tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
|
2
(4) |
3
|
4
(2) |
5
|
6
|
7
(1) |
8
|
9
(15) |
10
(13) |
11
|
12
(2) |
13
|
14
(6) |
15
|
16
|
17
|
18
(26) |
19
|
20
(1) |
21
|
22
|
23
(1) |
24
(3) |
25
|
26
|
27
(37) |
28
|
29
(1) |
30
(4) |
|
|
|
|
|
From: Dimitri F. <ta...@us...> - 2003-06-30 11:27:07
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs1:/tmp/cvs-serv7559/db Modified Files: Tag: BRANCH-1-1 table.pinc Log Message: We add volume_todo columns on tasks and timetrack Index: table.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/table.pinc,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -u -r1.15 -r1.15.2.1 --- table.pinc 10 Feb 2003 20:32:49 -0000 1.15 +++ table.pinc 30 Jun 2003 11:27:03 -0000 1.15.2.1 @@ -329,6 +329,7 @@ "s_end" => array(type => "TS_TYPE", constraints => "NN", Desc => "scheduled end date"), "volume" => array(type => "float", constraints => "", Desc => "hours of work"), "volume_done" => array(type => "float", constraints => "", Desc => "hours worked"), + "volume_todo" => array(type => "float", constraints => "", Desc => "hours of work to do"), "status" => array(type => "ID_TYPE", constraints => "", Desc => "state of task"), "description" => array(type => "TX_TYPE", constraints => "", Desc => "description"), "creator" => array(type => "ID_TYPE", constraints => "", Desc => "creator ID"), @@ -449,6 +450,7 @@ "adr_id" => array(type => "ID_TYPE", constraints => "NN", Desc => "id of worker"), "link_id" => array(type => "ID_TYPE", constraints => "NN", Desc => "id of worked object"), "volume" => array(type => "float", constraints => "", Desc => "work volume in hours"), + "volume_todo" => array(type => "float", constraints => "", Desc => "work volume still to do in hours"), "t_start" => array(type => "TS_TYPE", constraints => "", Desc => "start of work"), "t_end" => array(type => "TS_TYPE", constraints => "", Desc => "end of work"), "description" => array(type => "VARCHAR", size => 60, constraints => "", Desc => "description"), |
From: Dimitri F. <ta...@us...> - 2003-06-30 10:05:35
|
Update of /cvsroot/tutos/tutos/php/localization In directory sc8-pr-cvs1:/tmp/cvs-serv29691/localization Modified Files: Tag: BRANCH-1-1 en.p3 fr.p3 Log Message: Merging last developments into stable branch. Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/en.p3,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -u -r1.27 -r1.27.2.1 --- en.p3 23 Mar 2003 08:26:14 -0000 1.27 +++ en.p3 30 Jun 2003 10:05:31 -0000 1.27.2.1 @@ -19,7 +19,8 @@ # English Texts # $lang['PleaseLogin'] = "Please login"; -$lang['PleaseCookies'] = "Please enable cookies for this site"; +$lang['Welcome_1'] = "Welcome %s"; +$lang['Welcome_2'] = "last login was %s from %s"; $lang['Password'] = "Password"; $lang['Username'] = "Username"; $lang['MOTD'] = "The message of today"; @@ -397,6 +398,7 @@ $lang['MailSubject'] = "Subject"; $lang['MailSent'] = "sending mail %s to %s."; $lang['MailSentCc'] = "sending mail %s (Cc) to %s."; +$lang['MailSentBcc'] = "sending mail %s (Bcc) to %s."; $lang['MailCard'] = "Card of %s"; $lang['MailAttachmentNew'] = "Attachment"; @@ -424,6 +426,7 @@ $lang['Tasks'] = "Tasks"; $lang['TaskDetail'] = "Task Detail"; $lang['TaskCreate'] = "Task Create"; +$lang['TaskNewSubtask'] = "New subtask"; $lang['TaskCreateInfo'] = "create a new subtask of %s"; $lang['TaskDelete'] = "Delete Task %s"; $lang['TaskModify'] = "Modify Task %s"; @@ -433,8 +436,9 @@ $lang['TaskState'] = "State"; $lang['TaskDesc'] = "ToDo"; $lang['TaskWorker'] = "Assigned to"; -$lang['TaskVolumeFull'] = "Work Volume"; +$lang['TaskVolumeFull'] = "Planned Work Volume"; $lang['TaskVolumeDone'] = "Volume done"; +$lang['TaskVolumeTodo'] = "Volume to do"; $lang['TaskSubTask'] = "Subtask of"; $lang['hours'] = "hours"; $lang['TaskCreation'] = "created by %s on %s"; @@ -724,12 +728,12 @@ $lang['SalesForecastRep'] = "Sales Forecast Report"; $lang['UndefinedEndDate'] = "Unknown enddate"; $lang['SalesBalanced'] = "Balanced Sales"; -$lang["AccumulatedRevenue"] = "Accumulated revenue"; -$lang["PeriodRevenue"] = "Revenue per Period"; -$lang["Period"] = "Period"; -$lang["Est_revenue"] = "Estimated revenue"; -$lang["Graph"] = "Graph"; -$lang["GraphInfo"] = "Show in a graph"; +$lang['AccumulatedRevenue'] = "Accumulated revenue"; +$lang['PeriodRevenue'] = "Revenue per Period"; +$lang['Period'] = "Period"; +$lang['Est_revenue'] = "Estimated revenue"; +$lang['Graph'] = "Graph"; +$lang['GraphInfo'] = "Show in a graph"; # Permissions $lang['perm'][usecalendar] = "use calendar"; @@ -774,8 +778,8 @@ $lang['Err0025'] = "Missing Username or Password"; $lang['Err0026'] = "Login not possible"; $lang['Err0027'] = "Login failed"; - - +$lang['Err0028'] = "Account deleted"; +$lang['Err0029'] = "Missing senders email address"; $lang['Err0030'] = "Fax was not spooled !"; $lang['Err0031'] = "Missing Fax Number !"; $lang['Err0032'] = "Fax sending is diasabled !"; @@ -799,7 +803,7 @@ $lang['Err0050'] = "Could not find CSV contents !"; $lang['Err0051'] = "Could not find CSV Separator"; $lang['Err0052'] = "You must provide a classification"; - +$lang['Err0053'] = "You cannot delete your own user entry"; $lang['Err0054'] = "Sorry, due to permissions, you are not allowed to create a %s"; ### Local Variables: *** Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/fr.p3,v retrieving revision 1.23.2.2 retrieving revision 1.23.2.3 diff -u -r1.23.2.2 -r1.23.2.3 --- fr.p3 4 Jun 2003 12:38:51 -0000 1.23.2.2 +++ fr.p3 30 Jun 2003 10:05:31 -0000 1.23.2.3 @@ -16,7 +16,8 @@ # French Texts # $lang['PleaseLogin'] = "Veuillez vous identifier"; -$lang['PleaseCookies'] = "Veuillez authoriser les cookies SVP"; +$lang['Welcome_1'] = "Welcome %s"; +$lang['Welcome_2'] = "last login was %s from %s"; $lang['Password'] = "Mot de Passe"; $lang['Username'] = "Nom d'utilisateur"; $lang['MOTD'] = "Le message du jour"; @@ -27,7 +28,7 @@ $lang['StartDate'] = "Date de debut"; $lang['StartTime'] = "Heure de debut"; $lang['AppStart'] = "Démarrer"; -$lang['AppCreatedBy'] = "Créé par"; +$lang['AppCreatedBy'] = "Crée par"; $lang['EndDate'] = "Date de fin"; $lang['EndTime'] = "Heure de fin"; $lang['AppEnd'] = "Fin"; @@ -43,9 +44,9 @@ $lang['IgnoreTime2'] = "(i.e. l'évenement n'a pas<br>d'heure precise)"; $lang['forphrase'] = "pour"; $lang['nextweek'] = "Semaine suivante"; -$lang['lastweek'] = "Semaine précédente"; +$lang['lastweek'] = "Semaine précedente"; $lang['plus4weeks'] = "4 semaines suivantes"; -$lang['minus4weeks'] = "4 semaines précédentes"; +$lang['minus4weeks'] = "4 semaines précedentes"; $lang['only'] = "Seulement"; $lang['reload'] = "Rafraîchir"; $lang['changeapp'] = "Voir ou changer ce rendez-vous (%s - %s)"; @@ -143,7 +144,7 @@ $lang['OrderBy'] = "Tri croissant par %s"; $lang['RevOrderBy'] = "Tri décroissant par %s"; $lang['Export'] = "Exporter"; -$lang['ExportInfo'] = "Exporter les données sous la forme d'un fichier"; +$lang['ExportInfo'] = "Export data as file"; $lang['withmarked'] = "Pour les %s sélectionnées "; $lang['SetTo'] = "Positionner %s à %s"; $lang['pcs'] = "pièces"; @@ -158,7 +159,7 @@ $lang['NewAppoint'] = "Nouveau rendez-vous"; $lang['NewAppointR'] = "Nouveau rendez-vous périodique"; $lang['NewAppointInfo'] = "Créer un nouveau rendez-vous"; -$lang['NewAppointInfoR'] = "Créer un nouveau rendez-vous périodique"; +$lang['NewAppointInfoR'] = "Créer un nouveau rendez-vous periodique)"; $lang['AppointDetail'] = "Détail du Rendez-vous"; $lang['AppointModify'] = "Changer ce rendez-vous"; $lang['AppointCreate'] = "Créer un Rendez-vous"; @@ -174,7 +175,7 @@ $lang['AppFirstDate'] = "Date de debut"; $lang['AppLastDate'] = "Date de fin"; $lang['AppNoLastDate'] = "Pas de date de fin"; -$lang['AppRepeatType'] = "Périodicité"; +$lang['AppRepeatType'] = "Périodicite"; $lang['AppRepeatDay'] = "Quotidien"; $lang['AppRepeatWeek'] = "Hebdomadaire, même jour"; $lang['AppRepeatMonth'] = "Mensuel, même jour"; @@ -243,17 +244,17 @@ $lang['UserUnknown'] = "Utilisateur inconnu"; $lang['UserLastSeen'] = "Dernière connexion"; $lang['UserLastHost'] = "En provenance de"; -$lang['UserAdmin'] = "Administration"; +$lang['UserAdmin'] = "Administrateur"; $lang['UserLanguage'] = "Langue"; $lang['UserTimezone'] = "Zone horaire"; $lang['UserTheme'] = "Thème"; -$lang['UserLayout'] = "Calque"; +$lang['UserLayout'] = "Layout"; $lang['UserHoliday'] = "Vacances"; -$lang['UserNamedays'] = "Affichage des saints pour les jours"; +$lang['UserNamedays'] = "Namedays"; $lang['UserWorkdays'] = "Jours ouvrés"; $lang['UserWeekstart'] = "Début de semaine"; $lang['UserDisabled'] = "Désactiver le compte"; -$lang['UserDefaultGrp'] = "groupes par défaut pour le nouveaux objets"; +$lang['UserDefaultGrp'] = "defaultgroups for new objects"; # Bugs $lang['Bug'] = "Incident"; @@ -265,15 +266,15 @@ $lang['BugClass'] = "Type"; $lang['BugShort'] = "Description"; $lang['BugLong'] = "Détail"; -$lang['BugCreator'] = "Créé par"; -$lang['BugCreation'] = "Créé par %s sur %s"; +$lang['BugCreator'] = "Crée par"; +$lang['BugCreation'] = "Crée par %s sur %s"; $lang['BugProduct'] = "Produit/Projet"; $lang['BugReference'] = "Réferent"; $lang['BugSolvedBy'] = "Résolu par"; $lang['BugClosedBy'] = "Fermé par"; $lang['BugAssignedTo'] = "Assigné a"; $lang['BugModify'] = "Modifier un incident"; -$lang['BugModifyI'] = "Modifier l'incident: %s"; +$lang['BugModifyI'] = "Modifier le Bug %s"; $lang['BugCreate'] = "Créer un ticket d'incident"; $lang['BugCreateInfo'] = "Créer un ticket pour %s"; $lang['BugDeleteI'] = "Effacer ce ticket d'incident %s"; @@ -335,7 +336,7 @@ $lang['ProdRole'][7] = "Fournisseur"; $lang['ProdRole'][8] = "Revendeur"; $lang['ProdRole'][9] = "Partenaire"; -$lang['ProdRole'][10] = "Projet principal"; +$lang['ProdRole'][10] = "Project principal"; $lang['ProdRole'][11] = "Projet prédécesseur"; $lang['ProdRole'][12] = "Projet successeur"; $lang['ProdRole'][13] = "Sous projet"; @@ -367,13 +368,13 @@ $lang['ProdCreateInfo'] = "Créer un nouveau produit ou projet"; $lang['ProdDelInfo'] = "Supprimer le projet %s"; $lang['ProdModInfo'] = "Modifier le produit/projet %s"; -$lang['ProdCreator'] = "Créé par"; -$lang['ProdCreation'] = "Créé par %s le %s"; -$lang['ProdCreationS'] = "Créé le"; -$lang['ProdStart'] = "estimation du lancement"; -$lang['ProdEnd'] = "estimation de la fin"; +$lang['ProdCreator'] = "Crée par"; +$lang['ProdCreation'] = "Crée par %s le %s"; +$lang['ProdCreationS'] = "Crée le"; +$lang['ProdStart'] = "est. démarre"; +$lang['ProdEnd'] = "est. terminé"; $lang['ProdProb'] = "Probabilité"; -$lang['ProdModifyT'] = "Modifier ce produit / projet"; +$lang['ProdModifyT'] = "Modifer ce produit / projet"; $lang['ProdCreateT'] = "Créer un nouveau produit / projet"; $lang['ProdSelInfo'] = "(Laisser vide pour voir tous les produits/projets)"; $lang['ProdLinkInfo'] = "Voir produit/projet %s"; @@ -394,8 +395,9 @@ $lang['MailSubject'] = "Sujet"; $lang['MailSent'] = "Envoie de l'email %s à %s."; $lang['MailSentCc'] = "Envoie de l'email %s (Cc) à %s."; +$lang['MailSentBcc'] = "Envoie de l'email %s (Bcc) à %s."; $lang['MailCard'] = "Carte de %s"; -$lang['MailAttachmentNew'] = "Attachement"; +$lang['MailAttachmentNew'] = "Attachment"; # ACL $lang['AclModify'] = "Changer les permissions"; @@ -421,6 +423,7 @@ $lang['Tasks'] = "Tâches"; $lang['TaskDetail'] = "Détail tâche"; $lang['TaskCreate'] = "Créer tâche"; +$lang['TaskNewSubtask'] = "Nouvelle sous-tâche"; $lang['TaskCreateInfo'] = "Créer une nouvelle sous-tâche de %s"; $lang['TaskDelete'] = "Supprimer tâche %s"; $lang['TaskModify'] = "Modifer tâche %s"; @@ -430,21 +433,22 @@ $lang['TaskState'] = "État"; $lang['TaskDesc'] = "À faire"; $lang['TaskWorker'] = "À faire par"; -$lang['TaskVolumeFull'] = "Charge de travail"; +$lang['TaskVolumeFull'] = "Charge de travail prévue"; $lang['TaskVolumeDone'] = "Travail effectué"; +$lang['TaskVolumeTodo'] = "Charge de travail restant"; $lang['TaskSubTask'] = "Sous-tâche de"; $lang['hours'] = "Heures"; -$lang['TaskCreation'] = "Créé par %s sur %s"; +$lang['TaskCreation'] = "Créer par %s sur %s"; $lang['TaskStates'][0] = "Pre"; $lang['TaskStates'][1] = "En cours"; $lang['TaskStates'][2] = "Terminée"; -$lang['TaskStates'][3] = "En retard"; +$lang['TaskStates'][3] = "Overdue"; $lang['TaskS_Start'] = "Démarrage prévu"; $lang['TaskS_End'] = "Fin prévue"; $lang['TaskSched'] = "Plannifiée"; $lang['TaskReal'] = "réel"; $lang['TaskLinkInfo'] = "Voir tâche %s"; -$lang['TaskCompleted'] = "Complétée a %3.2f pour cent"; +$lang['TaskCompleted'] = "Completée a %3.2f pour cent"; $lang['Completed'] = "Complété"; $lang['Reschedule'] = "Décaler"; $lang['Reschedule_s'] = "Décaler le début"; @@ -458,29 +462,29 @@ $lang['ImportConfirm'] = "Confirmer l'import"; # Gantt Diagramm -$lang['GanttLink'] = "Voir Gantt"; -$lang['GanttLinkInfo'] = "Diagramme de Gantt"; -$lang['GanttTitle'] = "Diagramme de GANTT"; -$lang['GanttStart'] = "Date de début"; -$lang['GanttEnd'] = "Date de fin"; -$lang['GanttVolume'] = "Volume d'heures"; -$lang['GanttCompletion'] = "Complété"; +$lang['GanttLink'] = "See the Gantt"; +$lang['GanttLinkInfo'] = "Gantt diagramm"; +$lang['GanttTitle'] = "GANTT diagramm"; +$lang['GanttStart'] = "Begin date"; +$lang['GanttEnd'] = "End date"; +$lang['GanttVolume'] = "hour volume"; +$lang['GanttCompletion'] = "Completed"; # Company -$lang['Company'] = "Société"; -$lang['Companies'] = "Sociétés"; -$lang['CompanySearch'] = "Rechercher société"; -$lang['CompanyOverview'] = "Aperçu société "; -$lang['CompanyDetail'] = "Details société"; -$lang['CompanyModify'] = "Modifier société"; -$lang['CompanyCreate'] = "Créer société"; -$lang['CompanyCreateInfo'] = "Créer une nouvelle société"; -$lang['CompanyApps'] = "Reunions avec cette société"; +$lang['Company'] = "Societe"; +$lang['Companies'] = "Companies"; +$lang['CompanySearch'] = "Recherche societe"; +$lang['CompanyOverview'] = "Aperçu societe "; +$lang['CompanyDetail'] = "Details societe"; +$lang['CompanyModify'] = "Modifier societe"; +$lang['CompanyCreate'] = "Créer societe"; +$lang['CompanyCreateInfo'] = "Créer une nouvelle societe"; +$lang['CompanyApps'] = "Reunions avec cette societe"; $lang['CompanyLinks'] = "Liens"; -$lang['CompanyChgInfo'] = "Modifier société %s"; -$lang['CompanyDelInfo'] = "Supprimer société %s"; -$lang['CompanyMembers'] = "Membres de la société"; -$lang['CompanyLinkInfo'] = "Voir société %s"; +$lang['CompanyChgInfo'] = "Modifier societe %s"; +$lang['CompanyDelInfo'] = "Supprimer societe %s"; +$lang['CompanyMembers'] = "Membres de la societe"; +$lang['CompanyLinkInfo'] = "Voir societe %s"; # Department $lang['Department'] = "Service"; @@ -501,32 +505,32 @@ # Team $lang['Team'] = "Equipe"; $lang['Teams'] = "Equipes"; -$lang['TeamOverview'] = "Aperçu équipe"; -$lang['TeamDetail'] = "Détails équipe"; -$lang['TeamModify'] = "Modifier équipe"; -$lang['TeamCreate'] = "Créer équipe"; -$lang['TeamMember'] = "Membre de l'équipe"; +$lang['TeamOverview'] = "Aperçu equipe"; +$lang['TeamDetail'] = "Details equipe"; +$lang['TeamModify'] = "Modifier equipe"; +$lang['TeamCreate'] = "Créer equipe"; +$lang['TeamMember'] = "Membre de l'equipe"; $lang['TeamPosMember'] = "Membre potentiel"; -$lang['TeamMail'] = "Envoyer un email a l'équipe"; -$lang['TeamMailInfo'] = "Envoyer un email a l'équipe %s"; -$lang['TeamApps'] = "Voir le planning de l'équipe %s"; -$lang['TeamLinkInfo'] = "Voir équipe %s"; -$lang['TeamManager'] = "Responsable d'équipe"; -$lang['TeamName'] = "Nom de l'équipe"; -$lang['TeamCreation'] = "Créée le"; +$lang['TeamMail'] = "Envoyer un email a l'equipe"; +$lang['TeamMailInfo'] = "Envoyer un email a l'equipe %s"; +$lang['TeamApps'] = "Voir le planning de l'equipe %s"; +$lang['TeamLinkInfo'] = "Voir equipe %s"; +$lang['TeamManager'] = "Afficher les responsables"; +$lang['TeamName'] = "Nom de l'equipe"; +$lang['TeamCreation'] = "Cree le"; $lang['TeamCount'] = "Nombre de membres"; -$lang['TeamOverviewInfo'] = "Voir la liste de toutes les équipes"; -$lang['TeamCreateI'] = "Créer une nouvelle équipe"; -$lang['TeamDeleteI'] = "Supprimer équipe %s"; -$lang['TeamModifyI'] = "Modifier équipe %s"; -$lang['TeamSearch'] = "Recherche d'équipe"; -$lang['SearchForTeam'] = "Chercher des équipes"; +$lang['TeamOverviewInfo'] = "Voir la liste de toutes les equipes"; +$lang['TeamCreateI'] = "Créer une nouvelle equipe"; +$lang['TeamDeleteI'] = "Supprimer equipe %s"; +$lang['TeamModifyI'] = "Modifier equipe %s"; +$lang['TeamSearch'] = "Team Search"; +$lang['SearchForTeam'] = "Search for teams"; # Address -$lang['AddressSearch'] = "Rechercher un contact"; -$lang['AddressOverview'] = "Aperçu d'un contact"; -$lang['AddressDetail'] = "Details d'un contact"; -$lang['Address'] = "Contact"; +$lang['AddressSearch'] = "Rechercher adresse"; +$lang['AddressOverview'] = "Aperçu adresse"; +$lang['AddressDetail'] = "Details adresse"; +$lang['Address'] = "Adresse"; $lang['AddressEntries'] = "Entrees du repertoire"; $lang['AdrLocChange'] = "Changer l'adresse de %s"; $lang['AdrLocCreate'] = "Créer une adresse pour %s"; @@ -536,7 +540,7 @@ $lang['AdrBDelInfo'] = "Supprimer les info. et adresses de %s"; $lang['AdrBNew'] = "Nouveau"; $lang['AdrBNewInfo'] = "Entrer de nouvelles info."; -$lang['AdrCreateInfo'] = "Entrer un nouveau contact"; +$lang['AdrCreateInfo'] = "Entrer une nouvelle adresse"; $lang['AdrLNew'] = "Nouvelle adresse"; $lang['AdrLNewInfo'] = "Entrer une nouvelle adresse pour %s"; $lang['AdrName'] = "Nom"; @@ -547,7 +551,7 @@ $lang['AdrSeeEntryI'] = "Voir le repertoire de %s"; $lang['AdrLocTitle'] = "Adresse de %s"; $lang['AdrBNewTitle'] = "Entrer une nouvelle adresse"; -$lang['AdrBChangeTitle'] = "Modifier un contact"; +$lang['AdrBChangeTitle'] = "Changer une adresse"; $lang['Location'] = "Identifiant"; $lang['Location2'] = "Lieu"; @@ -572,14 +576,14 @@ $lang['Phone'] = "Tel"; $lang['AdrFax'] = "Fax"; $lang['AdrEmail'] = "Email"; -$lang['acc_info1'] = "Banque"; -$lang['acc_info2'] = "Banque"; -$lang['acc_nr'] = "No de compte"; +$lang['acc_info1'] = "Bank Account"; +$lang['acc_info2'] = "Bank Account"; +$lang['acc_nr'] = "Account Nr"; $lang['ChangeLocInfo'] = "Changer l'adresse %s de %s"; $lang['DeleteLocInfo'] = "Supprimer l'adresse %s de %s"; $lang['AdrLinks'] = "Liens"; $lang['AdrCategory'] = "Catégorie"; -$lang['AdrDescription'] = "Nom de l'adresse dans le répertoire"; +$lang['AdrDescription'] = "Nom dans le répertoire"; $lang['ShowCal'] = "Voir le calendrier de %s"; $lang['SearchForAdr'] = "Chercher dans le répertoire"; $lang['SearchForAdrExt'] = "Recherche étendue dans le répertoire"; @@ -606,7 +610,7 @@ $lang['ResCalDetail'] = "Utilisation des ressources pour %s dans %s"; # X.509v3-Certs -$lang['Certificate'] = "Certificat"; +$lang['Certificate'] = "Certificate"; # MAP $lang['MapSearch'] = "Sélection de la carte"; @@ -614,13 +618,13 @@ # History $lang['HistoryDetail'] = "%s Historique"; -$lang['HistoryShow'] = "Historique de %s %s"; +$lang['HistoryShow'] = "Historque de %s %s"; $lang['HistoryFld'] = "Champs"; $lang['HistoryOldV'] = "Ancienne Valeur"; $lang['HistoryNewV'] = "Nouvelle Valeur"; $lang['HistoryLink'] = "Voir l'historique"; $lang['HistoryLinkI'] = "Voir l'historique de %s"; -$lang['HistoryDeleted'] = "Jusqu'à effacement"; +$lang['HistoryDeleted'] = "Jusqu'à destruction"; #Timetrack $lang['Timetrack'] = "Effort"; @@ -638,8 +642,8 @@ $lang['SearchForTT'] = "Rechercher journal"; $lang['SearchForTTExt'] = "Recherche journal etendue"; $lang['TimetrackBetween'] = "Entre"; -$lang['TimetrackBooked'] = "Journal"; -$lang['TimetrackBookedI'] = "Journal d'activitées pour %s"; +$lang['TimetrackBooked'] = "Enregistrement"; +$lang['TimetrackBookedI'] = "Enregistrement pour %s"; $lang['TTStatsTitle'] = "Statistiques"; $lang['TTcph'] = "Coût horaire"; $lang['TTState'] = "État"; @@ -676,13 +680,13 @@ $lang['AdminDBTable'] = "Table"; $lang['AdminDBCount'] = "Entrées"; $lang['AdminDBName'] = "Nom de la Base"; -$lang['AdminDBAlias'] = "Alias de la base"; +$lang['AdminDBAlias'] = "Database Alias"; $lang['AdminDBUser'] = "Utilisateur de la base"; $lang['AdminDBPass'] = "Mot de passe"; $lang['AdminDBHost'] = "Hôte"; $lang['AdminDBPort'] = "Port"; $lang['AdminDBType'] = "Type"; -$lang['AdminDBHome'] = "Home de la base de données oracle"; +$lang['AdminDBHome'] = "ORA_HOME"; $lang['AdminLoginInfo'] = "Messages récents"; $lang['AdminDBSync'] = "Synchronisation de Bases"; $lang['AdminDBSource'] = "Source DB"; @@ -693,14 +697,14 @@ # Database $lang['DB'] = "Base de données"; $lang['DBInit'] = "Initialisation de la Base"; -$lang['DBModify'] = "Modification de la base"; +$lang['DBModify'] = "odification de la base"; $lang['DBModifyI'] = "Modifier la base %s"; $lang['DBCreate'] = "Créer une base de données"; $lang['DBDetail'] = "Détail de la base de données"; $lang['DBLastDate'] = "Date de la dernière synchronisation"; $lang['DBCurrID'] = "ID"; $lang['DBLastID'] = "LastSync ID"; -$lang['DBLastAnalyze'] = "ID de la dernière synchronisation"; +$lang['DBLastAnalyze'] = "dernière analyse"; $lang['DBrelogin'] = "utiliser la base de données"; $lang['DBreloginI'] = "reloguer sur %s"; $lang['DBOverview'] = "Aperçu de la base de données"; @@ -721,12 +725,12 @@ $lang['SalesForecastRep'] = "Rapport des prévisions de ventes"; $lang['UndefinedEndDate'] = "date de fin inconnue"; $lang['SalesBalanced'] = "Balance des ventes"; -$lang["AccumulatedRevenue"] = "revenus accumulés "; -$lang["PeriodRevenue"] = "Revenus par période"; -$lang["Period"] = "Période"; -$lang["Est_revenue"] = "Revenus estimés"; -$lang["Graph"] = "Graphique"; -$lang["GraphInfo"] = "Voir dans un graphique"; +$lang['AccumulatedRevenue'] = "revenus accumulés "; +$lang['PeriodRevenue'] = "Revenus par période"; +$lang['Period'] = "Période"; +$lang['Est_revenue'] = "Revenus estimés"; +$lang['Graph'] = "Graphique"; +$lang['GraphInfo'] = "Voir dans un graphique"; # Permissions $lang['perm'][usecalendar] = "Utiliser le calendrier"; @@ -760,6 +764,8 @@ $lang['Err0025'] = "Nom d'utilisateur ou mot de passe manquant"; $lang['Err0026'] = "Impossible de se connecter"; $lang['Err0027'] = "Échec de connexion"; +$lang['Err0028'] = "Account deleted"; +$lang['Err0029'] = "Missing senders email address"; $lang['Err0030'] = "Votre Fax n'a pu être mis en file d'attente !"; $lang['Err0031'] = "Numero de Fax manquant !"; $lang['Err0032'] = "Envoie de Fax désactive !"; @@ -783,6 +789,7 @@ $lang['Err0050'] = "Contenu du fichier CSV introuvable !"; $lang['Err0051'] = "Séparateur du fichier CSV introuvable !"; $lang['Err0052'] = "Veuillez préciser la classification du projet !"; +$lang['Err0053'] = "You cannot delete your own user entry"; $lang['Err0054'] = "Désolé,mais vous n'avez pas la permission de créer cet élément : %s"; ### Local Variables: *** |
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv29691 Modified Files: Tag: BRANCH-1-1 Date.pinc address_ins.php bug_ins.php bug_show.php config_default.pinc permission.p3 product_show.php task.pinc task_ins.php task_new.php task_overview.php task_show.php timetrack.pinc timetrack_ins.php user_ins.php webelements.p3 Log Message: Merging last developments into stable branch. Index: Date.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v retrieving revision 1.74.2.1 retrieving revision 1.74.2.2 diff -u -r1.74.2.1 -r1.74.2.2 --- Date.pinc 9 May 2003 08:27:28 -0000 1.74.2.1 +++ Date.pinc 30 Jun 2003 10:05:28 -0000 1.74.2.2 @@ -65,10 +65,10 @@ include "localization/holiday_custom.pinc"; } - @reset($tutos[holiday]); - while( list ($i,$f) = @each ($tutos[holiday])) { + foreach($tutos[holiday] as $i => $f) { $i = strtolower($i); - if ( ($f == 1) && ($current_user->holiday[$i] == 1) ) { + if ( ($f == 1) && ($current_user->holiday[$i] == 1) ) { +error_reporting(E_ALL); include "localization/holiday_". $i .".pinc"; } } @@ -583,6 +583,16 @@ $this->sec = (integer)$regs[6]; $this->format = 10; } else + if ( ereg( "^([0-9]{4}).([0-9]{1,2}).([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { + # Init via DB 2003-06-04 17:00:26 Postgres 7.3 + $this->year = (integer)$regs[1]; + $this->month = (integer)$regs[2]; + $this->day = (integer)$regs[3]; + $this->hour = (integer)$regs[4]; + $this->min = (integer)$regs[5]; + $this->sec = (integer)$regs[6]; + $this->format = 9; + } else if ( ereg( "^([0-1][0-9])([0-3][0-9])([0-9]{4})$", $str, $regs ) ) { # Init via DB MMDDYYYY $this->month = (integer)$regs[1]; @@ -959,6 +969,11 @@ function lessthan( &$DateObj ) { return( $this->ts < $DateObj->ts ); + } + + /* Ala strcmp : returns <0, 0 or >0... */ + function datecmp( &$DateObj ) { + return $this->ts - $DateObj->ts; } } ?> Index: address_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/address_ins.php,v retrieving revision 1.38.2.1 retrieving revision 1.38.2.2 diff -u -r1.38.2.1 -r1.38.2.2 --- address_ins.php 18 Jun 2003 13:50:37 -0000 1.38.2.1 +++ address_ins.php 30 Jun 2003 10:05:29 -0000 1.38.2.2 @@ -127,6 +127,7 @@ if ( $msg == "" ) { $a->setBirthday($birthday); + $newobj = $a->id<0; $dbconn->Begin("WORK"); $msg = $a->save(); if ( $savefile == 1 ) { @@ -137,11 +138,11 @@ } $dbconn->Commit("WORK"); - $gotourl = "address_new.php?id=". $a->id; + #$gotourl = web_StackPop($newobj?2:3); + $gotourl = web_StackPop(2); } - $_SESSION['MSGID'.$a->id] = UrlEncode($msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". $a->id); + $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); Index: bug_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bug_ins.php,v retrieving revision 1.32.2.1 retrieving revision 1.32.2.2 diff -u -r1.32.2.1 -r1.32.2.2 --- bug_ins.php 18 Jun 2003 14:22:22 -0000 1.32.2.1 +++ bug_ins.php 30 Jun 2003 10:05:29 -0000 1.32.2.2 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2003 by Gero Kohnert + * Copyright 1999 - 2002 by Gero Kohnert * * this script parses all the inputs and stores the object into the database. * on completition it jumps to the detail screen of the stored object @@ -94,6 +94,7 @@ return; } + $newobj = false; # # Old Bug # @@ -138,6 +139,7 @@ $b->description = sprintf("%s\n%s" ,rtrim($b->description) , $newlines); } } else { + $newobj = true; # # New Bug # @@ -160,7 +162,7 @@ $b->setSolver(current($b->parent->product->role[PROD_ROLE_MANAGER2])); } else { $b->setSolver($current_user); - } + } } else { $b->setSolver($current_user); } @@ -175,9 +177,9 @@ $dbconn->Commit("WORK"); - $gotourl = $b->getURL(); - $_SESSION['MSGID'.$b->id] = UrlEncode($msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". $b->id); + #$gotourl = web_StackPop($newobj?2:3); + $gotourl = web_StackPop(2); + $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); @@ -187,4 +189,4 @@ * CVS Info: $Id$ * $Author$ */ -?> \ No newline at end of file +?> Index: bug_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bug_show.php,v retrieving revision 1.53.2.1 retrieving revision 1.53.2.2 diff -u -r1.53.2.1 -r1.53.2.2 --- bug_show.php 14 Jun 2003 10:19:58 -0000 1.53.2.1 +++ bug_show.php 30 Jun 2003 10:05:29 -0000 1.53.2.2 @@ -96,7 +96,7 @@ echo "</tr><tr>\n"; echo $this->showfield($lang['BugHistory']); echo " <td class=\"pre\" colspan=\"3\">"; - echo "<pre>\n". wordwrap(urlReplace($this->obj->description,0),80) ."\n</pre></td>\n"; + echo "<pre>\n". urlReplace($this->obj->description,0) ."\n</pre></td>\n"; echo "</tr>\n"; show_module_infolists($this->user,$this->obj,4,$this->format); @@ -137,7 +137,8 @@ $this->addmenu($x); if ( $this->user->feature_ok(usebugtracking,PERM_NEW) ) { - $x = array( url => "bug_new.php", + # Pre select the same project as the one of the current bug + $x = array( url => "bug_new.php?pid=".$this->obj->parent->id, text => $lang['NewEntry'], info => $lang['CreateNewBug'], category => array("bug","new","obj") @@ -160,6 +161,7 @@ # add this page to the browsehistory of the users session $this->addtohistory(); + web_StackStartLayoutObj($this); } } Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.56.2.2 retrieving revision 1.56.2.3 diff -u -r1.56.2.2 -r1.56.2.3 --- config_default.pinc 27 Jun 2003 14:07:45 -0000 1.56.2.2 +++ config_default.pinc 30 Jun 2003 10:05:29 -0000 1.56.2.3 @@ -411,6 +411,7 @@ $tutos[layouts] = array(); $tutos[layouts][] = "classic_layout"; $tutos[layouts][] = "test_layout"; +$tutos[layouts][] = "adq_layout"; # # Timezones in TUTOS (these timezones must be known to your OS !!) # (Max length 30 Characters) @@ -599,7 +600,7 @@ # Doing some debugging logs in messages tables # (This will fill the messages table and the file $tutos[errlog]) # -$tutos[debug]=0; +$tutos[debug]=1; # # Where to put the log output for developing and bughunting # ATTENTION: On Windows Change this to something your system understands !!! @@ -619,6 +620,6 @@ # # The TUTOS Version number # -$tutos[version]="1.1.20030522"; +$tutos[version]="1.1beta.20030314"; # ?> Index: permission.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/permission.p3,v retrieving revision 1.118.2.3 retrieving revision 1.118.2.4 diff -u -r1.118.2.3 -r1.118.2.4 --- permission.p3 18 Jun 2003 13:50:37 -0000 1.118.2.3 +++ permission.p3 30 Jun 2003 10:05:29 -0000 1.118.2.4 @@ -31,12 +31,8 @@ # We do that ourself ini_set("session.use_trans_sid","0"); -if (isset($_SERVER['REQUEST_URI'])) { - $xxxx = split("/",$_SERVER['REQUEST_URI']); - ini_set("session.cookie_path","/". $xxxx[1]); -} else { - ini_set("session.cookie_path","/"); -} +$xxxx = split("/",$_SERVER['REQUEST_URI']); +ini_set("session.cookie_path","/". $xxxx[1]); #ini_set("file_uploads","On"); ini_set("register_globals","Off"); ini_set("register_argc_argv","Off"); @@ -187,27 +183,12 @@ global $lang ,$dbconn , $current_user,$tutos, $msg; # Take a possible transfered message to global namespace - # Stuff that is delivered in an unsecure way (GET/POST) will be - # handeld with HtmlEntities - $msg = ""; if ( isset($_POST['msg']) ) { - $msg .= HtmlEntities(UrlDecode($_POST['msg'])); + $msg = $_POST['msg']; } elseif ( isset($_GET['msg']) ) { - $msg .= HtmlEntities(UrlDecode($_GET['msg'])); - } elseif ( isset($_POST['msgid']) ) { - if (isset($_SESSION[$_POST['msgid']])) { - $msg .= UrlDecode($_SESSION[$_POST['msgid']]); - unset($_SESSION[$_POST['msgid']]); - } else { - $msg = "?"; - } - } elseif ( isset($_GET['msgid']) ) { - if (isset($_SESSION[$_GET['msgid']])) { - $msg .= UrlDecode($_SESSION[$_GET['msgid']]); - unset($_SESSION[$_GET['msgid']]); - } else { - $msg = "?"; - } + $msg = $_GET['msg']; + } else { + $msg = ""; } if ( isset($_COOKIE['TUTOS']) ) { @@ -281,7 +262,9 @@ } else { $tutos['SESSID'] = session_id(); $userid = -1; -# error_log("check_user: new session ". $tutos['SESSID'] ." :". $_SERVER['PHP_SELF'] .": userid=". $userid ."\n",3,$tutos[errlog]); + + error_log("check_user: new session ". $tutos['SESSID'] ." :". $_SERVER['PHP_SELF'] .": userid=". $userid ."\n",3,$tutos[errlog]); + # For login we use default language (via browser settings) if ( free_login($dbconn) == 1 ) { ReadLang($lang); @@ -293,11 +276,7 @@ } } # update the TTL - if (isset($_SERVER['REQUEST_URI'])) { - $xxxx = split("/",$_SERVER['REQUEST_URI']); - } else { - $xxxx[1] = ""; - } + $xxxx = split("/",$_SERVER['REQUEST_URI']); setcookie(session_name(),$tutos['SESSID'],time() + 60 * $tutos[timetolive],"/". $xxxx[1]); if ( ($userid < 1) OR !is_numeric($userid) ) { @@ -313,6 +292,8 @@ $auth->login_form($_SERVER['PHP_SELF'],$r[0]); } + error_log($auth->getuname(). "\n",3,$tutos[errlog]); + if ( $auth->getuname() == "" || $auth->getpw() == "" ) { /* No Username or no password supplied */ if ( free_login($dbconn) == 1 ) { @@ -326,15 +307,20 @@ $auth->init($dbconn); $r = $auth->check(); if ( is_array($r) ) { + error_log($r[0]."\n", 3, $tutos[errlog]); + error_log($r[1]."\n", 3, $tutos[errlog]); logmessage($r[0]); $auth->login_form($_SERVER['PHP_SELF'],$r[1]); } + #else + # error_log($r."\n", 3, $tutos[errlog]); + $_SESSION['userid'] = $current_user->id; $_SESSION['dbnr'] = $db; ReadLang($lang); - $msg .= "Welcome ". $current_user->getFullname(); - $msg .= "<br>last login was ". $current_user->last_seen->getDateTime()." from ".$current_user->last_host ."<br>\n"; + $msg .= sprintf($lang['Welcome_1'],$current_user->getFullname())."\n"; + $msg .= "<br>".sprintf($lang['Welcome_2'], $current_user->last_seen->getDateTime(),$current_user->last_host) ."<br>\n"; logmessage("check_user: Logged in ". $current_user->id .":". $current_user->login .":". $current_user->getFullname()); } else { @@ -344,7 +330,7 @@ $current_user->read($userid); ReadLang($lang); if ( $current_user->id == -1 ) { - $msg .= "<br>Account deleted"; + $msg .= "<br>". $lang['Err0028']; // account deleted logmessage($msg); $auth->logout(); $auth->login_form($_SERVER['PHP_SELF'],$msg); Index: product_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_show.php,v retrieving revision 1.77 retrieving revision 1.77.2.1 diff -u -r1.77 -r1.77.2.1 --- product_show.php 25 Mar 2003 19:18:28 -0000 1.77 +++ product_show.php 30 Jun 2003 10:05:30 -0000 1.77.2.1 @@ -168,7 +168,15 @@ echo "<tr>\n"; echo $this->showfield($lang['ProdTasks']); echo " <td valign=\"top\" colspan=\"3\">\n"; - echo $this->theme->getImage(folder,'list') ." ". makelink("task_overview.php?id=". $this->obj->id,$lang['TaskOverview'],sprintf($lang['TaskOverviewInfo'],$this->obj->getFullName())); + echo $this->theme->getImage(folder,'list') ." ". + makelink("task_overview.php?id=". + $this->obj->id, $lang['TaskOverview'], + sprintf($lang['TaskOverviewInfo'], + $this->obj->getFullName())); + + echo makelink("task_overview.php?id=".$this->obj->id."&fld=worker", + " [++] ", sprintf($lang['TaskOverviewInfo'], + $this->obj->getFullName())); echo "<br>\n"; $n = 1; $x = count($this->obj->tasklist); @@ -268,12 +276,6 @@ Function navigate() { global $tutos,$lang; - echo "<tr><th>".$lang['Product']."</th></tr>\n"; - echo "<tr><td>\n"; - - echo menulink("product_show.php?format=paper&id=".$this->obj->id,$lang['Printable'], $lang['PrintableInfo']); - echo "</td></tr>\n"; - echo "<tr><th>".$lang['Tasks']."</th></tr>\n"; echo "<tr><td>\n"; @@ -281,6 +283,10 @@ if ( $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { echo menulink("task_overview.php?id=".$this->obj->id,$lang['TaskOverview'],sprintf($lang['TaskOverviewInfo'], $this->obj->getFullName())); echo "<br>\n"; + + echo menulink("task_overview.php?id=".$this->obj->id."&fld=worker",$lang['TaskOverview']."++",sprintf($lang['TaskOverviewInfo'], $this->obj->getFullName())); + echo "<br>\n"; + if( $tutos[usejpgraph] ) { echo menulink("task_gantt.php?id=".$this->obj->id, $lang['TaskGantt']); echo "<br>\n"; @@ -297,6 +303,13 @@ // echo checklist::getaddlink($this->user,$this->obj); } echo "</td></tr>\n"; + + echo "<tr><th>".$lang['Product']."</th></tr>\n"; + echo "<tr><td>\n"; + + echo menulink("product_show.php?format=paper&id=".$this->obj->id,$lang['Printable'], $lang['PrintableInfo']); + echo "</td></tr>\n"; + } /** * prepare @@ -370,6 +383,7 @@ # add this page to the browsehistory of the users session $this->addtohistory(); + web_StackStartLayoutObj($this); } } Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.107.2.2 retrieving revision 1.107.2.3 diff -u -r1.107.2.2 -r1.107.2.3 --- task.pinc 27 Jun 2003 13:56:57 -0000 1.107.2.2 +++ task.pinc 30 Jun 2003 10:05:30 -0000 1.107.2.3 @@ -46,8 +46,19 @@ $f->sum['volume'] = $f->volume; $f->sum['volume_done'] = $f->volume_done; } - $obj->sum['volume'] += $f->sum['volume']; - $obj->sum['volume_done'] += $f->sum['volume_done']; + + // For address, we have to only count the work done by $obj... + if( $obj->getType() == "address" ) { + if( $obj->creator->id == $obj->id + || array_key_exists((int)$obj->id, $f->worker) ) { + $obj->sum['volume'] += $f->sum['volume']; + $obj->sum['volume_done'] += computeWorkedHours($obj, $f); + } + } + else { + $obj->sum['volume'] += $f->sum['volume']; + $obj->sum['volume_done'] += $f->sum['volume_done']; + } if ( ($min != -1) ) { if ( ($obj->min_start->ts != -1) ) { $obj->min_start->setDateTimeTS(min($min,$obj->min_start->ts)); @@ -86,6 +97,7 @@ $this->desc = ""; $this->volume = 0; $this->volume_done = 0; + $this->volume_todo = -1; $this->worker = array(); $this->s_start = new DateTime(); $this->s_end = new DateTime(); @@ -108,6 +120,7 @@ $this->state = $r->get($pos, "status"); $this->volume = $r->get($pos, "volume"); $this->volume_done = $r->get($pos, "volume_done"); + $this->volume_todo = $r->get($pos, "volume_todo"); $this->name = $r->get($pos, "name"); $this->desc = $r->get($pos, "description"); @@ -233,7 +246,7 @@ if ( empty($this->id) ) return; if ( -1 == $this->id ) return; - $query = "SELECT w_id FROM ". $this->tablename2 ." WHERE t_id = ". $this->id; + $query = "SELECT * FROM ". $this->tablename2 ." WHERE t_id = ". $this->id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); @@ -317,6 +330,12 @@ $this->setFloatField("volume_done",$value,"TaskVolumeDone"); } /** + * set the Volume Todo + */ + function setVolumeTodo($value) { + $this->setFloatField("volume_todo",$value,"TaskVolumeTodo"); + } + /** * set the parent */ function setParent($pid) { @@ -343,6 +362,7 @@ $q->addFV("p_id",$this->p_id,"INT"); $q->addFV("status",$this->state,"INT"); $q->addFV("volume",$this->volume,"FLOAT"); + $q->addFV("volume_todo",$this->volume_todo,"FLOAT"); $q->addFV("name",$this->name,"STRING",$table['task']['name'][size]); $q->addFV("description",$this->desc,"TEXT"); $q->addFV("r_start",$this->r_start,"DATETIME"); @@ -390,15 +410,23 @@ $this->saveWorker(); $msg .= parent::save(); - // if change is made by the user that is in solver list add timetrack for him - if ( ($this->diff != 0) && isset($cw) ) { + + # If the volume_done has been changed, we add a timetrack entry + if ( ($this->diff != 0) ) { $tt = new timetrack($this->dbconn); - $tt->worker = $cw; - $tt->link_id = $this->id; - $tt->ref = $this; - $tt->volume = $this->diff; - $tt->desc = $this->name; - $msg .= $tt->save(); + if( isset($cw) ) + // A worker has made the change + $tt->worker = $cw; + else + // The task creator or a mod_ok tutos user made the change... + $tt->worker = $current_user; + + $tt->link_id = $this->id; + $tt->ref = $this; + $tt->volume = $this->diff; + $tt->volume_todo = $this->volume_todo; + $tt->desc = $this->name; + $msg .= $tt->save($norec=1); } return $msg; } @@ -550,10 +578,12 @@ /** * get the type of object */ - function printRow (&$layout,$depth, &$parent, $fld = "") { + + function printRow (&$layout,$depth, &$parent, $fld = "", $slimit=0, $elimit=0) { global $lang, $tutos; -#echo $this->id ." XXX ". $parent->id ." <br>"; + #echo $this->id ." XXX ". $parent->id ." <br>"; + if ( ($parent->getType() == "address")||($parent->getType() == "team") ) { $norecur = 1; # print only unfinished tasks @@ -564,181 +594,210 @@ $norecur = 0; } - $c = $this->getCompletion(); - - echo $layout->OverviewRowStart($layout->line); - - switch( $parent->getType() ) { - case "address": { - /* We show the project name and the task name - * As we already know the person name, we should not have the need - * to display it (see Person Task Overview) - * - * That can take some times to complete... even with the - * $projects_tasks static var, keeping projects associations in - * memory, in order not to make too much data base access... - */ - global $projects_tasks; - if( !isset($projects_tasks) ) $projects_tasks = array(); - - $project = -1; - $obj = $this; - $ptasks = array(); - - // Walk through parents to find project - while( $project == -1 ) { - if( array_key_exists($obj->p_id, $projects_tasks) ) { - $ptasks[] = $obj->id; - $project = getObject($this->dbconn, $projects_tasks[$obj->p_id]); - } else { - $t = getObject($this->dbconn, $obj->p_id); - $ptasks[] = $obj->id; - if( $t->getType() != "task" ) { - // found first node - $project = &$t; - } else { - $obj = getObject($this->dbconn, $obj->p_id); - } - unset($t); - } - } - foreach( $ptasks as $pid ) { - $projects_tasks[$pid] = $project->id; - } - - echo " <td class=\"task". $this->state ."\" valign=\"top\" colspan=\"2\" nowrap> ". - $project->getLink() ." --> ". - $this->getLink()." </td>\n"; - break; - } - - case "team": { - echo " <td class=\"task". $this->state ."\" valign=\"top\" colspan=\"2\" nowrap> ". - $parent->getLink() ." --> ". - $this->getLink()." </td>\n"; - break; - } - - default: { - echo " <td class=\"task". $this->state ."\" align=\"right\" valign=\"top\"> ". $depth ." </td>\n"; - echo " <td valign=\"top\" nowrap><p> "; - for ($i = 0; $i <= $depth; $i++) { - echo " "; - } - echo $this->getLink()." "; - - if( $fld == "worker" ) { - echo "<p align=\"right\">".$lang['TaskWorker']; - $w = 0; - foreach ($this->worker as $i => $x) { - echo ($w %2 ? "<br>":" ").($w >0 ? ",":""). $this->worker[$i]->getLink(); - $w++; - } - } - echo "</td>\n"; - } - } # end of switch $parent->getType() - - echo " <td align=\"right\" valign=\"top\" nowrap>". - sprintf("%3.2f %%",$c ). - " <br> ". - hour_format($this->volume,2) ." / ". hour_format($this->volume_done,2) ." ". $lang['hours'] ." </td>\n"; - - echo " <td valign=\"top\" align=\"right\">". $this->s_start->getDate() ." </td>\n"; - - $w = 200; - $h = 32; # height - # seconds per pixel - $t = time(); - $max_end = max($parent->max_end->ts,$t); - $min_start = min($parent->min_start->ts,$t); - $p = ( ($max_end - $min_start) / $w); - if ( $p == 0 ) { + /* we limit the date range of printed tasks */ + if( $slimit == 0 && $elimit == 0 + || ($slimit != 0 && $elimit != 0 + && $slimit->datecmp($this->s_start) <= 0 + && ($elimit->datecmp($slimit) == 0 + || $elimit->datecmp($this->s_end) >= 0) )) { + + $c = $this->getcompletion(); + + echo $layout->OverviewRowStart($layout->line); + + switch( $parent->getType() ) { + case "address": { + /* We show the project name and the task name + * As we already know the person name, we should not have the need + * to display it (see Person Task Overview) + * + * That can take some times to complete... even with the + * $projects_tasks static var, keeping projects associations in + * memory, in order not to make too much data base access... + */ + global $projects_tasks; + if( !isset($projects_tasks) ) $projects_tasks = array(); + + $project = -1; + $obj = $this; + $ptasks = array(); + + // Walk through parents to find project + while( $project == -1 ) { + if( array_key_exists($obj->p_id, $projects_tasks) ) { + $ptasks[] = $obj->id; + $project = getObject($this->dbconn, $projects_tasks[$obj->p_id]); + } else { + $t = getObject($this->dbconn, $obj->p_id); + if( $t == -1 ) { + // Parent no longer exists ? + break; + } + $ptasks[] = $obj->id; + if( $t->getType() != "task" ) { + // found first node + $project = &$t; + } else { + $obj = getObject($this->dbconn, $obj->p_id); + } + unset($t); + } + } + foreach( $ptasks as $pid ) { + $projects_tasks[$pid] = $project->id; + } + + if( $this->getLink() != "" ) + echo " <td class=\"task". $this->state . + "\" valign=\"top\" colspan=\"2\" nowrap> ". + ($project != -1 ? $project->getLink() : "") ." --> ". + $this->getLink()." </td>\n"; + + break; + } + + case "team": { + echo " <td class=\"task". $this->state ."\" valign=\"top\" colspan=\"2\" nowrap> ". + $parent->getLink() ." --> ". + $this->getLink()." </td>\n"; + break; + } + + default: { + echo " <td class=\"task". $this->state ."\" align=\"right\" valign=\"top\"> ". $depth ." </td>\n"; + echo " <td valign=\"top\" nowrap><p> "; + for ($i = 0; $i <= $depth; $i++) { + echo " "; + } + echo $this->getLink()." "; + + if( $fld == "worker" ) { + echo "<p align=\"right\">".$lang['TaskWorker']; + $w = 0; + foreach ($this->worker as $i => $x) { + echo ($w %2 ? "<br>":" ").($w >0 ? ",":""). $this->worker[$i]->getLink(); + $w++; + } + } + echo "</td>\n"; + } + } // end of switch $parent->getType() + + // I have some strange bug where I reach non existing entities. + if( $this->getLink() == "" ) + return 0; + + // When displaying an address time overview, we have to compute + // the volume done by the $parent address ! + if( $parent->getType() == "address" ) { + $volume = $this->volume; + $volume_done = computeWorkedHours($parent, $this); + } + else { + $volume = $this->volume; + $volume_done = $this->volume_done; + } + + echo " <td align=\"right\" valign=\"top\" nowrap>" + .sprintf("%3.2f %%",$c ) + ." <br> " + .hour_format($volume_done,2) ." / ". hour_format($volume,2) + ." ". $lang['hours'] ." </td>\n"; + + echo " <td valign=\"top\" align=\"right\">" + .$this->s_start->getDate() ." </td>\n"; + + $w = 200; + $h = 32; // height + // seconds per pixel + $t = time(); + $max_end = max($parent->max_end->ts,$t); + $min_start = min($parent->min_start->ts,$t); + $p = ( ($max_end - $min_start) / $w); + if ( $p == 0 ) { # $p = 1; - } - - # from earliest to start - $x1 = round(($this->s_start->ts - $min_start)/$p); - $x1a = round( ($t - $min_start)/$p); - $x1b = round(( $this->s_start->ts - $t )/$p); - - $x2 = round(($this->s_end->ts - $this->s_start->ts)/$p); - - $x3 = round(($max_end - $this->s_end->ts)/$p); - $x3a = round(( $t - $this->s_end->ts)/$p); - $x3b = round( ($max_end - $t )/$p); - - - - echo " <td align=\"left\" colspan=\"2\" width=\"".($w +1)."\" nowrap>"; - - if ( $x1a + $x1b > 0 ) { - if ( $x1b < 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"".( $x1a + $x1b) ."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; - } else { - if ( $x1a > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x1a ."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; - } - } - if ( $x1b > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"".$x1b."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; } - } - if ( $x2 == 0 ) { - $x2=1; - } - $x2a = Round($x2 * $c/100.0); - $x2b = Round($x2 * (100 - $c)/100.0); - if ( $x2a != 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x2a."\" src=\"". $tutos['base'] ."/html/green.png\" alt=\"". $this->getFullName() ."\">"; - } - if ( $x2b > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x2b."\" src=\"". $tutos['base'] ."/html/red.png\" alt=\"". $this->getFullName() ."\">"; - } - if ( $x3a + $x3b > 0 ) { - if ( $x3a > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"".$x3a."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; - if ( $x3b > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"". ($x3b - 1) ."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; - } - } else { - if ( ($x3b + $x3a) > 0 ) { - echo "<img border=\"0\" height=\"". $h ."\" width=\"".($x3b + $x3a)."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; - } + // from earliest to start + $x1 = round(($this->s_start->ts - $min_start)/$p); + $x1a = round( ($t - $min_start)/$p); + $x1b = round(( $this->s_start->ts - $t )/$p); + + $x2 = round(($this->s_end->ts - $this->s_start->ts)/$p); + + $x3 = round(($max_end - $this->s_end->ts)/$p); + $x3a = round(( $t - $this->s_end->ts)/$p); + $x3b = round( ($max_end - $t )/$p); + + echo " <td align=\"left\" colspan=\"2\" width=\"".($w +1)."\" nowrap>"; + + if ( $x1a + $x1b > 0 ) { + if ( $x1b < 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"".( $x1a + $x1b) ."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; + } else { + if ( $x1a > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x1a ."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; + } + } + if ( $x1b > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"".$x1b."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; + } + } + if ( $x2 == 0 ) { + $x2=1; + } + $x2a = Round($x2 * $c/100.0); + $x2b = Round($x2 * (100 - $c)/100.0); + if ( $x2a != 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x2a."\" src=\"". $tutos['base'] ."/html/green.png\" alt=\"". $this->getFullName() ."\">"; + } + if ( $x2b > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"". $x2b."\" src=\"". $tutos['base'] ."/html/red.png\" alt=\"". $this->getFullName() ."\">"; + } + + if ( $x3a + $x3b > 0 ) { + if ( $x3a > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"".$x3a."\" src=\"". $tutos['base'] ."/html/gray.png\" alt=\"\">"; + if ( $x3b > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"". ($x3b - 1) ."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; + } + } else { + if ( ($x3b + $x3a) > 0 ) { + echo "<img border=\"0\" height=\"". $h ."\" width=\"".($x3b + $x3a)."\" src=\"". $tutos['base'] ."/html/white.png\" alt=\"\">"; + } + } } - } - echo "</td>\n"; - echo " <td valign=\"bottom\"> ". $this->s_end->getDate() ." </td>\n"; - echo " <td> "; - echo makelink("task_new.php?pid=".$this->id,$lang['NewEntry'],sprintf($lang['TaskCreateInfo'],$this->name)); - echo " </td>\n"; + echo "</td>\n"; + echo " <td valign=\"bottom\"> ". $this->s_end->getDate() ." </td>\n"; + echo " <td> "; + echo makelink("task_new.php?pid=".$this->id,$lang['NewEntry'],sprintf($lang['TaskCreateInfo'],$this->name)); + echo " </td>\n"; - echo " <td align=\"center\"> "; - if ( $tutos[massupdate] == 1 ) { - # Checkbox column for massupdate - if ( $this->mod_ok() ) { - echo "<input name=\"mark[]\" type=\"checkbox\" value=\"". $this->id ."\">"; - } else { - echo "-"; - } - } else { - if ( $this->del_ok() ) { - echo confirmlink("task_del.php?id=".$this->id,$lang['Delete'],sprintf($lang['TaskDelete'],$this->name)); + echo " <td align=\"center\"> "; + if ( $tutos[massupdate] == 1 ) { +# Checkbox column for massupdate + if ( $this->mod_ok() ) { + echo "<input name=\"mark[]\" type=\"checkbox\" value=\"". $this->id ."\">"; + } else { + echo "-"; + } } else { - echo $lang['Delete']; + if ( $this->del_ok() ) { + echo confirmlink("task_del.php?id=".$this->id,$lang['Delete'],sprintf($lang['TaskDelete'],$this->name)); + } else { + echo $lang['Delete']; + } } + echo " </td>\n"; + echo $layout->OverviewRowEnd($layout->line++); } - echo " </td>\n"; - echo $layout->OverviewRowEnd($layout->line++); - if ( $norecur != 1 ) { task::obj_read($this); @reset($this->tasklist); while ( list ($i,$f) = @each ($this->tasklist) ) { - $f->printRow($layout,$depth +1,$parent, $fld); + $f->printRow($layout,$depth +1,$parent, $fld, $slimit, $elimit); } } return 0; @@ -747,8 +806,15 @@ * get the percentage of completion */ function getcompletion () { + if( $this->state == TASK_FINISH ) + return 100.0; + if ( $this->volume <= 0 ) { return 0.0; + } + if( $this->volume_todo > -1 ) { + return (100.0*($this->volume_done/ + ($this->volume_todo + $this->volume_done))); } return ( 100.0 * ( $this->volume_done / $this->volume )); } Index: task_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_ins.php,v retrieving revision 1.29.2.2 retrieving revision 1.29.2.3 diff -u -r1.29.2.2 -r1.29.2.3 --- task_ins.php 18 Jun 2003 14:34:32 -0000 1.29.2.2 +++ task_ins.php 30 Jun 2003 10:05:30 -0000 1.29.2.3 @@ -73,6 +73,15 @@ } else { $gotourl= addUrlParameter($gotourl,"volume_done=". UrlEncode($volume_done)); } + + $volume_todo = -1.0; + list($volume_todo) = sscanf($_POST['volume_todo'],"%f"); + if ( !is_double($volume_todo) || ($volume_todo < 0 && $volume_todo != -1.0)) { + $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeTodo']) ."<br>"; + } else { + $gotourl= addUrlParameter($gotourl,"volume_todo=". UrlEncode($volume_todo)); + } + if ( !isset($_POST['worker']) ) { $msg .= sprintf($lang['Err0014'],$lang['TaskWorker']) ."<br>"; } else { @@ -124,18 +133,21 @@ $t->setState($state); $t->setVolume($volume); $t->setVolumeDone($volume_done); + $t->setVolumeTodo($volume_todo); $t->setSStart($s_start); $t->setSEnd($s_end); + $newobj = $t->id<0; $dbconn->Begin("WORK"); $msg .= $t->save(); $dbconn->Commit("WORK"); - $gotourl= $t->getURL(); + # When modifying a task we got back too much + #$gotourl= web_StackPop($newobj?2:3); + $gotourl = web_StackPop(2); } - $_SESSION['MSGID'.strlen($msg)] = UrlEncode($msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". strlen($msg)); + $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); @@ -145,4 +157,4 @@ * CVS Info: $Id$ * $Author$ */ -?> +?> \ No newline at end of file Index: task_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_new.php,v retrieving revision 1.48 retrieving revision 1.48.2.1 diff -u -r1.48 -r1.48.2.1 --- task_new.php 8 Mar 2003 19:20:09 -0000 1.48 +++ task_new.php 30 Jun 2003 10:05:30 -0000 1.48.2.1 @@ -81,25 +81,60 @@ echo " <td colspan=\"3\"><textarea id=\"desc\" rows=\"10\" cols=\"80\" name=\"desc\">". $this->obj->desc ."</textarea></td>\n"; echo " </tr>\n"; + # task workers on 3 rows echo " <tr>\n"; - echo " <td valign=\"top\" rowspan=\"2\" class=\"desc\">". $lang['TaskWorker'] ."<font color=\"red\">(*)</font></td>\n"; - echo " <td rowspan=\"2\" valign=\"top\">". $this->user->askPeople("worker[]",$this->obj->worker,1) ."</td>\n"; + echo " <td valign=\"top\" rowspan=\"3\" class=\"desc\">". $lang['TaskWorker'] ."<font color=\"red\">(*)</font></td>\n"; + echo " <td rowspan=\"3\" valign=\"top\">". $this->user->askPeople("worker[]",$this->obj->worker,1) ."</td>\n"; + + # on the right, task volumes, 3 rows + + # The planned volume is editable only when in PRE state echo $this->showfieldc($lang['TaskVolumeFull'],0,"volume"); - echo " <td><input id=\"volume\" size=\"5\" name=\"volume\" value=\"". $this->obj->volume ."\"> " . $lang['hours'] ."</td>\n"; + if( $this->obj->state == TASK_PRE ) { + echo " <td><input id=\"volume\" size=\"5\" name=\"volume\" value=\"". $this->obj->volume ."\"> " . $lang['hours'] ."</td>\n"; + } + else { + $this->addHidden("volume", $this->obj->volume); + echo " <td> ". $this->obj->volume ." ". $lang['hours'] ."</td>"; + } echo " </tr>\n"; + # The volume done echo " <tr>\n"; echo $this->showfieldc($lang['TaskVolumeDone'],0,"volume_done"); - if (array_key_exists((int)$this->user->id, $this->obj->worker)) { + # The creator should also be authorized to modify the task volume done + if ( $this->user->id == $this->obj->creator->id || + array_key_exists((int)$this->user->id, $this->obj->worker)) { echo " <td><input id=\"volume_done\" size=\"5\" name=\"volume_done\" value=\"". $this->obj->volume_done ."\"> ". $lang['hours'] ."</td>\n"; echo " </tr>\n"; - } - else { + } else { $this->addHidden("volume_done", $this->obj->volume_done ); echo " <td>". $this->obj->volume_done ." ". $lang['hours'] ."</td>\n"; echo " </tr>\n"; } + # And the volume todo, allowing to adjust task planned volume of + # a running task + if ( $this->obj->state != TASK_PRE && + ($this->user->id == $this->obj->creator->id || + array_key_exists((int)$this->user->id, $this->obj->worker))) { + + # If the volume todo has never been set, calculate it + if( $this->obj->volume_todo == -1 ) + $this->obj->volume_todo = + $this->obj->volume - $this->obj->volume_done; + + echo " <tr>\n"; + echo $this->showfieldc($lang['TaskVolumeTodo'],0,"volume_todo"); + echo " <td><input id=\"volume\" size=\"5\" name=\"volume_todo\" value=\"". $this->obj->volume_todo ."\"> " . $lang['hours'] ."</td>\n"; + echo " </tr>\n"; + } else { + $this->addHidden("volume_todo", -1 ); + echo " <tr><td colspan=\"4\"> </tr>\n"; + } + + + # Now task dates echo " <tr>\n"; echo $this->showfieldc($lang['TaskS_Start'],0,"s_start_d"); echo " <td colspan=\"3\">\n"; @@ -175,6 +210,9 @@ if ( isset($_GET['volume_done']) ) { $this->obj->volume_done = StripSlashes($_GET['volume_done']); } + if ( isset($_GET['volume_todo']) ) { + $this->obj->volume_todo = StripSlashes($_GET['volume_todo']); + } if ( isset($_GET['worker']) ) { foreach ($_GET['worker'] as $i => $f) { $this->obj->worker[$f] = new tutos_address($this->dbconn); @@ -210,6 +248,7 @@ } add_module_newlinks($this,$this->obj); + web_StackStartLayout($this,"task_new.php","task_new.php?".$_SERVER['QUERY_STRING']); } } Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.50.2.1 retrieving revision 1.50.2.2 diff -u -r1.50.2.1 -r1.50.2.2 --- task_overview.php 27 Jun 2003 13:56:57 -0000 1.50.2.1 +++ task_overview.php 30 Jun 2003 10:05:30 -0000 1.50.2.2 @@ -58,6 +58,38 @@ echo "//-->\n"; echo "</script>\n"; } + + if( ! isset($this->start) || $this->start == 0) { + $this->start = $this->parent->min_start; + $this->end = $this->parent->max_end; + } + + /* We add some date selection */ + echo "<p align=\"center\">\n"; + echo $this->DataTableStart(); + + echo " <tr>\n"; + echo $this->showfieldc($lang['StartDate'],0,"start"); + echo " <td colspan=\"3\">\n"; + $this->start->EnterDate("start"); + echo "</td>\n"; + + echo "<td align=\"center\" rowspan=\"2\">"; + echo "<input type=\"submit\" value=\"".$lang['Enter']."\">"; + echo "</td>\n"; + + echo " </tr>\n"; + + echo " <tr>\n"; + echo $this->showfieldc($lang['EndDate'],0,"end"); + echo " <td colspan=\"3\">\n"; + $this->end->EnterDate("end"); + echo "</td>\n"; + echo " </tr>\n"; + + echo $this->DataTableEnd(); + + echo "<p>\n"; echo $this->OverviewTableStart(); $cols = 9; @@ -68,8 +100,8 @@ echo " <tr>\n"; echo " <td colspan=\"2\" class=\"desc\" nowrap> ". $lang['TaskVolumeFull'] ." </td>\n"; echo " <td colspan=\"2\"> ". number_format($this->parent->sum['volume'],2) ." ". $lang['hours'] ."</td>\n"; - echo " <th colspan=\"1\" rowspan=\"2\" nowrap>". $lang['AppStart'] ."<br>". $this->parent->min_start->getDate() ."</th>\n"; - echo " <th colspan=\"1\" rowspan=\"2\" nowrap>". $lang['AppEnd'] ."<br>". $this->parent->max_end->getDate() ."</th>\n"; + echo " <th colspan=\"1\" rowspan=\"2\" nowrap>". $lang['AppStart'] ."<br>". $this->start->getDate() ."</th>\n"; + echo " <th colspan=\"1\" rowspan=\"2\" nowrap>". $lang['AppEnd'] ."<br>". $this->end->getDate() ."</th>\n"; if ( $this->parent->sum['volume'] != 0 ) { $c = ( 100.0 * ( $this->parent->sum['volume_done'] / $this->parent->sum['volume'] )); } else { @@ -101,11 +133,12 @@ $skipped = 0; $this->line = 0; + if ( $this->parent->getType() == "task" ) { - $skipped += $this->parent->printRow($this,0,$this->parent,$this->fld); + $skipped += $this->parent->printRow($this,0,$this->parent,$this->fld, $this->start, $this->end); } else { foreach ($this->parent->tasklist as $i => $f) { - $skipped += $this->parent->tasklist[$i]->printRow($this,0,$this->parent,$this->fld); + $skipped += $this->parent->tasklist[$i]->printRow($this,0,$this->parent,$this->fld, $this->start, $this->end); $a++; } } @@ -300,12 +333,30 @@ } else { $msg .= $lang['Err0048']; $this->stop = true; - return; } if ( isset($_GET['fld']) ) { $this->fld = $_GET['fld']; } + if ( isset($_GET['start']) ) + $this->start = new DateTime($_GET['start']); + else + if( isset($_GET['start_d']) ) { + $start = sprintf("%04d%02d%02d", $_GET['start_y'], + $_GET['start_m'], $_GET['start_d']); + $this->start = new DateTime($start); + } + + if ( isset($_GET['end']) ) + $this->end = new DateTime($_GET['end']); + else + if( isset($_GET['end_d']) ) { + $end = sprintf("%04d%02d%02d", $_GET['end_y'], + $_GET['end_m'], $_GET['end_d']); + $this->end = new DateTime($end); + } + + # menu // The PNG Gantt fonctionnality, using JpGraph Tools, to be installed @@ -320,19 +371,20 @@ if( $this->parent != -1 && $this->parent->getType() != "address" ) { $x = array( url => "task_overview.php?id=".$this->parent->id, + text => $lang['TaskGantt'], info => sprintf($lang['TaskOverviewInfo'],$this->parent->getFullName()), category => array("task","view") - ); + ); - if ( $this->fld != "" ) { - $x[text] = $lang['TaskOverview']; - } else { - $x[text] = $lang['TaskOverview'] ."++"; - $x[url] = "task_overview.php?id=".$this->parent->id."&fld=worker"; - } + $x[text] = $lang['TaskOverview']; + $this->addMenu($x); + $x[text] = $lang['TaskOverview'] ."++"; + $x[url] = "task_overview.php?id=".$this->parent->id."&fld=worker"; $this->addMenu($x); } - + web_StackStartLayout($this, + "task_overview.php?id=".$this->parent->id, + "task_overview.php?".$_SERVER['QUERY_STRING']); } } Index: task_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_show.php,v retrieving revision 1.55.2.1 retrieving revision 1.55.2.2 diff -u -r1.55.2.1 -r1.55.2.2 --- task_show.php 23 May 2003 12:39:55 -0000 1.55.2.1 +++ task_show.php 30 Jun 2003 10:05:30 -0000 1.55.2.2 @@ -29,7 +29,9 @@ echo $this->DataTableStart(); echo " <tr>\n"; - echo " <th colspan=\"4\">". $lang['TaskDetail'] ."</th>\n"; + echo " <th colspan=\"4\">"; + echo $lang['TaskDetail'].": ". $this->obj->getFullName(); + echo " </th>\n"; echo " </tr>\n"; echo " <tr>\n"; @@ -74,7 +76,7 @@ echo " <tr>\n"; echo $this->showfield($lang['TaskDesc']); - echo " <td colspan=\"3\" class=\"pre\"><pre>". wordwrap(urlReplace($this->obj->desc),80) ."</pre></td>\n"; + echo " <td colspan=\"3\" class=\"pre\"><pre>". urlReplace($this->obj->desc) ."</pre></td>\n"; echo " </tr>\n"; echo " <tr>\n"; @@ -89,6 +91,8 @@ echo " <td colspan=\"2\">". $lang['DateTimeTill'] .": ". $this->obj->r_end->getDateTime() ."</td>\n"; echo " </tr>\n"; + echo " <tr><td colspan=\"2\"> </td>\n"; + echo " <tr>\n"; echo $this->showfield($lang['TaskVolumeFull']); echo " <td>". number_format($this->obj->volume,2) ." ". $lang['hours'] ."</td>\n"; @@ -96,6 +100,11 @@ echo " <td>". makelink("timetrack_overview.php?link_id=" .$this->obj->id , number_format($this->obj->volume_done,2) , $lang['TimetrackOverview']) ." ". $lang['hours'] ."</td>\n"; echo " </tr>\n"; + if( $this->obj->volume_todo != -1 ) { + echo $this->showfield($lang['TaskVolumeTodo']); + echo " <td>". number_format($this->obj->volume_todo,2) ." ". $lang['hours'] ."</td>\n"; + } + bug::infolist($this->user,$this->obj,4,$this->format); $this->obj->readTasks(); @@ -248,7 +257,10 @@ } # menu - $x = task::getaddlink($this->user,$this->obj,$lang['NewEntry']); + $x = task::getaddlink($this->user,$this->obj->parent,$lang['NewEntry']); + $this->addMenu($x); + + $x = task::getaddlink($this->user, $this->obj, $lang['TaskNewSubtask']); $this->addMenu($x); if ( ($this->obj->id > 0) && $this->obj->mod_ok() ) { @@ -279,6 +291,7 @@ # add this page to the browsehistory of the users session $this->addtohistory(); + web_StackStartLayoutObj($this); } } Index: timetrack.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack.pinc,v retrieving revision 1.52 retrieving revision 1.52.2.1 diff -u -r1.52 -r1.52.2.1 --- timetrack.pinc 10 Mar 2003 18:11:27 -0000 1.52 +++ timetrack.pinc 30 Jun 2003 10:05:30 -0000 1.52.2.1 @@ -39,6 +39,30 @@ $r->free(); return; } + +/** + * Compute the amount of work done by $address on $task + * + * FIXME : add some time schedule restriction + */ +function computeWorkedHours($address, $task) { + $sum = 0; + + $q = + "SELECT SUM(volume) as XX FROM timetrack " . + "WHERE adr_id = ". $address->id. " AND link_id = ". $task->id; + + $r = $task->dbconn->Exec($q); + $n = $r->numrows(); + if ( $n == 0 ) { + return $sum = 0; + } + $sum = $r->get(0,"XX"); + $r->free(); + + return $sum == "" ? 0 : $sum; +} + /** * A fraction of a timetrack * @package timetrack @@ -51,16 +75,17 @@ $this->init($dbconn); - $this->wid = $current_user->id; - $this->worker = $current_user; - $this->link_id = -1; - $this->ref = -1; - $this->desc = ""; - $this->volume = 0.0; - $this->wday = new DateTime(); - $this->creation = new DateTime(); - $this->t_start = new DateTime(0); - $this->t_end = new DateTime(0); + $this->wid = $current_user->id; + $this->worker = $current_user; + $this->link_id = -1; + $this->ref = -1; + $this->desc = ""; + $this->volume = 0.0; + $this->volume_todo = -1; + $this->wday = new DateTime(); + $this->creation = new DateTime(); + $this->t_start = new DateTime(0); + $this->t_end = new DateTime(0); # number of invoice $this->invoice = -1; $this->currency = $tutos[currencies][0]; @@ -90,6 +115,7 @@ $this->ref = getObject($this->dbconn,$this->link_id); $this->desc = $r->get($pos, "description"); $this->volume = $r->get($pos, "volume"); + $this->volume_todo = $r->get($pos, "volume_todo"); $this->state = (integer)$r->get($pos, "state"); $this->cph = $r->get($pos, "cph"); $this->currency = $r->get($pos, "currency"); @@ -179,6 +205,13 @@ return; } /** + * set the volume todo + */ + function setVolumeTodo($value) { + $this->setFloatField("volume_todo",$value,"TaskVolumeTodo"); + return; + } + /** * set the state */ function setState($value) { @@ -201,16 +234,38 @@ } /** * Save Time Fraction to DB + * + * The norec parameter allows to create a timetrack from task.pink + * without re entrance problems that may occur when timetrack tries + * to save the ref task... */ - function save() { + function save($norec=0) { global $table,$tutos, $lang, $current_user; + // We may have to compute the volume todo of this timetrack entry + // This is the same as the task volume todo + if( $this->volume_todo == -1 ) { + $ref_todo = $this->ref->volume_todo; + if( $ref_todo == -1 ) + // If no volume_todo has been set for the task, we consider + // the planned volume as the volume_todo + $ref_todo = $this->ref->volume; + + // And the calculated volume_todo is the volume todo before this + // timetrack entry, minus this timetrack entry volume... + $volume_todo = $ref_todo - $this->volume; + } + else + // If a volume has been entered, we then just take it + $volume_todo = $this->volume_todo; + $msg = ""; $q = new query($this->dbconn); $q->setTable($this->tablename); $q->addFV("link_id",$this->link_id,""); $q->addFV("adr_id",$this->worker->id,""); $q->addFV("volume",$this->volume,"FLOAT"); + $q->addFV("volume_todo",$volume_todo,"FLOAT"); $q->addFV("description",$this->desc,"STRING",$table['timetrack']['description'][size]); $q->addFV("vtime",$this->wday,"DATETIME"); $q->addFV("state",$this->state,""); @@ -250,11 +305,21 @@ } $this->dbconn->Exec($query); - if ( ($this->ref != -1) && ($this->ref->getType() == "task") ) { + if ( $norec == 0 && + ($this->ref != -1) && ($this->ref->getType() == "task") ) { + if ( $this->ref->r_start->notime == 1 ) { $this->ref->setRStart(new Datetime()); - $this->ref->save(); } + + // Task has to be considered running + if( $this->ref->state == TASK_PRE ) + $this->ref->state = TASK_RUNNING; + + // The volume todo has to be set on the task + $this->ref->setVolumeTodo($volume_todo); + + $this->ref->save(); } $msg .= parent::save(); Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.30.2.2 retrieving revision 1.30.2.3 diff -u -r1.30.2.2 -r1.30.2.3 --- timetrack_ins.php 18 Jun 2003 14:34:32 -0000 1.30.2.2 +++ timetrack_ins.php 30 Jun 2003 10:05:30 -0000 1.30.2.3 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2002 by Gero Kohnert + * Copyright 1999 - 2003 by Gero Kohnert * * CVS Info: $Id$ * $Author$ @@ -63,7 +63,7 @@ $msg .= sprintf($lang['Err0009'],$lang['TimetrackWorker']) ."<br>"; } else { $x = check_field(StripSlashes($_POST['wfn']),"wfn","wl","a"); - $tt->setWorker($x->id); + $tt->setWorker($x->id); $gotourl= addUrlParameter($gotourl,"wid=". $x->id); } } else if ( isset($_POST['wid']) ) { @@ -131,6 +131,20 @@ $tt->setVolume($volume); } } + + # volume todo + if ( isset($_POST['volume_todo']) && $_POST['volume_todo'] != "" ) { + $volume_todo = 0.0; + list($volume_todo) = sscanf($_POST['volume_todo'],"%f"); + if ( ! (empty($volume_todo) || is_double($volume_todo)) ) { + $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeTodo']) ."<br>"; + $gotourl= addUrlParameter($gotourl,"volume_todo=".UrlEncode($volume_todo)); + } else { + $gotourl= addUrlParameter($gotourl,"volume_todo=".UrlEncode($volume_todo)); + $tt->setVolumeTodo($volume_todo); + } + } + if ( isset($_POST['cph']) ) { $cph = 0.0; list($cph) = sscanf($_POST['cph'],"%f"); @@ -151,15 +165,16 @@ $msg .= module_parseforms($current_user,$tt,$gotourl); if ( $msg == "" ) { + $newobj = $tt->id<0; $dbconn->Begin("WORK"); $msg .= $tt->save(); $dbconn->Commit("WORK"); - $gotourl = $tt->ref->getURL(); + + $gotourl = web_StackPop($newobj?2:2); } $gotourl = addSessionKey($gotourl); - $_SESSION['MSGID'.strlen($msg)] = UrlEncode($msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". strlen($msg)); + $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); Header("Status: 302 Moved Temporarily"); Header("Location: ". getBaseUrl() . $gotourl); Index: user_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/user_ins.php,v retrieving revision 1.38.2.2 retrieving revision 1.38.2.3 diff -u -r1.38.2.2 -r1.38.2.3 --- user_ins.php 18 Jun 2003 14:34:32 -0000 1.38.2.2 +++ user_ins.php 30 Jun 2003 10:05:30 -0000 1.38.2.3 @@ -1,6 +1,6 @@ <?php /* - * Copyright 1999 - 2003 by Gero Kohnert + * Copyright 1999 - 2002 by Gero Kohnert * */ include_once 'webelements.p3'; @@ -144,22 +144,16 @@ $u->setTheme($_POST['theme']); $u->setLayout($_POST['layout']); + $newobj = $u->id<0; $dbconn->Begin("WORK"); $msg .= $u->save_permissions(); $msg .= $u->save(); $dbconn->Commit("WORK"); - $gotourl = "address_show.php"; - if ( $tutos[demo] == 1 ) { - $gotourl= addUrlParameter($gotourl,"lg=". $u->lang); - $gotourl= addUrlParameter($gotourl,"th=". $u->theme); - $gotourl= addUrlParameter($gotourl,"ly=". $u->ly); - } - $gotourl= addUrlParameter($gotourl,"id=". $u->id); + #$gotourl = web_StackPop($newobj?1:2); + $gotourl = web_StackPop(2); } - - $_SESSION['MSGID'.strlen($msg)] = UrlEncode($msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". strlen($msg)); + $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); $gotourl = addSessionKey($gotourl); /* Go back to user mask */ Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.213.2.2 retrieving revision 1.213.2.3 diff -u -r1.213.2.2 -r1.213.2.3 --- webelements.p3 18 Jun 2003 13:52:43 -0000 1.213.2.2 +++ webelements.p3 30 Jun 2003 10:05:30 -0000 1.213.2.3 @@ -140,7 +140,6 @@ * Language is determined by looking at HTTP_ACCEPT_LANGUAGE in automatic mode */ Function ReadLang1(&$lang,$path,&$user) { - global $tutos; if ( isset($_GET['lg']) || isset($_POST['lg']) ) { if ( isset($_GET['lg']) ) { @@ -349,9 +348,7 @@ $msg .= "Language:\t". $_SERVER["HTTP_ACCEPT_LANGUAGE"] ."\n"; } $msg .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; - if (isset($_SERVER["REQUEST_URI"])) { - $msg .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; - } + $msg .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; if ( count($_POST) ) { foreach($_POST as $i => $f) { if ( is_Array($f) ) { @@ -443,9 +440,7 @@ } } echo "<b>URL:</b> ". $_SERVER["PHP_SELF"] ."<br>\n"; - if (isset($_SERVER["REQUEST_URI"])) { - echo "<b>Request:</b> ". $_SERVER["REQUEST_URI"] ."<br>\n"; - } + echo "<b>Request:</b> ". $_SERVER["REQUEST_URI"] ."<br>\n"; if ( isset($_SERVER['HTTP_REFERER']) ) { echo "<b>Called from:</b> <a href=\"". $_SERVER['HTTP_REFERER'] ."\">". $_SERVER['HTTP_REFERER'] ."</a><br>\n"; } @@ -751,7 +746,7 @@ } if ( $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != "") ) { - return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,$attr,myentities($plus),myentities($info,1),$text); + return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,$attr,myentities($plus),myentities($info),$text); } else { return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,$attr,myentities($info,1),myentities($info),$text); } @@ -773,7 +768,7 @@ $href = $tutos['base'] ."/php/". $href; } if ( $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != "") ) { - return sprintf ("<a href=\"%s\" "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,myentities($plus),myentities($info,1),$text); + return sprintf ("<a href=\"%s\" "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,myentities($plus),myentities($info),$text); } else { return sprintf ("<a href=\"%s\" "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,myentities($info,1),myentities($info),$text); } @@ -1109,8 +1104,8 @@ if ( $usecache == 1 ) { if ( isset($g_hash[$id]) ) { # echo $id ." ". $g_hash[$id]->gettype() ." hashed x<br>"; - $g_hash['hits']++; - return $g_hash[$id]; + $g_hash['hits']++; + return $g_hash[$id]; } } @@ -1526,4 +1521,123 @@ echo " <script language=\"JavaScript\" type=\"text/javascript\">TmpTS = new Date();TutosDebugW.document.writeln((TmpTS-DbgTS).toPrecision(4)+\"ms :".$out_text."<br>\"); delete TmpTS;</script>\n"; } } -?> \ No newline at end of file + +/** + * return n-1 url in stack + */ +function web_StackPop($back) +{ + if (!isset($_SESSION['web_stack'])) + return ""; + + $arWebStack = $_SESSION['web_stack']; + $web_local = end($arWebStack); + + for ($i = 0; $i<$back; $i++) + $web_local = array_pop($arWebStack); + + if ($web_local) + return $web_local['url']; + else + return $_SESSION['web_stack']['url']; + +} +/** + * page stack start + */ +function web_StackStart ($id, $url, $briefname="", $name="") +{ + if (!isset($_SESSION['web_stack'])) + $_SESSION['web_stack'] = array(); + + $arWebStack = &$_SESSION['web_stack']; + + // check is this the same page, do nothing + $wend = end($arWebStack); + + if ($wend && $wend['id'] == $id) + { + $web_local = array_pop($arWebStack); + $web_local['url'] = $url; + array_push($arWebStack, $web_local); + return true; + } + + // check if page already in stack, and find its firts occurence to + // restore settings + + $bFound = false; + foreach ($arWebStack as $web_local) + { + if ($web_local['id'] == $id) { + $bFound = true; + break; + } + } + + if ($bFound) + { + // need to return back to this page + while ($web_local = array_pop($arWebStack)) + { + if ($web_local['id'] == $id) + { + $_SESSION['web_local'] = $web_local['data']; + $web_local['url'] = $url; + array_push($arWebStack, $web_local); + return true; + } + } + } + + // the page is not found, add it to the stack + // but store previous page settings + if (count($arWebStack)) + { + $web_local = array_pop($arWebStack); + $web_local['data'] = $_SESSION['web_local']; + array_push($arWebStack, $web_local); + } + + // prepare new + $stackitem = Array('id' => $id, + 'url' => $url, + 'text' => $briefname, + 'info' => $name, + 'data' => array()); + + array_push ($arWebStack,$stackitem); + + $_SESSION['web_local'] = array (); +} + +function web_StackStartLayout($layout, $id, $url ) +{ + global $lang; + + if ($layout->stop) return; + + $x = $layout->name; + + if ( strlen($x) > 20 ) { + $x = substr($x,0,15) ."...". substr($x,-2); + } + web_StackStart($id, $url,$x, $layout->name); +} + +function web_StackStartLayoutObj($layout) +{ + global $lang; + + if ($layout->stop) return; + if (!isset($layout->obj)) return; + if (!is_object($layout->obj)) return; + + $x = $layout->obj->getFullName(); + + if ( strlen($x) > 20 ) { + $x = substr($x,0,15) ."...". substr($x,-2); + } + web_StackStart($layout->obj->getUrl(), $layout->obj->getUrl(),$x, $layout->obj->getFullName()); +} +?> |
From: Dimitri F. <ta...@us...> - 2003-06-30 10:05:35
|
Update of /cvsroot/tutos/tutos/php/watchlist In directory sc8-pr-cvs1:/tmp/cvs-serv29691/watchlist Modified Files: Tag: BRANCH-1-1 watchlist.pinc Log Message: Merging last developments into stable branch. Index: watchlist.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/watchlist/watchlist.pinc,v retrieving revision 1.24 retrieving revision 1.24.2.1 diff -u -r1.24 -r1.24.2.1 --- watchlist.pinc 1 Mar 2003 23:04:32 -0000 1.24 +++ watchlist.pinc 30 Jun 2003 10:05:31 -0000 1.24.2.1 @@ -1,5 +1,5 @@ <?php -/** +/** * Copyright 1999 - 2003 by Gero Kohnert * * CVS Info: $Id$ @@ -8,6 +8,46 @@ * @modulegroup watchlist * @package watchlist */ + +/* A utility function to send mail + * + * blist is a optionnal body list to attach as plain/text + */ +Function send_mail($proto, $f, $user, $subject, $url, $fullname, + $blist = array() ) { + $msg = ""; + $body = ""; + $encoding = $f->lg['content_encoding']; + + if ( ! findMailTemplate($proto, $f, $body) ) { + $msg .= sprintf($lang['Err0037'],$mail->subject,$body)."<br>\n"; + return $msg; + } + + $mail = new mail(); + $mail->setFrom($user); + $mail->resetBody(); + $mail->resetTo(); + $mail->addTo($f); + $mail->setSubject($subject); + + $body = eregi_replace("@TO@", $f->getFullName(), $body); + $body = eregi_replace("@URL@", $url, $body); + $body = eregi_replace("@CURRENT@", $user->getFullName(), $body); + $body = eregi_replace("@NAME@", $fullname, $body); + + $mail->addBody($body, "text/plain", "Notify", "", $encoding); + + if( isset($blist) && count($blist) > 0 ) { + foreach( $blist as $b ) { + $mail->addBody($b, "text/plain", "Info", "", $encoding); + } + } + + $msg = $mail->send(); + return $msg; +} + class watchlist extends tutos_module { /* */ @@ -89,7 +129,7 @@ function obj_read (&$obj) { global $tutos; - if ( $obj == -1 ) return; + if ( $obj == -1 ) return; if (! is_object($obj) ) return; if ( $obj->id < 1000 ) return; if ( ! $obj->see_ok() ) return; @@ -121,7 +161,7 @@ function getaddlink (&$user,&$obj,$text = "") { global $lang; - if ( $obj == -1 ) return; + if ( $obj == -1 ) return; if (! is_object($obj) ) return; if ( $obj->id < 1000 ) return; if ( ! $obj->see_ok() ) return; @@ -153,20 +193,27 @@ * create a link on a modify page of an obj */ function getNewLink (&$user,&$obj) { - global $lang; + global $lang,$tutos; - if ( $obj == -1 ) return; + if ( $obj == -1 ) return; if (! is_object($obj) ) return; if ( $obj->id < 1000 ) return; if ( ! $obj->mod_ok() ) return; if ( ! $user->feature_ok(usewatchlist,PERM_NEW) ) return; - $x = array( url => "watchlist/watchlist_overview.php?id=". $obj->id, + $x[] = array( url => "watchlist/watchlist_overview.php?id=". $obj->id, text => $lang['Watcher'], info => $lang['Watcher'], category => array("watchlist","show","module") ); + if ( $user->feature_ok(usemail,PERM_NEW) && ($tutos[mailmode] != 0) ) { + $x[] = array( url => "mail_new.php?watch=". $obj->id ."&subject=". $obj->getFullName(), + text => $lang['WatchMail'], + info => $lang['WatchMail'], + category => array("watchlist","show","module") + ); + } return $x; } @@ -201,45 +248,53 @@ function obj_save (&$user,&$obj) { global $tutos,$lang; - if ( $obj == -1 ) return; + $msg = ""; + + switch( $obj->getType() ) { + case "task": + case "bug": + $parent = $obj->parent; + break; + + case "file": + case "invoice": + case "note": + $parent = $obj->ref; + break; + + case "installation": + $parent = $obj->product; + break; + + default: + $parent = $obj; + break; + } + + if ( $obj == -1 ) return; if (! is_object($obj) ) return; if ( $tutos[usewatchlist] != 1 ) return; if ( count($obj->modified) < 1 ) return; - $msg = ""; - watchlist::obj_read($obj); - - if ( !isset($obj->watchlist) or count($obj->watchlist) == 0 ) return; - - $url = getBaseURL() . $obj->getUrl(); - $mail = new mail(); - $mail->setFrom($user); - @reset ($obj->watchlist); - while ( list ($i,$f) = @each ($obj->watchlist) ) { - $mail->resetBody(); - $mail->resetTo(); - $mail->addTo($f); - $body = ""; - - if ( ! findMailTemplate("watch.proto",$f,$body) ) { - $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br>\n"; - continue; - } - $mail->setSubject(sprintf("TUTOS:". $f->lg['EmailChanged'],$f->lg[$obj->getType()] ." ". $obj->getFullName())); + watchlist::obj_read($parent); + if ( !isset($parent->watchlist) or count($parent->watchlist) == 0 ) + return; - $body = eregi_replace("@TO@",$f->getFullName(),$body); - $body = eregi_replace("@URL@",$url,$body); - $body = eregi_replace("@CURRENT@",$user->getFullName(),$body); - $body = eregi_replace("@NAME@",$obj->getFullName(),$body); + $url = getBaseURL() . $parent->getUrl(); - $mail->addBody($body,"text/plain","Notify","",$f->lg['content_encoding']); + @reset ($parent->watchlist); + while ( list ($i,$f) = @each ($parent->watchlist) ) { + $name = $f->lg[$parent->getType()] ." ". $parent->getFullName(); + $subject = sprintf("TUTOS:". $f->lg['EmailChanged'], $name); + $msg = send_mail("watch.proto", $f, $user, + $subject, $url, $parent->getFullName()); - $msg .= $mail->send(); - watchlist::update($obj,$f); + watchlist::update($parent, $f); } return $msg; } + /** * Remove all the watchers of an obj * because obj is deleted @@ -247,7 +302,7 @@ function obj_delete (&$user,&$obj) { global $lang,$tutos,$tutos; - if ( $obj == -1 ) return; + if ( $obj == -1 ) return; if (! is_object($obj) ) return; if ( ($tutos[usewatchlist] != 1) ) { return; @@ -258,32 +313,21 @@ # watchlist::obj_read($obj); $url = getBaseURL() . $obj->getUrl(); - $mail = new mail(); - $mail->setFrom($user); + @reset ($obj->watchlist); while ( list ($i,$f) = @each ($obj->watchlist) ) { - $mail->resetBody(); - $mail->resetTo(); - $mail->addTo($f); - $body = ""; + $subject = sprintf("TUTOS:". $f->lg['EmailDeleted'],$obj->getFullName()); - if ( ! findMailTemplate("watch_del.proto",$f,$body) ) { - $msg .= sprintf($lang['Err0037'],$mail->subject,$body) ."<br>\n"; - continue; - } - $mail->setSubject(sprintf("TUTOS:". $f->lg['EmailDeleted'],$obj->getFullName())); + $blist = array(); - $body = eregi_replace("@TO@",$f->getFullName(),$body); - $body = eregi_replace("@URL@",$url,$body); - $body = eregi_replace("@CURRENT@",$user->getFullName(),$body); - $body = eregi_replace("@NAME@",$obj->getFullName(),$body); - $mail->addBody($body,"text/plain","Notify","",$f->lg['content_encoding']); + if ( method_exists($obj,'getTextDump') ) { + $blist[] = $obj->getTextdump(); - if ( method_exists($obj,'getTextDump') ) { - $mail->addBody($obj->getTextdump(),"text/plain","Info"); + if ( method_exists($obj,'getTextDump') ) { } - $msg .= $mail->send(); + $msg .= send_mail("watch_del.proto", $f, $user, + $subject, $url, $obj->getFullName(), $blist); } $q = "DELETE from ". $obj->dbconn->prefix ."watchlist where obj_id = ". $obj->id; $obj->dbconn->Exec($q); @@ -317,40 +361,41 @@ $f = new tutos_address($user->dbconn); $f->read($r->get($a,"adr_id")); - if ( $d->getDateShort() != $bd->getDateShort() ) { -# $msg .= "Not Tomorrow : ". $d->getDateShort() ." != ". $bd->getDateShort() ." ". $f->getFullName() ." ". $x->getFullName() ."<br>"; + if ( $d->getDateShort() != $bd->getDateShort() ) { + // $msg .= "Not Tomorrow : ". $d->getDateShort() ." != ". $bd->getDateShort() ." ". $f->getFullName() ." ". $x->getFullName() ."<br>"; $a++; unset($x); unset($f); continue; - } + } - if (($d->getTimestamp() - $lc->getTimestamp()) < 86400 ) { -# $msg .= "Skipping : ". ($d->getTimestamp() - $lc->getTimestamp()) ." seconds<br>"; + if (($d->getTimestamp() - $lc->getTimestamp()) < 86400 ) { + // $msg .= "Skipping : ". ($d->getTimestamp() - $lc->getTimestamp()) ." seconds<br>"; $a++; unset($x); unset($f); continue; - } - + } $m->resetBody(); $m->resetTo(); $m->addTo($f); $m->setFrom($f); $body = ""; + $m->setSubject("TUTOS:" + .sprintf($f->lg['EmailBirthday'], $x->getFullName())); + if ( ! findMailTemplate($watchmailtxt,$f,$body) ) { $msg .= sprintf($lang['Err0037'],$m->subject,$body) ."<br>\n"; continue; } - $m->setSubject("TUTOS:".sprintf($f->lg['EmailBirthday'],$x->getFullName())); - $body = eregi_replace("@CREATOR@",$f->getFullName(),$body); $body = eregi_replace("@URL@",$url,$body); $body = eregi_replace("@REFERENZ@",$x->getFullName(),$body); $body = eregi_replace("@BIRTHDAY@",$x->birthday->getDate(),$body); - $m->addBody($body,"text/plain",$lang['Note'],"",$f->lg['content_encoding']); + $m->addBody($body, "text/plain", $lang['Note'], "", + $f->lg['content_encoding']); $msg .= $m->send(); watchlist::update($x,$f); @@ -390,6 +435,7 @@ } $r->free(); + } } } |
From: Gero K. <gok...@us...> - 2003-06-29 12:53:12
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv22313 Modified Files: product_ins.php Log Message: bugfix Index: product_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_ins.php,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- product_ins.php 27 Jun 2003 13:30:08 -0000 1.44 +++ product_ins.php 29 Jun 2003 12:53:08 -0000 1.45 @@ -200,7 +200,6 @@ } $gotourl = addMessage($gotourl,$msg); - $gotourl = addUrlParameter($gotourl,"msgid=MSGID". length($msg)); Header("Status: 302 Moved Temporarily"); Header("Location: ". getBaseUrl() . $gotourl); |
From: Gero K. <gok...@us...> - 2003-06-27 14:07:57
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv20731/php Modified Files: Tag: BRANCH-1-1 admin_show.php database.pinc database_show.php Log Message: fixes Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.52 retrieving revision 1.52.2.1 diff -u -r1.52 -r1.52.2.1 --- admin_show.php 18 Feb 2003 05:27:20 -0000 1.52 +++ admin_show.php 27 Jun 2003 14:02:48 -0000 1.52.2.1 @@ -152,7 +152,7 @@ foreach ($tutos[modules] as $i => $f) { echo $this->OverviewRowStart($line); $table = array(); - @include("../".dirname($tutos[modules][$i][file]) ."/mtable.pinc"); + include("../".dirname($tutos[modules][$i][file]) ."/mtable.pinc"); echo " <td valign=\"top\" align=\"left\">"; if ($tutos[$f['perm']] == 0) { echo "<strike>\n"; Index: database.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/database.pinc,v retrieving revision 1.40 retrieving revision 1.40.2.1 diff -u -r1.40 -r1.40.2.1 --- database.pinc 12 Mar 2003 05:52:50 -0000 1.40 +++ database.pinc 27 Jun 2003 14:02:48 -0000 1.40.2.1 @@ -434,7 +434,7 @@ } if ( ($tutos[usedocmanagement] != 0) && ! file_exists(getcwd()."/". $tutos['base'] ."/". $this->repository)) { $msg = "<br>\nDocument Management:<br>missing repository directory<br>\n"; - $msg .= "Please change repository path in your config file<br>or create the missing path<br>or disable docmanagement \$tutos[usedocmanagement] = 0; in your config file<br>\n"; + $msg .= "Please change repository path in your config file<br>or create the missing path<br>or disable docmanagement \$tutos[usedocmanagement] = 0; in your config file (php/file/mconfig.pinc)<br>\n"; Fatal_Error($msg,getcwd()."/". $tutos['base'] ."/".$this->repository); } Index: database_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_show.php,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -u -r1.28 -r1.28.2.1 --- database_show.php 1 Apr 2003 17:48:17 -0000 1.28 +++ database_show.php 27 Jun 2003 14:02:49 -0000 1.28.2.1 @@ -41,7 +41,7 @@ echo $this->showdata($this->obj->alias,3); # Do not show sensitive infos - if ( $this->user->admin == 1 ) { + if ( $this->user->isAdmin() ) { echo "</tr><tr>\n"; echo $this->showfield($lang['AdminDBHost']); echo $this->showdata($this->obj->host); |
From: Gero K. <gok...@us...> - 2003-06-27 14:07:48
|
Update of /cvsroot/tutos/tutos/php/ldap In directory sc8-pr-cvs1:/tmp/cvs-serv21289/php/ldap Modified Files: Tag: BRANCH-1-1 mtable.pinc Log Message: fixes Index: mtable.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ldap/mtable.pinc,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- mtable.pinc 2 Dec 2002 20:10:23 -0000 1.2 +++ mtable.pinc 27 Jun 2003 14:07:45 -0000 1.2.2.1 @@ -13,9 +13,9 @@ name => "adrldap", Desc => "TUTOS addresses via ldap", "adr_id" => array(type => "ID_TYPE", constraints => "NN", Desc => "Object ID"), - "ldap_dn" => array(type => "VARCHAR", size => 255, constraints => "" , Desc => "a distinguished name in ldap"), - "host" => array(type => "VARCHAR", size => 60, constraints => "", Desc => "hostname ldap server"), - "port" => array(type => "ID_TYPE", constraints => "", Desc => "port number"), + "ldap_dn" => array(type => "VARCHAR", size => 255, constraints => "NN", Desc => "a distinguished name in ldap"), + "host" => array(type => "VARCHAR", size => 60, constraints => "NN", Desc => "hostname ldap server"), + "port" => array(type => "ID_TYPE", constraints => "NN", Desc => "port number"), ); $tableidx['adrldap1'] = array( name => "adrldap_idx1", @@ -26,7 +26,7 @@ $tableidx['adrldap2'] = array( name => "adrldap_idx2", table => "adrldap", - column => array("ldap_dn"), + column => array("ldap_dn","host","port"), Desc => "ldap keys", ); ?> |
From: Gero K. <gok...@us...> - 2003-06-27 14:07:48
|
Update of /cvsroot/tutos/tutos/php/installation In directory sc8-pr-cvs1:/tmp/cvs-serv21289/php/installation Modified Files: Tag: BRANCH-1-1 mtable.pinc Log Message: fixes Index: mtable.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/mtable.pinc,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- mtable.pinc 10 Feb 2003 20:32:50 -0000 1.6 +++ mtable.pinc 27 Jun 2003 14:07:45 -0000 1.6.2.1 @@ -15,7 +15,7 @@ "customer_id" => array(type => "ID_TYPE", constraints => "", Desc => "id of customer"), "installer_id" => array(type => "ID_TYPE", constraints => "", Desc => "id of installer"), "seller_id" => array(type => "ID_TYPE", constraints => "", Desc => "id of seller"), - "product_id" => array(type => "ID_TYPE", constraints => "", Desc => "id of product/project"), + "product_id" => array(type => "ID_TYPE", constraints => "NN", Desc => "id of product/project"), "update_id" => array(type => "ID_TYPE", constraints => "", Desc => "id of updated instalation"), "money" => array(type => "float", constraints => "", Desc => "cost of installation"), "currency" => array(type => "VARCHAR", size => 4, constraints => "", Desc => "currency for money"), |
From: Gero K. <gok...@us...> - 2003-06-27 14:07:48
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv21289/php Modified Files: Tag: BRANCH-1-1 config_default.pinc modules.pinc Log Message: fixes Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.56.2.1 retrieving revision 1.56.2.2 diff -u -r1.56.2.1 -r1.56.2.2 --- config_default.pinc 30 May 2003 13:04:43 -0000 1.56.2.1 +++ config_default.pinc 27 Jun 2003 14:07:45 -0000 1.56.2.2 @@ -619,6 +619,6 @@ # # The TUTOS Version number # -$tutos[version]="1.1beta.20030314"; +$tutos[version]="1.1.20030522"; # ?> Index: modules.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/modules.pinc,v retrieving revision 1.26 retrieving revision 1.26.2.1 diff -u -r1.26 -r1.26.2.1 --- modules.pinc 1 Apr 2003 17:48:17 -0000 1.26 +++ modules.pinc 27 Jun 2003 14:07:45 -0000 1.26.2.1 @@ -77,7 +77,7 @@ # Author: Boris Wesslowski # Modul by Gero Kohnert # -@include("ticker/mconfig.pinc"); +#@include("ticker/mconfig.pinc"); # # The checklist module # allows you to create and edit checklists for some purpose @@ -89,19 +89,12 @@ # allows you to export TUTOS data to palms # Modul by Gero Kohnert # -@include("palm/mconfig.pinc"); +#@include("palm/mconfig.pinc"); # # The ldap support # requires LDAP extension of php # Modul by Gero Kohnert # -@include("ldap/mconfig.pinc"); -# -# The requirements engineering module -# allows you to keep track of your product requirements -# Modul by Gero Kohnert -# -#@include("requirements/mconfig.pinc"); -# +#@include("ldap/mconfig.pinc"); # ?> |
From: Gero K. <gok...@us...> - 2003-06-27 14:06:19
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs1:/tmp/cvs-serv20695/php/db Modified Files: Tag: BRANCH-1-1 db_pg.pinc Log Message: additional dateformat Index: db_pg.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db_pg.pinc,v retrieving revision 1.18.2.1 retrieving revision 1.18.2.2 diff -u -r1.18.2.1 -r1.18.2.2 --- db_pg.pinc 7 Jun 2003 12:57:33 -0000 1.18.2.1 +++ db_pg.pinc 27 Jun 2003 14:02:27 -0000 1.18.2.2 @@ -13,6 +13,7 @@ $tutos['dateformat'][] = 'pgformat1'; $tutos['dateformat'][] = 'pgformat2'; $tutos['dateformat'][] = 'pgformat3'; +$tutos['dateformat'][] = 'pgformat4'; $tutos['dateformat'][] = 'pgformat5'; /** @@ -65,6 +66,24 @@ $d->min = 0; $d->sec = 0; $d->format = 3; + } + return; +} +/** + * check for string delivered in postgres format + */ +function pgformat4(&$d,$str){ + $regs = array(); + if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { + # Init via DB 1999-11-27 12:34:56 + $d->year = (integer)$regs[1]; + $d->month = (integer)$regs[2]; + $d->day = (integer)$regs[3]; + $d->hour = (integer)$regs[4]; + $d->min = (integer)$regs[5]; + $d->sec = (integer)$regs[6]; + //$d->tz = $regs[8]; + $d->format = 4; } return; } |
From: Gero K. <gok...@us...> - 2003-06-27 14:00:09
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv19670/php Modified Files: Tag: BRANCH-1-1 task.pinc task_overview.php Log Message: small changes Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.107.2.1 retrieving revision 1.107.2.2 diff -u -r1.107.2.1 -r1.107.2.2 --- task.pinc 12 May 2003 06:28:02 -0000 1.107.2.1 +++ task.pinc 27 Jun 2003 13:56:57 -0000 1.107.2.2 @@ -233,7 +233,7 @@ if ( empty($this->id) ) return; if ( -1 == $this->id ) return; - $query = "SELECT * FROM ". $this->tablename2 ." WHERE t_id = ". $this->id; + $query = "SELECT w_id FROM ". $this->tablename2 ." WHERE t_id = ". $this->id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.50 retrieving revision 1.50.2.1 diff -u -r1.50 -r1.50.2.1 --- task_overview.php 8 Mar 2003 17:07:10 -0000 1.50 +++ task_overview.php 27 Jun 2003 13:56:57 -0000 1.50.2.1 @@ -300,6 +300,7 @@ } else { $msg .= $lang['Err0048']; $this->stop = true; + return; } if ( isset($_GET['fld']) ) { $this->fld = $_GET['fld']; @@ -319,7 +320,6 @@ if( $this->parent != -1 && $this->parent->getType() != "address" ) { $x = array( url => "task_overview.php?id=".$this->parent->id, - text => $lang['TaskGantt'], info => sprintf($lang['TaskOverviewInfo'],$this->parent->getFullName()), category => array("task","view") ); @@ -328,8 +328,8 @@ $x[text] = $lang['TaskOverview']; } else { $x[text] = $lang['TaskOverview'] ."++"; - $x[url] = "task_overview.php?id=".$this->parent->id."&fld=worker"; - } + $x[url] = "task_overview.php?id=".$this->parent->id."&fld=worker"; + } $this->addMenu($x); } |
From: Gero K. <gok...@us...> - 2003-06-27 13:59:44
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv18057/php Modified Files: webelements.p3 Log Message: new addMessage and fixes Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.216 retrieving revision 1.217 diff -u -r1.216 -r1.217 --- webelements.p3 23 Jun 2003 15:57:04 -0000 1.216 +++ webelements.p3 27 Jun 2003 13:45:13 -0000 1.217 @@ -140,6 +140,7 @@ * Language is determined by looking at HTTP_ACCEPT_LANGUAGE in automatic mode */ Function ReadLang1(&$lang,$path,&$user) { + global $tutos; if ( isset($_GET['lg']) || isset($_POST['lg']) ) { if ( isset($_GET['lg']) ) { @@ -348,7 +349,9 @@ $msg .= "Language:\t". $_SERVER["HTTP_ACCEPT_LANGUAGE"] ."\n"; } $msg .= "URL:\t\t". $_SERVER["PHP_SELF"] ."\n"; - $msg .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; + if (isset($_SERVER["REQUEST_URI"])) { + $msg .= "Request:\t". $_SERVER["REQUEST_URI"] ."\n"; + } if ( count($_POST) ) { foreach($_POST as $i => $f) { if ( is_Array($f) ) { @@ -440,7 +443,9 @@ } } echo "<b>URL:</b> ". $_SERVER["PHP_SELF"] ."<br>\n"; - echo "<b>Request:</b> ". $_SERVER["REQUEST_URI"] ."<br>\n"; + if (isset($_SERVER["REQUEST_URI"])) { + echo "<b>Request:</b> ". $_SERVER["REQUEST_URI"] ."<br>\n"; + } if ( isset($_SERVER['HTTP_REFERER']) ) { echo "<b>Called from:</b> <a href=\"". $_SERVER['HTTP_REFERER'] ."\">". $_SERVER['HTTP_REFERER'] ."</a><br>\n"; } @@ -636,6 +641,17 @@ return $href; } /** + * store message for display on next page + * + */ + Function addMessage($gotourl,$msg) { + if ($msg != "") { + $_SESSION['MSGID'.strlen($msg)] = UrlEncode($msg); + return addUrlParameter($gotourl,"msgid=MSGID". strlen($msg)); + } + return $gotourl; + } +/** * add keys to a url * */ @@ -746,7 +762,7 @@ } if ( $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != "") ) { - return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,$attr,myentities($plus),myentities($info),$text); + return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,$attr,myentities($plus,1),myentities($info,1),$text); } else { return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,$attr,myentities($info,1),myentities($info),$text); } @@ -768,7 +784,7 @@ $href = $tutos['base'] ."/php/". $href; } if ( $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != "") ) { - return sprintf ("<a href=\"%s\" "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,myentities($plus),myentities($info),$text); + return sprintf ("<a href=\"%s\" "return overlib('%s',STATUS,'%s',FULLHTML)\" "nd()\">%s</a>",$href,myentities($plus,1),myentities($info,1),$text); } else { return sprintf ("<a href=\"%s\" "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,myentities($info,1),myentities($info),$text); } @@ -1104,8 +1120,11 @@ if ( $usecache == 1 ) { if ( isset($g_hash[$id]) ) { # echo $id ." ". $g_hash[$id]->gettype() ." hashed x<br>"; - $g_hash['hits']++; - return $g_hash[$id]; + $g_hash['hits']++; + if ( ($g_hash[$id] != -1) && ($tutos[debug] == 1) && ($g_hash[$id]->id != $id) ) { + echo "HASH ERR ". $g_hash[$id]->id ." != ". $id ."<br>"; + } + return $g_hash[$id]; } } @@ -1640,4 +1659,4 @@ } web_StackStart($layout->obj->getUrl(), $layout->obj->getUrl(),$x, $layout->obj->getFullName()); } -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:58:11
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv19894/php Modified Files: task_show.php task_overview.php bug_show.php Log Message: wordwrapping for long text Index: task_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_show.php,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- task_show.php 23 Jun 2003 15:57:04 -0000 1.60 +++ task_show.php 27 Jun 2003 13:58:08 -0000 1.61 @@ -76,7 +76,7 @@ echo " <tr>\n"; echo $this->showfield($lang['TaskDesc']); - echo " <td colspan=\"3\" class=\"pre\"><pre>". urlReplace($this->obj->desc) ."</pre></td>\n"; + echo " <td colspan=\"3\" class=\"pre\"><pre>". wordwrap(urlReplace($this->obj->desc),80) ."</pre></td>\n"; echo " </tr>\n"; echo " <tr>\n"; Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- task_overview.php 23 Jun 2003 15:57:04 -0000 1.54 +++ task_overview.php 27 Jun 2003 13:58:08 -0000 1.55 @@ -333,29 +333,29 @@ } else { $msg .= $lang['Err0048']; $this->stop = true; + return; } if ( isset($_GET['fld']) ) { $this->fld = $_GET['fld']; } - if ( isset($_GET['start']) ) + if ( isset($_GET['start']) ) { $this->start = new DateTime($_GET['start']); - else + } else { if( isset($_GET['start_d']) ) { - $start = sprintf("%04d%02d%02d", $_GET['start_y'], - $_GET['start_m'], $_GET['start_d']); - $this->start = new DateTime($start); + $start = sprintf("%04d%02d%02d", $_GET['start_y'],$_GET['start_m'], $_GET['start_d']); + $this->start = new DateTime($start); } - - if ( isset($_GET['end']) ) + } + if ( isset($_GET['end']) ) { $this->end = new DateTime($_GET['end']); - else + } else { if( isset($_GET['end_d']) ) { - $end = sprintf("%04d%02d%02d", $_GET['end_y'], - $_GET['end_m'], $_GET['end_d']); - $this->end = new DateTime($end); + $end = sprintf("%04d%02d%02d", $_GET['end_y'], + $_GET['end_m'], $_GET['end_d']); + $this->end = new DateTime($end); } - + } # menu @@ -371,10 +371,9 @@ if( $this->parent != -1 && $this->parent->getType() != "address" ) { $x = array( url => "task_overview.php?id=".$this->parent->id, - text => $lang['TaskGantt'], info => sprintf($lang['TaskOverviewInfo'],$this->parent->getFullName()), category => array("task","view") - ); + ); $x[text] = $lang['TaskOverview']; $this->addMenu($x); @@ -383,8 +382,8 @@ $this->addMenu($x); } web_StackStartLayout($this, - "task_overview.php?id=".$this->parent->id, - "task_overview.php?".$_SERVER['QUERY_STRING']); + "task_overview.php?id=".$this->parent->id, + "task_overview.php?".$_SERVER['QUERY_STRING']); } } Index: bug_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bug_show.php,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- bug_show.php 24 Jun 2003 15:12:49 -0000 1.55 +++ bug_show.php 27 Jun 2003 13:58:08 -0000 1.56 @@ -96,7 +96,7 @@ echo "</tr><tr>\n"; echo $this->showfield($lang['BugHistory']); echo " <td class=\"pre\" colspan=\"3\">"; - echo "<pre>\n". urlReplace($this->obj->description,0) ."\n</pre></td>\n"; + echo "<pre>\n". wordwrap(urlReplace($this->obj->description,0),80) ."\n</pre></td>\n"; echo "</tr>\n"; show_module_infolists($this->user,$this->obj,4,$this->format); |
From: Gero K. <gok...@us...> - 2003-06-27 13:56:47
|
Update of /cvsroot/tutos/tutos In directory sc8-pr-cvs1:/tmp/cvs-serv18174 Modified Files: Makefile README.ca langdiff.sh Added Files: README.es-ve README.pt Log Message: language stuff Index: Makefile =================================================================== RCS file: /cvsroot/tutos/tutos/Makefile,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Makefile 30 May 2003 13:18:02 -0000 1.62 +++ Makefile 27 Jun 2003 13:46:12 -0000 1.63 @@ -11,6 +11,9 @@ # # # $Log$ +# Revision 1.63 2003/06/27 13:46:12 gokohnert +# language stuff +# # Revision 1.62 2003/05/30 13:18:02 tapoueh # Minor debugs allowing to make the package. # @@ -406,6 +409,7 @@ php/localization/nl.p3 \ php/localization/sv.p3 \ php/localization/el.p3 \ + php/localization/pt.p3 \ php/localization/pt-br.p3 HELP = html/help/.htaccess \ @@ -562,6 +566,7 @@ ${LANG_CS} \ ${LANG_JA} \ ${LANG_CA} \ + ${LANG_ES-VE} \ ${PHP_MERGE} \ ${PHP_CHECKLIST} \ ${PHP_PALM} \ @@ -944,6 +949,7 @@ catalan.zip \ hungarian.zip \ czech.zip \ + portuguese.zip \ ticker.zip \ merge.zip \ checklist.zip \ @@ -961,6 +967,7 @@ @mv catalan.zip catalan-${FULLVERSION}.zip @mv hungarian.zip hungarian-${FULLVERSION}.zip @mv czech.zip czech-${FULLVERSION}.zip + @mv portuguese.zip portuguese-${FULLVERSION}.zip @mv ticker.zip ticker-${FULLVERSION}.zip @mv merge.zip merge-${FULLVERSION}.zip @mv checklist.zip checklist-${FULLVERSION}.zip @@ -1058,6 +1065,22 @@ cd ..;cat tutos/hu.list | zip -@ tutos/$@ rm hu.list +LANG_ES-VE = README.es-ve \ + $(wildcard php/*/es-ve.p3) \ + php/localization/holiday_es_ve.pinc \ + $(wildcard html/help/*_es-ve.html) \ + $(wildcard html/*.proto.es-ve) + +venezuela.zip: $(LANG_ES-VE) + @echo "# Make Filelist for $@" + @/bin/rm -f es-ve.list + @/usr/bin/touch es-ve.list + @$(foreach d,$(LANG_ES-VE), \ + echo tutos/$(d) >> es-ve.list; \ + ) + cd ..;cat tutos/es-ve.list | zip -@ tutos/$@ + rm es-ve.list + LANG_CS = README.cs \ $(wildcard php/*/cs.p3) \ $(wildcard html/help/*_cs.html) \ @@ -1072,6 +1095,22 @@ ) cd ..;cat tutos/cs.list | zip -@ tutos/$@ rm cs.list + +LANG_PT = README.pt \ + $(wildcard php/*/pt.p3) \ + $(wildcard html/help/*_pt.html) \ + $(wildcard html/*.proto.pt) + +portuguese.zip: $(LANG_PT) + @echo "# Make Filelist for $@" + @/bin/rm -f pt.list + @/usr/bin/touch pt.list + @$(foreach d,$(LANG_PT), \ + echo tutos/$(d) >> pt.list; \ + ) + cd ..;cat tutos/pt.list | zip -@ tutos/$@ + zip $@ -z < README.pt + rm pt.list # Ticker Module ticker.zip: $(PHP_TICKER) Index: README.ca =================================================================== RCS file: /cvsroot/tutos/tutos/README.ca,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- README.ca 25 Aug 2002 11:53:03 -0000 1.2 +++ README.ca 27 Jun 2003 13:46:13 -0000 1.3 @@ -4,7 +4,7 @@ for installation you have to -1. unpack ja.zip in the directory above tutos (you already have done this when you can read this) +1. unpack catalan.zip in the directory above tutos (you already have done this when you can read this) 2. if not existant create a file tutos/php/lang_custom.p3 3. add a line $lang['lang']['ca'] = "catalan"; Index: langdiff.sh =================================================================== RCS file: /cvsroot/tutos/tutos/langdiff.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- langdiff.sh 15 Apr 2003 20:00:28 -0000 1.5 +++ langdiff.sh 27 Jun 2003 13:46:13 -0000 1.6 @@ -49,8 +49,10 @@ doit "ca" doit "hu" doit "cs" +doit "pt" doit "es-mx" doit "es-ni" +doit "es-ve" doit "pt-br" doit "vi" |
From: Gero K. <gok...@us...> - 2003-06-27 13:56:47
|
Update of /cvsroot/tutos/tutos/html/help In directory sc8-pr-cvs1:/tmp/cvs-serv18174/html/help Modified Files: app_new.html product_show_cs.html Log Message: language stuff Index: app_new.html =================================================================== RCS file: /cvsroot/tutos/tutos/html/help/app_new.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- app_new.html 6 Nov 2002 20:01:25 -0000 1.2 +++ app_new.html 27 Jun 2003 13:46:13 -0000 1.3 @@ -24,10 +24,13 @@ <LI><B><?php echo $lang["Participants"] ?></B><BR> You see a list of users and teams. This are all teams where you are a member and all users of these teams. Your own name is preselected.<BR> You can enter multiple participants. -<LI><B>who may change or delete it</B><BR> +<LI><B><?php echo $lang["AppChangeOrDel"] ?></B><BR> Make a selection to tell <I>TUTOS</I> who you like to be able to change or delte this appointment. -<LI><B><?php echo $lang["tracestate"] ?></B><BR> +<LI><B><?php echo $lang["AppTrace"] ?></B><BR> If you are not sure if all selected participants will commit to your appointment, you can select this button. Users will have the possibility to vote (YES/NO/???) for this appointment. +<LI><B><?php echo $lang["AppCheck"] ?></B><BR> + Check this if the appointment should only be created when all participants + and resources are free. <LI><B><?php echo $lang["InviteEmail"] ?></B><BR> All participants will receive a email invitation.<BR> <I>This feature will not work on all systems !</I><BR> Index: product_show_cs.html =================================================================== RCS file: /cvsroot/tutos/tutos/html/help/product_show_cs.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- product_show_cs.html 27 Nov 2002 14:33:26 -0000 1.1 +++ product_show_cs.html 27 Jun 2003 13:46:13 -0000 1.2 @@ -85,7 +85,7 @@ Zkrácený seznam schùzek týkající se tohoto projektu/produktu.<BR> <LI><B><? echo $lang["Notes"] ?></B><BR> Seznam poznámek týkající se projektu/produktu. -<LI><B><? echo $lang["ProdFiles"] ?></B><BR> +<LI><B><? echo $lang["Files"] ?></B><BR> Seznam dokumentù (souborù), které mají vztah k projektu/produktu. <LI><B><? echo $lang["Resources"] ?></B><BR> Seznam zdrojù, které jsou, a nebo byly, vyu¾ívaný v prùbìhu prací na projektu/produktu. |
From: Gero K. <gok...@us...> - 2003-06-27 13:56:15
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv19562/php Modified Files: task_import_csv.php Log Message: variable preset Index: task_import_csv.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_import_csv.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- task_import_csv.php 31 Dec 2002 14:33:39 -0000 1.15 +++ task_import_csv.php 27 Jun 2003 13:56:12 -0000 1.16 @@ -102,13 +102,13 @@ if( ! $this->import ) { // Will have to confirm the import echo "<form name=\"import\" action=\"task_import_csv.php\" method=\"POST\">\n"; - $this->addHidden("contents",$contents); + $this->addHidden("contents",$contents); $this->addHidden("p_id",$this->obj->id); - $this->addHidden("name",$this->fld_name); - $this->addHidden("index",$this->fld_index); - $this->addHidden("s_start",$this->fld_start); - $this->addHidden("s_end",$this->fld_end); - $this->addHidden("volume",$this->fld_volume); + $this->addHidden("name",$this->fld_name); + $this->addHidden("index",$this->fld_index); + $this->addHidden("s_start",$this->fld_start); + $this->addHidden("s_end",$this->fld_end); + $this->addHidden("volume",$this->fld_volume); } echo $this->DataTableStart(); echo " <tr><th colspan=\"6\">"; @@ -128,7 +128,7 @@ $t->p_id = $this->obj->id; for($j=0; $j < count($fields); $j++) { - if( $i == 0 ) { + if( $i == 0 ) { echo "<th>".$fields[$j]."</th>"; } else { // Here we look what the field is @@ -162,7 +162,7 @@ $t->setVolume($vol); } else { $t->setVolume(0); - } + } $val = $t->volume." h"; break; } @@ -243,12 +243,12 @@ echo $this->DataTableEnd(); if( ! $this->import ) { hiddenFormElements(); - echo $this->getHidden(); + echo $this->getHidden(); echo "</form>"; - } + } } /** - * The date format I had here is the one used by french version of MSProject. + * The date format I had here is the one used by french version of MSProject. * As I'm not sure the format DD/MM/YY is widely used, i've prefered not to * add it to the DateTime class. */ @@ -259,7 +259,7 @@ $d = "20".$regs[3].$regs[2].$regs[1]; } else { $d = $datestr[1]; - } + } return $d; } @@ -279,7 +279,7 @@ $this->addHidden("p_id",$this->obj->id); - echo $this->DataTableStart(); + echo $this->DataTableStart(); echo " <tr><th colspan=\"4\">"; echo "Import CSV (". $lang[$this->obj->getType()] ." ". menulink($this->obj->getUrl(),$this->obj->getFullName()) .")"; echo " </th></tr>\n"; @@ -343,9 +343,9 @@ echo "<input type=\"submit\" name=\"valid\" value=\"". $lang['ImportValid']."\"></td>\n"; echo "</tr>\n"; } - echo $this->DataTableEnd(); + echo $this->DataTableEnd(); hiddenFormElements(); - echo $this->getHidden(); + echo $this->getHidden(); echo "</form>\n"; } /** @@ -360,7 +360,12 @@ global $tutos,$msg,$lang; $this->name = $lang['TaskImport']; - $this->import = false; + $this->import = false; + $this->fld_name = ""; + $this->fld_index = ""; + $this->fld_volume = ""; + $this->fld_start = ""; + $this->fld_end = ""; if ( isset($_POST['p_id']) ) { $this->obj = GetObject($this->dbconn, $_POST['p_id']); @@ -374,27 +379,27 @@ $this->fld_name = $_POST['name']; } else if ( isset($_GET['name']) ) { $this->fld_name = $_GET['name']; - } + } if ( isset($_POST['index']) ) { $this->fld_index = $_POST['index']; } else if ( isset($_GET['index']) ) { $this->fld_index = $_GET['index']; - } + } if ( isset($_POST['volume']) ) { $this->fld_volume = $_POST['volume']; } else if ( isset($_GET['volume']) ) { $this->fld_volume = $_GET['volume']; - } + } if ( isset($_POST['s_start']) ) { $this->fld_start = $_POST['s_start']; } else if ( isset($_GET['s_start']) ) { $this->fld_start = $_GET['s_start']; - } + } if ( isset($_POST['s_end']) ) { $this->fld_end = $_POST['s_end']; } else if ( isset($_GET['s_end']) ) { $this->fld_end = $_GET['s_end']; - } + } if ( isset($_POST['import']) ) { $this->import = true; @@ -405,4 +410,4 @@ $l = new task_import($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:55:29
|
Update of /cvsroot/tutos/tutos/homepage In directory sc8-pr-cvs1:/tmp/cvs-serv19405/homepage Modified Files: Tag: BRANCH-1-1 install_easy.html Log Message: fix Index: install_easy.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/install_easy.html,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -r1.12.2.1 -r1.12.2.2 --- install_easy.html 7 Apr 2003 19:02:08 -0000 1.12.2.1 +++ install_easy.html 27 Jun 2003 13:55:26 -0000 1.12.2.2 @@ -81,7 +81,7 @@ <UL> <LI>Login at <U>http://[yourserver]/tutos/php/mytutos.php</U> with the above username and password </UL> -<LI><B>remove <U>[tutosdir]/php/scheme.php</U> and <U>[tutosdir]/php/update.php</U> and <U>[tutosdir]/php/ldap_getdata.php</U> from your php subdir or at least disable it for public use!!!</B> +<LI><B>remove <U>[tutosdir]/php/scheme.php</U> and <U>[tutosdir]/php/update.php</U> from your php subdir or at least disable it for public use!!!</B> <LI><B>CHECK that <U>http://[yourserver]/tutos/php/config.pinc</U> is not readable. This should be the case if you leave <u>[tutosdir]/php/.htaccess</u> intact and/or use the provided <u>[tutosdir]/apache.conf</u>, otherwise you should provide some own protection.</b> </OL> |
From: Gero K. <gok...@us...> - 2003-06-27 13:55:02
|
Update of /cvsroot/tutos/tutos/php/note In directory sc8-pr-cvs1:/tmp/cvs-serv16152/php/note Modified Files: note_ins.php Log Message: new addMessage messaging Index: note_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note_ins.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- note_ins.php 10 Apr 2003 12:02:28 -0000 1.7 +++ note_ins.php 27 Jun 2003 13:33:33 -0000 1.8 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2002 by Gero Kohnert + * Copyright 1999 - 2003 by Gero Kohnert * * this script parses all the inputs and stores the object into the database. * on completition it jumps to the detail screen of the stored object @@ -69,8 +69,8 @@ $dbconn->Commit("WORK"); $gotourl = web_StackPop(2); } + $gotourl = addMessage($gotourl,$msg); $gotourl = addSessionKey($gotourl); - $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); Header("Status: 302 Moved Temporarily"); Header("Location: ". dirname(getBaseUrl()) ."/". $gotourl); @@ -79,4 +79,4 @@ * CVS Info: $Id$ * $Author$ */ -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:54:51
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs1:/tmp/cvs-serv19257/php/db Modified Files: db_pg.pinc Log Message: moved postgres date parsing to db_pg Index: db_pg.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db_pg.pinc,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- db_pg.pinc 14 Mar 2003 16:55:12 -0000 1.18 +++ db_pg.pinc 27 Jun 2003 13:54:48 -0000 1.19 @@ -1,6 +1,6 @@ <?php /* - * Copyright 2001 - 2002 by Gero Kohnert + * Copyright 2001 - 2003 by Gero Kohnert * * CVS Info: $Id$ * $Author$ @@ -13,6 +13,9 @@ $tutos['dateformat'][] = 'pgformat1'; $tutos['dateformat'][] = 'pgformat2'; $tutos['dateformat'][] = 'pgformat3'; +$tutos['dateformat'][] = 'pgformat4'; +$tutos['dateformat'][] = 'pgformat6'; +$tutos['dateformat'][] = 'pgformat5'; /** * check for string delivered in postgres format @@ -67,6 +70,58 @@ } return; } +/** + * check for string delivered in postgres format + */ +function pgformat4(&$d,$str){ + $regs = array(); + if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { + # Init via DB 1999-11-27 12:34:56 + $d->year = (integer)$regs[1]; + $d->month = (integer)$regs[2]; + $d->day = (integer)$regs[3]; + $d->hour = (integer)$regs[4]; + $d->min = (integer)$regs[5]; + $d->sec = (integer)$regs[6]; + //$d->tz = $regs[8]; + $d->format = 4; + } + return; +} +/** + * check for string delivered in postgres format + */ +function pgformat5(&$d,$str){ + $regs = array(); + if ( ereg( "^([0-9]{4})-([0-1][0-9])-([0-3][0-9]) ([0-2][0-9]):([0-5][0-9]):([0-5][0-9])?(.*[0-9])$", $str, $regs ) ) { + # Init via YYYY-MM-DD hh:mm:ss * + $d->month = (integer)$regs[2]; + $d->day = (integer)$regs[3]; + $d->year = (integer)$regs[1]; + $d->hour = (integer)$regs[4]; + $d->min = (integer)$regs[5]; + $d->sec = (integer)$regs[6]; + $d->format = 5; + } + return; +} +/** + * check for string delivered in postgres format + */ +function pgformat6(&$d,$str){ + $regs = array(); + if ( ereg( "^([0-9]{4}).([0-9]{1,2}).([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { + # Init via DB 2003.06.04 17:00:26 Postgres 7.3 + $d->year = (integer)$regs[1]; + $d->month = (integer)$regs[2]; + $d->day = (integer)$regs[3]; + $d->hour = (integer)$regs[4]; + $d->min = (integer)$regs[5]; + $d->sec = (integer)$regs[6]; + $d->format = 19; + } + return; +} /** * postgres database connection class @@ -90,7 +145,7 @@ function open() { global $phperrmsg; - $of = $this->openfunc; + $of = $this->openfunc; $c = $of("dbname=". $this->db->name ." host=".$this->db->host." port=".$this->db->port ." user=".$this->db->user." password=".$this->db->pass); if ($c == false) { @@ -122,9 +177,9 @@ if ( $this->version == 1 ) { # Postgres 7.0 return ("'epoch'"); - } else { + } else { return ("null"); - } + } } /* --------------------------------------------------------------------------- */ @@ -132,9 +187,9 @@ if ( $this->version == 1 ) { # Postgres 7.0 return ("'now'"); - } else { + } else { return ("current_timestamp"); - } + } } /* --------------------------------------------------------------------------- */ @@ -298,20 +353,20 @@ * 1 = yes */ function setPersistent($mode) { - if ( $mode == 1 ) { + if ( $mode == 1 ) { $this->openfunc = 'pg_pconnect'; - } else { + } else { $this->openfunc = 'pg_connect'; - } + } } /* --------------------------------------------------------------------------- */ function error() { if ( $this->conn != -1 ) { $msg = pg_ErrorMessage($this->conn); - } else { + } else { $msg = "no connection"; - } + } return "DBerror: ". $this->getFullname() ." ". $msg; } /** @@ -321,7 +376,7 @@ */ function truncatetable($tbl) { $q = "TRUNCATE ". $this->prefix . $tbl; - return $this->exec($q,0); + return $this->exec($q,0); } /** * tbl = array with table description @@ -329,10 +384,10 @@ function droptable(&$tbl) { if (is_array($tbl)) { $q = "DROP TABLE ". $this->prefix . $tbl[name] ; - } else { + } else { $q = "DROP TABLE ". $this->prefix . $tbl ; - } - return $this->exec($q,0); + } + return $this->exec($q,0); } /** * tbl = array with table description @@ -363,7 +418,7 @@ $c = ereg_replace("U","unique",$c); $q .= $pre. $this->colname($i) ." ". $t ." ". $c; $pre = ","; - $comment[] = "COMMENT ON COLUMN ". $this->prefix . $tbl[name] .".".$this->colname($i) ." IS '". $f[Desc] ."'"; + $comment[] = "COMMENT ON COLUMN ". $this->prefix . $tbl[name] .".".$this->colname($i) ." IS '". $f[Desc] ."'"; } $q .= ")"; @@ -384,14 +439,14 @@ */ function renametable(&$oldtbl,$newname) { $q = "ALTER TABLE ". $this->prefix . $oldtbl[name] ." RENAME TO " . $this->prefix . $newname; - return $this->exec($q,0); + return $this->exec($q,0); } /** * tbl = array with table description */ function dropindex(&$idx) { $q = "DROP INDEX ". $this->prefix . $idx[name] ; - return $this->exec($q,0); + return $this->exec($q,0); } /** * tbl = array with table description @@ -409,7 +464,7 @@ } $q .= ")"; $r = $this->exec($q,0); -# echo $r->numrows() ." ". $q ."<br>"; +# echo $r->numrows() ." ". $q ."<br>"; if ($r != -1 ) { $q = "COMMENT ON INDEX ". $this->prefix . $idx[name] ." IS '". $idx[Desc] ."'"; $this->exec($q); @@ -450,10 +505,10 @@ $c = ereg_replace("PK","",$c); $c = ereg_replace("U","",$c); $c = ereg_replace("NN","CHECK (". $this->colname($colname) ." is not null)",$c); - if ( $c != "" ) { + if ( $c != "" ) { $q .= $c; $r = $this->exec($q,0); - } + } return $r; } /** @@ -478,14 +533,14 @@ $diff = $now->getTimestamp() - $this->db->lastanalyze->getTimeStamp(); # only once a day - if ( $diff < 86400 ) return; + if ( $diff < 86400 ) return; $q = "vacuum full"; $this->Exec($q,0); $q = "analyze"; $this->Exec($q,0); - $this->db->setLastAnalyze($now); - $msg = $this->db->save(); + $this->db->setLastAnalyze($now); + $msg = $this->db->save(); return $msg; } /* --------------------------------------------------------------------------- @@ -546,4 +601,4 @@ } } -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:54:51
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv19257/php Modified Files: Date.pinc db.p3 permission.p3 Log Message: moved postgres date parsing to db_pg Index: Date.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- Date.pinc 12 Jun 2003 13:18:47 -0000 1.77 +++ Date.pinc 27 Jun 2003 13:54:47 -0000 1.78 @@ -583,16 +583,6 @@ $this->sec = (integer)$regs[6]; $this->format = 10; } else - if ( ereg( "^([0-9]{4}).([0-9]{1,2}).([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { - # Init via DB 2003-06-04 17:00:26 Postgres 7.3 - $this->year = (integer)$regs[1]; - $this->month = (integer)$regs[2]; - $this->day = (integer)$regs[3]; - $this->hour = (integer)$regs[4]; - $this->min = (integer)$regs[5]; - $this->sec = (integer)$regs[6]; - $this->format = 9; - } else if ( ereg( "^([0-1][0-9])([0-3][0-9])([0-9]{4})$", $str, $regs ) ) { # Init via DB MMDDYYYY $this->month = (integer)$regs[1]; Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.117 retrieving revision 1.118 diff -u -r1.117 -r1.118 --- db.p3 1 Apr 2003 18:54:19 -0000 1.117 +++ db.p3 27 Jun 2003 13:54:47 -0000 1.118 @@ -207,8 +207,8 @@ if ( $tutos[debug] != 0 ) { # error_reporting(E_ERROR|E_WARNING|E_PARSE); - error_reporting(E_ERROR|E_WARNING|E_PARSE|E_NOTICE|E_ALL); - error_log(Date("d.m.Y H:i:s T") ."\t". $_SERVER['REMOTE_ADDR']." \t". $_SERVER['REQUEST_METHOD'] ." ". $_SERVER['REQUEST_URI'] ."\n" ,3,$tutos[errlog].".log"); + @error_reporting(E_ERROR|E_WARNING|E_PARSE|E_NOTICE|E_ALL); + @error_log(Date("d.m.Y H:i:s T") ."\t". $_SERVER['REMOTE_ADDR']." \t". $_SERVER['REQUEST_METHOD'] ." ". $_SERVER['REQUEST_URI'] ."\n" ,3,$tutos[errlog].".log"); @chmod ($tutos[errlog].".log",0666); if ( @filesize($tutos[errlog].".log") > 1024000) { @rename($tutos[errlog].".log",$tutos[errlog].".log.". Date("YmdHi")); @@ -219,7 +219,7 @@ } } else { $tutos[debugConsole] = 0; - error_reporting(0); + @error_reporting(0); } set_error_handler('PHP_Error'); Index: permission.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/permission.p3,v retrieving revision 1.121 retrieving revision 1.122 diff -u -r1.121 -r1.122 --- permission.p3 20 Jun 2003 15:39:50 -0000 1.121 +++ permission.p3 27 Jun 2003 13:54:48 -0000 1.122 @@ -31,8 +31,12 @@ # We do that ourself ini_set("session.use_trans_sid","0"); -$xxxx = split("/",$_SERVER['REQUEST_URI']); -ini_set("session.cookie_path","/". $xxxx[1]); +if (isset($_SERVER['REQUEST_URI'])) { + $xxxx = split("/",$_SERVER['REQUEST_URI']); + ini_set("session.cookie_path","/". $xxxx[1]); +} else { + ini_set("session.cookie_path","/"); +} #ini_set("file_uploads","On"); ini_set("register_globals","Off"); ini_set("register_argc_argv","Off"); @@ -183,12 +187,27 @@ global $lang ,$dbconn , $current_user,$tutos, $msg; # Take a possible transfered message to global namespace + # Stuff that is delivered in an unsecure way (GET/POST) will be + # handeld with HtmlEntities + $msg = ""; if ( isset($_POST['msg']) ) { - $msg = $_POST['msg']; + $msg .= HtmlEntities(UrlDecode($_POST['msg'])); } elseif ( isset($_GET['msg']) ) { - $msg = $_GET['msg']; - } else { - $msg = ""; + $msg .= HtmlEntities(UrlDecode($_GET['msg'])); + } elseif ( isset($_POST['msgid']) ) { + if (isset($_SESSION[$_POST['msgid']])) { + $msg .= UrlDecode($_SESSION[$_POST['msgid']]); + unset($_SESSION[$_POST['msgid']]); + } else { + $msg = "?"; + } + } elseif ( isset($_GET['msgid']) ) { + if (isset($_SESSION[$_GET['msgid']])) { + $msg .= UrlDecode($_SESSION[$_GET['msgid']]); + unset($_SESSION[$_GET['msgid']]); + } else { + $msg = "?"; + } } if ( isset($_COOKIE['TUTOS']) ) { @@ -276,7 +295,11 @@ } } # update the TTL - $xxxx = split("/",$_SERVER['REQUEST_URI']); + if (isset($_SERVER['REQUEST_URI'])) { + $xxxx = split("/",$_SERVER['REQUEST_URI']); + } else { + $xxxx[1] = ""; + } setcookie(session_name(),$tutos['SESSID'],time() + 60 * $tutos[timetolive],"/". $xxxx[1]); if ( ($userid < 1) OR !is_numeric($userid) ) { |
From: Gero K. <gok...@us...> - 2003-06-27 13:52:42
|
Update of /cvsroot/tutos/tutos/php/url In directory sc8-pr-cvs1:/tmp/cvs-serv16152/php/url Modified Files: url_ins.php Log Message: new addMessage messaging Index: url_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_ins.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- url_ins.php 10 Mar 2003 18:11:39 -0000 1.5 +++ url_ins.php 27 Jun 2003 13:33:33 -0000 1.6 @@ -61,7 +61,7 @@ $gotourl = $ref->getUrl(); } - $gotourl = addUrlParameter($gotourl,"msg=". UrlEncode($msg)); + $gotourl = addMessage($gotourl,$msg); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); |
From: Gero K. <gok...@us...> - 2003-06-27 13:52:42
|
Update of /cvsroot/tutos/tutos/php/watchlist In directory sc8-pr-cvs1:/tmp/cvs-serv16152/php/watchlist Modified Files: watchlist_ins.php Log Message: new addMessage messaging Index: watchlist_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/watchlist/watchlist_ins.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- watchlist_ins.php 10 Mar 2003 18:11:45 -0000 1.9 +++ watchlist_ins.php 27 Jun 2003 13:33:33 -0000 1.10 @@ -38,7 +38,8 @@ if ( $msg == "" ) { $msg .= $w->add($obj,$a); } - $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); + + $gotourl = addMessage($gotourl,$msg); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); @@ -48,4 +49,4 @@ * CVS Info: $Id$ * $Author$ */ -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:52:41
|
Update of /cvsroot/tutos/tutos/php/merge In directory sc8-pr-cvs1:/tmp/cvs-serv16152/php/merge Modified Files: merge_ins.php Log Message: new addMessage messaging Index: merge_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/merge/merge_ins.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- merge_ins.php 31 Dec 2002 14:33:49 -0000 1.5 +++ merge_ins.php 27 Jun 2003 13:33:33 -0000 1.6 @@ -62,8 +62,8 @@ $gotourl = $u->ref->getURL(); } + $gotourl = addMessage($gotourl,$msg); $gotourl = addSessionKey($gotourl); - $gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); #echo "".$gotourl.""; Header("Status: 302 Moved Temporarily"); @@ -73,4 +73,4 @@ * CVS Info: $Id$ * $Author$ */ -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2003-06-27 13:51:10
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1:/tmp/cvs-serv18818/php Modified Files: database_new.php database_show.php Log Message: fixes Index: database_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_new.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- database_new.php 31 Dec 2002 14:33:37 -0000 1.23 +++ database_new.php 27 Jun 2003 13:51:07 -0000 1.24 @@ -1,6 +1,6 @@ <?php /* - * Copyright 2001 - 2002 by Gero Kohnert + * Copyright 2001 - 2003 by Gero Kohnert */ include_once 'webelements.p3'; include_once 'permission.p3'; @@ -158,7 +158,11 @@ echo "</form>\n"; echo $lang['FldsRequired'] ."\n"; - echo $this->setfocus("dbadd.name"); + if ( ($this->obj->id > 1000) || ($this->obj->id == -1) ) { + echo $this->setfocus("dbadd.name"); + } else { + echo $this->setfocus("dbadd.home"); + } } /** * navigate @@ -240,4 +244,4 @@ <!-- CVS Info: $Id$ $Author$ ---> +--> \ No newline at end of file Index: database_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_show.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- database_show.php 1 Apr 2003 17:48:17 -0000 1.28 +++ database_show.php 27 Jun 2003 13:51:07 -0000 1.29 @@ -41,7 +41,7 @@ echo $this->showdata($this->obj->alias,3); # Do not show sensitive infos - if ( $this->user->admin == 1 ) { + if ( $this->user->isAdmin() ) { echo "</tr><tr>\n"; echo $this->showfield($lang['AdminDBHost']); echo $this->showdata($this->obj->host); |
From: Gero K. <gok...@us...> - 2003-06-27 13:50:23
|
Update of /cvsroot/tutos/tutos/php/invoice In directory sc8-pr-cvs1:/tmp/cvs-serv18751/php/invoice Modified Files: invoice.pinc Log Message: unimportant change Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- invoice.pinc 25 Mar 2003 19:18:34 -0000 1.36 +++ invoice.pinc 27 Jun 2003 13:50:20 -0000 1.37 @@ -680,8 +680,7 @@ $msg = ""; $this->read_Pos(); - @reset($this->pos); - while ( list ($i,$f) = @each ($this->pos) ) { + foreach( $this->pos as $i => $f) { $msg .= $f->delete(); } |