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
|
4
|
5
|
|
6
|
7
(2) |
8
(9) |
9
(8) |
10
(7) |
11
(2) |
12
|
|
13
|
14
|
15
|
16
|
17
(2) |
18
|
19
(22) |
|
20
(3) |
21
(1) |
22
|
23
|
24
(5) |
25
|
26
(9) |
|
27
(4) |
28
(2) |
|
|
|
|
|
|
From: Gero K. <gok...@us...> - 2005-02-28 05:29:25
|
Update of /cvsroot/tutos/tutos/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5142/homepage Modified Files: Tag: BRANCH-1-2 about.html Log Message: typo Index: about.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/about.html,v retrieving revision 1.18 retrieving revision 1.18.4.1 diff -u -r1.18 -r1.18.4.1 --- about.html 7 Aug 2003 16:37:17 -0000 1.18 +++ about.html 28 Feb 2005 05:29:17 -0000 1.18.4.1 @@ -8,7 +8,7 @@ <p> <center><font color="red" size="+2">T</FONT>he <FONT COLOR=red SIZE=+2>U</FONT>ltimate <FONT COLOR=red SIZE=+2>T</FONT>eam <FONT COLOR=red SIZE=+2>O</FONT>rganization <FONT COLOR=red SIZE=+2>S</FONT>oftware</CENTER> <p> -<font color="red">TUTOS</font> is a tool to manage the the organizational needs of small groups, teams, departments ...<br> +<font color="red">TUTOS</font> is a tool to manage the organizational needs of small groups, teams, departments ...<br> To do this it provides some web-based tools:<br> <ul> |
|
From: Gero K. <gok...@us...> - 2005-02-28 05:28:59
|
Update of /cvsroot/tutos/tutos/homepage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4996 Modified Files: about.html Log Message: typo Index: about.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/about.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- about.html 7 Aug 2003 16:37:17 -0000 1.18 +++ about.html 28 Feb 2005 05:28:50 -0000 1.19 @@ -8,7 +8,7 @@ <p> <center><font color="red" size="+2">T</FONT>he <FONT COLOR=red SIZE=+2>U</FONT>ltimate <FONT COLOR=red SIZE=+2>T</FONT>eam <FONT COLOR=red SIZE=+2>O</FONT>rganization <FONT COLOR=red SIZE=+2>S</FONT>oftware</CENTER> <p> -<font color="red">TUTOS</font> is a tool to manage the the organizational needs of small groups, teams, departments ...<br> +<font color="red">TUTOS</font> is a tool to manage the organizational needs of small groups, teams, departments ...<br> To do this it provides some web-based tools:<br> <ul> |
|
From: Gero K. <gok...@us...> - 2005-02-27 19:19:43
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26922 Modified Files: config_default.pinc db.p3 module_base.pinc task.pinc task_overview.php Log Message: updates Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.97 retrieving revision 1.98 diff -u -r1.97 -r1.98 --- config_default.pinc 26 Feb 2005 19:03:16 -0000 1.97 +++ config_default.pinc 27 Feb 2005 19:19:32 -0000 1.98 @@ -1,6 +1,10 @@ <?php /* - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * Global Default Configuration * Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.155 retrieving revision 1.156 diff -u -r1.155 -r1.156 --- db.p3 27 Jan 2005 15:44:29 -0000 1.155 +++ db.p3 27 Feb 2005 19:19:33 -0000 1.156 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ Index: module_base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_base.pinc,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- module_base.pinc 25 Aug 2004 19:17:02 -0000 1.38 +++ module_base.pinc 27 Feb 2005 19:19:33 -0000 1.39 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2002 - 2004 by Gero Kohnert + * Copyright 2002 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.161 retrieving revision 1.162 diff -u -r1.161 -r1.162 --- task.pinc 11 Dec 2004 08:03:51 -0000 1.161 +++ task.pinc 27 Feb 2005 19:19:33 -0000 1.162 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ @@ -962,9 +966,8 @@ } /** - * get the type of object + * print a row with the needed infos */ - function printRow (&$layout,$depth, &$parent, $fld = "", $slimit=0, $elimit=0) { global $lang, $tutos, $projects_tasks,$table; @@ -984,6 +987,17 @@ $recursive = true; } + # some temp variables + $s_start = $this->s_start; + $s_end = $this->s_end; + + if (($s_start->notime == 1) && ($this->s_end->notime != 1)) { + $s_start = $this->s_end; + } + if (($s_end->notime == 1) && $this->s_start->notime != 1 ) { + $s_end = $this->s_start; + } + /* we limit the date range of printed tasks */ if( $slimit == 0 && $elimit == 0 || ($slimit != 0 && $elimit != 0 @@ -1103,14 +1117,14 @@ } // from earliest to start - $x1 = round(($this->s_start->ts - $min_start)/$p); + $x1 = round(($s_start->ts - $min_start)/$p); $x1a = round( ($t - $min_start)/$p); - $x1b = round(( $this->s_start->ts - $t )/$p); + $x1b = round(( $s_start->ts - $t )/$p); - $x2 = round(($this->s_end->ts - $this->s_start->ts)/$p); + $x2 = round(($s_end->ts - $s_start->ts)/$p); - $x3 = round(($max_end - $this->s_end->ts)/$p); - $x3a = round(( $t - $this->s_end->ts)/$p); + $x3 = round(($max_end - $s_end->ts)/$p); + $x3a = round(( $t - $s_end->ts)/$p); $x3b = round( ($max_end - $t )/$p); echo " <td align=\"left\" colspan=\"2\" width=\"".($w +1)."\" nowrap=\"nowrap\">"; @@ -1205,6 +1219,17 @@ $recursive = true; } + # some temp variables + $s_start = $this->s_start; + $s_end = $this->s_end; + + if (($s_start->notime == 1) && ($this->s_end->notime != 1)) { + $s_start = $this->s_end; + } + if (($s_end->notime == 1) && $this->s_start->notime != 1 ) { + $s_end = $this->s_start; + } + /* we limit the date range of printed tasks */ if( $slimit == 0 && $elimit == 0 || ($slimit != 0 && $elimit != 0 @@ -1322,14 +1347,14 @@ } // from earliest to start - $x1 = round(($this->s_start->ts - $min_start)/$p); + $x1 = round(($s_start->ts - $min_start)/$p); $x1a = round( ($t - $min_start)/$p); - $x1b = round(( $this->s_start->ts - $t )/$p); + $x1b = round(( $s_start->ts - $t )/$p); - $x2 = round(($this->s_end->ts - $this->s_start->ts)/$p); + $x2 = round(($s_end->ts - $s_start->ts)/$p); - $x3 = round(($max_end - $this->s_end->ts)/$p); - $x3a = round(( $t - $this->s_end->ts)/$p); + $x3 = round(($max_end - $s_end->ts)/$p); + $x3a = round(( $t - $s_end->ts)/$p); $x3b = round( ($max_end - $t )/$p); echo " <td align=\"center\" valign=\"top\"> ". $this->s_end->getDate() ." </td>\n"; Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- task_overview.php 13 Oct 2004 14:13:12 -0000 1.71 +++ task_overview.php 27 Feb 2005 19:19:33 -0000 1.72 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ |
|
From: Gero K. <gok...@us...> - 2005-02-27 19:19:43
|
Update of /cvsroot/tutos/tutos/php/report-engine/rep_envelope In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26922/report-engine/rep_envelope Modified Files: rep_envelope.pinc Log Message: updates Index: rep_envelope.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/report-engine/rep_envelope/rep_envelope.pinc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- rep_envelope.pinc 2 Oct 2004 17:17:03 -0000 1.1 +++ rep_envelope.pinc 27 Feb 2005 19:19:34 -0000 1.2 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2004 by Gero Kohnert + * Copyright 2004 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * * CVS Info: $Id$ |
|
From: Gero K. <gok...@us...> - 2005-02-27 19:19:43
|
Update of /cvsroot/tutos/tutos/php/invoice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26922/invoice Modified Files: invoice.pinc Log Message: updates Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- invoice.pinc 19 Jul 2004 19:08:53 -0000 1.49 +++ invoice.pinc 27 Feb 2005 19:19:34 -0000 1.50 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2003 - 2004 by Gero Kohnert + * Copyright 2003 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ |
|
From: Gero K. <gok...@us...> - 2005-02-27 17:34:35
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28429 Modified Files: task_ins.php Log Message: fixes Index: task_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_ins.php,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- task_ins.php 19 Feb 2005 11:50:48 -0000 1.49 +++ task_ins.php 27 Feb 2005 17:34:25 -0000 1.50 @@ -174,18 +174,18 @@ $s_start = new DateTime(0); $s_start->setDateTimeF("s_start"); $gotourl= addUrlParameter($gotourl,"s_start=". $s_start->getYYYYMMDDHHMM(),true); - if ( !$s_start->checkDMY() ) { -# $msg .= sprintf($lang['Err0038'],$lang['TaskS_Start']) ."<br>"; + if ( !$s_start->checkDMY(true) ) { + $msg .= sprintf($lang['Err0038'],$lang['TaskS_Start']) ."<br>"; } $s_end = new DateTime(0); $s_end->setDateTimeF("s_end"); $gotourl= addUrlParameter($gotourl,"s_end=". $s_end->getYYYYMMDDHHMM(),true); - if ( !$s_end->checkDMY() ) { -# $msg .= sprintf($lang['Err0038'],$lang['TaskS_End']) ."<br>"; + if ( !$s_end->checkDMY(true) ) { + $msg .= sprintf($lang['Err0038'],$lang['TaskS_End']) ."<br>"; } - if ( ($s_start->ts > $s_end->ts ) ) { + if ( ($s_start->notime != 1) && ($s_end->notime != 1) && ($s_start->ts > $s_end->ts ) ) { $msg .= $lang['Err0002'] ."<br>"; } |
|
From: Gero K. <gok...@us...> - 2005-02-26 19:04:02
|
Update of /cvsroot/tutos/tutos/php/file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890/file Modified Files: file_overview.php Log Message: support of deprecated options Index: file_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_overview.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- file_overview.php 27 Jan 2005 15:21:32 -0000 1.16 +++ file_overview.php 26 Feb 2005 19:03:19 -0000 1.17 @@ -1,6 +1,11 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert & MEGA.COM.PL + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * * @modulegroup file * @module file_overview @@ -173,7 +178,7 @@ * prepare */ Function prepare() { - global $msg,$lang; + global $msg,$lang,$tutos; $this->name = $lang['FileOverview']; @@ -184,7 +189,7 @@ $this->link1 = "file/file_overview.php"; - $this->q = "SELECT distinct f.* FROM ". $this->dbconn->prefix ."files f,". $this->dbconn->prefix ."filelink l"; + $this->q = "SELECT distinct f.* FROM ". $this->dbconn->prefix ."files f,". $this->dbconn->prefix ."filelink l,". $this->dbconn->prefix ."acl a"; $pre = " WHERE " ; if ( isset($_GET['link_id']) && is_numeric($_GET['link_id']) ) { @@ -254,6 +259,16 @@ $this->filter['to'] = $to; } + if(! $this->user->isadmin()) { + $tq = ''; + foreach ( $this->user->teamlist as $key => $val ) + { + $tq .= "OR ( a.adr_id = ".$key." ) "; + } + $this->q .= $pre."(( f.id = a.obj_id ) AND ( a.perm >= ".$tutos[seeok]." ) AND (( a.adr_id = ".$this->user->id.") OR (a.adr_id = ".EVERYBODY.") ".$tq.") )"; + $pre = " AND "; + } + check_dbacl( $this->q, $this->user->id); # sorting @@ -266,6 +281,7 @@ $_GET['xo'] = 1; } $this->result = $this->dbconn->Exec($this->q); +//print_r( $this->user->acl); if ( 0 == $this->result->numrows()) { $this->redirect = "file_select.php?msg=". UrlEncode($lang['Err0048']); $this->result->free(); |
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890 Modified Files: app_new.php app_new_r.php config_default.pinc custom.pinc permission.p3 product_new.php task_new.php webelements.p3 Log Message: support of deprecated options Index: app_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_new.php,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- app_new.php 19 Feb 2005 21:41:36 -0000 1.61 +++ app_new.php 26 Feb 2005 19:03:15 -0000 1.62 @@ -116,11 +116,7 @@ # LOCATION echo $this->showfieldc($lang['Location2'],0,"outside"); echo " <td colspan=\"2\">\n"; - echo " <select id=\"outside\" name=\"outside\">\n"; - foreach ($lang['AppLoc'] as $i => $f) { - echo " <option value=\"". $i ."\"". ($this->obj->outside == $i ? " selected=\"selected\"":"") .">". $lang['AppLoc'][$i] ."</option>\n"; - } - echo " </select>\n"; + echo SelectLangArray('outside','AppLoc',$this->obj->outside); echo " </td>\n"; # Ignore times @@ -193,12 +189,8 @@ echo " </label></td>\n"; # reminder email - echo " <td colspan=\"3\"><b>". $lang['AppEmailRemind'] ."</b><br />\n"; - echo " <select name=\"remember\">\n"; - foreach ($lang['AppRemind'] as $i => $f) { - echo " <option value=\"". $i ."\"". ($i == $this->obj->remember ? " selected=\"selected\"":"") .">". $f ."</option>\n"; - } - echo " </select>"; + echo " <td colspan=\"3\" class=\"desc\"><label for=\"remember\">". $lang['AppEmailRemind'] ."</label><br />\n"; + echo SelectLangArray('remember','AppRemind',$this->obj->remember); echo " </td>\n"; echo " </tr>\n"; Index: app_new_r.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_new_r.php,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- app_new_r.php 25 Aug 2004 19:07:30 -0000 1.53 +++ app_new_r.php 26 Feb 2005 19:03:16 -0000 1.54 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * Editing of "repeating" appointments * @@ -138,12 +142,7 @@ # LOCATION echo $this->showfield($lang['Location2'],0,"outside"); echo " <td colspan=\"5\">\n"; - echo " <select id=\"outside\" name=\"outside\">\n"; - @reset($lang['AppLoc']); - while ( list($i,$f) = each($lang['AppLoc']) ) { - echo " <option value=\"". $i ."\" ". ($this->obj->outside == $i ? "selected=\"selected\"":"") .">". $lang['AppLoc'][$i] ."</option>\n"; - } - echo " </select>\n"; + echo SelectLangArray('outside','AppLoc',$this->obj->outside); echo " </td>\n"; echo "</tr><tr>\n"; Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- config_default.pinc 19 Feb 2005 11:44:02 -0000 1.96 +++ config_default.pinc 26 Feb 2005 19:03:16 -0000 1.97 @@ -749,6 +749,6 @@ # # The TUTOS Version number # -$tutos[version]="1.3dev.20050107"; +$tutos[version]="1.3dev.20050225"; # ?> \ No newline at end of file Index: custom.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/custom.pinc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- custom.pinc 24 Feb 2005 13:02:20 -0000 1.2 +++ custom.pinc 26 Feb 2005 19:03:16 -0000 1.3 @@ -133,26 +133,7 @@ echo " </td>\n"; } else if ($x['ftype'] == "SelectOne") { echo " <td colspan=\"".($cols-1)."\">\n"; - echo " <select id=\"".$parsename."\" name=\"".$parsename."\">\n"; - foreach($lang[$x['lang'].'_'] as $xx => $f) { - $old = false; - if (isset($tutos[$x['lang']]['deprecated']) - && array_key_exists($xx,$tutos[$x['lang']]['deprecated']) ) { - $old = true; - } - echo " <option"; - if ($old) { - echo " class=\"deprecated\""; - } - echo " value=\"".myentities($xx)."\""; - echo ($obj->$fld == $xx ? " selected=\"selected\"":""); - echo ">". myentities($f); - if ($old) { - echo "(deprecated)"; - } - echo "</option>\n"; - } - echo " </select>\n"; + echo SelectLangArray($parsename,$x['lang'].'_',$obj->$fld); echo " </td>\n"; } else if ($x[type] == "VARCHAR") { echo " <td colspan=\"".($cols-1)."\">\n"; Index: permission.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/permission.p3,v retrieving revision 1.150 retrieving revision 1.151 diff -u -r1.150 -r1.151 --- permission.p3 2 Nov 2004 19:47:24 -0000 1.150 +++ permission.p3 26 Feb 2005 19:03:16 -0000 1.151 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ Index: product_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_new.php,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- product_new.php 9 Dec 2004 17:12:47 -0000 1.88 +++ product_new.php 26 Feb 2005 19:03:17 -0000 1.89 @@ -1,8 +1,12 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert * cloning option added by Michal Salaban 2003 * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * create a new product or modify/clone an existing one * * @modulegroup product @@ -60,14 +64,8 @@ echo $this->showfieldc($lang['ProdVersion'],0,"version"); echo " <td colspan=\"4\"><input id=\"version\" size=\"". min($table['product']['version'][size],20) ."\" maxlength=\"". $table['product']['version'][size] ."\" name=\"version\" value=\"". myentities($this->obj->version) ."\" />\n"; echo " <span class=\"desc\">". $lang['ProdState'] ."</span> \n"; - echo "<select name=\"state\">\n"; -# $ar = array (0,4,5,1,2,3); - foreach ($lang['ProdStates'] as $f => $i) { - if ( $f >= 0 ) { - echo " <option value=\"". $f ."\" ". ($f == $this->obj->state ? "selected=\"selected\"":"") .">". myentities($lang['ProdStates'][$f]) ."</option>\n"; - } - } - echo "</select>\n"; + + echo SelectLangArray('state','ProdStates',$this->obj->state); echo " <span class=\"desc\">". $lang['ProdProb'] ."</span> \n"; echo "<input id=\"prob\" size=\"3\" maxlength=\"3\" name=\"prob\" value=\"". number_format($this->obj->probability,0,$lang['DecPoint'],$lang['ThousandPoint']) ."\" /> %\n"; echo "</td>\n"; @@ -83,6 +81,11 @@ if ( $this->obj->id > 0 ) { $n = 0; foreach ($lang['ProdRole'] as $role => $x) { + $old = false; + if (isset($tutos['deprecated']['ProdRole']) + && in_array($role,$tutos['deprecated']['ProdRole']) ) { + $old = true; + } if ( isset($this->obj->role[$role]) ) { foreach ($this->obj->role[$role] as $i => $o) { if ( $o->id < 1 ) { @@ -93,7 +96,12 @@ } echo "<tr>\n"; echo " <td> </td>\n"; - echo " <td>". $lang['ProdRole'][$role] ."</td>"; + echo " <td>". $lang['ProdRole'][$role]; + if ($old) { + echo $lang['deprecated']; + } + echo "</td>"; + echo " <td>". $o->getLink() ."</td>"; echo " <td>". myentities($this->obj->roledesc[$role][$i]) ." </td>"; $val = $o->id .",". $role; @@ -110,13 +118,18 @@ echo "<tr>\n"; echo $this->showfieldc($lang['ProdRolesNew']); echo " <td>\n"; - echo " <select name=\"role1\">\n"; + echo " <select id=\"role1\" name=\"role1\">\n"; foreach ($lang['ProdRole'] as $role => $x) { # No Product Roles if ( $tutos[rolecheck][$role] == "p") { continue; } - echo " <option value=\"". $role ."\"". ($role == $this->obj->rsel1 ? " selected=\"selected\"":"") .">". myentities($lang['ProdRole'][$role]) ."</option>\n"; + $old = false; + if (isset($tutos['deprecated']['ProdRole']) + && in_array($role,$tutos['deprecated']['ProdRole']) ) { + $old = true; + } + echo " <option" .($old ? ' class="deprecated"':''). " value=\"". $role ."\"". ($role == $this->obj->rsel1 ? " selected=\"selected\"":"") .">". myentities($lang['ProdRole'][$role]).($old ? $lang['deprecated']:'') ."</option>\n"; } echo " </select>\n"; echo " </td>\n"; @@ -138,6 +151,11 @@ if ( $this->obj->id > 0 ) { $n = 0; foreach ($lang['ProdRole'] as $role => $x) { + $old = false; + if (isset($tutos['deprecated']['ProdRole']) + && in_array($role,$tutos['deprecated']['ProdRole']) ) { + $old = true; + } if ( isset($this->obj->role[$role]) ) { foreach ($this->obj->role[$role] as $i => $o) { if ( $o->id < 1 ) { @@ -148,7 +166,11 @@ } echo "<tr>\n"; echo " <td> </td>\n"; - echo " <td>". $lang['ProdRole'][$role] ."</td>"; + echo " <td>". $lang['ProdRole'][$role]; + if ($old) { + echo $lang['deprecated']; + } + echo "</td>"; echo " <td>". $o->getLink() ."</td>"; echo " <td>". myentities($this->obj->roledesc[$role][$i]) ." </td>"; $val = $o->id .",". $role; @@ -165,13 +187,18 @@ echo "<tr>\n"; echo $this->showfieldc($lang['ProdProdNew']); echo " <td>\n"; - echo " <select name=\"role2\">\n"; + echo " <select id=\"role2\" name=\"role2\">\n"; foreach ($lang['ProdRole'] as $role => $x) { # No Product Roles if ( $tutos[rolecheck][$role] != "p") { continue; } - echo " <option value=\"". $role ."\"". ($role == $this->obj->rsel2 ? " selected=\"selected\"":"") .">". myentities($lang['ProdRole'][$role]) ."</option>\n"; + $old = false; + if (isset($tutos['deprecated']['ProdRole']) + && in_array($role,$tutos['deprecated']['ProdRole']) ) { + $old = true; + } + echo " <option" .($old ? ' class="deprecated"':''). " value=\"". $role ."\"". ($role == $this->obj->rsel2 ? " selected=\"selected\"":"") .">". myentities($lang['ProdRole'][$role]).($old ? $lang['deprecated']:'') ."</option>\n"; } echo " </select>\n"; echo " </td>\n"; Index: task_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_new.php,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- task_new.php 19 Feb 2005 11:50:48 -0000 1.69 +++ task_new.php 26 Feb 2005 19:03:17 -0000 1.70 @@ -74,12 +74,7 @@ echo " <td><input id=\"name\" size=\"". min($table['task']['name'][size],40) ."\" maxlength=\"". $table['task']['name'][size] ."\" name=\"name\" value=\"". myentities($this->obj->name) ."\"></td>\n"; echo $this->showfieldc($lang['TaskState'],0,"state"); echo " <td>\n"; - echo " <select id=\"state\" name=\"state\">\n"; - - foreach($lang['TaskStates'] as $f => $i ) { - echo " <option value=\"". $f ."\"". ($f == $this->obj->state ? " selected" : "") .">". $lang['TaskStates'][$f] ."</option>\n"; - } - echo " </select>\n"; + echo SelectLangArray('state','TaskStates',$this->obj->state); echo " </td>\n"; echo " </tr>\n"; Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.284 retrieving revision 1.285 diff -u -r1.284 -r1.285 --- webelements.p3 19 Feb 2005 21:41:36 -0000 1.284 +++ webelements.p3 26 Feb 2005 19:03:17 -0000 1.285 @@ -70,6 +70,44 @@ } /** + * Make a selection based on an language array + */ +Function SelectLangArray($fldname,$lgname,$default,$any = false,$additional = 0) { + global $lang,$tutos; + + $r = ''; + $r .= '<select id="'. $fldname .'" name="'.$fldname.'">'."\n"; + foreach ($lang[$lgname] as $f => $i) { + if ( $f < 0 ) continue; + + $old = false; + if (isset($tutos['deprecated'][$lgname]) + && in_array($f,$tutos['deprecated'][$lgname]) ) { + $old = true; + } + + $r .= ' <option' .($old ? ' class="deprecated"':''). ' value="'. $f .'"'. ($f == $default ? ' selected="selected"':'') .'>'; + $r .= myentities($i).($old ? ' '.$lang['deprecated']:''); + $r .= '</option>'."\n"; + } + if ( is_array($additional) && count($additional) ) { + foreach ($additional as $f => $i) { + $r .= ' <option value="'. $f .'"'. ($f == $default ? ' selected="selected"':'') .'>'; + $r .= myentities($i); + $r .= '</option>'."\n"; + } + } + if ( $any == true ) { + $r .= "<option value=\"-1\""; + if ( -1 == $default ) { + $r .= ' selected="selected" '; + } + $r .= ">". myentities($lang['any']) ."</option>\n"; + } + $r .= '</select>'."\n"; + return $r; +} +/** * Select a country code */ Function SelectCntryCde($field,$default) { |
|
From: Gero K. <gok...@us...> - 2005-02-26 19:04:02
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890/bugtracking Modified Files: bug.pinc bug_select.php Log Message: support of deprecated options Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- bug.pinc 6 Sep 2004 11:38:01 -0000 1.30 +++ bug.pinc 26 Feb 2005 19:03:18 -0000 1.31 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ @@ -71,55 +75,20 @@ function BugAskState ($default,$any) { global $lang; - $r = "<select id=\"state\" name=\"state\">\n"; - @reset($lang['BugStates']); - while ( list ($i,$f) = @each ($lang['BugStates']) ) { - $r .= "<option value=\"". $i ."\""; - if ( $i == $default ) { - $r .= " selected "; - } - $r .= ">". $f ."</option>\n"; - } - if ( $any > 0 ) { - $r .= "<option value=\"-1\""; - if ( -1 == $default ) { - $r .= " selected "; - } - $r .= ">". $lang['any'] ."</option>\n"; - } - # Any but not closed + $additional = array(); if ( $any == 2 ) { - $r .= "<option value=\"-2\""; - if ( -2 == $default ) { - $r .= " selected "; - } - $r .= ">". $lang['BugAnyButClosed'] ."</option>\n"; + $additional[-2] = $lang['BugAnyButClosed']; } - $r .= "</select>\n"; + + $r = SelectLangArray('state','BugStates',$default,$any > 0,$additional); + return $r; } /** * ask a bug class */ function BugAskClass ($default,$any) { - global $tutos,$lang; - - $r = "<select id=\"class\" name=\"class\">"; - foreach ($tutos['bugclasses'] as $i) { - $r .= "<option value=\"". $i ."\""; - if ( $i == $default ) { - $r .= " selected "; - } - $r .= ">". myentities($lang['BugClasses'][$i]) ."</option>\n"; - } - if ( $any == true ) { - $r .= "<option value=\"-1\""; - if ( -1 == $default ) { - $r .= " selected "; - } - $r .= ">". myentities($lang['any']) ."</option>\n"; - } - $r .= "</select>\n"; + $r = SelectLangArray('class','BugClasses',$default,$any); return $r; } /** Index: bug_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_select.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- bug_select.php 26 Mar 2004 11:01:39 -0000 1.3 +++ bug_select.php 26 Feb 2005 19:03:19 -0000 1.4 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * @modulegroup bug * @module bug_select |
|
From: Gero K. <gok...@us...> - 2005-02-26 19:04:01
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890/db Modified Files: table_custom_example.pinc Log Message: support of deprecated options Index: table_custom_example.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/table_custom_example.pinc,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- table_custom_example.pinc 19 Feb 2005 11:54:42 -0000 1.6 +++ table_custom_example.pinc 26 Feb 2005 19:03:19 -0000 1.7 @@ -122,7 +122,7 @@ $lang['CTISERVERLIST'] = "CTI Server"; # Old entries that are no longer valid -$tutos['CTISERVERLIST']['deprecated'] = array(11,2); +$tutos['deprecated']['CTISERVERLIST_'] = array(11,2); # all entries (including old ones !) $lang['CTISERVERLIST_'][1] = "Server 1"; |
|
From: Gero K. <gok...@us...> - 2005-02-26 19:03:50
|
Update of /cvsroot/tutos/tutos/php/localization In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890/localization Modified Files: de.p3 en.p3 fr.p3 it.p3 nl.p3 Log Message: support of deprecated options Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/de.p3,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- de.p3 19 Feb 2005 11:44:43 -0000 1.65 +++ de.p3 26 Feb 2005 19:03:20 -0000 1.66 @@ -169,6 +169,7 @@ $lang['pageof'] = 'Seite %s/%s'; $lang['RowIconsBefore'] = 'Icons am Zeilenanfang'; $lang['RowIconsAfter'] = 'Icons am Zeilenende'; +$lang['deprecated'] = ' (veraltet)'; # Appointments $lang['Appointment'] = 'Termin'; Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/en.p3,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- en.p3 19 Feb 2005 11:44:44 -0000 1.63 +++ en.p3 26 Feb 2005 19:03:21 -0000 1.64 @@ -169,6 +169,7 @@ $lang['pageof'] = 'Page %s/%s'; $lang['RowIconsBefore'] = 'Icons BEFORE rows'; $lang['RowIconsAfter'] = 'Icons AFTER rows'; +$lang['deprecated'] = ' (deprecated)'; # Appointments $lang['Appointment'] = 'Appointment'; Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/fr.p3,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- fr.p3 19 Feb 2005 11:44:44 -0000 1.54 +++ fr.p3 26 Feb 2005 19:03:21 -0000 1.55 @@ -166,6 +166,7 @@ $lang['pageof'] = 'Page %s/%s'; $lang['RowIconsBefore'] = 'Icônes AVANT les lignes'; $lang['RowIconsAfter'] = 'Icônes APRÈS les lignes'; +$lang['deprecated'] = ' (deprecated)'; # Appointments $lang['Appointment'] = 'Rendez-vous'; Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/it.p3,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- it.p3 8 Nov 2004 20:29:08 -0000 1.51 +++ it.p3 26 Feb 2005 19:03:37 -0000 1.52 @@ -164,6 +164,7 @@ $lang['pageof'] = "Page %s/%s"; $lang['RowIconsBefore'] = "Icons BEFORE rows"; $lang['RowIconsAfter'] = "Icons AFTER rows"; +$lang['deprecated'] = ' (deprecated)'; # Appointments $lang['Appointment'] = "Appuntamento"; Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/nl.p3,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- nl.p3 8 Nov 2004 20:29:08 -0000 1.57 +++ nl.p3 26 Feb 2005 19:03:37 -0000 1.58 @@ -173,6 +173,7 @@ $lang['pageof'] = "Pagina %s/%s"; $lang['RowIconsBefore'] = "Icons BEFORE rows"; $lang['RowIconsAfter'] = "Icons AFTER rows"; +$lang['deprecated'] = ' (deprecated)'; # Appointments $lang['Appointment'] = "Afspraak"; |
|
From: Gero K. <gok...@us...> - 2005-02-26 19:03:49
|
Update of /cvsroot/tutos/tutos/php/mailbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25890/mailbox Modified Files: mailbox.pinc Log Message: support of deprecated options Index: mailbox.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/mailbox/mailbox.pinc,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- mailbox.pinc 19 Feb 2005 12:00:26 -0000 1.19 +++ mailbox.pinc 26 Feb 2005 19:03:38 -0000 1.20 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2003 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * A interface to handle mailboxes (requires the imap extension of php) * @@ -133,7 +137,7 @@ function checkservice (&$user) { loadmodule('file'); - $msg = ""; + $msg = ""; $q = "SELECT * from ". $this->dbconn->prefix ."mailboxes where autoimport = 1"; $r = $this->dbconn->Exec($q); $n = $r->numrows(); @@ -142,6 +146,11 @@ $m = new mailbox($this->dbconn); $m->read_result($r,$a); $msg = $m->open(); + if ($m->mbox == "") { + $a++; + unset($m); + continue; + } $headers = imap_sort($m->mbox,SORTFROM,0,SE_UID); #echo count($headers); foreach ($headers as $hkey => $hval) { @@ -152,16 +161,16 @@ $b = imap_fetchheader($m->mbox,imap_msgno($m->mbox,$hdr->Msgno)); $b .= imap_body($m->mbox,imap_msgno($m->mbox,$hdr->Msgno)); $email_adr = array(); - foreach ($hdr->from as $id => $object) { + foreach ($hdr->from as $id => $object) { array_push($email_adr, strtolower($object->mailbox . "@" . $object->host)); } - foreach ($hdr->to as $id => $object) { + foreach ($hdr->to as $id => $object) { array_push($email_adr, strtolower($object->mailbox . "@" . $object->host)); } - foreach ($hdr->cc as $id => $object) { + foreach ($hdr->cc as $id => $object) { array_push($email_adr, strtolower($object->mailbox . "@" . $object->host)); } - foreach ($hdr->bcc as $id => $object) { + foreach ($hdr->bcc as $id => $object) { array_push($email_adr, strtolower($object->mailbox . "@" . $object->host)); } $email_adr = array_unique($email_adr); @@ -214,7 +223,7 @@ if ( $this->path != "" ) { $this->path = $this->path ."/". $path; - $this->path = ereg_replace("//","/",$this->path); + $this->path = ereg_replace("//","/",$this->path); } else { $this->path = $path; } |
|
From: Gero K. <gok...@us...> - 2005-02-26 16:37:23
|
Update of /cvsroot/tutos/tutos/php/mailbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17867 Modified Files: Tag: BRANCH-1-2 mailbox.pinc Log Message: fix Index: mailbox.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/mailbox/mailbox.pinc,v retrieving revision 1.16.2.2 retrieving revision 1.16.2.3 diff -u -r1.16.2.2 -r1.16.2.3 --- mailbox.pinc 5 Dec 2004 09:48:59 -0000 1.16.2.2 +++ mailbox.pinc 26 Feb 2005 16:37:09 -0000 1.16.2.3 @@ -142,6 +142,11 @@ $m = new mailbox($this->dbconn); $m->read_result($r,$a); $msg = $m->open(); + if ($m->mbox == "") { + $a++; + unset($m); + continue; + } $headers = imap_sort($m->mbox,SORTFROM,0,SE_UID); #echo count($headers); foreach ($headers as $hkey => $hval) { @@ -684,4 +689,4 @@ return $r; } } -?> \ No newline at end of file +?> |
|
From: Gero K. <gok...@us...> - 2005-02-26 15:52:28
|
Update of /cvsroot/tutos/tutos/php/ticker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6527/php/ticker Modified Files: Tag: BRANCH-1-2 mconfig.pinc rsslib.pinc Log Message: fixes Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ticker/mconfig.pinc,v retrieving revision 1.9.4.2 retrieving revision 1.9.4.3 diff -u -r1.9.4.2 -r1.9.4.3 --- mconfig.pinc 1 Dec 2004 19:18:26 -0000 1.9.4.2 +++ mconfig.pinc 26 Feb 2005 15:52:05 -0000 1.9.4.3 @@ -14,11 +14,11 @@ # define('useticker',-97); $tutos[modules]['ticker'] = array( - name => "ticker", - Desc => "display newsticker resources", - file => "php/ticker/ticker.pinc", - 'overview' => "ticker/ticker_overview.php", - 'perm' => useticker + name => "ticker", + Desc => "display newsticker resources", + file => "php/ticker/ticker.pinc", + 'overview' => "ticker/ticker_overview.php", + 'perm' => useticker ); # # globally enable this module @@ -29,42 +29,47 @@ # # $tutos['ticker'][] = array ( - name => 'freshmeat.net', - 'url' => 'http://freshmeat.net', - 'rdf' => 'http://download.freshmeat.net/backend/fm.rdf' + name => 'LOCALHOST', + 'url' => 'http://localhost', + 'rdf' => 'http://localhost' ); $tutos['ticker'][] = array ( - name => 'theregister.co.uk', - 'url' => 'http://www.theregister.co.uk', - 'rdf' => 'http://www.theregister.co.uk/tonys/slashdot.rdf' + name => 'freshmeat.net', + 'url' => 'http://freshmeat.net', + 'rdf' => 'http://download.freshmeat.net/backend/fm-releases-global.xml' ); $tutos['ticker'][] = array ( - name => 'linuxsecurity.com', - 'url' => 'http://www.linuxsecurity.com', - 'rdf' => 'http://www.linuxsecurity.com/index2.php?option=com_rss&feed=RSS1.0&no_html=1' + name => 'theregister.co.uk', + 'url' => 'http://www.theregister.co.uk', + 'rdf' => 'http://www.theregister.co.uk/tonys/slashdot.rdf' ); $tutos['ticker'][] = array ( - name => 'heise.de', - 'url' => 'http://www.heise.de/newsticker', - 'rdf' => 'http://www.heise.de/newsticker/heise.rdf' + name => 'linuxsecurity.com', + 'url' => 'http://www.linuxsecurity.com', + 'rdf' => 'http://www.linuxsecurity.com/index2.php?option=com_rss&feed=RSS1.0&no_html=1' ); $tutos['ticker'][] = array ( - name => 'slashdot', - 'url' => 'http://slashdot.org', - 'rdf' => 'http://slashdot.org/slashdot.rdf' + name => 'heise.de', + 'url' => 'http://www.heise.de/newsticker', + 'rdf' => 'http://www.heise.de/newsticker/heise.rdf' ); $tutos['ticker'][] = array ( - name => 'kuro5hin.org', - 'url' => 'http://www.kuro5hin.org', - 'rdf' => 'http://www.kuro5hin.org/backend.rdf' + name => 'slashdot', + 'url' => 'http://slashdot.org', + 'rdf' => 'http://slashdot.org/slashdot.rdf' +); +$tutos['ticker'][] = array ( + name => 'kuro5hin.org', + 'url' => 'http://www.kuro5hin.org', + 'rdf' => 'http://www.kuro5hin.org/backend.rdf' ); # # List of objects/modules where we do something with this module # and need to include this module # $tutos[modulesinc]['ticker'] = array( - "mytutos" - ); + "mytutos" + ); # # skipped (unused) permissions # @@ -73,4 +78,4 @@ $permskip[useticker][PERM_DEL] = 1; $permskip[useticker][PERM_SEL] = 1; -?> \ No newline at end of file +?> Index: rsslib.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ticker/rsslib.pinc,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -r1.9.2.1 -r1.9.2.2 --- rsslib.pinc 1 Dec 2004 19:04:49 -0000 1.9.2.1 +++ rsslib.pinc 26 Feb 2005 15:52:05 -0000 1.9.2.2 @@ -74,18 +74,19 @@ if (! file_exists($cachefile)) { return; } + $regs = array(); $fp = @fopen($cachefile, "rb"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom - if (eregi(".*(<rdf:RDF.*</rdf:RDF>).*",$pagetext,$regs)) { + if (preg_match("/(<rdf:RDF.*<\/rdf:RDF>)/ims",$pagetext,$regs)) { $pagetext = $regs[1]; } else - if (eregi(".*(<rss.*</rss>).*",$pagetext,$regs)) { + if (preg_match("/(<rss.*<\/rss>)/ims",$pagetext,$regs)) { $pagetext = $regs[1]; } else { - $pagetext = "missing info"; + $pagetext = "missing info"; } $pagetext = chop($pagetext); // make an array and walk it, printing out the item |
|
From: Gero K. <gok...@us...> - 2005-02-26 15:49:22
|
Update of /cvsroot/tutos/tutos/php/ticker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5824/ticker Modified Files: mconfig.pinc rsslib.pinc Log Message: fixes Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ticker/mconfig.pinc,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mconfig.pinc 9 Dec 2004 06:47:46 -0000 1.11 +++ mconfig.pinc 26 Feb 2005 15:49:13 -0000 1.12 @@ -36,7 +36,7 @@ $tutos['ticker'][] = array ( name => 'freshmeat.net', 'url' => 'http://freshmeat.net', - 'rdf' => 'http://download.freshmeat.net/backend/fm.rdf' + 'rdf' => 'http://download.freshmeat.net/backend/fm-releases-global.xml' ); $tutos['ticker'][] = array ( name => 'theregister.co.uk', Index: rsslib.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/ticker/rsslib.pinc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- rsslib.pinc 9 Dec 2004 06:47:46 -0000 1.10 +++ rsslib.pinc 26 Feb 2005 15:49:13 -0000 1.11 @@ -74,18 +74,19 @@ if (! file_exists($cachefile)) { return; } + $regs = array(); $fp = @fopen($cachefile, "rb"); if (!$fp) return; //just quit on error $pagetext = fread($fp, filesize($cachefile)); fclose($fp); // kill the crud at the top and bottom - if (eregi(".*(<rdf:RDF.*</rdf:RDF>).*",$pagetext,$regs)) { + if (preg_match("/(<rdf:RDF.*<\/rdf:RDF>)/ims",$pagetext,$regs)) { $pagetext = $regs[1]; } else - if (eregi(".*(<rss.*</rss>).*",$pagetext,$regs)) { + if (preg_match("/(<rss.*<\/rss>)/ims",$pagetext,$regs)) { $pagetext = $regs[1]; } else { - $pagetext = "missing info"; + $pagetext = "missing info"; } $pagetext = chop($pagetext); // make an array and walk it, printing out the item |
|
From: Gero K. <gok...@us...> - 2005-02-24 19:29:02
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25566 Modified Files: base.pinc pdf.pinc Log Message: fix Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- base.pinc 19 Feb 2005 13:48:43 -0000 1.82 +++ base.pinc 24 Feb 2005 19:28:36 -0000 1.83 @@ -98,7 +98,7 @@ if ($x[type] == 'float') { $this->$fld = 0.0; } else if ($x[type] == 'TS_TYPE') { - $this->$fld = new DateTime(); + $this->$fld = new DateTime(0); } else { $this->$fld = ''; } @@ -733,4 +733,4 @@ return ''; } } -?> \ No newline at end of file +?> Index: pdf.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/pdf.pinc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- pdf.pinc 8 Nov 2004 20:29:05 -0000 1.5 +++ pdf.pinc 24 Feb 2005 19:28:37 -0000 1.6 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2004 by Gero Kohnert + * Copyright 2004 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * base format for TUTOS pdf output * |
|
From: Gero K. <gok...@us...> - 2005-02-24 19:29:01
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25566/bugtracking Modified Files: bug_overview.php Log Message: fix Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- bug_overview.php 9 Oct 2004 12:40:10 -0000 1.18 +++ bug_overview.php 24 Feb 2005 19:28:37 -0000 1.19 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ |
|
From: Gero K. <gok...@us...> - 2005-02-24 19:28:23
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25444 Modified Files: res_cal.php Date.pinc appointment.pinc Log Message: fast jump Index: res_cal.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/res_cal.php,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- res_cal.php 2 Dec 2004 08:39:33 -0000 1.38 +++ res_cal.php 24 Feb 2005 19:28:13 -0000 1.39 @@ -1,6 +1,11 @@ <?php /* - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * */ include_once 'webelements.p3'; include_once 'permission.p3'; @@ -344,7 +349,14 @@ echo $this->OverviewRowEnd($line); } } + echo '<form name="" id="">'."\n"; echo $this->OverviewTableEnd(); + echo $this->start->enterMonth('s'); + echo $this->start->enterYear('s'); + echo ' <input type="submit" value="GO" />'."\n"; + hiddenFormElements(); + echo $this->getHidden(); + echo "</form>\n"; } /** * naviagte @@ -363,17 +375,18 @@ $this->do[usecalendar] = false; $this->do[useprojects] = false; $this->do[usetaskmanagement] = false; - foreach($_GET as $x1 => $x2) { - if (is_array($x2)) { - foreach($_GET[$x1] as $y1 => $y2) { - echo $x1."[".$y1."] ".$y2."<br>\n"; - } - } else - echo $x1." ". $x2 ."<br>\n"; - } +# foreach($_GET as $x1 => $x2) { +# if (is_array($x2)) { +# foreach($_GET[$x1] as $y1 => $y2) { +# echo $x1."[".$y1."] ".$y2."<br>\n"; +# } +# } else +# echo $x1." ". $x2 ."<br>\n"; +# } if ( isset($_GET['f']) ) { foreach($_GET['f'] as $x) { $this->link = addUrlParameter($this->link,"f[]=".$x); + $this->addHidden("f[]",$x); $this->do[$x] = true; } # Fatal_Error(); @@ -383,6 +396,7 @@ $this->do[usetaskmanagement] = true; } if ( isset($_GET['id']) ) { + $this->addHidden("id",$_GET['id']); $this->link = addUrlParameter($this->link,"id=".$_GET['id']); if ($_GET['id'] == 0 ) { $this->base = new team($this->dbconn); @@ -405,13 +419,20 @@ $this->base = $this->user; $this->uids[$this->base->id] = $this->base; } - if ( isset($_GET['start']) ) { + + # + # Start + # + if ( isset($_GET['s_y']) && isset($_GET['s_m'])) { + $this->start = new DateTime(sprintf('%04d%02d01',$_GET['s_y'],$_GET['s_m'])); + } else if ( isset($_GET['start']) ) { $this->start = new DateTime($_GET['start']); } else { $t = MkTime(0,0,0,Date("m"),1,Date("Y")); $this->start = new DateTime(); $this->start->setDateTimeTS($t); } + if ( isset($_GET['end']) ) { $this->end = new DateTime($_GET['end']); } else { @@ -426,7 +447,7 @@ $this->end->setDateTimeTS($t); } # do not add start/end to navigate - $this->link2 = $this->link; + $this->link2 = $this->link; $this->link = addUrlParameter($this->link,"start=".Date("Ymd",$this->start->ts)); $this->link = addUrlParameter($this->link,"end=".Date("Ymd",$this->end->ts)); Index: Date.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- Date.pinc 27 Jan 2005 16:36:52 -0000 1.99 +++ Date.pinc 24 Feb 2005 19:28:13 -0000 1.100 @@ -1,6 +1,10 @@ <?php /* - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ @@ -659,52 +663,54 @@ */ function EnterDay($name,$none = 0) { $x = sprintf("%s_d",$name ); - echo "<select id=\"". $x ."\" name=\"". $x ."\">"; + $r = '<select id="'. $x .'" name="'. $x .'">'; $day=0; if ( ($none == 1) || ($this->day == -1) ) { - echo "<option value=\"-1\""; + $r .= '<option value="-1"'; if ( $this->day == -1 ) { - echo " selected=\"selected\""; + $r .= ' selected="selected"'; } - echo ">--</option>\n"; + $r .= ">--</option>\n"; } while($day < 31) { $day++; - echo "<option value=\"". $day ."\""; + $r .= '<option value="'. $day .'"'; if ( $day == $this->day ) { - echo " selected=\"selected\" "; + $r .= ' selected="selected" '; } - echo ">"; - printf ("%02d\n",$day); - echo "</option>\n"; + $r .= '>'; + $r .= sprintf ("%02d\n",$day); + $r .= "</option>\n"; } - echo "</select>\n"; + $r .= "</select>\n"; + return $r; } /** * parts of a form used to enter a month */ function EnterMonth($name,$none = 0) { $x = sprintf("%s_m",$name ); - echo "<select id=\"". $x ."\" name=\"". $x ."\">"; + $r = '<select id="'. $x .'" name="'. $x .'">'; $mon=0; if ( ($none == 1) || ($this->month == -1) ) { - echo "<option value=\"-1\""; + $r .= '<option value="-1"'; if ( $this->month == -1 ) { - echo " selected=\"selected\""; + $r .= ' selected="selected"'; } - echo ">--</option>\n"; + $r .= ">--</option>\n"; } while($mon < 12) { $mon++; - echo "<option value=\"". $mon ."\""; + $r .= '<option value="'. $mon .'"'; if ( $mon == $this->month ) { - echo " selected=\"selected\" "; + $r .= ' selected="selected" '; } - echo ">"; - printf ("%02d\n",$mon); - echo "</option>\n"; + $r .= '>'; + $r .= sprintf ("%02d\n",$mon); + $r .= "</option>\n"; } - echo "</select>\n"; + $r .= "</select>\n"; + return $r; } /** * parts of a form used to enter a year @@ -712,14 +718,14 @@ */ function EnterYear($name,$none = 0,$future_only = false) { $x = sprintf("%s_y",$name ); - echo "<select id=\"". $x ."\" name=\"". $x ."\">"; + $r = '<select id="'. $x .'" name="'. $x .'">'; $year= Date("Y") + 10; if ( ($none == 1) || ($this->year == -1) ) { - echo "<option value=\"-1\""; + $r .= '<option value="-1"'; if ( $this->year == -1 ) { - echo " selected=\"selected\""; + $r .= ' selected="selected"'; } - echo ">----</option>\n"; + $r .= ">----</option>\n"; } if ($future_only) { $stop = Date("Y"); @@ -728,23 +734,25 @@ } while($year >= $stop ) { # yes my grandma was born 1904 (I need this!) - echo "<option value=\"". $year ."\""; + $r .= '<option value="'. $year .'"'; if ( $year == $this->year ) { - echo " selected=\"selected\" "; + $r .= ' selected="selected" '; } - echo ">". $year . "</option>\n"; + $r .= '>'. $year . "</option>\n"; $year--; } - echo "</select>\n"; + $r .= "</select>\n"; + return $r; } function ShowMinical($name, $none = 0) { global $tutos; + $r = ''; if ( !isset($_SERVER['HTTP_USER_AGENT']) || ereg("Lynx",$_SERVER['HTTP_USER_AGENT']) || ereg("w3m",$_SERVER['HTTP_USER_AGENT']) ) { # Do nothing } else { - echo "<a href=\"JavaScript: + $r .= "<a href=\"JavaScript: var d = document.forms[0]; mywindow = window.open('', 'calendar', 'resizable=yes,width=200,height=200,top=100,left=100'); mywindow.location.href = '". $tutos['base'] ."/php/minical.php?f=".$name."&n=".$none."&d=". @@ -752,9 +760,10 @@ ."&". SID ."'; mywindow.focus(); \" "self.status='minical' ;return true\">\n"; - echo "<font size=\"-1\">minical</font>\n"; - echo "</a>\n"; + $r .= "<font size=\"-1\">minical</font>\n"; + $r .= "</a>\n"; } + return $r; } /** @@ -766,20 +775,20 @@ global $tutos; if ( $tutos['df'] == 1 ) { - $this->EnterMonth($name,$none); + echo $this->EnterMonth($name,$none); } else { - $this->EnterDay($name,$none); + echo $this->EnterDay($name,$none); } echo "<b>.</b> "; if ( $tutos['df'] == 1 ) { - $this->EnterDay($name,$none); + echo $this->EnterDay($name,$none); } else { - $this->EnterMonth($name,$none); + echo $this->EnterMonth($name,$none); } echo "<b>.</b> "; - $this->EnterYear($name,$none,$future_only); + echo $this->EnterYear($name,$none,$future_only); - $this->ShowMinical($name, $none); + echo $this->ShowMinical($name, $none); } /** * enter a time into a form @@ -802,18 +811,18 @@ global $tutos; if ( $tutos['df'] == 1 ) { - $this->EnterMonth($name,$none); + echo $this->EnterMonth($name,$none); } else { - $this->EnterDay($name,$none); + echo $this->EnterDay($name,$none); } echo "<b>.</b> "; if ( $tutos['df'] == 1 ) { - $this->EnterDay($name,$none); + echo $this->EnterDay($name,$none); } else { - $this->EnterMonth($name,$none); + echo $this->EnterMonth($name,$none); } echo "<b>.</b> "; - $this->EnterYear($name,$none,$future_only); + echo $this->EnterYear($name,$none,$future_only); $h = sprintf("%s_H",$name ); $m = sprintf("%s_M",$name ); @@ -822,7 +831,7 @@ echo " <b>:</b> "; echo "<input maxlength=\"2\" size=\"2\" name=\"". $m ."\" value=\"". ($this->min == -1 ? "--":$this->min) ."\" />\n"; - $this->ShowMinical($name, $none); + echo $this->ShowMinical($name, $none); } /* --------------------------------------------------------------------------- */ Index: appointment.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v retrieving revision 1.180 retrieving revision 1.181 diff -u -r1.180 -r1.181 --- appointment.pinc 19 Feb 2005 21:41:36 -0000 1.180 +++ appointment.pinc 24 Feb 2005 19:28:13 -0000 1.181 @@ -44,7 +44,7 @@ $team = $tarr; } foreach($team as $t => $tt) - echo "XXX ".$t.' '.$tt."<br>"; +# echo "XXX ".$t.' '.$tt."<br>"; # if (is_array($team)) { # echo "<select id=\"team\" multiple size=\"".count($team)."\" name=\"team\">\n"; |
|
From: Gero K. <gok...@us...> - 2005-02-24 13:02:58
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13367 Modified Files: custom.pinc Log Message: fix Index: custom.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/custom.pinc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- custom.pinc 19 Feb 2005 11:44:02 -0000 1.1 +++ custom.pinc 24 Feb 2005 13:02:20 -0000 1.2 @@ -166,7 +166,7 @@ } else if ($x[type] == "float") { $x[size] = 15; echo " <td colspan=\"".($cols-1)."\">\n"; - echo " <input id=\"".$parsename."\" name=\"".$parsename."\" value=\"". myentities($obj->$fld) ."\" size=\"". min($x[size],10) ."\" maxlength=\"".$x[size]."\" />\n"; + echo " <input id=\"".$parsename."\" name=\"".$parsename."\" value=\"". number_format($obj->$fld,2,$lang['DecPoint'],$lang['ThousandPoint']) ."\" size=\"". min($x[size],10) ."\" maxlength=\"".$x[size]."\" />\n"; echo " </td>\n"; } else if ($x[type] == "TX_TYPE") { echo $layout->textarea($parsename,($cols-1),$obj->dbconn->txtlen,$obj->$fld); @@ -279,4 +279,4 @@ } } -?> \ No newline at end of file +?> |
|
From: Gero K. <gok...@us...> - 2005-02-24 13:02:04
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13230 Modified Files: Tag: BRANCH-1-2 webelements.p3 Log Message: fix Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.271.2.8 retrieving revision 1.271.2.9 diff -u -r1.271.2.8 -r1.271.2.9 --- webelements.p3 26 Nov 2004 09:09:34 -0000 1.271.2.8 +++ webelements.p3 24 Feb 2005 13:01:53 -0000 1.271.2.9 @@ -1574,7 +1574,7 @@ } else if ($x[type] == "float") { $x[size] = 15; echo " <td colspan=\"".($cols-1)."\">\n"; - echo " <input id=\"".$parsename."\" name=\"".$parsename."\" value=\"". myentities($obj->$fld) ."\" size=\"". min($x[size],10) ."\" maxlength=\"".$x[size]."\" />\n"; + echo " <input id=\"".$parsename."\" name=\"".$parsename."\" value=\"". number_format($obj->$fld,2,$lang['DecPoint'],$lang['ThousandPoint']) ."\" size=\"". min($x[size],10) ."\" maxlength=\"".$x[size]."\" />\n"; echo " </td>\n"; } else if ($x[type] == "TX_TYPE") { echo $layout->textarea($parsename,($cols-1),$obj->dbconn->txtlen,$obj->$fld); |
|
From: Gero K. <gok...@us...> - 2005-02-21 19:42:08
|
Update of /cvsroot/tutos/tutos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7701 Modified Files: ToDo Log Message: update Index: ToDo =================================================================== RCS file: /cvsroot/tutos/tutos/ToDo,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- ToDo 12 Oct 2004 06:35:19 -0000 1.45 +++ ToDo 21 Feb 2005 19:40:29 -0000 1.46 @@ -218,7 +218,7 @@ Multiple teams for calendar.php (very useful with resource groups) - + DONE (without real usage) 20050218 Adding a BugPlannedFinishedDate (sortable | auto warning) @@ -274,7 +274,7 @@ Put mails sent out to a sent folder (Marcin Kierdelewicz <mar...@me...>) - +add user to groups when create/modify users # # # EOF |
|
From: Gero K. <gok...@us...> - 2005-02-20 19:59:57
|
Update of /cvsroot/tutos/tutos/php/checklist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20086 Modified Files: checkfield.pinc checkfield_overview.php checklist.pinc checklist_update.php Log Message: fix Index: checkfield.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield.pinc,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- checkfield.pinc 13 Oct 2004 14:20:43 -0000 1.17 +++ checkfield.pinc 20 Feb 2005 19:59:49 -0000 1.18 @@ -573,9 +573,9 @@ for ( $a=1; $a<=$this->maxvalue ; $a++) { $out .= $a; if ( $a == $this->value_n ) { - $out .= "<input name=\"".$name."\" type=\"radio\" value=\"".$a."\" checked >"; + $out .= "<input name=\"".$name."\" type=\"radio\" value=\"".$a."\" checked >"; } else { - $out .= "<input name=\"".$name."\" type=\"radio\" value=\"".$a."\">"; + $out .= "<input name=\"".$name."\" type=\"radio\" value=\"".$a."\">"; } } return $out; Index: checkfield_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_overview.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- checkfield_overview.php 13 Oct 2004 14:20:43 -0000 1.22 +++ checkfield_overview.php 20 Feb 2005 19:59:49 -0000 1.23 @@ -114,7 +114,7 @@ $this->addHidden("checklist_ins","from_editor"); } echo "<tr>\n"; - submit_reset(0,-1,1,0,0,0); + submit_reset(0,-1,2,0,0,0); echo "</tr>\n"; echo $this->OverviewTableEnd(); hiddenFormElements(); @@ -167,7 +167,7 @@ echo "<td valign=\"top\">". $c->getObjType() ."</td>"; echo "<td valign=\"top\">". $c->getValue() ."</td>"; echo "<td valign=\"top\">". $c->getRefLink() ." </td>"; - echo " <td>". $c->creation->getDateTime() ."</TD>\n"; + echo " <td>". $c->creation->getDateTime() ."</td>\n"; echo " <td> ". $c->creator->getLink($c->creator->getShortname()) ."</td>\n"; if ( $tutos[massupdate] == 1 ) { if ( $c->mod_ok() ) { Index: checklist.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checklist.pinc,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- checklist.pinc 13 Oct 2004 14:20:43 -0000 1.24 +++ checklist.pinc 20 Feb 2005 19:59:49 -0000 1.25 @@ -411,6 +411,9 @@ if ( $this->class_id > 0 ) { $tmp_checklist = new checklist( $this->dbconn); $tmp_checklist = $tmp_checklist->read( $this->class_id,$tmp_checklist); + if ($tmp_checklist == -1) { + return "no link"; + } $tmp_string = $tmp_checklist->GetLink(); unset( $tmp_checklist); return $tmp_string; @@ -523,6 +526,9 @@ if ( $this->class_id > 0 ) { $tmp_cl_class = new checklist( $this->dbconn); $tmp_cl_class = $tmp_cl_class->read( $this->class_id,$tmp_cl_class); + if ($tmp_cl_class == -1) { + return " "; + } $tmp_string = $tmp_cl_class->getLink(); unset( $tmp_cl_class); return $tmp_string; @@ -538,44 +544,47 @@ if ( $this->class_id > 0 ) { $tmp_cl_class = new checklist( $this->dbconn); $tmp_cl_class = $tmp_cl_class->read( $this->class_id,$tmp_cl_class); + if ($tmp_cl_class == -1) { + return; + } $tmp_cl_class->read_checkfields( $tmp_cl_class); @reset ($this->checkfields); while ( list ($i,$f) = @each ($this->checkfields) ) { - $tmp_cf_class = $tmp_cl_class->checkfields[$f->fid_in_class]; - if ( isset($tmp_cf_class) ) { - if ( $f->modification->lessthan( $tmp_cf_class->modification ) ) { - // newer values in cf-class -> update - $f->updateFrom( $tmp_cf_class); - } - } else { - // cf only in working-copy -> delete - $f->delete(); - } + $tmp_cf_class = $tmp_cl_class->checkfields[$f->fid_in_class]; + if ( isset($tmp_cf_class) ) { + if ( $f->modification->lessthan( $tmp_cf_class->modification ) ) { + // newer values in cf-class -> update + $f->updateFrom( $tmp_cf_class); + } + } else { + // cf only in working-copy -> delete + $f->delete(); + } } // added to checklist-class $tmp_cl = $tmp_cl_class->checkfields; @reset ($this->checkfields); while ( list ($i,$f) = @each ($this->checkfields) ) { - if ( array_key_exists( $f->fid_in_class, $tmp_cl) ) { - unset( $tmp_cl[$f->fid_in_class]); - } + if ( array_key_exists( $f->fid_in_class, $tmp_cl) ) { + unset( $tmp_cl[$f->fid_in_class]); + } } @reset ($tmp_cl); while ( list ($i,$f) = @each ($tmp_cl) ) { - $cf = new checkfield($this->dbconn); // new checkfield - $cf->creation = new DateTime(); // created now - $cf->fid_in_class = $f->id; // which field-id in class - $cf->id = -1; // will save as new object - $cf->link_id = $this->id; // reference_id will be id of checklist-__instance__ - $cf->updateFrom( $f); // get values and store + $cf = new checkfield($this->dbconn); // new checkfield + $cf->creation = new DateTime(); // created now + $cf->fid_in_class = $f->id; // which field-id in class + $cf->id = -1; // will save as new object + $cf->link_id = $this->id; // reference_id will be id of checklist-__instance__ + $cf->updateFrom( $f); // get values and store $cf->type = $f->type; // set value-type $cf->value_n = $f->value_n; $cf->maxvalue = $f->maxvalue; $cf->value_t = $f->value_t; $cf->pos = $f->pos; - $cf->save(); // store in DB + $cf->save(); // store in DB } } } Index: checklist_update.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checklist_update.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- checklist_update.php 13 Oct 2004 14:20:43 -0000 1.4 +++ checklist_update.php 20 Feb 2005 19:59:49 -0000 1.5 @@ -20,11 +20,11 @@ loadmodule("checklist"); $gotourl = "checklist/checkfield_overview.php"; -$gotourl= addUrlParameter( $gotourl, "format=checklist"); +$gotourl= addUrlParameter( $gotourl, "format=checklist",true); $msg = ""; $clid = $HTTP_GET_VARS['id']; -$gotourl= addUrlParameter( $gotourl, "link_id=". $clid); +$gotourl= addUrlParameter( $gotourl, "link_id=". $clid,true); $dbconn->Begin("WORK"); $new_cl = new checklist($dbconn); @@ -33,11 +33,11 @@ $new_cl->save(); $dbconn->Commit("WORK"); -$gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg)); +$gotourl= addUrlParameter($gotourl,"msg=". UrlEncode($msg),true); $gotourl = addSessionKey($gotourl); Header("Status: 302 Moved Temporarily"); -Header("Location: ". dirname(getBaseUrl()) ."/". $gotourl); +Header("Location: ". dirname(getBaseUrl()) ."/". $gotourl,true); $dbconn->Close(); // CVS Info: $Id$ |
|
From: Gero K. <gok...@us...> - 2005-02-20 19:54:13
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17914/php Modified Files: Tag: BRANCH-1-2 config_default.pinc product.pinc task.pinc Log Message: fix Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.87.2.7 retrieving revision 1.87.2.8 diff -u -r1.87.2.7 -r1.87.2.8 --- config_default.pinc 14 Jan 2005 20:23:30 -0000 1.87.2.7 +++ config_default.pinc 20 Feb 2005 19:53:58 -0000 1.87.2.8 @@ -727,6 +727,6 @@ # # The TUTOS Version number # -$tutos[version]="1.2.20050105"; +$tutos[version]="1.2.20050128"; # ?> \ No newline at end of file Index: product.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/product.pinc,v retrieving revision 1.148 retrieving revision 1.148.2.1 diff -u -r1.148 -r1.148.2.1 --- product.pinc 23 Apr 2004 10:21:55 -0000 1.148 +++ product.pinc 20 Feb 2005 19:53:59 -0000 1.148.2.1 @@ -14,9 +14,11 @@ define ('PROD_STATE_QCANCEL',5); define ('PROD_ROLE_MANAGER',1); +define ('PROD_ROLE_COMMERCIAL',2); define ('PROD_ROLE_MANAGER2',3); define ('PROD_ROLE_SALES',4); define ('PROD_ROLE_DEVEL',5); +define ('PROD_ROLE_CUSTOMER',6); define ('PROD_ROLE_PARTNER',9); define ('PROD_ROLE_ANCESTOR',11); Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.150.2.6 retrieving revision 1.150.2.7 diff -u -r1.150.2.6 -r1.150.2.7 --- task.pinc 25 Nov 2004 05:13:26 -0000 1.150.2.6 +++ task.pinc 20 Feb 2005 19:53:59 -0000 1.150.2.7 @@ -102,6 +102,8 @@ } else { $font = FF_FONT1; } + # ugly fix + $font = FF_FONT1; task_calc($parent); @@ -1458,4 +1460,4 @@ return $r; } } -?> \ No newline at end of file +?> |
|
From: Gero K. <gok...@us...> - 2005-02-20 19:54:13
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17914/php/db Modified Files: Tag: BRANCH-1-2 db_mysql.pinc Log Message: fix Index: db_mysql.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db_mysql.pinc,v retrieving revision 1.21.2.2 retrieving revision 1.21.2.3 diff -u -r1.21.2.2 -r1.21.2.3 --- db_mysql.pinc 2 Oct 2004 17:37:48 -0000 1.21.2.2 +++ db_mysql.pinc 20 Feb 2005 19:54:00 -0000 1.21.2.3 @@ -411,7 +411,13 @@ $c = ereg_replace("NN","not null",$c); $q .= $this->colname($colname) ." ". $t ." ". $c; $q .= ")"; - return $this->exec($q,0); + # fix sizes if column already exists or some other problem appears + $x = $this->exec($q,0); + if ($x == -1) { + $q = "ALTER TABLE ". $this->prefix . $tblname ." CHANGE " . $this->colname($colname).' '. $this->colname($colname)." ". $t ." ". $c ; + $x = $this->exec($q,0); + } + return $x; } /** * name = name of sequencer |
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2464 Modified Files: app_new.php appointment.pinc calendar.php calendar_week.php calendar_day.php webelements.p3 user.pinc Log Message: multiple teams in calendar Index: app_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_new.php,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- app_new.php 7 Feb 2005 16:45:36 -0000 1.60 +++ app_new.php 19 Feb 2005 21:41:36 -0000 1.61 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * Editing of "normal" (not repeatig) appointments * Index: appointment.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v retrieving revision 1.179 retrieving revision 1.180 diff -u -r1.179 -r1.180 --- appointment.pinc 27 Jan 2005 14:27:40 -0000 1.179 +++ appointment.pinc 19 Feb 2005 21:41:36 -0000 1.180 @@ -1,6 +1,10 @@ <?php /* - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ @@ -30,57 +34,87 @@ /** * options for calendar selection */ -function cal_options($team,$teamname) { +function cal_options($tarr,$teamname) { global $lang,$current_user; - echo "<select name=\"team\">\n"; - $showed = 0; - $useOPTGROUP = true; - if (!isset ($_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; - } - if ($useOPTGROUP && ereg("Opera",$_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; + if (!is_array($tarr)) { + $team[] = $tarr; + } else { + $team = $tarr; } - if ($useOPTGROUP && ereg ("MSIE.*Mac",$_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; + foreach($team as $t => $tt) + echo "XXX ".$t.' '.$tt."<br>"; + +# if (is_array($team)) { +# echo "<select id=\"team\" multiple size=\"".count($team)."\" name=\"team\">\n"; +# } else { + echo '<select id="team" name="team[]">'."\n"; +# } + $showed[] = array(); + + $useOPTGROUP = UseOptGroup(); + + if (count($current_user->t_parties)) { + if ($useOPTGROUP) { + echo ' <optgroup label="'. $lang['Teams'] ."\">\n"; + } + foreach ( $current_user->t_parties as $i => $f ) { + echo ' <option value="'. $i .'"'. ($team == $i ? ' selected="selected"' : '') .'>'. myentities($f) ."</option>\n"; + if ( $team == $i ) { + $showed = 1; + } + } + if ($useOPTGROUP) { + echo " </optgroup>\n"; + } } if ($useOPTGROUP) { - echo " <optgroup label=\"". $lang['Teams'] ."\">\n"; + echo ' <optgroup label="'.$lang['User'].'">'."\n"; } - foreach ( $current_user->t_parties as $i => $f ) { - echo " <option value=\"". $i ."\"". ($team == $i ? " selected=\"selected\"" : "") .">". myentities($f) ."</option>\n"; - if ( $team == $i ) { - $showed = 1; - } + echo ' <option value="'. CAL_MYOWN .'"'. (isset($team[CAL_MYOWN]) ? ' selected="selected"' : '') .'>'.($useOPTGROUP ? "": $lang['User']) ." ". $current_user->getFullname() ."</option>\n"; + if ( isset($team[CAL_MYOWN]) ) { + $showed[CAL_MYMON] = 1; + $showed[$current_user->id] = 1; } if ($useOPTGROUP) { echo " </optgroup>\n"; + echo ' <optgroup label="-----">'."\n"; } - echo " <option value=\"". CAL_MYOWN ."\"". ($team == CAL_MYOWN ? " selected=\"selected\"" : "") .">". $lang['User'] ." ". $current_user->getFullname() ."</option>\n"; - if ( $team == CAL_MYOWN ) { - $showed = 1; - } - echo " <option value=\"". CAL_OWNTEAMS ."\"". ($team == CAL_OWNTEAMS ? " selected=\"selected\"" : "") .">". $lang['AppAllTeams'] ."</option>\n"; + echo ' <option value="'. CAL_OWNTEAMS .'"'. (isset($team[CAL_OWNTEAMS]) ? ' selected="selected"' : '') .'>'. $lang['AppAllTeams'] ."</option>\n"; if ( $team == CAL_OWNTEAMS ) { - $showed = 1; + $showed[CAL_OWNTEAMS] = 1; } - echo " <option value=\"". CAL_ALLTOSEE ."\"". ($team == CAL_ALLTOSEE ? " selected=\"selected\"" : "") .">". $lang['AppAllSee'] ."</option>\n"; + echo ' <option value="'. CAL_ALLTOSEE .'"'. (isset($team[CAL_ALLTOSEE]) ? ' selected="selected"' : '') .'>'. $lang['AppAllSee'] ."</option>\n"; if ( $team == CAL_ALLTOSEE ) { - $showed = 1; + $showed[CAL_ALLTOSEE] = 1; } if ( $current_user->isadmin() ) { - echo " <option value=\"". CAL_EVERYTHING ."\"". ($team == CAL_EVERYTHING ? " selected=\"selected\"" : "") .">". $lang['AppEverything'] ."</option>\n"; + echo ' <option value="'. CAL_EVERYTHING .'"'. (isset($team[CAL_EVERYTHING]) ? ' selected="selected"' : '') .'>'. $lang['AppEverything'] ."</option>\n"; if ( $team == CAL_EVERYTHING ) { - $showed = 1; + $showed[CAL_EVERYTHING] = 1; } } - if ( $showed != 1 ) { - echo " <option value=\"". $team ."\" selected=\"selected\">". $teamname ."</option>\n"; + if ($useOPTGROUP) { + echo " </optgroup>\n"; + } + + if ($useOPTGROUP) { + echo ' <optgroup label="-----">'."\n"; + } + foreach($team as $t => $tt) { + if ( $showed[$t] == 1 ) continue; + $obj = getObject($current_user->dbconn,$t); + if ($obj != -1) { + echo ' <option value="'. $t .'" selected="selected">'. $obj->getFullName() ."</option>\n"; + } + echo ("XXXX".$t); + } + if ($useOPTGROUP) { + echo " </optgroup>\n"; } echo " </select>\n"; - echo " <input type=\"submit\" value=\"GO\" />"; + echo ' <input type="submit" value="GO" />'."\n"; } /** @@ -158,118 +192,133 @@ $uids = array(); if ( isset($_GET['team']) ) { - $team = $_GET['team']; - $x = $user->set_prefteam($team); + if (is_array($_GET['team'])) { + foreach ($_GET['team'] as $i) { + $tt[$i] = $i; + } + } else { + $tt[$_GET['team']] = $_GET['team']; + $x = $user->set_prefteam($_GET['team']); + } } else { /* Get the last used team */ - $team = $user->get_prefteam(); + $x = $user->get_prefteam(); + $tt[$x] = $x; } $user->readKnownParties(); + /* reset unallowed stuff */ + foreach ($tt as $t) { + if ( ($t == CAL_EVERYTHING) && ! $user->isadmin() ) { + unset($tt[$t]); + $tt[CAL_MYOWN] = CAL_MYOWN; + } + } + /* Get group or user whose calendar should be displayed */ /* default to current checked in user */ - if ( ($team == CAL_EVERYTHING) && ! $user->isadmin() ) { - $team = CAL_MYOWN; - } - if ( $team == CAL_EVERYTHING ) { - $uids[0] = 1; - } elseif ( $team == CAL_MYOWN) { - cal_setDefault($user,$uids); - } elseif ( $team == CAL_OWNTEAMS) { - /* show apps for all teams members of current users teams */ - $uids[$user->id] = 1; - foreach($user->teamlist as $i => $f ) { - $uids[$i] = 1; - $tt = new team($user->dbconn); - $tt = $tt->read($i,$tt); - $tt->read_member(); - foreach($tt->member as $i1 => $f1 ) { - $uids[$i1] = 1; - # Add all teams where this member is also a member - # so you can see if this one is occupied by a team event - # of one of his/her teams - if (!isset($tt->member[$i1]->teamlist)) { - team::obj_read($tt->member[$i1]); - } - foreach($tt->member[$i1]->teamlist as $i2 => $f2 ) { - $uids[$i2] = 1; - } - } - unset($tt); - } - } elseif ( $team == CAL_ALLTOSEE) { - /* show apps for all teams members of current users teams */ - /* and all users and teams we are allowed to see (ACL) */ - $uids[$user->id] = 1; - foreach($user->a_parties as $ip => $fn ) { - $uids[$ip] = 1; - } - foreach($user->t_parties as $ip => $fn ) { - $uids[$ip] = 1; - $tt = new team($user->dbconn); - $tt = $tt->read($ip,$tt); - foreach($tt->ids as $i1 => $f1 ) { - $uids[$i1] = 1; - } - unset($tt); - } - } else { - $tt = getObject($user->dbconn,$team); - if ( $tt == -1 ) { - } else if ( $tt->getType() == "team" ) { - if ( $tt->see_ok() ) { - # Team - $uids[$team] = 1; - $teamname = $tt->name; + foreach ($tt as $team) { + if ( $team == CAL_EVERYTHING ) { + $uids[0] = 1; + } elseif ( $team == CAL_MYOWN) { + cal_setDefault($user,$uids); + } elseif ( $team == CAL_OWNTEAMS) { + /* show apps for all teams members of current users teams */ + $uids[$user->id] = 1; + foreach($user->teamlist as $i => $f ) { + $uids[$i] = 1; + $tt = new team($user->dbconn); + $tt = $tt->read($i,$tt); $tt->read_member(); foreach($tt->member as $i1 => $f1 ) { - $uids[$i1] = 1; - # Check the teams where this user is also a member + $uids[$i1] = 1; + # Add all teams where this member is also a member + # so you can see if this one is occupied by a team event + # of one of his/her teams if (!isset($tt->member[$i1]->teamlist)) { team::obj_read($tt->member[$i1]); } foreach($tt->member[$i1]->teamlist as $i2 => $f2 ) { - $uids[$i2] = 1; + $uids[$i2] = 1; } } - } else { - $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang['Team']." ".$tt->getFullName().")"); - cal_setDefault($user,$uids); + unset($tt); } - } else if ( $tt->getType() == "user" ) { - if ( $tt->see_ok() ) { - $uids[$team] = 1; - $teamname = $lang['User'] ." ". $tt->getFullname(); - # All Teams where the user is a member - foreach($tt->teamlist as $i => $f ) { - $uids[$i] = 1; + } elseif ( $team == CAL_ALLTOSEE) { + /* show apps for all teams members of current users teams */ + /* and all users and teams we are allowed to see (ACL) */ + $uids[$user->id] = 1; + foreach($user->a_parties as $ip => $fn ) { + $uids[$ip] = 1; + } + foreach($user->t_parties as $ip => $fn ) { + $uids[$ip] = 1; + $tt = new team($user->dbconn); + $tt = $tt->read($ip,$tt); + foreach($tt->ids as $i1 => $f1 ) { + $uids[$i1] = 1; + } + unset($tt); + } + } else { + $tt = getObject($user->dbconn,$team); + if ( $tt == -1 ) continue; + + if ( $tt->getType() == "team" ) { + if ( $tt->see_ok() ) { + # Team + $uids[$team] = 1; + $teamname = $tt->name; + $tt->read_member(); + foreach($tt->member as $i1 => $f1 ) { + $uids[$i1] = 1; + # Check the teams where this user is also a member + if (!isset($tt->member[$i1]->teamlist)) { + team::obj_read($tt->member[$i1]); + } + foreach($tt->member[$i1]->teamlist as $i2 => $f2 ) { + $uids[$i2] = 1; + } + } + } else { + $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang['Team']." ".$tt->getFullName().")"); + cal_setDefault($user,$uids); } - } else { - $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang['User']." ".$tt->getFullName().")"); - cal_setDefault($user,$uids); - } - } else if ( $tt->getType() == "product" ) { - if ( $tt->see_ok() ) { - $teamname = $lang[$tt->getType()] ." ". $tt->getFullname(); - # put all the team members on the list - $tt->readroles(); - $uids[$tt->id] = 1; - foreach ($lang['ProdRole'] as $role => $x ) { - foreach ($tt->role[$role] as $i => $r) { + } else if ( $tt->getType() == "user" ) { + if ( $tt->see_ok() ) { + $uids[$team] = 1; + $teamname = $lang['User'] ." ". $tt->getFullname(); + # All Teams where the user is a member + foreach($tt->teamlist as $i => $f ) { $uids[$i] = 1; } + } else { + $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang['User']." ".$tt->getFullName().")"); + cal_setDefault($user,$uids); + } + } else if ( $tt->getType() == "product" ) { + if ( $tt->see_ok() ) { + $teamname = $lang[$tt->getType()] ." ". $tt->getFullname(); + # put all the team members on the list + $tt->readroles(); + $uids[$tt->id] = 1; + foreach ($lang['ProdRole'] as $role => $x ) { + foreach ($tt->role[$role] as $i => $r) { + $uids[$i] = 1; + } + } + } else { + $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang[$tt->getType()]." ".$tt->getFullName().")"); + cal_setDefault($user,$uids); } } else { - $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang[$tt->getType()]." ".$tt->getFullName().")"); - cal_setDefault($user,$uids); - } - } else { - if ( $tt->see_ok() ) { - $teamname = $lang[$tt->getType()] ." ". $tt->getFullname(); - $uids[$team] = 1; - } else { - $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang[$tt->getType()]." ".$tt->getFullName().")"); - cal_setDefault($user,$uids); + if ( $tt->see_ok() ) { + $teamname = $lang[$tt->getType()] ." ". $tt->getFullname(); + $uids[$team] = 1; + } else { + $msg .= sprintf($lang['Err0022'],$lang['Calendar']."(". $lang[$tt->getType()]." ".$tt->getFullName().")"); + cal_setDefault($user,$uids); + } } } } Index: calendar.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/calendar.php,v retrieving revision 1.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- calendar.php 22 Apr 2004 13:15:02 -0000 1.82 +++ calendar.php 19 Feb 2005 21:41:36 -0000 1.83 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * @modulegroup appointment * @module calendar @@ -30,6 +34,11 @@ Function Cal_Week ($t) { global $lang, $tutos; + $navurl = 'calendar_week.php'; + foreach ($this->team as $tt) { + $navurl = addUrlParameter($navurl,'team[]='.$tt,false); + } + $ts = mktime(12,0,0,substr($t,4,2),substr($t,6,2),substr($t,0,4)); /* Back to last weekstart day before ts */ # echo $this->user->weekstart ." ". $ts." ". strftime($lang['DateTimeStr'],$ts) ." ". Date("w",$ts)."<br />"; @@ -41,7 +50,9 @@ $w0 = (( 1 + Date("w",mktime(12,0,0,1,1, Date("Y",$ts) ) )) % 7) > 3; $wn = sprintf("%02d", Round( (Date("z",$ts)+7 ) / 7) ); $yy = Date("y",$ts); - echo " <td class=\"week\" width=\"5%\">". menulink("calendar_week.php?t=".Date("Ymd",$ts)."&team=". $this->team, $wn ."/". $yy, $lang['week'] ." ". $wn ."/". $yy ) ."</td>\n"; + + $navurl = addUrlParameter($navurl,'t='.Date("Ymd",$ts),false); + echo " <td class=\"week\" width=\"5%\">". menulink($navurl, $wn ."/". $yy, $lang['week'] ." ". $wn ."/". $yy ) ."</td>\n"; /* Select appointments for this day */ $from = new DateTime(); @@ -148,6 +159,10 @@ } } + $navurl = 'calendar.php'; + foreach ($this->team as $tt) { + $navurl = addUrlParameter($navurl,'team[]='.$tt,false); + } $ts = mktime(0,0,0,substr($this->t,4,2),substr($this->t,6,2),substr($this->t,0,4)); $last_week = Date("Ymd",$ts - 7 * 86400); $next_week = Date("Ymd",$ts + 7 * 86400); @@ -169,17 +184,21 @@ echo " </th>\n"; echo " <td nowrap=\"nowrap\" class=\"navigate\" colspan=\"".( $cols - 3) ."\" align=\"center\">\n"; - echo menulink("calendar.php?t=". $last_week,$this->theme->getImage(left,'list').$lang['lastweek'],$lang['lastweek']); + $url = addUrlParameter($navurl,'t='.$last_week,false); + echo menulink($url,$this->theme->getImage(left,'list').$lang['lastweek'],$lang['lastweek']); echo " "; - echo menulink("calendar.php?t=". $this->t ,$lang['reload']); + $url = addUrlParameter($navurl,'t='.$this->t,false); + echo menulink($url ,$lang['reload']); echo " "; - echo menulink("calendar.php?t=". $next_week,$lang['nextweek'].$this->theme->getImage(right,'list'),$lang['nextweek']); + $url = addUrlParameter($navurl,'t='.$next_week,false); + echo menulink($url,$lang['nextweek'].$this->theme->getImage(right,'list'),$lang['nextweek']); echo "</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td nowrap=\"nowrap\" class=\"navigate\" colspan=\"". ( $cols - 3)."\" align=\"center\">\n"; - echo menulink("calendar.php?t=". $last_month,$this->theme->getImage(left,'list').$this->theme->getImage(left,'list').$lang['minus4weeks'],$lang['minus4weeks']); + $url = addUrlParameter($navurl,'t='.$last_month,false); + echo menulink($url,$this->theme->getImage(left,'list').$this->theme->getImage(left,'list').$lang['minus4weeks'],$lang['minus4weeks']); echo " "; if ( $this->user->feature_ok(usecalendar,PERM_NEW) ) { echo menulink("app_new.php?t=".$this->t,$lang['NewAppoint'],$lang['NewAppointInfo']); @@ -187,7 +206,8 @@ echo " "; } echo " "; - echo menulink("calendar.php?t=". $next_month,$lang['plus4weeks'].$this->theme->getImage(right,'list').$this->theme->getImage(right,'list'),$lang['plus4weeks']); + $url = addUrlParameter($navurl,'t='.$next_month,false); + echo menulink($url,$lang['plus4weeks'].$this->theme->getImage(right,'list').$this->theme->getImage(right,'list'),$lang['plus4weeks']); echo " </td>\n"; echo " </tr>\n"; @@ -261,7 +281,13 @@ } $this->uids = cal_parse_options($this->user,$this->teamname); - $this->team = $this->user->get_prefteam(); + if (!isset($_GET['team'])) { + $x = $this->user->get_prefteam(); + $this->team[$x] = $x; + } else { + foreach($_GET['team'] as $x) + $this->team[$x] = $x; + } # menu $m = appointment::getSelectLink($this->user); @@ -279,4 +305,4 @@ <!-- CVS Info: $Id$ $Author$ ---> +--> \ No newline at end of file Index: calendar_week.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/calendar_week.php,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- calendar_week.php 27 Jan 2005 15:42:30 -0000 1.46 +++ calendar_week.php 19 Feb 2005 21:41:36 -0000 1.47 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2001 - 2004 by Gero Kohnert + * Copyright 2001 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * A calendar for one week * @@ -29,6 +33,11 @@ Function info() { global $lang,$tutos; + $navurl = 'calendar_week.php'; + foreach ($this->team as $tt) { + $navurl = addUrlParameter($navurl,'team[]='.$tt,false); + } + $adr = $this->user; $ts = mktime(12,0,0,substr($this->t,4,2),substr($this->t,6,2),substr($this->t,0,4)); @@ -53,7 +62,12 @@ echo " </th><th> </th>\n"; echo " </tr>\n"; echo " <tr>\n"; - echo " <th colspan=\"2\" width=\"100%\">".menulink("calendar_week.php?t=".$last_week,$this->theme->getImage(left,'list'),$lang['lastweek']) ." ". $lang['week'] ." " . $wn . "/". $yy ." ". menulink("calendar_week.php?t=".$next_week,$this->theme->getImage(right,'list') ,$lang['nextweek']) ."</th>\n"; + $url = addUrlParameter($navurl,'t='.$last_week,false); + echo " <th colspan=\"2\" width=\"100%\">"; + echo menulink($url,$this->theme->getImage(left,'list'),$lang['lastweek']); + echo ' '. $lang['week'] .' ' . $wn . '/'. $yy .' '; + $url = addUrlParameter($navurl,'t='.$next_week,false); + echo menulink($url,$this->theme->getImage(right,'list') ,$lang['nextweek']) ."</th>\n"; echo " </tr>\n"; $from = new DateTime(); @@ -74,6 +88,10 @@ $day = 0; $col = 1; $dd = new DateTime(); + $navurl = 'calendar_day.php'; + foreach ($this->team as $tt) { + $navurl = addUrlParameter($navurl,'team[]='.$tt,false); + } while ( $day < 7 ) { $dd->setDateTimeTS($ts); $d = $dd->getDate(); @@ -91,7 +109,8 @@ echo "<table class=\"single\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">\n"; echo " <tr>\n"; echo " <th>\n"; - echo menulink("calendar_day.php?t=". $tref,$lang['Day'. Date("w",$ts)],strftime($lang['DateFormatTitle'],$ts)); + $url = addUrlParameter($navurl,'t='.$tref,false); + echo menulink($url,$lang['Day'. Date("w",$ts)],strftime($lang['DateFormatTitle'],$ts)); if ( isset($dinfo[Desc]) ) { echo " " . menulink("app_new.php?t=". $tref,$d,$lang['NewAppointInfo'],$dinfo[popinfo]) ."\n"; } else { @@ -173,9 +192,15 @@ $this->stop = true; } - $this->team = $this->user->get_prefteam(); $this->teamname = ""; $this->uids = cal_parse_options($this->user,$this->teamname); + if (!isset($_GET['team'])) { + $x = $this->user->get_prefteam(); + $this->team[$x] = $x; + } else { + foreach($_GET['team'] as $x) + $this->team[$x] = $x; + } $this->t = Date("Ymd"); if ( isset($_GET['t']) ) { $this->t = $_GET['t']; Index: calendar_day.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/calendar_day.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- calendar_day.php 27 Mar 2004 18:51:30 -0000 1.32 +++ calendar_day.php 19 Feb 2005 21:41:36 -0000 1.33 @@ -1,6 +1,10 @@ <?php /** - * Copyright 2002-2004 by Gero Kohnert + * Copyright 2002-2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * a calendar for a single day * @@ -132,6 +136,13 @@ $maxcol = max($maxcol,count($table[$i])); } + $navurl = 'calendar_day.php'; + $navurl2 = 'calendar_week.php'; + foreach ($this->team as $tt) { + $navurl = addUrlParameter($navurl,'team[]='.$tt,false); + $navurl2 = addUrlParameter($navurl2,'team[]='.$tt,false); + } + echo "<form action=\"calendar_day.php\" method=\"get\">\n"; echo "<table class=\"single\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"90%\">\n"; echo " <tr>\n"; @@ -141,9 +152,15 @@ echo " </tr>\n"; echo " <tr>\n"; echo " <th nowrap=\"nowrap\" colspan=\"". ($maxcol +1) ."\" width=\"100%\">"; - echo menulink("calendar_day.php?t=".$last_day->getYYYYMMDD(),$this->theme->getImage(left,'list'),$last_day->getDate()); - echo " ". strftime($lang['DateFormatTitle'],$from->ts) ." (". $lang['week']." ". menulink("calendar_week.php?t=".Date("Ymd",$from->ts), $wn ."/". $yy, $wn ."/". $yy ) .") "; - echo menulink("calendar_day.php?t=".$next_day->getYYYYMMDD(),$this->theme->getImage(right,'list'),$next_day->getDate()); + $url = addUrlParameter($navurl,'t='.$last_day->getYYYYMMDD(),false); + echo menulink($url,$this->theme->getImage(left,'list'),$last_day->getDate()); + echo " ". strftime($lang['DateFormatTitle'],$from->ts) .' ('. $lang['week'].' '; + + $url = addUrlParameter($navurl2,'t='.Date("Ymd",$from->ts),false); + echo menulink($url, $wn ."/". $yy, $wn ."/". $yy ) .') '; + + $url = addUrlParameter($navurl,'t='.$next_day->getYYYYMMDD(),false); + echo menulink($url,$this->theme->getImage(right,'list'),$next_day->getDate()); echo "</th></tr>\n"; for ($i = -1 ; $i <24 ; $i++ ) { echo " <tr>\n"; @@ -202,7 +219,13 @@ } $this->addHidden("t", $this->t); $this->uids = cal_parse_options($this->user,$this->teamname); - $this->team = $this->user->get_prefteam(); + if (!isset($_GET['team'])) { + $x = $this->user->get_prefteam(); + $this->team[$x] = $x; + } else { + foreach($_GET['team'] as $x) + $this->team[$x] = $x; + } # menu $m = appointment::getSelectLink($this->user); $m[category][] = "obj"; Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.283 retrieving revision 1.284 diff -u -r1.283 -r1.284 --- webelements.p3 19 Feb 2005 13:48:43 -0000 1.283 +++ webelements.p3 19 Feb 2005 21:41:36 -0000 1.284 @@ -571,6 +571,22 @@ echo "</table>\n"; echo "</td></tr></table>\n"; } + +/** + * Checjk if we can use the html optgroup stuff + */ +Function UseOptGroup() { + if (!isset ($_SERVER['HTTP_USER_AGENT'])) { + return false; + } + if (ereg("Opera",$_SERVER['HTTP_USER_AGENT'])) { + return false; + } + if (ereg ("MSIE.*Mac",$_SERVER['HTTP_USER_AGENT'])) { + return false; + } + return true; +} /** * return the baseurl * useconfig = true will use the $tutos[baseurl] config variable to determine the baseurl Index: user.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/user.pinc,v retrieving revision 1.143 retrieving revision 1.144 diff -u -r1.143 -r1.144 --- user.pinc 27 Jan 2005 15:27:54 -0000 1.143 +++ user.pinc 19 Feb 2005 21:41:36 -0000 1.144 @@ -1,6 +1,10 @@ <?php /** - * Copyright 1999 - 2004 by Gero Kohnert + * Copyright 1999 - 2005 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. * * CVS Info: $Id$ * $Author$ @@ -525,16 +529,7 @@ } # Get the list sorted - $useOPTGROUP = true; - if (!isset ($_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; - } - if ($useOPTGROUP && ereg("Opera",$_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; - } - if ($useOPTGROUP && ereg ("MSIE.*Mac",$_SERVER['HTTP_USER_AGENT'])) { - $useOPTGROUP = false; - } + $useOPTGROUP = UseOptGroup(); if (count($rlist)) { if ($useOPTGROUP) { |