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
(1) |
2
|
3
(2) |
4
(1) |
5
|
6
(3) |
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
(1) |
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
(13) |
25
|
26
|
27
|
28
|
29
|
30
(1) |
31
|
|
|
|
From: Gero K. <gok...@us...> - 2001-10-30 19:06:13
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv2211/php Modified Files: holiday_fr.pinc Log Message: Update from Thomas GIBERT Index: holiday_fr.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/holiday_fr.pinc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** holiday_fr.pinc 2001/09/27 19:30:21 1.1 --- holiday_fr.pinc 2001/10/30 19:06:09 1.2 *************** *** 5,12 **** * CVS Info: $Id$ * $Author$ */ - $tutos[cal][] = array( ! array( Date => "14-07", Desc => "National Holiday (F)"), ); ?> --- 5,25 ---- * CVS Info: $Id$ * $Author$ + * + * Added by Thomas GIBERT 2001-10-30 */ $tutos[cal][] = array( ! array( Date => "01-01", Desc => "Nouvel An (F)"), ! array( Date => "EASTERSUNDAY", Desc => "Pâques (F)"), ! array( Date => "EASTERMONDAY", Desc => "Lundi de Pâques (F)"), ! array( Date => "01-05", Desc => "Fête du Travail (F)"), ! array( Date => "08-05", Desc => "Victoire 1945 (F)"), ! array( Date => "ASCENSIONDAY", Desc => "Ascension (F)"), ! array( Date => "WHITSUNDAY", Desc => "Pentecôte (F)"), ! array( Date => "WHITMONDAY", Desc => "Lundi de Pentecôte (F)"), ! array( Date => "14-07", Desc => "Fête Nationale (F)"), ! array( Date => "15-08", Desc => "Assomption (F)"), ! array( Date => "01-11", Desc => "Toussaint (F)"), ! array( Date => "11-11", Desc => "Armistice 1918 (F)"), ! array( Date => "25-12", Desc => "Noël (F)") ); ?> |
From: Gero K. <gok...@us...> - 2001-10-24 17:40:55
|
Update of /cvsroot/tutos/tutos In directory usw-pr-cvs1:/tmp/cvs-serv4139 Modified Files: createdb.sh Log Message: using db superuser info for pg Index: createdb.sh =================================================================== RCS file: /cvsroot/tutos/tutos/createdb.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** createdb.sh 2001/09/16 19:23:02 1.8 --- createdb.sh 2001/10/24 17:40:52 1.9 *************** *** 106,115 **** if [ $2 = "CREATE" ] then ! createdb -h $DBHOST -p $DBPORT $DBNAME echo " Database $DBNAME created !" # OLD Postgres 6.5 # createuser -h $DBHOST -p $DBPORT -U -D $DBUSER # Postgres 7 ! createuser -A -D -h $DBHOST -p $DBPORT $DBUSER echo " User $DBUSER created !" echo "---------------------------------------------------------------" --- 106,115 ---- if [ $2 = "CREATE" ] then ! createdb -h $DBHOST -p $DBPORT -U $DBSUSER $DBNAME echo " Database $DBNAME created !" # OLD Postgres 6.5 # createuser -h $DBHOST -p $DBPORT -U -D $DBUSER # Postgres 7 ! createuser -A -D -h $DBHOST -p $DBPORT -U $DBSUSER $DBUSER echo " User $DBUSER created !" echo "---------------------------------------------------------------" |
From: Gero K. <gok...@us...> - 2001-10-24 17:39:49
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv3841/php Modified Files: location.pinc Log Message: added default acl funcs Index: location.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/location.pinc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** location.pinc 2001/09/19 20:51:38 1.16 --- location.pinc 2001/10/24 17:39:46 1.17 *************** *** 72,76 **** $l->read($i); $l->lname = $f; ! $obj->location[$i] = $l; } } --- 72,78 ---- $l->read($i); $l->lname = $f; ! if ( $l->see_ok() ) { ! $obj->location[$i] = $l; ! } } } *************** *** 167,173 **** --- 169,201 ---- $this->id = $result->get(0, "id"); + acl_read($this); $g_loc[$this->id] = $this; } + /* --------------------------------------------------------------------------- + * Checks if the current user is allowed to see this location + */ + function see_ok () { + global $tutos; + + return $tutos[seeok]; + # return acl_see_ok($this); + } + /* --------------------------------------------------------------------------- + * Checks if the current user is allowed to delete this location + */ + function del_ok () { + global $tutos; + return $tutos[delok]; + # return acl_del_ok($this); + } + /* --------------------------------------------------------------------------- + * Checks if the current user is allowed to modify this location + */ + function mod_ok () { + global $tutos; + return $tutos[modok]; + # return acl_mod_ok($this); + } /* --------------------------------------------------------------------------- * |
From: Gero K. <gok...@us...> - 2001-10-24 17:33:56
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv2204/php Modified Files: user.pinc Log Message: fixed string lenght Index: user.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/user.pinc,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -r1.53 -r1.54 *** user.pinc 2001/10/06 18:10:44 1.53 --- user.pinc 2001/10/24 17:33:53 1.54 *************** *** 636,640 **** $q->addFV("last_seen",$this->last_seen,"DATETIME"); $q->addFV("prefteam",$this->get_prefteam(),""); ! $q->addFV("last_host",$this->last_host,"STRING"); $q->addWC("login",$this->login,"STRING"); $query = $q->getUpdate(); --- 636,640 ---- $q->addFV("last_seen",$this->last_seen,"DATETIME"); $q->addFV("prefteam",$this->get_prefteam(),""); ! $q->addFV("last_host",substr($this->last_host,0,20),"STRING"); $q->addWC("login",$this->login,"STRING"); $query = $q->getUpdate(); |
From: Gero K. <gok...@us...> - 2001-10-24 17:32:24
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv1800/php Modified Files: appointment.pinc Log Message: bugfix for daylightsaving time Index: appointment.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** appointment.pinc 2001/09/30 18:31:08 1.62 --- appointment.pinc 2001/10/24 17:32:20 1.63 *************** *** 51,56 **** if ( $to == -1 ) { $to = new DateTime(); ! $to->setDateTimeTS( NextDay($from->getTimeStamp()) - 12 * 3600); } $x1 = $obj->dbconn->DateTime($from); $x2 = $obj->dbconn->DateTime($to); --- 51,60 ---- if ( $to == -1 ) { $to = new DateTime(); ! $to->setDateTimeTS( NextDay($from->getTimeStamp()) ); } + + $from->setDateTime($from->getYYYYMMDD() . "000000"); + $to->setDateTime($to->getYYYYMMDD() . "000000"); + $x1 = $obj->dbconn->DateTime($from); $x2 = $obj->dbconn->DateTime($to); *************** *** 215,219 **** $this->trace = 0; $this->outside = 0; ! $this->mod_allow = 0; $this->start = new DateTime(); $this->end = new DateTime(); --- 219,223 ---- $this->trace = 0; $this->outside = 0; ! $this->mod_allow = 1; $this->start = new DateTime(); $this->end = new DateTime(); *************** *** 235,238 **** --- 239,243 ---- $this->res = array(); $this->resuselist = array(); + $this->tablename = "calendar"; } *************** *** 315,319 **** } ! $query = "SELECT * FROM calendar WHERE id = ". $id; $result = $this->dbconn->Exec($query); $i = $result->numrows(); --- 320,324 ---- } ! $query = "SELECT * FROM ". $this->tablename ." WHERE id = ". $id; $result = $this->dbconn->Exec($query); $i = $result->numrows(); *************** *** 494,498 **** $msg = ""; ! $q = "DELETE FROM calendar WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 499,503 ---- $msg = ""; ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); *************** *** 601,605 **** $q = new query($this->dbconn); ! $q->setTable("calendar"); $q->addFV("a_start",$this->start,"DATETIME"); $q->addFV("a_end",$this->end,"DATETIME"); --- 606,610 ---- $q = new query($this->dbconn); ! $q->setTable($this->tablename); $q->addFV("a_start",$this->start,"DATETIME"); $q->addFV("a_end",$this->end,"DATETIME"); *************** *** 638,646 **** $q->addWC("id",$this->id,""); ! $r = $this->dbconn->Exec($q->getUpdate()); /* Remove the old list of participants */ $q = "DELETE FROM participants WHERE app_id = ". $this->id; ! $r = $this->dbconn->Exec($q); } else { --- 643,651 ---- $q->addWC("id",$this->id,""); ! $this->dbconn->Exec($q->getUpdate()); /* Remove the old list of participants */ $q = "DELETE FROM participants WHERE app_id = ". $this->id; ! $this->dbconn->Exec($q); } else { *************** *** 651,655 **** $q->addFV("creation",$this->creation,"DATETIME"); ! $r = $this->dbconn->Exec($q->getInsert()); acl_raise($this,$this->creator->id,$tutos[delok]); --- 656,660 ---- $q->addFV("creation",$this->creation,"DATETIME"); ! $this->dbconn->Exec($q->getInsert()); acl_raise($this,$this->creator->id,$tutos[delok]); *************** *** 692,697 **** $vals .= ",".$state; ! $q="INSERT INTO participants (". $flds .") VALUES (". $vals .")"; ! $r = $this->dbconn->Exec($q); # Manage the permissions --- 697,702 ---- $vals .= ",".$state; ! $q = "INSERT INTO participants (". $flds .") VALUES (". $vals .")"; ! $this->dbconn->Exec($q); # Manage the permissions |
From: Gero K. <gok...@us...> - 2001-10-24 17:29:08
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv593/php Modified Files: webelements.p3 Log Message: bugfixes / cleanups Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** webelements.p3 2001/10/06 18:09:20 1.85 --- webelements.p3 2001/10/24 17:29:06 1.86 *************** *** 376,380 **** HTML_Head1($text); /* Margins are needed for Netscape */ ! echo "<BODY MARGINWIDTH=0 MARGINHEIGHT=0>\n"; # echo "<BODY>\n"; if ( ($tutos[useoverlib] == 1) && file_exists($tutos[overlib]) && is_readable($tutos[overlib]) ) { --- 376,380 ---- HTML_Head1($text); /* Margins are needed for Netscape */ ! echo "<BODY MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">\n"; # echo "<BODY>\n"; if ( ($tutos[useoverlib] == 1) && file_exists($tutos[overlib]) && is_readable($tutos[overlib]) ) { *************** *** 434,440 **** echo "<!-- all rights reserved -->\n"; echo "<HEAD>\n"; echo " <META NAME=\"GENERATOR\" CONTENT=\"TUTOS ". $tutos[version] ."\">\n"; echo " <META NAME=\"language\" CONTENT=\"". $tutos[lang] ."\">\n"; ! # echo " <META HTTP-EQUIV=\"Expires\" CONTENT=\"0\">\n"; if (is_readable("../html/". $theme .".css") ) { echo " <LINK REL=\"stylesheet\" HREF=\"../html/". $theme .".css\" TYPE=\"text/css\">\n"; --- 434,441 ---- echo "<!-- all rights reserved -->\n"; echo "<HEAD>\n"; + echo " <META http-equiv=\"Content-Type\" CONTENT=\"text/html; charset=". $lang['content_encoding'] ."\">\n"; echo " <META NAME=\"GENERATOR\" CONTENT=\"TUTOS ". $tutos[version] ."\">\n"; echo " <META NAME=\"language\" CONTENT=\"". $tutos[lang] ."\">\n"; ! echo " <META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\n"; if (is_readable("../html/". $theme .".css") ) { echo " <LINK REL=\"stylesheet\" HREF=\"../html/". $theme .".css\" TYPE=\"text/css\">\n"; *************** *** 442,446 **** echo "\n<!-- NO THEME ". $theme ." found -->\n"; } ! echo "<META NAME=\"MSSmartTagsPreventParsing\" CONTENT=\"TRUE\">"; echo " <LINK REL=\"copyright\" HREF=\"../html/copyright.html\" TITLE=\"Copyright\">\n"; --- 443,447 ---- echo "\n<!-- NO THEME ". $theme ." found -->\n"; } ! echo " <META NAME=\"MSSmartTagsPreventParsing\" CONTENT=\"TRUE\">"; echo " <LINK REL=\"copyright\" HREF=\"../html/copyright.html\" TITLE=\"Copyright\">\n"; *************** *** 460,464 **** HTML_Head1($text); /* Margins are needed for Netscape */ ! echo "<BODY MARGINWIDTH=0 MARGINHEIGHT=0>\n"; # echo "<BODY>\n"; if ( ($tutos[useoverlib] == 1) && file_exists($tutos[overlib]) && is_readable($tutos[overlib]) ) { --- 461,465 ---- HTML_Head1($text); /* Margins are needed for Netscape */ ! echo "<BODY MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">\n"; # echo "<BODY>\n"; if ( ($tutos[useoverlib] == 1) && file_exists($tutos[overlib]) && is_readable($tutos[overlib]) ) { *************** *** 477,481 **** echo " <TD WIDTH=\"16%\" COLSPAN=2 VALIGN=middle ALIGN=left> <A CLASS=nodeco HREF=\"../html/copyright.html\">TUTOS</A></TD>\n"; } else { ! echo " <TD WIDTH=\"8%\" VALIGN=middle ALIGN=left><A TARGET=url HREF=\"". $tutos[logolink] ."\"><IMG HEIGHT=40 BORDER=0 SRC=\"". $tutos[logo] ."\" ALT=\"LOGO\" ALIGN=middle></A></TD>\n"; echo " <TD WIDTH=\"8%\" VALIGN=middle ALIGN=left> <A CLASS=nodeco HREF=\"../html/copyright.html\">TUTOS</A></TD>\n"; } --- 478,488 ---- echo " <TD WIDTH=\"16%\" COLSPAN=2 VALIGN=middle ALIGN=left> <A CLASS=nodeco HREF=\"../html/copyright.html\">TUTOS</A></TD>\n"; } else { ! echo " <TD WIDTH=\"8%\" VALIGN=middle ALIGN=left>"; ! if ( isset($tutos[logolink]) ) { ! echo "<A TARGET=url HREF=\"". $tutos[logolink] ."\"><IMG HEIGHT=40 BORDER=0 SRC=\"". $tutos[logo] ."\" ALT=\"LOGO\" ALIGN=middle></A>"; ! } else { ! echo "<IMG HEIGHT=40 BORDER=0 SRC=\"". $tutos[logo] ."\" ALT=\"LOGO\" ALIGN=middle>"; ! } ! echo "</TD>\n"; echo " <TD WIDTH=\"8%\" VALIGN=middle ALIGN=left> <A CLASS=nodeco HREF=\"../html/copyright.html\">TUTOS</A></TD>\n"; } *************** *** 601,604 **** --- 608,612 ---- while ( list ($i,$f) = @each ($current_user->teamids) ) { if ( count($t[$i]->urllist) > 0 ) { + echo "<UL>\n"; @reset($t[$i]->urllist); while ( list ($j,$x) = @each ($t[$i]->urllist) ) { *************** *** 606,609 **** --- 614,618 ---- echo "<LI><A CLASS=nodeco HREF=\"". $x->getUrl() ."\" TARGET=url>". htmlentities($x->name) . "</A><BR>\n"; } + echo "</UL>\n"; } } *************** *** 640,679 **** Function HTML_Close () { global $lang; - # global $includes, $g_bug,$g_app,$g_adr,$g_com,$g_dep,$g_pro,$g_team, $g_usr, $g_ins, $g_note; echo "</BODY>\n"; - /* echo "<FONT SIZE=-1>\n"; */ - # echo makelink("show_source.php?page_url=$PHP_SELF","$PHP_SELF","See the source") ." last modified "; - # echo "$PHP_SELF last modified "; - # echo Date("H:i d.m.Y",getLastMod()); - # echo " <B>Copyright 1999/2000 by Gero Kohnert</B>\n"; - /* echo "</FONT>\n"; */ - - /* - echo "<ADDRESS>\n"; - @reset($includes); - while( list ($i,$f) = @each ($includes)) { - echo " ".$i." == ". $f ."<BR>"; - } - echo "Bugs: ". count($g_bug) ."<BR>"; - echo "Appointments: ". count($g_app) ."<BR>"; - echo "Addresses: ". count($g_adr) ."<BR>"; - @reset($g_adr); - while( list ($i,$f) = @each ($g_adr)) { - echo " ".$f->getLink(); - } - echo "<BR>Companies: ". count($g_com) ."<BR>"; - @reset($g_com); - while( list ($i,$f) = @each ($g_com)) { - echo " ".$f->getLink(); - } - echo "<BR>Departments: ". count($g_dep) ."<BR>"; - echo "Products: ". count($g_pro) ."<BR>"; - echo "Installations: ". count($g_ins) ."<BR>"; - echo "Notes: ". count($g_note) ."<BR>"; - echo "Teams: ". count($g_team) ."<BR>"; - echo "User: ". count($g_usr) ."<BR>"; - echo "</ADDRESS>\n"; - */ echo "</HTML>\n"; } --- 649,654 ---- *************** *** 775,784 **** # $tutos[baseurl] = sprintf("http://%s:%s%s/", # $SERVER_NAME, $SERVER_PORT, dirname($PHP_SELF); if($SERVER_PORT == 443) { ! $r = sprintf("https://%s%s/",$HTTP_HOST,dirname($PHP_SELF)); } else if($SERVER_PORT == 80) { ! $r = sprintf("http://%s%s/",$HTTP_HOST, dirname($PHP_SELF)); } else { ! $r = sprintf("http://%s%s/",$HTTP_HOST, dirname($PHP_SELF)); } return $r; --- 750,763 ---- # $tutos[baseurl] = sprintf("http://%s:%s%s/", # $SERVER_NAME, $SERVER_PORT, dirname($PHP_SELF); + $dir = dirname($PHP_SELF); + if ( $dir == "/" ) { + $dir = ""; + } if($SERVER_PORT == 443) { ! $r = sprintf("https://%s%s/",$HTTP_HOST,$dir); } else if($SERVER_PORT == 80) { ! $r = sprintf("http://%s%s/",$HTTP_HOST, $dir); } else { ! $r = sprintf("http://%s%s/",$HTTP_HOST, $dir); } return $r; *************** *** 829,844 **** return $faxnr; } - } - - /* --------------------------------------------------------------------------- - * get next color for big tables with colored lines - * - */ - Function get_next_col ( $oldcol ) { - - if ( $oldcol == "#DDDDDD" ) { - return "#CCCCCC"; - } - return "#DDDDDD"; } --- 808,811 ---- |
From: Gero K. <gok...@us...> - 2001-10-24 17:26:52
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv32265/php Modified Files: task.pinc task_ins.php Log Message: using query object / transaction lock in _ins Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -r1.48 -r1.49 *** task.pinc 2001/10/03 09:23:48 1.48 --- task.pinc 2001/10/24 17:26:49 1.49 *************** *** 47,52 **** if ( $to == -1 ) { $to = new DateTime(); ! $to->setDateTimeTS( NextDay($from->getTimeStamp()) - 12 * 3600); } $x1 = $obj->dbconn->DateTime($from); $x2 = $obj->dbconn->DateTime($to); --- 47,56 ---- if ( $to == -1 ) { $to = new DateTime(); ! $to->setDateTimeTS( NextDay($from->getTimeStamp()) ); } + + $from->setDateTime($from->getYYYYMMDD() . "000000"); + $to->setDateTime($to->getYYYYMMDD() . "000000"); + $x1 = $obj->dbconn->DateTime($from); $x2 = $obj->dbconn->DateTime($to); *************** *** 212,215 **** --- 216,221 ---- $this->state = 0; $this->diff = 0; + + $this->tablename = "tasks"; } /* --------------------------------------------------------------------------- *************** *** 289,293 **** } ! $q = "SELECT * from tasks where id = ". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); --- 295,299 ---- } ! $q = "SELECT * from ". $this->tablename ." where id = ". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); *************** *** 360,413 **** $msg = ""; - if ( -1 == $this->id ) { - $this->id = $this->dbconn->NextID(); - - $flds = "INSERT INTO tasks (ID"; - $vals = "VALUES (". $this->id; - - $flds .= ",WORKER"; - $vals = sprintf("%s,%d",$vals, $this->worker->id); - - $flds .= ",CREATOR"; - $vals = sprintf("%s,%d",$vals, $this->creator->id); - - $flds .= ",CREATION"; - $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->creation)); - - $flds .= ",P_ID"; - $vals = sprintf("%s,%d",$vals,$this->p_id); - - $flds .= ",STATUS"; - $vals = sprintf("%s,%d",$vals,$this->state); ! $flds .= ",VOLUME"; ! $vals = sprintf("%s,%f",$vals,$this->volume); ! # $flds .= ",VOLUME_DONE"; ! # $vals = sprintf("%s,%f",$vals,$this->volume_done); ! ! $flds .= ",NAME"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->String($this->name)); ! ! $flds .= ",DESCRIPTION"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->String($this->desc)); ! ! $flds .= ",R_START"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->r_start)); ! ! $flds .= ",R_END"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->r_end)); ! ! $flds .= ",S_START"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->s_start)); ! ! $flds .= ",S_END"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->s_end)); ! ! $flds .= " )"; ! $vals .= " )"; - $q = $flds ." ". $vals; # Defaut Access Control (get parents acl as default) $this->acl = $this->parent->acl; --- 366,390 ---- $msg = ""; ! $q = new query($this->dbconn); ! $q->setTable($this->tablename); ! $q->addFV("worker",$this->worker->id,""); ! $q->addFV("p_id",$this->p_id,""); ! $q->addFV("status",$this->state,""); ! $q->addFV("volume",$this->volume,"FLOAT"); ! $q->addFV("name",$this->name,"STRING"); ! $q->addFV("description",$this->desc,"STRING"); ! $q->addFV("r_start",$this->r_start,"DATETIME"); ! $q->addFV("r_end",$this->r_end,"DATETIME"); ! $q->addFV("s_start",$this->s_start,"DATETIME"); ! $q->addFV("s_end",$this->s_end,"DATETIME"); ! if ( -1 == $this->id ) { ! $this->id = $q->addFV("id",-1,"NEXTID"); ! $q->addFV("creator",$this->creator->id,""); ! $q->addFV("creation",$this->creation,"DATETIME"); ! $query = $q->getInsert(); # Defaut Access Control (get parents acl as default) $this->acl = $this->parent->acl; *************** *** 424,452 **** ); } else { ! $q = "UPDATE tasks SET"; ! $q .= " NAME = ". $this->dbconn->String($this->name); ! $q .= ",DESCRIPTION = ". $this->dbconn->String($this->desc); ! $q .= ",VOLUME = ". $this->volume ; ! # volume_done is deprecated and now using timetracks ! # $q .= ",VOLUME_DONE = ". $this->volume_done ; ! $q .= ",VOLUME_DONE = NULL" ; ! $q .= ",STATUS = ". $this->state ; ! $q .= ",WORKER = ". $this->worker->id ; ! $q .= ",S_START = ". $this->dbconn->DateTime($this->s_start) ; ! $q .= ",S_END = ". $this->dbconn->DateTime($this->s_end) ; ! $q .= ",R_START = ". $this->dbconn->DateTime($this->r_start) ; ! $q .= ",R_END = ". $this->dbconn->DateTime($this->r_end) ; ! $q .= " WHERE id = ". $this->id; } acl_raise($this,$this->worker->id,$tutos[modok]); acl_raise($this,$this->creator->id,$tutos[delok]); ! $this->dbconn->Begin("WORK"); ! $this->dbconn->Exec($q); $msg .= acl_save($this); $msg .= history_save($this); $msg .= resource_save($this); - $this->dbconn->Commit("WORK"); if ( ($this->diff != 0) && ($this->worker->getType() == "address") ) { --- 401,415 ---- ); } else { ! $q->addWC("id",$this->id,""); ! $query = $q->getUpdate(); } acl_raise($this,$this->worker->id,$tutos[modok]); acl_raise($this,$this->creator->id,$tutos[delok]); ! $this->dbconn->Exec($query); $msg .= acl_save($this); $msg .= history_save($this); $msg .= resource_save($this); if ( ($this->diff != 0) && ($this->worker->getType() == "address") ) { *************** *** 475,482 **** ! $q = "UPDATE tasks SET p_id = ". $this->p_id ." WHERE p_id = ". $this->id; $this->dbconn->Exec($q); ! $q = "DELETE FROM tasks WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 438,445 ---- ! $q = "UPDATE ". $this->tablename ." SET p_id = ". $this->p_id ." WHERE p_id = ". $this->id; $this->dbconn->Exec($q); ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); Index: task_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_ins.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** task_ins.php 2001/09/10 16:35:44 1.12 --- task_ins.php 2001/10/24 17:26:49 1.13 *************** *** 133,137 **** $t->s_end = $s_end; ! $msg = $t->save(); $gotourl= $t->getURL(); --- 133,139 ---- $t->s_end = $s_end; ! $dbconn->Begin("WORK"); ! $msg .= $t->save(); ! $dbconn->Commit("WORK"); $gotourl= $t->getURL(); |
From: Gero K. <gok...@us...> - 2001-10-24 17:26:02
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv31940/php Modified Files: team.pinc team_ins.php Log Message: using query object / better history support Index: team.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/team.pinc,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -r1.34 -r1.35 *** team.pinc 2001/09/19 20:47:29 1.34 --- team.pinc 2001/10/24 17:25:59 1.35 *************** *** 21,24 **** --- 21,26 ---- $this->creation = new DateTime(); $this->member = array(); + + $this->tablename = "teams"; } /* --------------------------------------------------------------------------- *************** *** 57,61 **** $g_team[$this->id] = $this; } else { ! $query = "SELECT * FROM teams WHERE id = ". $id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); --- 59,63 ---- $g_team[$this->id] = $this; } else { ! $query = "SELECT * FROM ". $this->tablename ." WHERE id = ". $id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); *************** *** 211,214 **** --- 213,227 ---- } /* --------------------------------------------------------------------------- + * set the team name + */ + function setName($new) { + $new = trim($new); + if ( $this->name != $new ) { + $this->modified[] = array ( "field" => "Team" , "old" => $this->name , "new" => $new ); + $this->name = $new; + } + return; + } + /* --------------------------------------------------------------------------- * Save the tema info */ *************** *** 217,224 **** $msg = ""; if ( $this->id == -1 ) { ! $this->id = $this->dbconn->NextID(); ! $q = "INSERT INTO teams (id,name,owner,creation) VALUES (". $this->id .",". $this->dbconn->String($this->name) .",". $this->owner->id .",". $this->dbconn->DateTime($this->creation) .")"; acl_default($this,$current_user); --- 230,243 ---- $msg = ""; + $q = new query($this->dbconn); + $q->setTable($this->tablename); + $q->addFV("name",$this->name,"STRING"); + $q->addFV("owner",$this->owner->id,""); if ( $this->id == -1 ) { ! $this->id = $q->addFV("id",-1,"NEXTID"); ! $q->addFV("creation",$this->creation,"DATETIME"); ! ! $query = $q->getInsert(); acl_default($this,$current_user); *************** *** 230,237 **** ); } else { ! $q = "UPDATE teams SET name = ". $this->dbconn->String($this->name) .", owner = ". $this->owner->id ." WHERE id = ". $this->id; } ! $this->dbconn->Exec($q); if ( $add != "" ) { --- 249,257 ---- ); } else { ! $q->addWC("id",$this->id,""); ! $query = $q->getUpdate(); } ! $this->dbconn->Exec($query); if ( $add != "" ) { *************** *** 251,255 **** @reset($del); while( list ($i,$f) = @each ($del)) { ! $q = "DELETE FROM adrteam WHERE adr_id = $f AND team_id = $this->id"; $r = $this->dbconn->Exec($q); acl_set($this,$f,0); --- 271,275 ---- @reset($del); while( list ($i,$f) = @each ($del)) { ! $q = "DELETE FROM adrteam WHERE adr_id = ". $f ." AND team_id = ". $this->id; $r = $this->dbconn->Exec($q); acl_set($this,$f,0); *************** *** 275,279 **** $msg = ""; ! $q = "DELETE FROM teams WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 295,299 ---- $msg = ""; ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); Index: team_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_ins.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** team_ins.php 2001/09/19 20:47:29 1.10 --- team_ins.php 2001/10/24 17:25:59 1.11 *************** *** 60,65 **** } if ( $msg == "" ) { ! $t->name = $name; ! $t->owner = new tutos_address($dbconn); $t->owner->read($owner); --- 60,65 ---- } if ( $msg == "" ) { ! $t->SetName($name); ! $t->owner = new tutos_address($dbconn); $t->owner->read($owner); |
From: Gero K. <gok...@us...> - 2001-10-24 17:21:56
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv30707/php Modified Files: note.pinc mytutos.php calendar_week.php calendar.php Log Message: show reminding notes in calendars Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note.pinc,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** note.pinc 2001/10/03 09:24:27 1.43 --- note.pinc 2001/10/24 17:21:53 1.44 *************** *** 8,11 **** --- 8,58 ---- */ + /* -------------------------------------------------------------------------- + * support function for readNotesCal + * author J.Baten + */ + function addNotesCal(&$obj, &$r,&$from) { + $n = $r->NumRows($r); + $a = 0; + while ( $a < $n ) { + + $o = new note($obj->dbconn); + $o->read_result($r,$a); + $a++; + + if ( ! $o->see_ok() ) { + continue; + } + $obj->callist[] = $o; + } + } + /* + * Reading Notes for the calendar + * author J.Baten + */ + function readNotesCal(&$obj, &$from) { + # read notes to display in calendar. + + $to = new DateTime(); + $to->setDateTimeTS( NextDay($from->getTimeStamp()) - 12 * 3600 ); + + $from->setDateTime($from->getYYYYMMDD() . "000000"); + $to->setDateTime($to->getYYYYMMDD() . "000000"); + + $x1 = $obj->dbconn->DateTime($from); + $x2 = $obj->dbconn->DateTime($to); + # + # First query + # + $q = "SELECT n.* FROM notes n WHERE "; + $q .= " (remember < ". $x2 ." AND remember >= ". $x1 .")"; + $q .= "AND creator = ". $obj->id ." ORDER by remember"; + + $result = $obj->dbconn->Exec($q); + /* Create all Notes */ + addNotesCal($obj,$result,$from); + $result->free(); + } + /* --------------------------------------------------------------------------- * delete note entries for a object *************** *** 170,173 **** --- 217,229 ---- return "no link"; } + /* --------------------------------------------------------------------------- + */ + /* added by J. Baten */ + function formatted () { + global $lang,$tutos,$current_user; + + echo "<TR><TD COLSPAN=3 bgcolor='yellow'>". $this->getLink() ."</TD></TR>\n"; + } + /* --------------------------------------------------------------------------- * Popup for overlib Index: mytutos.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/mytutos.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** mytutos.php 2001/09/19 20:51:38 1.38 --- mytutos.php 2001/10/24 17:21:53 1.39 *************** *** 81,86 **** $adr->callist = array(); readAppsCal($adr,$from); ! readTaskCal($adr,$from); ! echo "<TD CLASS=\"". $dinfo[color] ."\" WIDTH=\"10%\">\n"; --- 81,90 ---- $adr->callist = array(); readAppsCal($adr,$from); ! if ( ($current_user->p[usetaskmanagement] == 1) && ($tutos[usetaskmanagement] == 1) ) { ! readTaskCal($adr,$from); ! } ! if ( ($current_user->p[usenotes] == 1) && ($tutos[usenotes] == 1) ) { ! readNotesCal($adr,$from); ! } echo "<TD CLASS=\"". $dinfo[color] ."\" WIDTH=\"10%\">\n"; Index: calendar_week.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/calendar_week.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** calendar_week.php 2001/09/10 16:43:22 1.3 --- calendar_week.php 2001/10/24 17:21:53 1.4 *************** *** 13,16 **** --- 13,17 ---- include("bug.pinc"); include("timetrack.pinc"); + include("note.pinc"); /* Check if user is allowed to use it */ *************** *** 56,60 **** $current_user->callist = array(); readAppsCal($current_user,$from); ! readTaskCal($current_user,$from); if ( $col == 1 ) { --- 57,66 ---- $current_user->callist = array(); readAppsCal($current_user,$from); ! if ( ($current_user->p[usetaskmanagement] == 1) && ($tutos[usetaskmanagement] == 1) ) { ! readTaskCal($current_user,$from); ! } ! if ( ($current_user->p[usenotes] == 1) && ($tutos[usenotes] == 1) ) { ! readNotesCal($current_user,$from); ! } if ( $col == 1 ) { Index: calendar.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/calendar.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** calendar.php 2001/09/19 20:50:10 1.31 --- calendar.php 2001/10/24 17:21:53 1.32 *************** *** 8,11 **** --- 8,12 ---- include("product.pinc"); include("resource.pinc"); + include("note.pinc"); /* Check if user is allowed to use it */ *************** *** 160,165 **** $current_user->callist = array(); readAppsCal($current_user,$from); ! ! $hastable = 0; --- 161,167 ---- $current_user->callist = array(); readAppsCal($current_user,$from); ! if ( ($current_user->p[usenotes] == 1) && ($tutos[usenotes] == 1) ) { ! readNotesCal($current_user,$from); ! } $hastable = 0; *************** *** 171,194 **** /* if user is not interessted in - show nothing */ $found = 0; ! if ( ! isset($uids[0]) ) { ! @reset($apo->participant); ! while ( list ($i,$f) = @each ($apo->participant) ) { ! @reset($uids); ! while ( list ($i1,$f1) = @each ($uids) ) { ! if ( ($f->id == $i1) && ($f1 == 1) ) { ! $found = "$i1"; ! break; } } } ! } else { ! $found = 1; ! } ! ! if ( $found == 0 ) { ! /* Show nothing */ ! $a++; ! continue; ! } if ( $hastable == 0 ) { --- 173,197 ---- /* if user is not interessted in - show nothing */ $found = 0; ! if ( $apo->gettype() == "appointment" ) { ! if ( ! isset($uids[0]) ) { ! @reset($apo->participant); ! while ( list ($i,$f) = @each ($apo->participant) ) { ! @reset($uids); ! while ( list ($i1,$f1) = @each ($uids) ) { ! if ( ($f->id == $i1) && ($f1 == 1) ) { ! $found = "$i1"; ! break; ! } } } + } else { + $found = 1; } ! if ( $found == 0 ) { ! /* Show nothing */ ! $a++; ! continue; ! } ! } if ( $hastable == 0 ) { *************** *** 208,211 **** --- 211,215 ---- } } + if ( $hastable == 1 ) { if ( $tutos[caltable] == 2 ) { |
From: Gero K. <gok...@us...> - 2001-10-24 17:19:32
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv30003/php Modified Files: installation.pinc installation_ins.php Log Message: using query object / transaction block in _ins Index: installation.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation.pinc,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -r1.33 -r1.34 *** installation.pinc 2001/09/19 20:47:29 1.33 --- installation.pinc 2001/10/24 17:19:29 1.34 *************** *** 105,108 **** --- 105,110 ---- $this->salesdate= new DateTime(); $this->instdate= new DateTime(); + + $this->tablename = "installations"; } /* --------------------------------------------------------------------------- *************** *** 119,123 **** } ! $query = "SELECT * FROM installations WHERE id = ". $id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); --- 121,125 ---- } ! $query = "SELECT * FROM ". $this->tablename ." WHERE id = ". $id; $result = $this->dbconn->Exec($query); $n = $result->numrows(); *************** *** 339,376 **** $msg = ""; if ( -1 == $this->id ) { ! $this->id = $this->dbconn->NextID(); ! $flds = "id"; ! $vals = $this->id; ! ! $flds = sprintf("%s,product_id",$flds); ! $vals = sprintf("%s,%s",$vals,$this->product->id); ! ! $flds = sprintf("%s,customer_id",$flds); ! $vals = sprintf("%s,%s",$vals,$this->customer->id); ! ! if ( !empty($this->money) ) { ! $flds = sprintf("%s,money",$flds); ! $vals = sprintf("%s,%s",$vals,$this->money); ! } ! $flds = sprintf("%s,currency",$flds); ! $vals = sprintf("%s,'%s'",$vals,$this->currency); ! ! $flds = sprintf("%s,instdate",$flds); ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->instdate)); ! ! if ( $this->installer->id > 0 ) { ! $flds = sprintf("%s,installer_id",$flds); ! $vals = sprintf("%s,%s",$vals,$this->installer->id); ! } ! $flds = sprintf("%s,salesdate",$flds); ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->salesdate)); ! ! if ( $this->seller->id > 0 ) { ! $flds = sprintf("%s,seller_id",$flds); ! $vals = sprintf("%s,%s",$vals,$this->seller->id); ! } - $q = "INSERT INTO installations ($flds) VALUES ($vals)"; # Defaut Access Control --- 341,371 ---- $msg = ""; + $q = new query($this->dbconn); + $q->setTable($this->tablename); + $q->addFV("product_id",$this->product->id,""); + $q->addFV("customer_id",$this->customer->id,""); + $q->addFV("instdate",$this->instdate,"DATETIME"); + $q->addFV("salesdate",$this->salesdate,"DATETIME"); + $q->addFV("currency",$this->currency,"STRING"); + if ( !empty($this->money) ) { + $q->addFV("money",$this->money,"FLOAT"); + } else { + $q->addFV("money","null"); + } + if ( $this->installer->id > 0 ) { + $q->addFV("installer_id",$this->installer->id,""); + } else { + $q->addFV("installer_id","null"); + } + if ( $this->seller->id > 0 ) { + $q->addFV("seller_id",$this->seller->id,""); + } else { + $q->addFV("seller_id","null"); + } + if ( -1 == $this->id ) { ! $this->id = $q->addFV("id",-1,"NEXTID"); ! $query = $q->getInsert(); # Defaut Access Control *************** *** 393,417 **** ); } else { ! $q = "UPDATE installations SET "; ! $q = sprintf("%s product_id = %d", $q,$this->product->id ); ! if ( !empty($this->money) ) { ! $q = sprintf("%s,money = %f", $q,$this->money ); ! } ! $q = sprintf("%s,currency = '%s'", $q,$this->currency ); ! if ( $this->installer->id > 0 ) { ! $q = sprintf("%s,installer_id = %d", $q,$this->installer->id ); ! } else { ! $q = sprintf("%s,installer_id = null", $q ); ! } ! if ( $this->seller->id > 0 ) { ! $q = sprintf("%s,seller_id = %d", $q,$this->seller->id ); ! } else { ! $q = sprintf("%s,seller_id = null", $q ); ! } ! $q = sprintf("%s,customer_id = %d", $q,$this->customer->id ); ! $q = sprintf("%s,salesdate = %s", $q,$this->dbconn->DateTime($this->salesdate) ); ! $q = sprintf("%s,instdate = %s", $q,$this->dbconn->DateTime($this->instdate) ); ! ! $q = sprintf("%s WHERE id = %d", $q,$this->id ); } --- 388,393 ---- ); } else { ! $q->addWC("id",$this->id,""); ! $query = $q->getUpdate(); } *************** *** 426,436 **** } ! $this->dbconn->Begin("WORK"); ! $this->dbconn->Exec($q); $msg .= acl_save($this); $msg .= history_save($this); $msg .= resource_save($this); - $this->dbconn->Commit("WORK"); return $msg; } --- 402,410 ---- } ! $this->dbconn->Exec($query); $msg .= acl_save($this); $msg .= history_save($this); $msg .= resource_save($this); return $msg; } *************** *** 446,450 **** $this->dbconn->Lock("timetrack"); ! $q = "DELETE FROM installations WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 420,424 ---- $this->dbconn->Lock("timetrack"); ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); Index: installation_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation_ins.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** installation_ins.php 2001/10/06 18:09:20 1.10 --- installation_ins.php 2001/10/24 17:19:29 1.11 *************** *** 95,99 **** --- 95,102 ---- } + $dbconn->Begin("WORK"); $msg .= $i->save(); + $dbconn->Commit("WORK"); + $gotourl = $i->getUrl(); } |
From: Gero K. <gok...@us...> - 2001-10-24 17:17:58
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv29573/php Modified Files: timetrack.pinc timetrack_ins.php Log Message: using query object / transaction block in _ins Index: timetrack.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack.pinc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** timetrack.pinc 2001/09/19 20:47:29 1.19 --- timetrack.pinc 2001/10/24 17:17:55 1.20 *************** *** 13,16 **** --- 13,17 ---- Function timetrack_delete_obj(&$obj) { $msg = ""; + # FIXME (mybe we should rebook the efforts to the user himself) !! $q = "DELETE FROM timetrack WHERE link_id = ". $obj->id; *************** *** 63,66 **** --- 64,69 ---- $this->wday = new DateTime(); $this->creation = new DateTime(); + + $this->tablename = "timetrack"; } /* --------------------------------------------------------------------------- *************** *** 101,105 **** } ! $q = "SELECT * FROM timetrack WHERE id =". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); --- 104,108 ---- } ! $q = "SELECT * FROM ". $this->tablename ." WHERE id =". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); *************** *** 118,152 **** $msg = ""; ! unset ($this->modified); ! ! if ( -1 == $this->id ) { ! $this->id = $this->dbconn->NextID(); ! ! $flds = "id"; ! $vals = $this->id; ! ! $flds .= ",link_id"; ! $vals .= ",". $this->link_id; - $flds .= ",adr_id"; - $vals .= ",". $this->worker->id; ! $flds .= ",volume"; ! $vals .= ",". $this->volume; ! ! $flds .= ",description"; ! $vals .= ",". $this->dbconn->String($this->desc); ! ! # $flds = $flds .",creator"; ! # $vals = $vals .",". $this->creator->id; ! ! ! $flds .= ",vtime"; ! $vals .= ",". $this->dbconn->DateTime($this->wday); ! $flds .= ",creation"; ! $vals .= ",". $this->dbconn->DateTime($this->creation); ! $q = "INSERT INTO timetrack (". $flds .") VALUES (". $vals .")"; # Prepare the history --- 121,140 ---- $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("description",$this->desc,"STRING"); ! $q->addFV("vtime",$this->wday,"DATETIME"); ! unset ($this->modified); ! if ( -1 == $this->id ) { ! $this->id = $q->addFV("id",-1,"NEXTID"); ! $q->addFV("creation",$this->creation,"DATETIME"); ! $query = $q->getInsert(); # Prepare the history *************** *** 162,171 **** ); } else { ! $q = "UPDATE timetrack SET "; ! $q .= " description = ". $this->dbconn->String($this->desc); ! $q .= ",volume = ". $this->volume; ! $q .= ",vtime = ". $this->dbconn->DateTime($this->wday); ! $q .= ",adr_id = ". $this->worker->id; ! $q .= " WHERE id = ". $this->id; # Prepare the history FIX ME !! --- 150,155 ---- ); } else { ! $q->addWC("id",$this->id,""); ! $query = $q->getUpdate(); # Prepare the history FIX ME !! *************** *** 177,184 **** } ! $this->dbconn->Begin("WORK"); ! $this->dbconn->Exec($q); $msg .= history_save($this); - $this->dbconn->Commit("WORK"); return $msg; --- 161,166 ---- } ! $this->dbconn->Exec($query); $msg .= history_save($this); return $msg; *************** *** 190,194 **** $msg = ""; ! $q = "DELETE FROM timetrack WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 172,176 ---- $msg = ""; ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** timetrack_ins.php 2001/10/06 18:09:20 1.10 --- timetrack_ins.php 2001/10/24 17:17:55 1.11 *************** *** 72,76 **** if ( $msg == "" ) { ! $msg = $tt->save(); $gotourl = $tt->ref->getURL(); } --- 72,80 ---- if ( $msg == "" ) { ! ! $dbconn->Begin("WORK"); ! $msg .= $tt->save(); ! $dbconn->Commit("WORK"); ! $gotourl = $tt->ref->getURL(); } |
From: Gero K. <gok...@us...> - 2001-10-24 17:17:24
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv29441/php Modified Files: resource.pinc resource_ins.php Log Message: using query object / transaction block in _ins Index: resource.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/resource.pinc,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** resource.pinc 2001/09/19 20:48:33 1.20 --- resource.pinc 2001/10/24 17:17:20 1.21 *************** *** 139,142 **** --- 139,144 ---- $this->creation = new DateTime(); $this->ulist = array(); + + $this->tablename = "resources"; } /* --------------------------------------------------------------------------- *************** *** 154,158 **** } ! $q = "SELECT * from resources WHERE id = ". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); --- 156,160 ---- } ! $q = "SELECT * from ". $this->tablename ." WHERE id = ". $id; $r = $this->dbconn->Exec($q); $n = $r->numrows(); *************** *** 273,296 **** $msg = ""; - - if ( -1 == $this->id ) { - $this->id = $this->dbconn->NextID(); - - $flds = "id"; - $vals = $this->id; ! $flds .= ",name"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->String($this->name)); ! $flds .= ",description"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->String($this->desc)); ! ! $flds .= ",creation"; ! $vals = sprintf("%s,%s",$vals,$this->dbconn->DateTime($this->creation)); ! ! $flds .= ",creator"; ! $vals = sprintf("%s,%d",$vals,$this->creator->id); ! $q = "INSERT INTO resources (". $flds .") VALUES (". $vals .")"; $this->acl[$this->creator->id] = $tutos[delok]; --- 275,290 ---- $msg = ""; ! $q = new query($this->dbconn); ! $q->setTable($this->tablename); ! $q->addFV("name",$this->name,"STRING"); ! $q->addFV("description",$this->desc,"STRING"); ! if ( -1 == $this->id ) { ! $this->id = $q->addFV("id",-1,"NEXTID"); ! $q->addFV("creator",$this->creator->id,""); ! $q->addFV("creation",$this->creation,"DATETIME"); ! $query = $q->getInsert(); $this->acl[$this->creator->id] = $tutos[delok]; *************** *** 303,318 **** ); } else { ! $q = "UPDATE resources SET"; ! ! $q .= " description = ". $this->dbconn->String($this->desc); ! $q .= ",name = ". $this->dbconn->String($this->name); ! $q .= " WHERE id = ". $this->id ; } ! $this->dbconn->Begin("WORK"); ! $result = $this->dbconn->Exec($q); $msg .= acl_save($this); $msg .= history_save($this); - $this->dbconn->Commit("WORK"); return $msg; --- 297,307 ---- ); } else { ! $q->addWC("id",$this->id,""); ! $query = $q->getUpdate(); } ! $this->dbconn->Exec($query); $msg .= acl_save($this); $msg .= history_save($this); return $msg; *************** *** 324,328 **** $msg = ""; ! $q = "DELETE FROM resources WHERE id = ". $this->id; $this->dbconn->Exec($q); --- 313,317 ---- $msg = ""; ! $q = "DELETE FROM ". $this->tablename ." WHERE id = ". $this->id; $this->dbconn->Exec($q); Index: resource_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/resource_ins.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** resource_ins.php 2001/09/10 16:37:54 1.5 --- resource_ins.php 2001/10/24 17:17:21 1.6 *************** *** 32,36 **** $b->name = $name; $b->desc = $desc; ! $msg = $b->save(); $gotourl = $b->getURL(); } --- 32,40 ---- $b->name = $name; $b->desc = $desc; ! ! $dbconn->Begin("WORK"); ! $msg .= $b->save(); ! $dbconn->Commit("WORK"); ! $gotourl = $b->getURL(); } |
From: Gero K. <gok...@us...> - 2001-10-24 17:15:54
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv29028/php Modified Files: address_show.php address.pinc Log Message: removed comments from vcards Index: address_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/address_show.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** address_show.php 2001/09/27 19:40:20 1.20 --- address_show.php 2001/10/24 17:15:52 1.21 *************** *** 2,5 **** --- 2,8 ---- /* * Copyright 1999/2000 by Gero Kohnert + * + * CVS Info: $Id$ + * $Author$ */ include("webelements.p3"); *************** *** 217,222 **** $dbconn->Close(); ?> - <!-- - CVS Info: $Id$ - $Author$ - --> --- 220,221 ---- Index: address.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/address.pinc,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -r1.48 -r1.49 *** address.pinc 2001/09/30 18:39:06 1.48 --- address.pinc 2001/10/24 17:15:52 1.49 *************** *** 535,578 **** $this->read_locs_data(); $ical = ""; ! $ical = $ical . "BEGIN:VCARD\n"; ! $ical = $ical . "VERSION:2.1\n"; ! $ical = $ical . "N:" . $this->l_name .";". $this->f_name ."\n"; ! $ical = $ical . "FN:" . $this->getFullName() ."\n"; if ( isset($this->location) && (count($this->location) > 0) ) { @reset($this->location); while( list ($i,$f) = @each ($this->location)) { ! if ( $f->email_1 != "" ) { ! $ical = $ical . "EMAIL;TYPE=INTERNET:" . $f->email_1 ."\n"; ! } ! if ( $f->email_2 != "" ) { ! $ical = $ical . "EMAIL;TYPE=INTERNET:" . $f->email_2 ."\n"; ! } ! if ( $f->phone_1 != "" ) { ! if ( $f->category == 2 ) { ! $ical = $ical . "TEL;TYPE=WORK:" . $f->phone_1 ."\n"; ! } else { ! $ical = $ical . "TEL;TYPE=HOME:" . $f->phone_1 ."\n"; ! } ! } ! if ( $f->phone_2 != "" ) { ! if ( $f->category == 2 ) { ! $ical = $ical . "TEL;TYPE=WORK:" . $f->phone_2 ."\n"; ! } else { ! $ical = $ical . "TEL;TYPE=HOME:" . $f->phone_2 ."\n"; ! } ! } ! if ( $f->fax_1 != "" ) { ! if ( $f->category == 2 ) { ! $ical = $ical . "TEL;TYPE=WORK,FAX:" . $f->fax_1 ."\n"; ! } else { ! $ical = $ical . "TEL;TYPE=HOME,FAX:" . $f->fax_1 ."\n"; ! } ! } ! if ( ($f->company->id != -1) && ($f->company->name != "") ) { ! $ical = $ical . "ORG:" . $f->company->name ."\n"; ! } } } ! $ical = $ical . "END:VCARD\n"; return $ical; } --- 535,578 ---- $this->read_locs_data(); $ical = ""; ! $ical .= "BEGIN:VCARD\n"; ! $ical .= "VERSION:2.1\n"; ! $ical .= "N:" . $this->l_name .";". $this->f_name ."\n"; ! $ical .= "FN:" . $this->getFullName() ."\n"; if ( isset($this->location) && (count($this->location) > 0) ) { @reset($this->location); while( list ($i,$f) = @each ($this->location)) { ! if ( $f->email_1 != "" ) { ! $ical .= "EMAIL;TYPE=INTERNET:" . $f->email_1 ."\n"; ! } ! if ( $f->email_2 != "" ) { ! $ical .= "EMAIL;TYPE=INTERNET:" . $f->email_2 ."\n"; ! } ! if ( $f->phone_1 != "" ) { ! if ( $f->category == 2 ) { ! $ical .= "TEL;TYPE=WORK:" . $f->phone_1 ."\n"; ! } else { ! $ical .= "TEL;TYPE=HOME:" . $f->phone_1 ."\n"; ! } ! } ! if ( $f->phone_2 != "" ) { ! if ( $f->category == 2 ) { ! $ical .= "TEL;TYPE=WORK:" . $f->phone_2 ."\n"; ! } else { ! $ical .= "TEL;TYPE=HOME:" . $f->phone_2 ."\n"; ! } ! } ! if ( $f->fax_1 != "" ) { ! if ( $f->category == 2 ) { ! $ical .= "TEL;TYPE=WORK,FAX:" . $f->fax_1 ."\n"; ! } else { ! $ical .= "TEL;TYPE=HOME,FAX:" . $f->fax_1 ."\n"; ! } ! } ! if ( ($f->company->id != -1) && ($f->company->name != "") ) { ! $ical .= "ORG:" . $f->company->name ."\n"; ! } } } ! $ical .= "END:VCARD\n"; return $ical; } |
From: Gero K. <gok...@us...> - 2001-10-24 17:13:34
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv28317/php Modified Files: graph_bars.php Log Message: close db connection Index: graph_bars.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/graph_bars.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** graph_bars.php 2001/09/16 19:29:00 1.8 --- graph_bars.php 2001/10/24 17:13:30 1.9 *************** *** 159,162 **** basic($f,$t0,$t1); } ! ?> --- 159,162 ---- basic($f,$t0,$t1); } ! $dbconn->Close(); ?> |
From: Gero K. <gok...@us...> - 2001-10-16 16:37:41
|
Update of /cvsroot/tutos/tutos/homepage In directory usw-pr-cvs1:/tmp/cvs-serv31272 Modified Files: install_faq.html Log Message: bugfix Index: install_faq.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/install_faq.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** install_faq.html 2001/07/26 17:14:49 1.4 --- install_faq.html 2001/10/16 16:23:05 1.5 *************** *** 38,44 **** Such a cronjob line will look like this<BR> <FONT SIZE=-1> ! <PRE>*/5 * * * * /usr/bin/lynx -accept_all_cookies -dump http://[yourhost]/tutos/php/check.php3 > /dev/null </PRE> or ! <PRE>*/5 * * * * /usr/bin/wget -a /dev/null -O /dev/null http://[yourhost]/tutos/php/check.php3 2> /dev/null </PRE> </FONT> Ensure that the mail mechanism does work. See <I>config.pinc</I> $tutos[mailmode] --- 38,44 ---- Such a cronjob line will look like this<BR> <FONT SIZE=-1> ! <PRE>*/5 * * * * /usr/bin/lynx -accept_all_cookies -dump http://[yourhost]/tutos/php/check.php > /dev/null </PRE> or ! <PRE>*/5 * * * * /usr/bin/wget -a /dev/null -O /dev/null http://[yourhost]/tutos/php/check.php 2> /dev/null </PRE> </FONT> Ensure that the mail mechanism does work. See <I>config.pinc</I> $tutos[mailmode] |
From: Gero K. <gok...@us...> - 2001-10-06 18:10:48
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv16312/php Modified Files: user.pinc acl.pinc Log Message: fixed default/initial acl for users Index: user.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/user.pinc,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** user.pinc 2001/09/30 18:41:18 1.52 --- user.pinc 2001/10/06 18:10:44 1.53 *************** *** 65,68 **** --- 65,70 ---- // Start of week $this->weekstart = $tutos[weekstart]; + + $this->tablename = "people"; } /* --------------------------------------------------------------------------- *************** *** 80,86 **** if ( $mode == 0 ) { ! $query = "SELECT a.* ,p.*,p.id as u_id FROM addresses a,people p WHERE a.id = ". $id ." AND a.id = p.adr_id"; } else { ! $query = "SELECT a.* ,p.*,p.id as u_id FROM addresses a,people p WHERE p.id = ". $id ." AND a.id = p.adr_id"; } $result = $this->dbconn->Exec($query); --- 82,88 ---- if ( $mode == 0 ) { ! $query = "SELECT a.* ,p.*,p.id as u_id FROM addresses a,". $this->tablename ." p WHERE a.id = ". $id ." AND a.id = p.adr_id"; } else { ! $query = "SELECT a.* ,p.*,p.id as u_id FROM addresses a,". $this->tablename ." p WHERE p.id = ". $id ." AND a.id = p.adr_id"; } $result = $this->dbconn->Exec($query); *************** *** 219,222 **** --- 221,225 ---- /* --------------------------------------------------------------------------- * Read and set the permissions this user has + * feature permissions have an ID < 0 */ function read_permissions() { *************** *** 242,249 **** /* --------------------------------------------------------------------------- * Save the permissions of this user */ function save_permissions() { - global $tutos; - $msg = ""; $q = "DELETE FROM acl where obj_id < 0 AND adr_id = ". $this->id; --- 245,251 ---- /* --------------------------------------------------------------------------- * Save the permissions of this user + * feature permissions have an ID < 0 */ function save_permissions() { $msg = ""; $q = "DELETE FROM acl where obj_id < 0 AND adr_id = ". $this->id; *************** *** 340,344 **** # users we may see by special (ACL) allowance # ! $q = "SELECT distinct u.adr_id ,d.f_name , d.l_name FROM people u,addresses d , acl a WHERE (u.id = a.obj_id) AND (u.adr_id = d.id) AND (a.perm > 0) AND $t2 ORDER by l_name"; $r = $this->dbconn->Exec($q); $n = $r->numrows(); --- 342,346 ---- # users we may see by special (ACL) allowance # ! $q = "SELECT distinct u.adr_id ,d.f_name , d.l_name FROM ". $this->tablename ." u,addresses d , acl a WHERE (u.id = a.obj_id) AND (u.adr_id = d.id) AND (a.perm > 0) AND $t2 ORDER by l_name"; $r = $this->dbconn->Exec($q); $n = $r->numrows(); *************** *** 499,507 **** */ function del_ok () { - global $current_user,$tutos; - - # if ( $current_user->id == $this->id ) { - # return $tutos[delok]; - # } return acl_del_ok($this); } --- 501,504 ---- *************** *** 510,518 **** */ function mod_ok () { - global $current_user,$tutos; - - if ( $current_user->id == $this->id ) { - return $tutos[modok]; - } return acl_mod_ok($this); } --- 507,510 ---- *************** *** 521,525 **** */ function save() { ! global $tutos; $msg = ""; --- 513,517 ---- */ function save() { ! global $current_user,$tutos; $msg = ""; *************** *** 528,532 **** } $q = new query($this->dbconn); ! $q->setTable("people"); $q->addFV("login",$this->login,"STRING"); if ( $this->updatepw == 1 ) { --- 520,524 ---- } $q = new query($this->dbconn); ! $q->setTable($this->tablename); $q->addFV("login",$this->login,"STRING"); if ( $this->updatepw == 1 ) { *************** *** 556,559 **** --- 548,556 ---- "obj_id" => $this->uid ); + + $this->acl = array(); + acl_default($this,$current_user); + acl_raise($this,$this->id,$tutos[modok]); + acl_raise($this,$current_user->id,$tutos[delok]); } else { $q->addWC("adr_id",$this->id,""); *************** *** 576,580 **** unset ($this->modified); ! $q = "DELETE FROM people WHERE adr_id =". $this->id ." AND id = ". $this->uid; $this->dbconn->Exec($q); --- 573,577 ---- unset ($this->modified); ! $q = "DELETE FROM ". $this->tablename ." WHERE adr_id =". $this->id ." AND id = ". $this->uid; $this->dbconn->Exec($q); *************** *** 636,640 **** $q = new query($this->dbconn); ! $q->setTable("people"); $q->addFV("last_seen",$this->last_seen,"DATETIME"); $q->addFV("prefteam",$this->get_prefteam(),""); --- 633,637 ---- $q = new query($this->dbconn); ! $q->setTable($this->tablename); $q->addFV("last_seen",$this->last_seen,"DATETIME"); $q->addFV("prefteam",$this->get_prefteam(),""); Index: acl.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/acl.pinc,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** acl.pinc 2001/09/19 20:50:10 1.17 --- acl.pinc 2001/10/06 18:10:45 1.18 *************** *** 28,39 **** if ( ($adr->getType() == "address") || ($adr->getType() == "user") ) { $adr->readTeamList(); ! @reset($adr->teamids); ! while ( list ($i,$f) = @each ($adr->teamids) ) { ! acl_raise($obj,$i,$tutos[seeok]); ! } } return; } - } /* --------------------------------------------------------------------------- --- 28,43 ---- if ( ($adr->getType() == "address") || ($adr->getType() == "user") ) { $adr->readTeamList(); ! # When no teams are defined everybody may see ! if ( count($adr->teamids) == 0 ) { ! $obj->acl[0] = $tutos[seeok]; ! } else { ! @reset($adr->teamids); ! while ( list ($i,$f) = @each ($adr->teamids) ) { ! acl_raise($obj,$i,$tutos[seeok]); ! } ! } } return; } } /* --------------------------------------------------------------------------- *************** *** 43,46 **** --- 47,51 ---- global $tutos; + $obj->acl = array(); if ( $obj->gettype() == "user" ) { $id = $obj->uid; |
From: Gero K. <gok...@us...> - 2001-10-06 18:09:22
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv15982/php Modified Files: app_ins.php bug_ins.php department_ins.php file_ins.php installation_ins.php location_ins.php product_ins.php timetrack_ins.php webelements.p3 Log Message: extended check function with products Index: app_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_ins.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** app_ins.php 2001/09/30 18:31:08 1.8 --- app_ins.php 2001/10/06 18:09:19 1.9 *************** *** 161,165 **** $a->visitor = new tutos_address($dbconn); if ( isset($vfn) && !empty($vfn) ) { ! $a->visitor = check_address($vfn,"vfn","vl","acd"); } else { if ( isset($vid) && !empty($vid) ) { --- 161,165 ---- $a->visitor = new tutos_address($dbconn); if ( isset($vfn) && !empty($vfn) ) { ! $a->visitor = check_field($vfn,"vfn","vl","acd"); } else { if ( isset($vid) && !empty($vid) ) { *************** *** 174,178 **** $a->product = new product($dbconn); if ( isset($pfn) && !empty($pfn) ) { ! $a->product = check_product($pfn); } else { if ( isset($pid) && !empty($pid) ) { --- 174,178 ---- $a->product = new product($dbconn); if ( isset($pfn) && !empty($pfn) ) { ! $a->product = check_field($pfn,"pfn","pl","p"); } else { if ( isset($pid) && !empty($pid) ) { Index: bug_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bug_ins.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** bug_ins.php 2001/09/17 20:24:55 1.10 --- bug_ins.php 2001/10/06 18:09:20 1.11 *************** *** 57,61 **** if ( isset($sfn) ) { ! $solver = check_address($sfn,"sfn","sl"); } else { if ( isset($sid) ) { --- 57,61 ---- if ( isset($sfn) ) { ! $solver = check_field($sfn,"sfn","sl"); } else { if ( isset($sid) ) { Index: department_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/department_ins.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** department_ins.php 2001/09/30 18:39:06 1.9 --- department_ins.php 2001/10/06 18:09:20 1.10 *************** *** 41,45 **** $msg .= sprintf($lang['Err0009'],$lang['Company']) ."<BR>"; } else { ! $d->company = check_address($company,"company","cl","c"); } } else { --- 41,45 ---- $msg .= sprintf($lang['Err0009'],$lang['Company']) ."<BR>"; } else { ! $d->company = check_field($company,"company","cl","c"); } } else { Index: file_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file_ins.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -r1.14 -r1.15 *** file_ins.php 2001/09/30 18:39:06 1.14 --- file_ins.php 2001/10/06 18:09:20 1.15 *************** *** 68,72 **** if ( isset($afn) ) { # Check the author full name ! $author = check_address($afn,"afn","al","at"); } --- 68,72 ---- if ( isset($afn) ) { # Check the author full name ! $author = check_field($afn,"afn","al","at"); } Index: installation_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation_ins.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** installation_ins.php 2001/09/10 16:39:04 1.9 --- installation_ins.php 2001/10/06 18:09:20 1.10 *************** *** 33,37 **** $msg .= sprintf($lang['Err0009'],$lang['Customer']) ."<BR>"; } else { ! $x = check_address($cfn,"cfn","cl","acd"); $i->setCustomer($x->id); } --- 33,37 ---- $msg .= sprintf($lang['Err0009'],$lang['Customer']) ."<BR>"; } else { ! $x = check_field($cfn,"cfn","cl","acd"); $i->setCustomer($x->id); } *************** *** 39,48 **** if ( isset($ifn) ) { ! $x = check_address($ifn,"ifn","il"); $i->setInstaller($x->id); } if ( isset($sfn) ) { ! $x = check_address($sfn,"sfn","sl","at"); $i->setSeller($x->id); } --- 39,48 ---- if ( isset($ifn) ) { ! $x = check_field($ifn,"ifn","il"); $i->setInstaller($x->id); } if ( isset($sfn) ) { ! $x = check_field($sfn,"sfn","sl","at"); $i->setSeller($x->id); } Index: location_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/location_ins.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** location_ins.php 2001/09/19 20:51:38 1.15 --- location_ins.php 2001/10/06 18:09:20 1.16 *************** *** 42,46 **** # Check Company if ( !isset($c_id) ) { ! $l->company = check_address($company,"company","cl","c"); } else { if ( $c_id != -1 ) { --- 42,46 ---- # Check Company if ( !isset($c_id) ) { ! $l->company = check_field($company,"company","cl","c"); } else { if ( $c_id != -1 ) { *************** *** 51,55 **** # Check Department if ( !isset($d_id) ) { ! $l->department = check_address($department,"department","dl","d"); } else { if ( $d_id != -1 ) { --- 51,55 ---- # Check Department if ( !isset($d_id) ) { ! $l->department = check_field($department,"department","dl","d"); } else { if ( $d_id != -1 ) { Index: product_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_ins.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** product_ins.php 2001/09/19 20:46:07 1.21 --- product_ins.php 2001/10/06 18:09:20 1.22 *************** *** 42,46 **** # Add given Role if ( isset($rfn) ) { ! $m = check_address($rfn,"rfn","rl",$tutos[rolecheck][$role]); if ( $m->id > 0 ) { $p->setRole($m,$role); --- 42,46 ---- # Add given Role if ( isset($rfn) ) { ! $m = check_field($rfn,"rfn","rl",$tutos[rolecheck][$role]); if ( $m->id > 0 ) { $p->setRole($m,$role); Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** timetrack_ins.php 2001/09/10 16:37:54 1.9 --- timetrack_ins.php 2001/10/06 18:09:20 1.10 *************** *** 33,37 **** $msg .= sprintf($lang['Err0009'],$lang['TimetrackWorker']) ."<BR>"; } else { ! $tt->worker = check_address($wfn,"wfn","wl"); } } --- 33,37 ---- $msg .= sprintf($lang['Err0009'],$lang['TimetrackWorker']) ."<BR>"; } else { ! $tt->worker = check_field($wfn,"wfn","wl"); } } Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -r1.84 -r1.85 *** webelements.p3 2001/09/30 18:41:18 1.84 --- webelements.p3 2001/10/06 18:09:20 1.85 *************** *** 952,992 **** } /* --------------------------------------------------------------------------- ! * check if a given String is a product ! * ! */ ! Function check_product($name) { ! global $dbconn,$msg,$gotourl,$lang; ! ! $gotourl= addUrlParameter($gotourl,"pfn=".UrlEncode($name)); ! if ( empty($name) ) { ! return new product($dbconn); ! } ! $q = "SELECT * from products WHERE". $dbconn->Like("name",$name,"version"); ! $r = $dbconn->Exec($q); ! $n = $r->numrows(); ! if ( 0 == $n) { ! $msg .= sprintf($lang['Err0004'],$name) ."<BR>"; ! } else if ( $n > 10 ) { ! $msg .= sprintf($lang['Err0005'],$name,$n) ."<BR>"; ! $msg .= $lang['Err0006'] ."<BR>"; ! } else if ( $n > 1) { ! $msg .= sprintf($lang['Err0005'],$name,$n) ."<BR>"; ! $msg .= $lang['Err0006'] ."<BR>"; ! $a = 0; ! while ( $a < $n ) { ! $gotourl .="&pl[]=". $r->get($a, "id"); ! $a++; ! } ! } else { ! $p = new product($dbconn); ! $p->read_result($r,0); ! $r->free(); ! return $p; ! } ! $r->free(); ! return; ! } ! /* --------------------------------------------------------------------------- ! * check a address name * field = name in url * field2 = arrayname for selections url --- 952,956 ---- } /* --------------------------------------------------------------------------- ! * check a given name * field = name in url * field2 = arrayname for selections url *************** *** 996,1001 **** * c = companies * d = departments */ ! Function check_address($name,$field,$field2,$mode = "at") { global $dbconn,$msg,$gotourl,$lang; --- 960,966 ---- * c = companies * d = departments + * p = products */ ! Function check_field($name,$field,$field2,$mode = "at") { global $dbconn,$msg,$gotourl,$lang; *************** *** 1009,1012 **** --- 974,978 ---- $n3 = 0; $n4 = 0; + $n5 = 0; if ( strstr($mode,"a") != FALSE ) { $q1 = "SELECT * from addresses WHERE". $dbconn->Like ("f_name",$name,"m_name","l_name"); *************** *** 1033,1036 **** --- 999,1008 ---- $n += $n4; } + if ( strstr($mode,"p") != FALSE ) { + $q5 = "SELECT * from products WHERE". $dbconn->Like("name",$name,"version"); + $r5 = $dbconn->Exec($q5); + $n5 = $r5->numrows(); + $n += $n5; + } if ( 0 == $n) { *************** *** 1051,1054 **** --- 1023,1030 ---- $r1->free(); } + if ( strstr($mode,"p") != FALSE ) { + $msg .= sprintf($lang['Err0004'],$name,$n) ."<BR>"; + $r5->free(); + } return; } *************** *** 1097,1100 **** --- 1073,1084 ---- $r4->free(); } + if ( strstr($mode,"p") != FALSE ) { + $a = 0; + while ( $a < $n5 ) { + $gotourl = addUrlParameter($gotourl,$field2."[]=".$r5->get($a, "id")); + $a++; + } + $r5->free(); + } return; } *************** *** 1115,1118 **** --- 1099,1106 ---- $a->read_result($r4,0); } + if ( $n5 == 1 ) { + $a = new product($dbconn); + $a->read_result($r5,0); + } if ( strstr($mode,"a") != FALSE ) { *************** *** 1128,1131 **** --- 1116,1122 ---- $r4->free(); } + if ( strstr($mode,"p") != FALSE ) { + $r5->free(); + } return $a; } *************** *** 1503,1505 **** echo "</TR>\n"; } ! ?> --- 1494,1496 ---- echo "</TR>\n"; } ! ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2001-10-04 16:05:20
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv17264/php Modified Files: db_ora.pinc Log Message: Bugfix / non standard language support Index: db_ora.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db_ora.pinc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** db_ora.pinc 2001/09/27 21:39:36 1.4 --- db_ora.pinc 2001/10/04 16:05:17 1.5 *************** *** 26,29 **** --- 26,30 ---- putenv("ORACLE_SID=".$this->db->name); putenv("ORACLE_HOME=".$this->db->home); + putenv("NLS_LANG=AMERICA_AMERICA.WE8ISO8859P1"); $of = $this->openfunc; *************** *** 108,112 **** # A Insert or Update # echo "ROWS: $numrows COLS: $numcols | $query<BR>";flush(); ! return $x; } --- 109,113 ---- # A Insert or Update # echo "ROWS: $numrows COLS: $numcols | $query<BR>";flush(); ! # return $x; } |
From: Gero K. <gok...@us...> - 2001-10-03 09:24:30
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv21073/php Modified Files: url.pinc note.pinc file.pinc Log Message: history save deletion Index: url.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url.pinc,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** url.pinc 2001/09/30 18:39:05 1.29 --- url.pinc 2001/10/03 09:24:27 1.30 *************** *** 13,19 **** Function url_delete_obj(&$obj) { $msg = ""; ! # FIXME ( cleanup of history and acl needed ) !! ! $q = "DELETE FROM urls WHERE link_id = ". $obj->id; ! $r = $obj->dbconn->Exec($q); return $msg; } --- 13,23 ---- Function url_delete_obj(&$obj) { $msg = ""; ! readUrls($obj); ! if ( count($this->urllist) > 0 ) { ! @reset ($this->urllist); ! while ( list ($i,$f) = @each ($this->urllist) ) { ! $msg .= $f->delete(); ! } ! } return $msg; } *************** *** 26,30 **** global $lang; ! $obj->readUrls(); --- 30,34 ---- global $lang; ! readUrls($obj); *************** *** 65,69 **** function readUrls(&$obj) { ! $obj->urllist = array(); $q = "SELECT * from urls where link_id = ". $obj->id ." order by name"; $r = $obj->dbconn->Exec($q); --- 69,73 ---- function readUrls(&$obj) { ! $obj->urllist = array(); $q = "SELECT * from urls where link_id = ". $obj->id ." order by name"; $r = $obj->dbconn->Exec($q); Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note.pinc,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -r1.42 -r1.43 *** note.pinc 2001/09/30 18:29:57 1.42 --- note.pinc 2001/10/03 09:24:27 1.43 *************** *** 13,19 **** Function note_delete_obj(&$obj) { $msg = ""; ! # FIXME ( cleanup of history and acl needed ) !! ! $q = "DELETE FROM notes WHERE link_id = ". $obj->id; ! $r = $obj->dbconn->Exec($q); return $msg; } --- 13,24 ---- Function note_delete_obj(&$obj) { $msg = ""; ! readNotes($obj); ! ! if ( count($this->notelist) > 0 ) { ! @reset ($this->notelist); ! while ( list ($i,$f) = @each ($this->notelist) ) { ! $msg .= $f->delete(); ! } ! } return $msg; } Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file.pinc,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -r1.43 -r1.44 *** file.pinc 2001/09/30 18:39:05 1.43 --- file.pinc 2001/10/03 09:24:27 1.44 *************** *** 11,14 **** --- 11,28 ---- /* --------------------------------------------------------------------------- + * delete file entries for a object + */ + Function file_delete_obj(&$obj) { + $msg = ""; + readFiles($obj); + if ( count($this->filelist) > 0 ) { + @reset ($this->filelist); + while ( list ($i,$f) = @each ($this->filelist) ) { + $msg .= $f->delete(); + } + } + return $msg; + } + /* --------------------------------------------------------------------------- * Show links to all files */ |
From: Gero K. <gok...@us...> - 2001-10-03 09:23:51
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv20936/php Modified Files: task.pinc task_new.php task_show.php Log Message: url handling for tasks Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -r1.47 -r1.48 *** task.pinc 2001/09/19 20:47:29 1.47 --- task.pinc 2001/10/03 09:23:48 1.48 *************** *** 467,471 **** $this->readBugs(); ! if ( isset($this->buglist) && (count($this->buglist) > 0) ) { @reset ($this->buglist); while ( list ($i,$f) = @each ($this->buglist) ) { --- 467,471 ---- $this->readBugs(); ! if ( count($this->buglist) > 0 ) { @reset ($this->buglist); while ( list ($i,$f) = @each ($this->buglist) ) { *************** *** 474,494 **** } - $this->readFiles(); - if ( isset($this->filelist) && (count($this->filelist) > 0) ) { - @reset ($this->buglist); - while ( list ($i,$f) = @each ($this->filelist) ) { - $msg .= $f->delete(); - } - } $q = "UPDATE tasks SET p_id = ". $this->p_id ." WHERE p_id = ". $this->id; $this->dbconn->Exec($q); - $q = "UPDATE files SET link_id = ". $this->p_id ." WHERE link_id = ". $this->id; - $this->dbconn->Exec($q); - $q = "DELETE FROM tasks WHERE id = ". $this->id; $this->dbconn->Exec($q); $msg .= timetrack_delete_obj($this); $msg .= note_delete_obj($this); --- 474,485 ---- } $q = "UPDATE tasks SET p_id = ". $this->p_id ." WHERE p_id = ". $this->id; $this->dbconn->Exec($q); $q = "DELETE FROM tasks WHERE id = ". $this->id; $this->dbconn->Exec($q); + $msg .= file_delete_obj($this); $msg .= timetrack_delete_obj($this); $msg .= note_delete_obj($this); *************** *** 652,659 **** } /* --------------------------------------------------------------------------- ! * Return Info about connected files of this product */ function readFiles() { readFiles($this); return; } --- 643,657 ---- } /* --------------------------------------------------------------------------- ! * Return Info about connected files of this task */ function readFiles() { readFiles($this); + return; + } + /* --------------------------------------------------------------------------- + * Return Info about connected urls of this task + */ + function readUrls() { + readUrls($this); return; } Index: task_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_new.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** task_new.php 2001/09/13 14:49:48 1.17 --- task_new.php 2001/10/03 09:23:48 1.18 *************** *** 120,123 **** --- 120,130 ---- echo "</TABLE>\n"; echo "</FORM>\n"; + + if ( ($current_user->p[useurl] == 1) && ($tutos[useurl] == 1) ) { + if ( $t->id != -1 ) { + url_form($t,"task_new.php?id=". $t->id); + } + } + echo $lang['FldsRequired'] ."\n"; } Index: task_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_show.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** task_show.php 2001/09/10 16:35:44 1.16 --- task_show.php 2001/10/03 09:23:48 1.17 *************** *** 147,150 **** --- 147,164 ---- echo "</TR>\n"; } + if ( ($current_user->p[useurl] == 1) && ($tutos[useurl] == 1) ) { + $t->readUrls(); + if ( count($t->urllist) >0 ) { + echo "<TR>\n"; + showfield($lang['ProdLinks']); + echo " <TD VALIGN=top COLSPAN=3>\n"; + @reset($t->urllist); + while ( list ($i,$f) = @each ($t->urllist) ) { + echo $f->getLink() . "<BR>\n"; + } + echo "</TD>\n"; + echo "</TR>\n"; + } + } echo "<TR>\n"; |
From: Gero K. <gok...@us...> - 2001-10-01 18:25:48
|
Update of /cvsroot/tutos/tutos/php In directory usw-pr-cvs1:/tmp/cvs-serv1420/php Modified Files: app_overview.php app_select.php Log Message: calendar search by location Index: app_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_overview.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** app_overview.php 2001/09/19 20:47:29 1.6 --- app_overview.php 2001/10/01 18:25:45 1.7 *************** *** 171,175 **** if ( $to->notime != 1 ) { $q .= $pre ."(a_end <= ". $dbconn->Date($to) .")"; ! $pre = "AND "; $qarg .= "&td=". $to->getYYYYMMDD(); --- 171,175 ---- if ( $to->notime != 1 ) { $q .= $pre ."(a_end <= ". $dbconn->Date($to) .")"; ! $pre = " AND "; $qarg .= "&td=". $to->getYYYYMMDD(); *************** *** 178,181 **** --- 178,191 ---- $filter['to'] = $to; + } + if ( isset($loc) && ($loc != -1) ) { + $q .= $pre ."(outside = ". $loc .")"; + $pre = " AND "; + $qarg .= "&td=". $to->getYYYYMMDD(); + + $link1 = addUrlParameter($link1,"loc=".$loc); + $link2 = addUrlParameter($link2,"loc=".$loc); + + $filter['loc'] = $loc; } # Index: app_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_select.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** app_select.php 2001/09/10 16:40:40 1.4 --- app_select.php 2001/10/01 18:25:45 1.5 *************** *** 57,60 **** --- 57,69 ---- $tutos['astd']->EnterDate("t",1); echo " </TD>\n"; + + echo "</TR><TR>\n"; + showfieldc($lang['Location2']); + echo " <TD COLSPAN=2> <SELECT name=loc>\n"; + echo " <OPTION value=-1>all</OPTION>\n"; + for ( $i = 0 ; $i < count($lang['AppLoc']); $i++ ) { + echo " <OPTION VALUE=". $i .">". $lang['AppLoc'][$i] ."</OPTION>\n"; + } + echo " </SELECT></TD>\n"; } |