tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
|
3
|
4
|
5
(6) |
6
|
7
|
8
|
9
(1) |
10
(13) |
11
(1) |
12
|
13
|
14
(4) |
15
|
16
|
17
|
18
(2) |
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
|
|
|
From: Gero K. <gok...@us...> - 2009-05-18 12:10:01
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14362 Modified Files: task.pinc Log Message: fix Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.225 retrieving revision 1.226 diff -u -d -r1.225 -r1.226 --- task.pinc 10 May 2009 13:59:00 -0000 1.225 +++ task.pinc 18 May 2009 12:09:52 -0000 1.226 @@ -608,6 +608,7 @@ unset($p); } $result->free(); + $this->worker_new = $this->worker; } /** * save worker @@ -635,7 +636,7 @@ } } $this->worker = $this->worker_new; - unset($this->worker_new); +# unset($this->worker_new); } /** @@ -805,22 +806,22 @@ if (!is_object($worker)) { return false; } - if (isset($this->worker[$worker->id])) { + if (isset($this->worker_new[$worker->id])) { return false; } $this->modified[] = array ( "field" => 'TaskWorker' , "old" => $worker->id , "new" => -1 ); - $this->worker[$worker->id] = $worker; + $this->worker_new[$worker->id] = $worker; return true; } /** * delete a exisitng worker */ function delWorker($workerid) { - if (!isset($this->worker[$workerid])) { + if (!isset($this->worker_new[$workerid])) { return false; } $this->modified[] = array ( "field" => 'TaskWorker' , "old" => -1 , "new" => $workerid ); - unset($this->worker[$workerid]); + unset($this->worker_new[$workerid]); return true; } /** @@ -1911,4 +1912,4 @@ return $r; } } -?> \ No newline at end of file +?> |
From: Gero K. <gok...@us...> - 2009-05-18 09:04:54
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25260/php Modified Files: webelements.p3 Log Message: fix Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.357 retrieving revision 1.358 diff -u -d -r1.357 -r1.358 --- webelements.p3 5 May 2009 04:26:49 -0000 1.357 +++ webelements.p3 18 May 2009 09:04:47 -0000 1.358 @@ -950,8 +950,8 @@ if ((!empty($target)) && (!eregi("^target=",$target))) { $target = 'target="'.$target.'"'; } - $href = addSessionKey($href,false); - if ( ! eregi("^(JavaScript:|http:|https:|mailto:|ftp:|gopher:|\./)",$href) ) { + if ( ! eregi("^(JavaScript:|http:|https:|mailto:|ftp:|file:|gopher:|\./)",$href) ) { + $href = addSessionKey($href,false); $href = $tutos['base'] ."/php/". $href; } if ( is_object($current_user) && $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != '') ) { |
From: Gero K. <gok...@us...> - 2009-05-14 14:42:08
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17339/url Modified Files: mconfig.pinc Log Message: fix Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/mconfig.pinc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mconfig.pinc 10 May 2009 13:57:06 -0000 1.12 +++ mconfig.pinc 14 May 2009 14:42:00 -0000 1.13 @@ -10,7 +10,7 @@ # # Every module must have an individual ID ( < 0 > -100 ). -# this is module 20 and 28 +# this is module 20 and 37 # define ('useurl',-20); define ('useurlcat',-37); |
From: Gero K. <gok...@us...> - 2009-05-14 08:46:49
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5738 Modified Files: address.pinc location.pinc department.pinc Log Message: allow see/use for all Index: department.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/department.pinc,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- department.pinc 29 Mar 2009 18:25:40 -0000 1.73 +++ department.pinc 14 May 2009 08:46:43 -0000 1.74 @@ -172,6 +172,7 @@ $this->id = $q->addFV("id",-1,"NEXTID"); $this->acl[$current_user->id] = $tutos[delok]; acl_default($this,$current_user); + acl_raise($this, EVERYBODY, $tutos[useok]); $this->modified[] = array ( "field" => "created" , "old" => $this->getType() , "new" => $this->id, @@ -395,4 +396,4 @@ return $r; } } -?> \ No newline at end of file +?> Index: location.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/location.pinc,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- location.pinc 29 Mar 2009 18:25:40 -0000 1.93 +++ location.pinc 14 May 2009 08:46:43 -0000 1.94 @@ -641,4 +641,4 @@ } } -?> \ No newline at end of file +?> Index: address.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/address.pinc,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- address.pinc 10 May 2009 13:59:00 -0000 1.130 +++ address.pinc 14 May 2009 08:46:43 -0000 1.131 @@ -280,6 +280,7 @@ # Defaut Access Control $this->acl[$this->id] = $tutos[modok]; # if this one becomes a user he could change it acl_default($this,$current_user); + acl_raise($this, EVERYBODY, $tutos[useok]); $this->modified[] = array ( "field" => "created" , "old" => $this->getType() , @@ -608,4 +609,4 @@ return $r; } } -?> \ No newline at end of file +?> |
From: Gero K. <gok...@us...> - 2009-05-14 08:44:01
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5502/bugtracking Modified Files: bug.pinc Log Message: fix Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- bug.pinc 10 May 2009 13:59:00 -0000 1.84 +++ bug.pinc 14 May 2009 08:43:54 -0000 1.85 @@ -20,6 +20,9 @@ define ('BUG_CLASS_HINT',4); +class bugdummy extends tutos_base { +} + /** * ask a bug state */ @@ -327,7 +330,7 @@ $this->name = $this->getFullName(); } if ( ! is_object($this->parent) ) { - $this->parent= new tutos_base($this->dbconn); + $this->parent= new bugdummy($this->dbconn); } $this->class = $r->get($pos, "class"); $this->state = $r->get($pos, "state"); |
From: Gero K. <gok...@us...> - 2009-05-14 05:30:08
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13390 Modified Files: timetrack_ins.php Log Message: fix Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- timetrack_ins.php 5 May 2009 04:26:49 -0000 1.59 +++ timetrack_ins.php 14 May 2009 05:30:00 -0000 1.60 @@ -133,7 +133,7 @@ if ( $tt->t_start->notime == 1 ) { // the worked time $volume = trim($_POST['volume']); - if ( !checkHHMM($volume,$false) && !checkfloat($volume,false) ) { + if ( !checkHHMM($volume,false) && !checkfloat($volume,false) ) { $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeDone']) ."<br />"; $gotourl = addBadField($gotourl,'volume',true); } else { |
From: Gero K. <gok...@us...> - 2009-05-11 11:49:17
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15074 Modified Files: address_new.php Log Message: fix Index: address_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/address_new.php,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- address_new.php 29 Mar 2009 18:25:40 -0000 1.87 +++ address_new.php 11 May 2009 11:48:57 -0000 1.88 @@ -276,7 +276,7 @@ $this->addHidden($varname,$varvalue); } } elseif ( $varname == 'country' ) { - SelectCntryCde($varname,$varvalue); + $r .= SelectCntryCde($varname,$varvalue); } else { if ( $mod == true ) { $r .= '<input id="'. $varname .'" name="'. $varname .'" size="'. $showsize .'" maxlength="'. $size .'" value="'. myentities($varvalue) .'" />'; @@ -561,4 +561,4 @@ <!-- CVS Info: $Id$ $Author$ - --> \ No newline at end of file + --> |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:25
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18651/url Modified Files: url_show.php urlcat_show.php Log Message: new urlcat functions to categorize and display urls Index: urlcat_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/urlcat_show.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- urlcat_show.php 10 May 2009 13:57:40 -0000 1.1 +++ urlcat_show.php 10 May 2009 13:58:19 -0000 1.2 @@ -30,9 +30,9 @@ * */ Function info() { - global $lang; + global $lang; - $r = ''; + $r = ''; $r .= $this->DataTableStart(); $r .= "<tr>\n"; @@ -47,7 +47,7 @@ $r .= "<td colspan=\"3\"><b><font size=\"+1\">". myentities($this->obj->name) ."</font></b></td>"; $r .= "</tr>\n"; - $r .= url::infolist($this->user,$this->obj,3); + $r .= url::infolist($this->user,$this->obj,3); // Show additional custom fields $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,4); // References to modules @@ -56,8 +56,8 @@ $r .= $this->DataTableEnd(); - return $r; - } + return $r; + } /** * prepare */ @@ -88,7 +88,7 @@ add_module_addlinks($this,$this->obj); // add this page to the browsehistory of the users session $this->addtohistory(); - } + } } $l = new UrlCat_show($current_user); Index: url_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_show.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- url_show.php 10 May 2009 13:57:40 -0000 1.1 +++ url_show.php 10 May 2009 13:58:19 -0000 1.2 @@ -54,21 +54,21 @@ } else if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); $this->stop = true; - return; + return; } else if ( $this->obj->id < 0 ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; - return; + return; } $this->addtohistory(); - Header('Status: 302 Moved Temporarily'); + Header('Status: 302 Moved Temporarily'); if (preg_match("<@BASEURL@>",$this->obj->url)) { - Header('Location: '. addSessionKey($this->obj->getUrl(),true)); - } else { - Header('Location: '. $this->obj->url); - } + Header('Location: '. addSessionKey($this->obj->getUrl(),true)); + } else { + Header('Location: '. $this->obj->url); + } # $this->redirect = 'http://www.tutos.de'; } |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:21
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18581/url Added Files: url_show.php urlcat_show.php Log Message: new urlcat functions to categorize and display urls --- NEW FILE: urlcat_show.php --- <?php /** * Copyright 2000 - 2009 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 url * @module urlcat_show * @package url */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; // Check if user is allowed to use it check_user(); loadmodules('url','show'); loadmodule('url'); loadlayout(); /** * display a note */ class UrlCat_show extends layout { /** * */ Function info() { global $lang; $r = ''; $r .= $this->DataTableStart(); $r .= "<tr>\n"; $r .= ' <th colspan="3">'. $lang['URLCat'] ."</th>\n"; $r .= $this->showGuiIcons('<th class="icons">','</th>',$this->obj,$this->obj,array('mod','del','perm'),false); $r .= "</tr>\n"; $r .= $this->CreatorInfoLine($this->obj,4); $r .= "<tr>\n"; $r .= $this->showfield($lang['URLCat']); $r .= "<td colspan=\"3\"><b><font size=\"+1\">". myentities($this->obj->name) ."</font></b></td>"; $r .= "</tr>\n"; $r .= url::infolist($this->user,$this->obj,3); // Show additional custom fields $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,4); // References to modules $r .= show_module_infolists($this->user,$this->obj,4); $r .= $this->obj->getHistoryLink(4); $r .= $this->DataTableEnd(); return $r; } /** * prepare */ Function prepare() { global $msg,$lang; $this->name = $lang['URLCat']; $this->obj = new urlcat($this->dbconn); if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); } if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['URLCat']); $this->stop = true; $this->format = "html"; return; } else if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); $this->stop = true; } else if ( $this->obj->id < 0 ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; } else { # $this->obj->read_reference(); } add_module_addlinks($this,$this->obj); // add this page to the browsehistory of the users session $this->addtohistory(); } } $l = new UrlCat_show($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: urlcat_show.php,v 1.1 2009/05/10 13:57:40 gokohnert Exp $ $Author: gokohnert $ --> --- NEW FILE: url_show.php --- <?php /** * Copyright 2000 - 2009 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 note * @module note_show * @package note */ $tutos['base'] = "../.."; ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; // Check if user is allowed to use it check_user(); loadmodules('url','show'); loadmodule('url'); loadlayout(); /** * display a url (if everything works we simply redirect) */ class Url_show extends layout { /** * */ Function info() { global $lang,$tutos; $r = ''; return $r; } /** * prepare */ Function prepare() { global $msg,$lang; $this->name = $lang['URL']; $this->obj = new url($this->dbconn); if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); } if ( !is_object($this->obj) ) { $msg .= sprintf($lang['Err0040'],$lang['URL']); $this->stop = true; $this->format = "html"; return; } else if ( ! $this->obj->see_ok() ) { $msg .= sprintf($lang['Err0022'],$lang[$this->obj->getType()]); $this->stop = true; return; } else if ( $this->obj->id < 0 ) { $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); $this->stop = true; return; } $this->addtohistory(); Header('Status: 302 Moved Temporarily'); if (preg_match("<@BASEURL@>",$this->obj->url)) { Header('Location: '. addSessionKey($this->obj->getUrl(),true)); } else { Header('Location: '. $this->obj->url); } # $this->redirect = 'http://www.tutos.de'; } } $l = new Url_Show($current_user); $l->display(); $dbconn->Close(); ?> <!-- CVS Info: $Id: url_show.php,v 1.1 2009/05/10 13:57:40 gokohnert Exp $ $Author: gokohnert $ --> |
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18485/url Modified Files: de.p3 en.p3 mconfig.pinc url.pinc url_new.php url_overview.php urlcat_ins.php urlcat_new.php Log Message: new urlcat functions to categorize and display urls Index: urlcat_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/urlcat_new.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- urlcat_new.php 5 May 2009 04:26:33 -0000 1.1 +++ urlcat_new.php 10 May 2009 13:57:06 -0000 1.2 @@ -85,7 +85,7 @@ $this->addHidden("id",$this->obj->id); } else { $this->name = $lang['URLCatCreate']; - if (!$this->user->feature_ok(useurl,PERM_NEW) ) { + if (!$this->user->feature_ok(useurlcat,PERM_NEW) ) { $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); $this->stop = true; return; Index: url_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_overview.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- url_overview.php 5 May 2009 04:26:33 -0000 1.14 +++ url_overview.php 10 May 2009 13:57:06 -0000 1.15 @@ -44,6 +44,7 @@ $r .= $this->orderHeader("name",$lang['URLName'],$this->link2); $r .= $this->orderHeader("cat_id",$lang['URLCat'],$this->link2); $r .= $this->orderHeader("url",$lang['URL'],$this->link2); + $this->flds = 4; if ( $tutos[massupdate] == 1 ) { $r .= " <th nowrap=\"nowrap\"><input type=\"checkbox\" name=\"checkit\" "CheckAll2();\" /></th>\n"; } @@ -100,9 +101,9 @@ $r .= $this->OverviewRowEnd($line++); } - $r .= $this->list_navigation($this->link1,3 + $tutos[massupdate],$this->start,$a,$n); + $r .= $this->list_navigation($this->link1,$this->flds + $tutos[massupdate],$this->start,$a,$n); if ( $tutos[massupdate] == 1 ) { - $r .= $this->UpdateRowStart(2); + $r .= $this->UpdateRowStart($this->flds -1); $r .= sprintf($lang['withmarked'],$lang['URL']); $r .= " <select name=\"action\">\n"; $r .= ' <option value="-1" selected="selected">'. $lang['ActionNil'] ."</option>\n"; Index: url_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_new.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- url_new.php 5 May 2009 04:26:33 -0000 1.26 +++ url_new.php 10 May 2009 13:57:06 -0000 1.27 @@ -54,7 +54,7 @@ $r .= " <tr>\n"; $r .= $this->showfieldc($lang['URLCat'],1,"urlcat"); $r .= " <td colspan=\"3\">\n"; - $r .= $this->obj->askCategory(); + $r .= $this->obj->askCategory($this->user); $r .= " </td>\n"; $r .= " </tr>\n"; @@ -143,6 +143,10 @@ $x[category][] = "obj"; $this->addMenu($x); + $x = urlcat::getAddLink($this->user,$this->obj); + $x[category][] = "obj"; + $this->addMenu($x); + if ( ($this->obj->id > 0) && $this->obj->del_ok() ) { $x = array( url => $this->obj->getDelURL(), text => $lang['Delete'], Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/mconfig.pinc,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- mconfig.pinc 5 May 2009 04:26:33 -0000 1.11 +++ mconfig.pinc 10 May 2009 13:57:06 -0000 1.12 @@ -13,7 +13,7 @@ # this is module 20 and 28 # define ('useurl',-20); -define ('useurlcat',-28); +define ('useurlcat',-37); $tutos[modules]['url'] = array( name => "url", Desc => "Linkmanagement", @@ -33,6 +33,8 @@ # if (!isset($tutos[useurl])) $tutos[useurl] = 1; + +$tutos[useurlcat] = $tutos[useurl]; # # List of objects/modules where we do something with this module # and need to include this module @@ -50,4 +52,5 @@ # skip # #$permskip[useurl][PERM_MYTUTOS] = 1; +$permskip[useurlcat][PERM_MYTUTOS] = 1; ?> \ No newline at end of file Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/en.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- en.p3 5 May 2009 04:26:33 -0000 1.5 +++ en.p3 10 May 2009 13:57:06 -0000 1.6 @@ -20,7 +20,11 @@ $lang['SearchForURL'] = "Search for URL"; $lang['URLCat'] = "Category"; - +$lang['URLCatName'] = 'Name'; +$lang['URLCatAdd'] = "Create Category"; +$lang['URLCatAddI'] = "Create a new URL Category"; +$lang['URLCatMod'] = "Modify URL Category"; +$lang['URLCatCreate'] = "Create URL Category"; $lang['perm'][useurl] = "use url database"; $lang['perm'][useurlcat] = "use categories"; Index: urlcat_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/urlcat_ins.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- urlcat_ins.php 5 May 2009 04:26:33 -0000 1.1 +++ urlcat_ins.php 10 May 2009 13:57:06 -0000 1.2 @@ -51,7 +51,6 @@ $msg .= module_parseforms($current_user,$u,$gotourl); if ( $msg == "" ) { - $ref = getObject($dbconn,$u->link_id); $dbconn->Begin("WORK"); $msg .= $u->save(); $dbconn->Commit("WORK"); Index: url.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url.pinc,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- url.pinc 5 May 2009 04:26:33 -0000 1.32 +++ url.pinc 10 May 2009 13:57:06 -0000 1.33 @@ -22,15 +22,45 @@ */ class urlcat extends tutos_module { /** - * creator + * creator */ function urlcat(&$dbconn) { global $table; $this->init($dbconn); + + $this->name = ''; $this->tablename = $this->dbconn->prefix .$table['urlcat'][name]; } /** + * read data from the database + */ + function read_result (&$r, $pos ) { + $this->name = $r->get($pos, 'name'); + $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); + + parent::read_result($r,$pos); + return; + } + /** + * Return the url + */ + function getFullname() { + return $this->name; + } + /** + * Return the url + */ + function getUrl() { + return 'url/urlcat_show.php?id='.$this->id ; + } + /** + * Return a url to modify this URL Category + */ + function getModUrl() { + return "url/urlcat_new.php?id=".$this->id; + } + /** * set the url category name */ function setName($value) { @@ -55,7 +85,7 @@ $q->addFV("id",$this->id,""); } else { $this->id = $q->addFV("id",-1,"NEXTID"); - // Prepare the history + // Prepare the history $this->modified[] = array ( "field" => "created" , "old" => $this->getType() , "new" => $this->id, @@ -102,6 +132,50 @@ function gettypeid () { return useurlcat; } + /** + * create a link where a new category could be created + */ + static function getaddlink (&$user,&$obj,$text = "") { + global $lang; + + if (! is_object($obj) ) return ""; + if (! $user->feature_ok(useurl,PERM_NEW) ) return ""; + if (! $obj->see_ok() ) return ""; + + $x = array( url => "url/urlcat_new.php", + confirm => false, + text => ($text == "" ? $lang['URLCatAdd']:$text), + info => $lang['URLCatAddI'], + category => array("url","new","module") + ); + return $x; + } + /** + * Read all urls categories visible to a given user + */ + static function obj_read(&$obj) { + global $table; + + if (! is_object($obj) ) return; + if (isset($obj->list[useurlcat]) ) return; + + $obj->list[useurlcat] = array(); + $q = 'SELECT * from '. $obj->dbconn->prefix . $table['urlcat'][name].' order by name'; + $r = $obj->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ($a < $n) { + $u = new urlcat($obj->dbconn); + $u->read_result($r,$a); + if ($u->see_ok()) { + $obj->list[useurlcat][$u->id] = &$u; + } + $a++; + unset($u); + } + $r->free(); + return; + } } /** @@ -113,7 +187,7 @@ */ class url extends tutos_module { /** - * creator + * creator */ function url(&$dbconn) { global $table; @@ -124,13 +198,15 @@ $this->cat_id = -1; $this->link_id = -1; $this->tablename = $this->dbconn->prefix .$table['url'][name]; + $this->cat = new urlcat($dbconn); $this->base = trim(getBaseUrl(false),'/'); while($this->base != '' && !preg_match("</php$>",$this->base)) { $this->base = dirname($this->base); } } - /* --------------------------------------------------------------------------- + /** + * read data from the database */ function read_result (&$r, $pos ) { $this->link_id = $r->get($pos, 'link_id'); @@ -139,9 +215,9 @@ $this->url = $r->get($pos, 'url'); $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); - if ($this->cat_id == '') { - $this->cat_id = -1; - } + if ($this->cat_id == '') { + $this->cat_id = -1; + } parent::read_result($r,$pos); return; } @@ -161,13 +237,20 @@ * Return the category */ function getCategory() { - if ($this->cat_id == -1) { - return ''; - } - if ($this->cat_id == MYTUTOS_CAT) { - return 'MyTUTOS'; + global $lang; + + if ($this->cat_id == -1) { + return ''; + } + if ($this->cat_id == MYTUTOS_CAT) { + return $lang['PersonalPage']; + } + $this->cat = $this->cat->read($this->cat_id,$this->cat); + if (is_object($this->cat)) { + return $this->cat->getLink(); } - return '?'; + + return '?'; } /** * Return a url to modify this URL @@ -195,7 +278,7 @@ } else { $x = myentities($this->name); } - // Do not use makelink here !!! + // Do not use makelink here !!! if (preg_match("<@BASEURL@>",$this->url)) { return makelink($this->getURL(),myentities($this->name),myentities($this->url) ); } else { @@ -221,9 +304,9 @@ */ function setCategory($value) { $value = trim($value); - if (!is_numeric($value)) { - $value = -1; - } + if (!is_numeric($value)) { + $value = -1; + } return $this->setIntField("cat_id",$value,"URLCat"); } @@ -242,15 +325,25 @@ return $r; } - function askCategory() { - $r = ''; + function askCategory($obj) { + global $table,$lang; - $r .= '<select id="urlcat" name="urlcat">'."\n"; - $r .= ' <option value="-1"'.($this->cat_id == -1 ? ' selected="selected"':'').'>-</option>'."\n"; - $r .= ' <option value="'.MYTUTOS_CAT.'"'.($this->cat_id == MYTUTOS_CAT ? ' selected="selected"':'').'>MyTUTOS</option>'."\n"; - $r .= '</select>'."\n"; - return $r; - } + urlcat::obj_read($obj); + + + $r = ''; + + $r .= '<select id="urlcat" name="urlcat">'."\n"; + $r .= ' <option value="-1"'.($this->cat_id == -1 ? ' selected="selected"':'').'>-</option>'."\n"; + $r .= ' <option value="'.MYTUTOS_CAT.'"'.($this->cat_id == MYTUTOS_CAT ? ' selected="selected"':'').'>'.$lang['PersonalPage'].'</option>'."\n"; + foreach($obj->list[useurlcat] as $f) { + // show only the current value and other usable selections + if (!$f->use_ok() && ($f->id != $this->cat_id)) continue; + $r .= ' <option value="'.$f->id.'"'.($this->cat_id == $f->id ? ' selected="selected"':'').'>'.$f->getFullName().'</option>'."\n"; + } + $r .= '</select>'."\n"; + return $r; + } /** * Save URL to DB */ @@ -273,7 +366,7 @@ $q->addFV("id",$this->id,""); } else { $this->id = $q->addFV("id",-1,"NEXTID"); - // Prepare the history + // Prepare the history $this->modified[] = array ( "field" => "URLAdd" , "old" => "-1" , "new" => $this->id, @@ -402,7 +495,11 @@ if (isset($obj->list[useurl]) ) return; $obj->list[useurl] = array(); - $q = "SELECT * from ". $obj->dbconn->prefix . $table['url'][name]. " where link_id = ". $obj->id ." order by name"; + if ($obj->getType() == 'urlcat') { + $q = "SELECT * from ". $obj->dbconn->prefix . $table['url'][name]. " where category = ". $obj->id ." order by name"; + } else { + $q = "SELECT * from ". $obj->dbconn->prefix . $table['url'][name]. " where link_id = ". $obj->id ." order by name"; + } $r = $obj->dbconn->Exec($q); $n = $r->numrows(); $a = 0; @@ -489,37 +586,75 @@ $q .= ' ORDER by creation'; $res = $user->dbconn->Exec($q); $n = $res->numrows(); - if ($n == 0) { - $res->free(); - return ''; - } - $a = 0; + if ($n == 0) { + $res->free(); + } + urlcat::obj_read($user); + + $a = 0; $r = ''; - $r .= info_table_start(); - $r .= " <tr>\n"; - $m = url::getSelectLink($current_user); - $m[text] = $lang['URL']; - if ($m) { - $ml = menulink($m[url],$m[text],$m[info]); - } else { - $ml = $lang['URL']; - } - $r .= ' <th colspan="4">'. $current_user->layout->theme->getImage(url::getHtmlIcon(),'list') .' '. $ml ."</th>\n"; - $r .= " </tr>\n"; - while ( ($a < $n) and ($a < 2* $tutos[maxshort]) ) { - $f = new url($user->dbconn); - $f->read_result($res,$a); - if ( $f->see_ok() ) { - $r .= '<tr>'; - $r .= '<td colspan="4">'.$f->getLink().'</td>'; + $r .= info_table_start(); + $r .= " <tr>\n"; + $m = url::getSelectLink($current_user); + $m[text] = $lang['URL']; + if ($m) { + $ml = menulink($m[url],$m[text],$m[info]); + } else { + $ml = $lang['URL']; + } + $r .= ' <th colspan="4">'. $current_user->layout->theme->getImage(url::getHtmlIcon(),'list') .' '. $ml ."</th>\n"; + $r .= " </tr>\n"; + + $cnt = 0; + while ( ($a < $n) and ($a < 2* $tutos[maxshort]) ) { + $f = new url($user->dbconn); + $f->read_result($res,$a); + if ( $f->see_ok() ) { + if ($cnt == 0) $r .= '<tr>'; + $r .= '<td width="50%" colspan="2">'.$f->getLink().'</td>'; + $cnt++; + if ($cnt == 2) { + $r .= '</tr>'; + $cnt = 0; + } + } + $a++; + unset($f); + } + foreach($user->list[useurlcat] as $f) { + url::obj_read($f); + if (0 == count($f->list[useurl])) continue; + + if ($cnt == 0) $r .= '<tr>'; + $r .= '<form name="urljump" id="urljump" method="GET" action="url/url_show.php">'; + $r .= '<td width="25%" colspan="1">'; + $r .= $f->getLink(); + $r .= "</td>\n"; + $r .= '<td width="25%" colspan="1">'; + $r .= '<select name="id" id="urlselect" >'; + $r .= '<option value="'.$f->id.'"></option>'; + foreach($f->list[useurl] as $f2) { + $r .= '<option value="'.$f2->id.'">'.$f2->getLink().'</option>'; + } + $r .= '</select>'; + $r .= '</td>'; + $r .= '</form>'; + $cnt++; + if ($cnt == 2) { $r .= '</tr>'; + $cnt = 0; } - $a++; - unset($f); + } + if ($cnt == 1) { + $r .= '<td> </td>'; + } + if ($cnt == 2) { + $r .= '</tr>'; + $cnt = 0; } - $r .= info_table_end(); - $res->free(); + $r .= info_table_end(); + $res->free(); return $r; } /** Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/de.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- de.p3 5 Apr 2007 16:14:59 -0000 1.5 +++ de.p3 10 May 2009 13:57:06 -0000 1.6 @@ -9,18 +9,28 @@ # ======================================================= # URL -$lang['URLName'] = "Beschreibung"; -$lang['URL'] = "URL"; -$lang['URLAdd'] = "URL anlegen"; -$lang['URLDel'] = "URL löschen"; -$lang['URLMod'] = "URL ändern"; -$lang['URLCreate'] = "URL anlegen"; -$lang['URLOverview'] = "URL-Ãbersicht"; -$lang['URLSearch'] = "URL-Suche"; -$lang['SearchForURL'] = "Suche nach einer URL"; +$lang['URLName'] = 'Beschreibung'; +$lang['URL'] = 'URL'; +$lang['URLAdd'] = 'URL anlegen'; +$lang['URLDel'] = 'URL löschen'; +$lang['URLMod'] = 'URL ändern'; +$lang['URLCreate'] = 'URL anlegen'; +$lang['URLOverview'] = 'URL-Ãbersicht'; +$lang['URLSearch'] = 'URL-Suche'; +$lang['SearchForURL'] = 'Suche nach einer URL'; -$lang['perm'][useurl] = "URL-Nutzung"; -$lang['url'] = &$lang['URL']; +$lang['URLCat'] = 'URL Kategorie'; +$lang['URLCatName'] = 'Name'; +$lang['URLCatAdd'] = "URL Kategorie anlegen"; +$lang['URLCatAddI'] = "eine neue URL KAtegorie anlegen"; +$lang['URLCatMod'] = "URL Kategorie ändern"; +$lang['URLCatCreate'] = "URL Kategorie anlegen"; + +$lang['perm'][useurl] = 'URL-Nutzung'; +$lang['perm'][useurlcat] = 'URL-Kategorien'; + +$lang['url'] = &$lang['URL']; +$lang['urlcat'] = &$lang['URLCat']; ### Local Variables: *** ### mode:iso-accents *** |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:08
|
Update of /cvsroot/tutos/tutos/homepage In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/homepage Modified Files: head0.html.inc screens.html Log Message: standardize popups using css Index: screens.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/screens.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- screens.html 16 Aug 2008 12:36:51 -0000 1.10 +++ screens.html 10 May 2009 13:59:00 -0000 1.11 @@ -6,11 +6,11 @@ <!--$Id$ --> <p /> -<b>Calendar:</b> (using the blue theme)<br /> +<b>Calendar:</b><br /> <a href="calendar.html"><img border="0" src="calendar.png" alt="Calendar" /></a> <p /> -<b>Adressbook:</b>details of an address (using blue theme)<br /> +<b>Adressbook:</b>details of an address <br /> <a href="address.html"><img border="0" src="address.png" alt="Adressbook" /></a> <p /> @@ -18,11 +18,11 @@ <a href="product.html"><img border="0" src="product.png" alt="Products/Prokjects" /></a> <p /> -<b>Task:</b>(overview of a projects tasks in the red theme)<br /> +<b>Task:</b>(overview of a projects tasks)<br /> <a href="task.html"><img border="0" src="task.png" alt="Task" /></a> <p /> -<b>Document:</b>(detail page of a documentin the TUTOS theme)<br /> +<b>Document:</b>(detail page of a document)<br /> <a href="file.html"><img border="0" src="file.png" alt="Document" /></a> <p /> Index: head0.html.inc =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/head0.html.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- head0.html.inc 16 Aug 2008 12:36:50 -0000 1.2 +++ head0.html.inc 10 May 2009 13:58:59 -0000 1.3 @@ -2,9 +2,22 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> -<!-- Copyright 2003 - 2008 by Gero Kohnert --> +<!-- Copyright 2003 - 2009 by Gero Kohnert --> <!-- all rights reserved --> +<!-- Piwik --> +<script type="text/javascript"> +var pkBaseURL = (("https:" == document.location.protocol) ? "https://apps.sourceforge.net/piwik/tutos/" : "http://apps.sourceforge.net/piwik/tutos/"); +document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); +</script><script type="text/javascript"> +piwik_action_name = ''; +piwik_idsite = 1; +piwik_url = pkBaseURL + "piwik.php"; +piwik_log(piwik_action_name, piwik_idsite, piwik_url); +</script> +<object><noscript><p><img src="http://apps.sourceforge.net/piwik/tutos/piwik.php?idsite=1" alt="piwik"/></p></noscript></object> +<!-- End Piwik Tag --> + <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../html/nuke.css" type="text/css" /> @@ -20,5 +33,8 @@ <meta name="Page-topic" content="Groupware" /> <meta name="Description" content="Groupware TUTOS" /> <meta name="verify-v1" content="BhT/gTeMC1M1bdoNDdIKtBQEQ/xNLX19g1eXFfUpliA=" /> + + + <!-- start of head 0 --> <title> |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:05
|
Update of /cvsroot/tutos/tutos/php/layout In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/layout Modified Files: new_layout.pinc Log Message: standardize popups using css Index: new_layout.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/layout/new_layout.pinc,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- new_layout.pinc 6 Apr 2009 06:16:23 -0000 1.90 +++ new_layout.pinc 10 May 2009 13:59:00 -0000 1.91 @@ -829,7 +829,7 @@ return; } if ( ($this->format == 'html') || ($this->format == 'stat') || ($this->format == 'checklist')) { -# Start the HTML + // Start the HTML echo $this->HTML_Start(); echo $this->layout_start(); if ($this->stop == false ) { |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:04
|
Update of /cvsroot/tutos/tutos/html In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/html Modified Files: blue.css kmz_blue.css kmz_pink.css kmz_purple.css kmz_yellow.css nuke.css red.css sqli.css tutos.css visual.css white.css Log Message: standardize popups using css Index: kmz_purple.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/kmz_purple.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmz_purple.css 9 Dec 2006 19:44:44 -0000 1.2 +++ kmz_purple.css 10 May 2009 13:59:00 -0000 1.3 @@ -356,6 +356,14 @@ background: #FFFFFF; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #FFFFFF; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: white.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/white.css,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- white.css 24 Aug 2007 13:05:31 -0000 1.22 +++ white.css 10 May 2009 13:59:00 -0000 1.23 @@ -357,6 +357,14 @@ background: white; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: white; + padding: 3px; +} + TABLE.outer { background: white; margin: 0px; Index: blue.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/blue.css,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- blue.css 24 Aug 2007 13:05:29 -0000 1.47 +++ blue.css 10 May 2009 13:59:00 -0000 1.48 @@ -351,6 +351,14 @@ background: #88acd0; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #88acd0; + padding: 3px; +} + TABLE.outer { background: #102058; margin: 0px; Index: sqli.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/sqli.css,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- sqli.css 24 Aug 2007 13:05:31 -0000 1.20 +++ sqli.css 10 May 2009 13:59:00 -0000 1.21 @@ -344,6 +344,14 @@ background: #EEEEFF; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #EEEEFF; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: tutos.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/tutos.css,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- tutos.css 24 Aug 2007 13:05:31 -0000 1.35 +++ tutos.css 10 May 2009 13:59:00 -0000 1.36 @@ -345,6 +345,14 @@ background: #EEEEEE; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #eeeeee; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: nuke.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/nuke.css,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- nuke.css 18 Jan 2009 20:47:46 -0000 1.29 +++ nuke.css 10 May 2009 13:59:00 -0000 1.30 @@ -395,6 +395,14 @@ background: #efefef; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #efefef; + padding: 3px; +} + TABLE.outer { background: black; margin: 0px; @@ -432,6 +440,8 @@ font-family: tahoma, arial, verdana, sans-serif; font-size: 12px; text-align: center; + padding-left: 5px; + padding-right: 5px; } INPUT,TEXTAREA,SELECT { Index: red.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/red.css,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- red.css 24 Aug 2007 13:05:31 -0000 1.32 +++ red.css 10 May 2009 13:59:00 -0000 1.33 @@ -367,6 +367,14 @@ background: #e0d0d0; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #e0d0d0; + padding: 3px; +} + TABLE.outer { background: #582010; margin: 0px; Index: kmz_yellow.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/kmz_yellow.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmz_yellow.css 9 Dec 2006 19:44:44 -0000 1.2 +++ kmz_yellow.css 10 May 2009 13:59:00 -0000 1.3 @@ -356,6 +356,14 @@ background: #FFFFFF; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #FFFFFF; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: kmz_blue.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/kmz_blue.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmz_blue.css 9 Dec 2006 19:44:44 -0000 1.2 +++ kmz_blue.css 10 May 2009 13:59:00 -0000 1.3 @@ -356,6 +356,14 @@ background: #FFFFFF; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #FFFFFF; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: visual.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/visual.css,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- visual.css 22 May 2005 14:23:31 -0000 1.27 +++ visual.css 10 May 2009 13:59:00 -0000 1.28 @@ -353,6 +353,14 @@ background: #EEEEEE; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #eeeeee; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; Index: kmz_pink.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/kmz_pink.css,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kmz_pink.css 9 Dec 2006 19:44:44 -0000 1.2 +++ kmz_pink.css 10 May 2009 13:59:00 -0000 1.3 @@ -356,6 +356,14 @@ background: #FFFFFF; } +TABLE.popupinfo { + border-width: 1px; + border-color: silver; + border-style: solid; + background: #FFFFFF; + padding: 3px; +} + TABLE.outer { background: #101010; margin: 0px; |
From: Gero K. <gok...@us...> - 2009-05-10 14:17:01
|
Update of /cvsroot/tutos/tutos/php/expense In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/expense Modified Files: expense.pinc Log Message: standardize popups using css Index: expense.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/expense/expense.pinc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- expense.pinc 29 Mar 2009 18:25:41 -0000 1.28 +++ expense.pinc 10 May 2009 13:59:00 -0000 1.29 @@ -285,7 +285,7 @@ $info = ""; $info .= "<html>"; $info .= "<body>"; - $info .= "<table class=\"inner\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; + $info .= "<table class=\"popupinfo\">"; $info .= "<tr><th>". (is_object($this->ref ? $lang[$this->ref->getType()]:'')) ." ". $h ." → ". $t ."</th></tr>"; $info .= "<tr><td><font size=\"-1\"><pre>"; $info .= $n; |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:59
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/bugtracking Modified Files: bug.pinc Log Message: standardize popups using css Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- bug.pinc 17 Apr 2009 11:17:49 -0000 1.83 +++ bug.pinc 10 May 2009 13:59:00 -0000 1.84 @@ -537,10 +537,8 @@ if (!isset($tutos['bug_long_pop']) || ($tutos['bug_long_pop'] == 0) ) { $n =str_replace("\n","<br />",myentities(wordwrap($this->short,80))); - $border = 0; } else { $n = str_replace("\n","<br />",$this->getBugHistory(false)); - $border = 1; } $n =str_replace("\r","",$n); $n =str_replace("\\","\\\\",$n); @@ -553,7 +551,7 @@ $info = ''; $info .= '<html>'; $info .= '<body>'; - $info .= '<table class="inner" border="'. $border .'" cellspacing="0" cellpadding="1">'; + $info .= '<table class="popupinfo">'; $info .= '<tr><th>'. $lang[$this->getType()] .' '. $t .'</th></tr>'; $info .= '<tr><td><font size="-1"><pre>'; $info .= $n; |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:58
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php Modified Files: Date.pinc address.pinc product_show.php task.pinc Log Message: standardize popups using css Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.224 retrieving revision 1.225 diff -u -d -r1.224 -r1.225 --- task.pinc 8 Apr 2009 20:36:50 -0000 1.224 +++ task.pinc 10 May 2009 13:59:00 -0000 1.225 @@ -146,9 +146,9 @@ Function gantt_draw(&$parent) { global $lang, $msg, $font, $tutos; -# -# If we use a non western laguage encoding force the use of truetype fonts -# + // + // If we use a non western laguage encoding force the use of truetype fonts + // if ($lang['content_encoding'] != "iso-8859-1") { $font = FF_ARIAL; } else { @@ -1066,7 +1066,7 @@ $info = ""; $info .= "<html>"; $info .= "<body>"; - $info .= "<table class=\"inner\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; + $info .= "<table class=\"popupinfo\">"; $x = $this->parent; if( !is_object($x) ) unset($x); Index: product_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_show.php,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- product_show.php 29 Mar 2009 18:25:41 -0000 1.122 +++ product_show.php 10 May 2009 13:59:00 -0000 1.123 @@ -173,9 +173,10 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['Tasks']); $r .= " <td valign=\"top\" colspan=\"3\">\n"; - $r .= $this->theme->getImage(folder,'list') ." ". makelink("task_overview.php?id=". $this->obj->id, $lang['TaskOverview'], - sprintf($lang['TaskOverviewInfo'], - $this->obj->getFullName())); + $r .= $this->theme->getImage(folder,'list') .' '; + $r .= makelink("task_overview.php?id=". $this->obj->id, $lang['TaskOverview'], + sprintf($lang['TaskOverviewInfo'], + $this->obj->getFullName())); $r .= makelink("task_overview.php?id=".$this->obj->id."&fld=worker", " [++] ", sprintf($lang['TaskOverviewInfo'], @@ -192,7 +193,9 @@ foreach ($this->obj->tasklist as $i => $f ) { if ( ($n >= $rows) && ( $x != $rows ) ) { - $r .= $this->theme->getImage(folder,'list') .' '. makelink("task_overview.php?id=". $this->obj->id,sprintf($lang['AllEntries'], count($this->obj->tasklist))); + $r .= $this->theme->getImage(folder,'list') .' '; + $r .= makelink("task_overview.php?id=". $this->obj->id, + sprintf($lang['AllEntries'], count($this->obj->tasklist))); break; } $r .= $this->theme->getImage(task,'list') .' '. $f->getLink(); @@ -209,7 +212,7 @@ bug::obj_read($f); if (count($f->list[usebugtracking]) > 0) { if ($r != '') $r .= ' '; - $rx .= count($f->list[usebugtracking]).' '.$lang['Bugs']; + $rx .= ($rx == '' ? '':', ').count($f->list[usebugtracking]).' '.$lang['Bugs']; } } if ($rx != '') { Index: address.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/address.pinc,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- address.pinc 24 Mar 2009 20:56:14 -0000 1.129 +++ address.pinc 10 May 2009 13:59:00 -0000 1.130 @@ -191,7 +191,7 @@ $info = ""; $info .= "<html>"; $info .= "<body>"; - $info .= "<table class=\"single\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; + $info .= "<table class=\"popupinfo\">"; $info .= "<tr><th colspan=\"2\">". $fn ."</th></tr>"; $info .= "<tr><td valign=\"top\"><font size=\"-2\">". $lang['Phone'] .":</font></td><td><font size=\"-2\">"; Index: Date.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v retrieving revision 1.130 retrieving revision 1.131 diff -u -d -r1.130 -r1.131 --- Date.pinc 29 Mar 2009 18:25:40 -0000 1.130 +++ Date.pinc 10 May 2009 13:59:00 -0000 1.131 @@ -354,7 +354,7 @@ if (!empty($dinfo[Desc])) { $dinfo[popinfo] = '<html><body>'; - $dinfo[popinfo] .= '<table class="inner" border="0" cellspacing="0" cellpadding="1">'; + $dinfo[popinfo] .= '<table class="popupinfo">'; $dinfo[popinfo] .= '<tr><td valign="top"><font size="-1"><strong>'; $dinfo[popinfo] .= eregi_replace("'","\'",$dinfo[Desc]); $dinfo[popinfo] .= '</strong></font></td></tr></table></body></html>'; |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:58
|
Update of /cvsroot/tutos/tutos/php/rate In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/rate Modified Files: rate.pinc Log Message: standardize popups using css Index: rate.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/rate/rate.pinc,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- rate.pinc 30 Mar 2009 15:48:06 -0000 1.45 +++ rate.pinc 10 May 2009 13:59:00 -0000 1.46 @@ -180,7 +180,7 @@ $info = ""; $info .= "<html>"; $info .= "<body>"; - $info .= "<table class=\"inner\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; + $info .= "<table class=\"popupinfo\">"; $info .= "<tr><th>". $lang[$this->ref->getType()] ." ". $h ." → ". $t ."</th></tr>"; $info .= "<tr><td><font size=\"-1\"><pre>"; $info .= $n; |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:57
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/note Modified Files: note.pinc note_show.php Log Message: standardize popups using css Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- note.pinc 5 Apr 2009 18:59:11 -0000 1.74 +++ note.pinc 10 May 2009 13:59:00 -0000 1.75 @@ -191,7 +191,7 @@ $info = ""; $info .= "<html>"; $info .= "<body>"; - $info .= "<table class=\"inner\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; + $info .= "<table class=\"popupinfo\">"; $info .= "<tr><th>". $lang[$this->ref->getType()] ." ". $h ." → ". $t ."</th></tr>"; $info .= "<tr><td><font size=\"-1\"><pre>"; $info .= $n; Index: note_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note_show.php,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- note_show.php 29 Mar 2009 18:25:41 -0000 1.40 +++ note_show.php 10 May 2009 13:59:00 -0000 1.41 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2000 - 2008 by Gero Kohnert + * Copyright 2000 - 2009 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 |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:48
|
Update of /cvsroot/tutos/tutos/php/reminder In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/reminder Modified Files: reminder.pinc Log Message: standardize popups using css Index: reminder.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/reminder/reminder.pinc,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- reminder.pinc 29 Mar 2009 18:25:41 -0000 1.29 +++ reminder.pinc 10 May 2009 13:59:00 -0000 1.30 @@ -206,7 +206,7 @@ $info = ''; $info .= '<html>'; $info .= '<body>'; - $info .= '<table class="inner" border="0" cellspacing="0" cellpadding="1">'; + $info .= '<table class="popupinfo">'; $info .= '<tr><th>'. $lang['Reminder'].' → '.$lang[$this->ref->getType()] ." ". $h .'</th></tr>'; $info .= '<tr><td><font size="-1"><pre>'; $info .= $n; |
From: Gero K. <gok...@us...> - 2009-05-10 14:16:47
|
Update of /cvsroot/tutos/tutos/php/rss In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18698/php/rss Modified Files: rss_ins.php Log Message: standardize popups using css Index: rss_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/rss/rss_ins.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rss_ins.php 29 Mar 2009 18:25:42 -0000 1.3 +++ rss_ins.php 10 May 2009 13:59:00 -0000 1.4 @@ -67,7 +67,7 @@ $gotourl = $obj->getURL(); } -leave_insert($dbconn,$gotourl,$msg); +leave_insert($dbconn,'../'.$gotourl,$msg); /* * CVS Info: $Id$ * $Author$ |
From: Gero K. <gok...@us...> - 2009-05-09 08:42:43
|
Update of /cvsroot/tutos/tutos/php/rss In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18407 Modified Files: rss.pinc Log Message: fix Index: rss.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/rss/rss.pinc,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- rss.pinc 15 Apr 2009 10:37:42 -0000 1.7 +++ rss.pinc 9 May 2009 08:42:38 -0000 1.8 @@ -321,15 +321,15 @@ if (! is_object($obj) ) return; + if ( isset($obj->list[userss]) ) { + return; + } + $obj->list[userss] = array(); if ( $obj->id < 0 ) return; - if ( isset($obj->list[userss]) ) { - return; - } - $q = "SELECT * from ". $obj->dbconn->prefix ."rssfeeds where adr_id = ". $obj->id .""; $r = $obj->dbconn->Exec($q); $n = $r->numrows(); |
From: Gero K. <gok...@us...> - 2009-05-05 04:27:05
|
Update of /cvsroot/tutos/tutos/php/admin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29006/php/admin Modified Files: update.php Log Message: updates Index: update.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin/update.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- update.php 29 Mar 2009 18:25:41 -0000 1.14 +++ update.php 5 May 2009 04:26:49 -0000 1.15 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2005 by Gero Kohnert + * Copyright 2002 - 2009 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 @@ -26,119 +26,120 @@ * display a update output */ class Admin_update extends layout { - /** - * display the info - */ - Function info() { - global $table, $tableidx, $sequence, $tutos, $current_user; + /** + * display the info + */ + Function info() { + global $table, $tableidx, $sequence, $tutos, $current_user; - echo "<h2>". $this->dbc->getFullName() ."</h2>\n"; - echo $this->dbc->before_update_db(); - echo "<p />TABLES<p />\n"; + $r = ''; + echo "<h2>". $this->dbc->getFullName() ."</h2>\n"; + echo $this->dbc->before_update_db(); + echo "<p />TABLES<p />\n"; - foreach ($table as $i => $f) { - echo $f[Desc] ."<br />\n"; - if (!is_object($this->dbc->createtable($f))) { - if ( $tutos[debug] != 0 ) { - echo "Table ". $f[name] ." not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - } else { - echo "<span class=\"found\">Table <b>". $f[name] ."</b> created</span><br />\n"; - } - flush(); - } + foreach ($table as $i => $f) { + echo $f[Desc] ."<br />\n"; + if (!is_object($this->dbc->createtable($f))) { + if ( $tutos[debug] != 0 ) { + echo "Table ". $f[name] ." not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + } else { + echo "<span class=\"found\">Table <b>". $f[name] ."</b> created</span><br />\n"; + } + flush(); + } - echo "<p />COLUMNS<p />\n"; - foreach ($table as $i => $f) { - echo $f[Desc] ."<br />\n"; - foreach($f as $i2 => $f2) { - if ( ! is_array($f2) ) { - continue; - } - if (!is_object($this->dbc->createcolumn($f[name],$i2,$f2))) { - # nothing created (try an alter table to fix sizes) - } else { - echo "Column <span class=\"found\">". $f[name] ." (". $i2 .")</span> updated<br />\n"; - } - } - flush(); - } + echo "<p />COLUMNS<p />\n"; + foreach ($table as $i => $f) { + echo $f[Desc] ."<br />\n"; + foreach($f as $i2 => $f2) { + if ( ! is_array($f2) ) { + continue; + } + if (!is_object($this->dbc->createcolumn($f[name],$i2,$f2))) { + // nothing created (try an alter table to fix sizes) + } else { + echo "Column <span class=\"found\">". $f[name] ." (". $i2 .")</span> updated<br />\n"; + } + } + flush(); + } - echo "<p />INDICES<p />\n"; - foreach ($tableidx as $i => $f) { - echo $f[Desc] ."<br />\n"; - if (!is_object($this->dbc->createindex($f))) { - } else { - echo "<span class=\"found\">Index <b>". $f[name] ."</b> created</span><br />\n"; - } - flush(); - } - echo "<p />SEQUENCERS<p />\n"; - foreach ($sequence as $i => $f) { - echo $f[Desc] ."<br />\n"; - if (!is_object($this->dbc->createsequence($f))) { - } else { - echo "<span class=\"found\">Sequence <b>". $f[name] ."</b> created</span><br />\n"; - } - flush(); - } + echo "<p />INDICES<p />\n"; + foreach ($tableidx as $i => $f) { + echo $f[Desc] ."<br />\n"; + if (!is_object($this->dbc->createindex($f))) { + } else { + echo "<span class=\"found\">Index <b>". $f[name] ."</b> created</span><br />\n"; + } + flush(); + } + echo "<p />SEQUENCERS<p />\n"; + foreach ($sequence as $i => $f) { + echo $f[Desc] ."<br />\n"; + if (!is_object($this->dbc->createsequence($f))) { + } else { + echo "<span class=\"found\">Sequence <b>". $f[name] ."</b> created</span><br />\n"; + } + flush(); + } - # Update the DB entry - # The current DB entry is always that with the ID 1 - $this->dbc->db->read_update(); + // Update the DB entry + // The current DB entry is always that with the ID 1 + $this->dbc->db->read_update(); - echo "DB Version:". $this->dbc->db->version ."<br />"; - echo "TUTOS Version:". $tutos[version] ."<br />"; - $oldv = ereg_replace("[a-z\.]","",$this->dbc->db->version); - $newv = ereg_replace("[a-z\.]","",$tutos[version]); - if ( $oldv < 1120021026 ) { - #special update - $updatefailed = false; - echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; - $tmpname = 'acl_temp'; - # drop temp table - if (!is_object($this->dbc->droptable($tmpname)) ) { - } - if (!is_object($this->dbc->dropindex($tableidx['acl1'])) ) { - } - if (!is_object($this->dbc->dropindex($tableidx['acl2'])) ) { - } - # rename acl - if (!is_object($this->dbc->renametable($table['acl'],$tmpname)) ) { - $updatefailed = true; - echo "Table not renamed:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - # create acl - if (!is_object($this->dbc->createtable($table['acl'])) ) { - $updatefailed = true; - echo "Table not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - if (!is_object($this->dbc->createindex($tableidx['acl1'])) ) { - $updatefailed = true; - echo "Index not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - if (!is_object($this->dbc->createindex($tableidx['acl2'])) ) { - $updatefailed = true; - echo "Index not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - # fill - $q = "insert into ". $this->dbc->prefix . $table['acl'][name] ." (obj_id,adr_id,perm)"; - if ( $this->dbc->getType() == "Postgres" ) { - $q .= " select obj_id,adr_id,int4(perm) from ". $this->dbc->prefix . $tmpname; - } else { - $q .= " select obj_id,adr_id,perm from ". $this->dbc->prefix . $tmpname; - } - $this->dbc->Exec($q,0); - if ( $updatefailed ) { - echo "Update failed<br />\n"; - } - } - if ( $oldv < 1320050108 ) { - #special update - $updatefailed = false; - echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; + echo "DB Version:". $this->dbc->db->version ."<br />"; + echo "TUTOS Version:". $tutos[version] ."<br />"; + $oldv = ereg_replace("[a-z\.]","",$this->dbc->db->version); + $newv = ereg_replace("[a-z\.]","",$tutos[version]); + if ( $oldv < 1120021026 ) { + // special update + $updatefailed = false; + echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; + $tmpname = 'acl_temp'; + // drop temp table + if (!is_object($this->dbc->droptable($tmpname)) ) { + } + if (!is_object($this->dbc->dropindex($tableidx['acl1'])) ) { + } + if (!is_object($this->dbc->dropindex($tableidx['acl2'])) ) { + } + // rename acl + if (!is_object($this->dbc->renametable($table['acl'],$tmpname)) ) { + $updatefailed = true; + echo "Table not renamed:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + // create acl + if (!is_object($this->dbc->createtable($table['acl'])) ) { + $updatefailed = true; + echo "Table not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + if (!is_object($this->dbc->createindex($tableidx['acl1'])) ) { + $updatefailed = true; + echo "Index not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + if (!is_object($this->dbc->createindex($tableidx['acl2'])) ) { + $updatefailed = true; + echo "Index not created:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + // fill + $q = "insert into ". $this->dbc->prefix . $table['acl'][name] ." (obj_id,adr_id,perm)"; + if ( $this->dbc->getType() == "Postgres" ) { + $q .= " select obj_id,adr_id,int4(perm) from ". $this->dbc->prefix . $tmpname; + } else { + $q .= " select obj_id,adr_id,perm from ". $this->dbc->prefix . $tmpname; + } + $this->dbc->Exec($q,0); + if ( $updatefailed ) { + echo "Update failed<br />\n"; + } + } + if ( $oldv < 1320050108 ) { + // special update + $updatefailed = false; + echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; - /** + /** $tmpname = 's_start_temp'; if ($this->dbc->renamecolumn($table['task'],"s_start",$tmpname) == -2) { $updatefailed = true; @@ -155,93 +156,93 @@ $updatefailed = true; echo "Column s_start_temp not dropped:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; } - ***/ - if ($this->dbc->dropnotnull($table['task'],"s_start") == -1) { - $updatefailed = true; - echo "Column attribute NOT NULL not dropped:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - if ($this->dbc->dropnotnull($table['task'],"s_end") == -1) { - $updatefailed = true; - echo "Column attribute NOT NULL not dropped:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } + ***/ + if ($this->dbc->dropnotnull($table['task'],"s_start") == -1) { + $updatefailed = true; + echo "Column attribute NOT NULL not dropped:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + if ($this->dbc->dropnotnull($table['task'],"s_end") == -1) { + $updatefailed = true; + echo "Column attribute NOT NULL not dropped:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } - if ( $updatefailed ) { - echo "Update failed<br />\n"; - } - } - # Prior to 1.3.20060701 - if ( $oldv < 1320060701 ) { - $updatefailed = false; - echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; - $tmpname = 'repeat_type'; - echo "<h3>".$table['appointment1'][name]."</h3><br />"; - if ($this->dbc->dropcolumn($table['appointment1'],$tmpname) == -2) { - } - if ($this->dbc->renamecolumn($table['appointment1'],"repeat",$tmpname) == -2) { - $updatefailed = true; - echo "Column not renamed:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; - } - if ( $updatefailed ) { - echo "Update failed<br />\n"; - } - } - # update missing file links - if ($tutos[usedocmanagement]) { - } + if ( $updatefailed ) { + echo "Update failed<br />\n"; + } + } + // Prior to 1.3.20060701 + if ( $oldv < 1320060701 ) { + $updatefailed = false; + echo "<h3>Special update for ". $tutos[version] ." from ". $this->dbc->db->version ."</h3><br />"; + $tmpname = 'repeat_type'; + echo "<h3>".$table['appointment1'][name]."</h3><br />"; + if ($this->dbc->dropcolumn($table['appointment1'],$tmpname) == -2) { + } + if ($this->dbc->renamecolumn($table['appointment1'],"repeat",$tmpname) == -2) { + $updatefailed = true; + echo "Column not renamed:<span class=\"warn\">". $this->dbc->lasterror ."</span><br />\n"; + } + if ( $updatefailed ) { + echo "Update failed<br />\n"; + } + } + // update missing file links + if ($tutos[usedocmanagement]) { + } - $this->dbc->db->SetVersion($tutos[version]); - $current_user->dbconn = &$this->dbc; - $this->dbc->db->save(); + $this->dbc->db->SetVersion($tutos[version]); + $current_user->dbconn = &$this->dbc; + $this->dbc->db->save(); - echo $this->dbc->after_update_db(); - echo $this->error("If everything works disable this script"); - return $r; - } - /** - * prepare - */ - Function prepare() { - global $table,$sequence,$tableidx,$tutos,$msg,$lang; + echo $this->dbc->after_update_db(); + echo $this->error("If everything works disable this script"); + return $r; + } + /** + * prepare + */ + Function prepare() { + global $table,$sequence,$tableidx,$tutos,$msg,$lang; - $this->nomenu = true; + $this->nomenu = true; - if ( ! minimum_version(minimumversion) ) { - $msg .= "<br />\nSorry TUTOS needs a PHP Version >= ". minimumversion ."<br />\n"; - $msg .= "you are using ". phpversion() ."<br />\n"; - $this->stop = true; - } + if ( ! minimum_version(minimumversion) ) { + $msg .= "<br />\nSorry TUTOS needs a PHP Version >= ". minimumversion ."<br />\n"; + $msg .= "you are using ". phpversion() ."<br />\n"; + $this->stop = true; + } - if ( isset($_GET['id']) ) { - if ( $this->user->id == -1 ) { - ReadLang($lang); - } - if ( isset($tutos[dbname][$_GET['id']] ) ) { - $this->dbc = DB_Open($_GET['id'],false); - } else { - $msg .= "<br />The given database id ". $_GET['id'] ." is not defined in you configuration"; - $this->stop = true; - } - } else { - /* Check if user is allowed to use it */ - $msg .= "<br />Please add a Database ID like ?id=0 to the URL"; - $this->stop = true; - } + if ( isset($_GET['id']) ) { + if ( $this->user->id == -1 ) { + ReadLang($lang); + } + if ( isset($tutos[dbname][$_GET['id']] ) ) { + $this->dbc = DB_Open($_GET['id'],false); + } else { + $msg .= "<br />The given database id ". $_GET['id'] ." is not defined in you configuration"; + $this->stop = true; + } + } else { + /* Check if user is allowed to use it */ + $msg .= "<br />Please add a Database ID like ?id=0 to the URL"; + $this->stop = true; + } - # read the table definitions of modules - foreach ($tutos[modules] as $r => $x) { - if (isset($tutos[modules][$r][file]) && file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) { - @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc"; - } - } - $this->name = $lang['DBUpdate']; + // read the table definitions of modules + foreach ($tutos[modules] as $r => $x) { + if (isset($tutos[modules][$r][file]) && file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) { + @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc"; + } + } + $this->name = $lang['DBUpdate']; - if ( $tutos[demo] != 0 ) { - $msg .= "will not work in demo"; - $this->stop = true; - } - } + if ( $tutos[demo] != 0 ) { + $msg .= "will not work in demo"; + $this->stop = true; + } + } } $dbc = null; @@ -252,6 +253,6 @@ $l->display(); ?> <!-- - CVS Info: $Id$ - $Author$ ---> \ No newline at end of file +CVS Info: $Id$ + $Author$ + --> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-05-05 04:27:05
|
Update of /cvsroot/tutos/tutos/php/expense In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29006/php/expense Modified Files: expense_overview.php Log Message: updates Index: expense_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/expense/expense_overview.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- expense_overview.php 30 Mar 2009 15:48:06 -0000 1.15 +++ expense_overview.php 5 May 2009 04:26:49 -0000 1.16 @@ -60,6 +60,7 @@ $sum[''] = 0.0; foreach($tutos[currencies] as $c) { $sum[$c] = 0.0; + $tsum[$c] = 0.0; } @@ -74,6 +75,7 @@ continue; } $sum[$b->currency] += $b->gamount; + $tsum[$b->currency] += $b->getTax(); $blist[] = &$b; unset($b); } @@ -86,11 +88,12 @@ $r .= $this->OverviewTableStart(); $r .= "<thead>\n"; $r .= "<tr>\n"; - $r .= $this->orderHeader("name",$lang['ExpenseName'],$this->link2); - $r .= $this->orderHeader("link_id",$lang['ExpenseReference'],$this->link2); - $r .= $this->orderHeader("adr_id",$lang['ExpenseAddress'],$this->link2); - $r .= $this->orderHeader("",$lang['ExpenseGAmount'],$this->link2); - $r .= $this->orderHeader("category",$lang['ExpenseCategory'],$this->link2); + $r .= $this->orderHeader('name',$lang['ExpenseName'],$this->link2); + $r .= $this->orderHeader('link_id',$lang['ExpenseReference'],$this->link2); + $r .= $this->orderHeader('adr_id',$lang['ExpenseAddress'],$this->link2); + $r .= $this->orderHeader('',$lang['ExpenseGAmount'],$this->link2); + $r .= $this->orderHeader('',$lang['ExpenseITax'],$this->link2); + $r .= $this->orderHeader('category',$lang['ExpenseCategory'],$this->link2); $this->flds = 5; $r .= show_custom_overview_headers($this,'expense',$this->link2); $r .= get_module_overview_header($this,'expense'); @@ -130,6 +133,12 @@ $r .= " <td> ". $b->getAdrRefLink() ."</td>\n"; $r .= " <td> ". number_format($b->gamount,2,$lang['DecPoint'],$lang['ThousandPoint']) ." ". myentities($b->currency) ."</td>\n"; + if ($b->itax != 0) { + $r .= " <td> ". number_format($b->GetTax(),2,$lang['DecPoint'],$lang['ThousandPoint']) + .' '. myentities($b->currency) .' ('. myentities($b->itax) ." %)</td>\n"; + } else { + $r .= " <td> </td>\n"; + } $r .= " <td> ". $b->getCategory() ."</td>\n"; $r .= show_custom_overview_data($this,'expense',$b); $r .= get_module_overview_data($this,$b); @@ -162,11 +171,21 @@ } } $r .= "</b></td>\n"; + $r .= " <td align=\"right\"><b>\n"; + foreach ($tsum as $s => $x) { + if ( $x != 0.0 ) { + $z= array($x,$s); + $r .= handle('money',$z,number_format($tsum[$s],2,$lang['DecPoint'],$lang['ThousandPoint']) ." ". myentities($s)) ."<br />\n"; + } else { + $r .= " "; + } + } + $r .= "</b></td>\n"; $r .= " <td colspan=\"".($this->flds - 4)."\"> </td>\n"; $r .= "</tr>\n"; if ( $tutos[massupdate] == 1 ) { - $r .= $this->UpdateRowStart(4); + $r .= $this->UpdateRowStart(5); $r .= sprintf($lang['withmarked'],$lang['Expenses']); $r .= "<select name=\"action\">\n"; $r .= " <option value=\"-1\" selected>". $lang['ActionNil'] ."</option>\n"; |
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29006/php Modified Files: admin_show.php check.php module_overview.php pdf.pinc task_overview.php timetrack_ins.php webelements.p3 Log Message: updates Index: pdf.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/pdf.pinc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- pdf.pinc 29 Mar 2009 18:25:40 -0000 1.8 +++ pdf.pinc 5 May 2009 04:26:49 -0000 1.9 @@ -12,95 +12,92 @@ * $Author$ */ - if ($tutos[fpdfpath] != "") { - if (!file_exists($tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php')) { - die ("NO FPDF support. <br />\nSee \$tutos[fpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php'); - } - include_once $tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php'; - } else { - return; - } +if ($tutos[fpdfpath] != "") { + if (!file_exists($tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php')) { + die ("NO FPDF support. <br />\nSee \$tutos[fpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php'); + } + include_once $tutos['base'] ."/". $tutos[fpdfpath].'/fpdf.php'; +} else { + return; +} - class tutospdf extends FPDF { - /** - * Constructor - */ - function tutospdf(&$dbconn,$orientation='P',$format='xx') - { - global $tutos; - if ($format == "xx") { - $format = $tutos[paperformat]; - } - $this->fpdf($orientation,"mm",$format); - $this->dbconn = &$dbconn; - $this->AliasNbPages(); - $this->setCreator("TUTOS Version ".$tutos[version]); - $this->setKeywords("TUTOS"); - $this->setDisplayMode('fullpage','continuous'); - $this->SetCompression(true); - $this->SetAutoPageBreak(true,20); - $this->header = true; - $this->footer = true; - } - //Page header - function Header() - { - global $tutos; +class tutospdf extends FPDF { + /** + * Constructor + */ + function tutospdf(&$dbconn,$orientation='P',$format='xx') { + global $tutos; + if ($format == "xx") { + $format = $tutos[paperformat]; + } + $this->fpdf($orientation,"mm",$format); + $this->dbconn = &$dbconn; + $this->AliasNbPages(); + $this->setCreator("TUTOS Version ".$tutos[version]); + $this->setKeywords("TUTOS"); + $this->setDisplayMode('fullpage','continuous'); + $this->SetCompression(true); + $this->SetAutoPageBreak(true,20); + $this->header = true; + $this->footer = true; + } + //Page header + function Header() { + global $tutos; - if (! $this->header) return; + if (! $this->header) return; - //Logo - if (eregi("png",$this->dbconn->db->logo)) { - @$this->Image($this->dbconn->db->logo,5,5,0,15,"PNG",$this->dbconn->db->logolink); - $this->Cell(40); - $this->SetY(5); - $this->SetX(25); - } else if (eregi("jpg",$this->dbconn->db->logo)) { - @$this->Image($this->dbconn->db->logo,5,5,0,15,"JPG",$this->dbconn->db->logolink); - $this->Cell(40); - $this->SetY(5); - $this->SetX(25); - } else if (eregi("jpeg",$this->dbconn->db->logo)) { - @$this->Image($this->dbconn->db->logo,5,5,0,15,"JPG",$this->dbconn->db->logolink); - $this->Cell(40); - $this->SetY(5); - $this->SetX(25); - } else { - $this->SetY(5); - } - //Move to the right - //Title - if (isset($this->headtitle)) { - $this->SetFont('Arial','',15); - $this->Cell(0,15,$this->headtitle,1,0,'C'); - } - //Line break - $this->Ln(20); - } + //Logo + if (eregi("png",$this->dbconn->db->logo)) { + @$this->Image($this->dbconn->db->logo,5,5,0,15,"PNG",$this->dbconn->db->logolink); + $this->Cell(40); + $this->SetY(5); + $this->SetX(25); + } else if (eregi("jpg",$this->dbconn->db->logo)) { + @$this->Image($this->dbconn->db->logo,5,5,0,15,"JPG",$this->dbconn->db->logolink); + $this->Cell(40); + $this->SetY(5); + $this->SetX(25); + } else if (eregi("jpeg",$this->dbconn->db->logo)) { + @$this->Image($this->dbconn->db->logo,5,5,0,15,"JPG",$this->dbconn->db->logolink); + $this->Cell(40); + $this->SetY(5); + $this->SetX(25); + } else { + $this->SetY(5); + } + //Move to the right + //Title + if (isset($this->headtitle)) { + $this->SetFont('Arial','',15); + $this->Cell(0,15,$this->headtitle,1,0,'C'); + } + //Line break + $this->Ln(20); + } - //Page footer - function Footer() - { - global $lang,$tutos; + //Page footer + function Footer() { + global $lang,$tutos; - if (! $this->footer) return; + if (! $this->footer) return; - $d = new TUTOS_Date_Time(); - //Position at 1.5 cm from bottom - //Arial italic 8 - $this->SetFont('Arial','I',8); - $this->SetY(-15); - $this->SetX(5); - $this->Cell(0,10,$d->getDateTime(),0,0,'L'); - //Page number - $this->SetX(5); - $this->Cell(0,10,sprintf($lang['pageof'],$this->PageNo(),'{nb}'),0,0,'C'); - // LABEL - $this->SetFont('Arial','',6); - $this->SetX(5); - $this->Cell(0,10,"generated by TUTOS ".$tutos[version],'T',1,'R',0,"http://www.tutos.org"); - } + $d = new TUTOS_Date_Time(); + //Position at 1.5 cm from bottom + //Arial italic 8 + $this->SetFont('Arial','I',8); + $this->SetY(-15); + $this->SetX(5); + $this->Cell(0,10,$d->getDateTime(),0,0,'L'); + //Page number + $this->SetX(5); + $this->Cell(0,10,sprintf($lang['pageof'],$this->PageNo(),'{nb}'),0,0,'C'); + // LABEL + $this->SetFont('Arial','',6); + $this->SetX(5); + $this->Cell(0,10,"generated by TUTOS ".$tutos[version],'T',1,'R',0,"http://www.tutos.org"); + } - } +} ?> \ No newline at end of file Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.356 retrieving revision 1.357 diff -u -d -r1.356 -r1.357 --- webelements.p3 17 Apr 2009 11:17:49 -0000 1.356 +++ webelements.p3 5 May 2009 04:26:49 -0000 1.357 @@ -979,6 +979,20 @@ } } /** + * check a field for a time formatted as HH:MM + * the reformated thing is stored as float in the given variable + */ + function checkHHMM(&$value,$allowempty = true) { + if ($allowempty && empty($value)) { + return true; + } + if ( ereg( "^([0-9]*):([0-5][0-9])$", $value, $regs )) { + $value = ($regs[1] * 60 + $regs[2]) / 60; + return true; + } + return false; + } +/** * check a field for a float * the reformated float is stored in the given variable */ @@ -993,9 +1007,10 @@ } else { $p = $lang['ThousandPoint']; } + // remove possible thousand points $x = eregi_replace($p,"",$value); - # Set a decimal point that sscanf understand + // Set a decimal point that sscanf understand if ($lang['DecPoint'] != ".") { $x = eregi_replace($lang['DecPoint'],".",$x); } Index: timetrack_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_ins.php,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- timetrack_ins.php 25 Mar 2009 10:50:09 -0000 1.58 +++ timetrack_ins.php 5 May 2009 04:26:49 -0000 1.59 @@ -29,178 +29,180 @@ $tt = new timetrack($dbconn); - if ( isset($_POST['gotourl']) ) { - $gotourl = $_POST['gotourl']; - } else { - $gotourl = "timetrack_new.php"; - } - if ( isset($_POST['mode']) ) { - $mode = $_POST['mode']; - $gotourl= addUrlParameter($gotourl,"mode=". $mode,true); - } - if ( isset($_POST['id']) ) { - $tt = $tt->read($_POST['id'],$tt); - $gotourl= addUrlParameter($gotourl,"id=". $tt->id,true); - } else { - $tt->creator = $current_user; - } +if ( isset($_POST['gotourl']) ) { + $gotourl = $_POST['gotourl']; +} else { + $gotourl = "timetrack_new.php"; +} +if ( isset($_POST['mode']) ) { + $mode = $_POST['mode']; + $gotourl= addUrlParameter($gotourl,"mode=". $mode,true); +} +if ( isset($_POST['id']) ) { + $tt = $tt->read($_POST['id'],$tt); + $gotourl= addUrlParameter($gotourl,"id=". $tt->id,true); +} else { + $tt->creator = $current_user; +} - # reference - if ( isset($_POST['lfn']) ) { - if ( empty($_POST['lfn']) ) { - $msg .= sprintf($lang['Err0009'],$lang['TimetrackRef']) ."<br />"; - $gotourl = addBadField($gotourl,'lfn',true); - } else { - $x = check_field(StripSlashes($_POST['lfn']),"lfn","ll","api"); // api: address, product, installation - $tt->setReference($x->id); - $tt->ref = getObject($dbconn,$tt->link_id); - $gotourl= addUrlParameter($gotourl,"lid=". $x->id,true); - } - } else if ( isset($_POST['lid']) ) { - $tt->setReference($_POST['lid']); - $tt->ref = getObject($dbconn,$tt->link_id); - $gotourl= addUrlParameter($gotourl,"lid=". $_POST['lid'],true); - } - if (!is_object($tt->ref)) { - $msg .= sprintf($lang['Err0009'],$lang['TimetrackRef']) ."<br />"; - } - # worker - if ( isset($_POST['wfn']) ) { - if ( empty($_POST['wfn']) ) { - $msg .= sprintf($lang['Err0009'],$lang['TimetrackWorker']) ."<br />"; - $gotourl = addBadField($gotourl,'wfn',true); - } else { - $x = check_field(StripSlashes($_POST['wfn']),"wfn","wl","a"); - $tt->setWorker($x->id); - $gotourl= addUrlParameter($gotourl,"wid=". $x->id,true); - } - } else if ( isset($_POST['wid']) ) { - $tt->setWorker($_POST['wid']); - $gotourl= addUrlParameter($gotourl,"wid=". $_POST['wid'],true); - } - # description - if ( empty($_POST['desc']) ) { - $msg .= sprintf($lang['Err0009'],$lang['Description']) ."<br />"; - $gotourl = addBadField($gotourl,'desc',true); - } else { - if ( isset($_POST['desc']) ) { - $tt->setDescription(StripSlashes($_POST['desc'])); - $gotourl= addUrlParameter($gotourl,"desc=". UrlEncode($tt->desc),true); - } - } - # state - if ( isset($_POST['state']) ) { - $tt->setState($_POST['state']); - $gotourl= addUrlParameter($gotourl,"state=". UrlEncode($tt->state),true); - } +// reference +if ( isset($_POST['lfn']) ) { + if ( empty($_POST['lfn']) ) { + $msg .= sprintf($lang['Err0009'],$lang['TimetrackRef']) ."<br />"; + $gotourl = addBadField($gotourl,'lfn',true); + } else { + $x = check_field(StripSlashes($_POST['lfn']),"lfn","ll","api"); // api: address, product, installation + $tt->setReference($x->id); + $tt->ref = getObject($dbconn,$tt->link_id); + $gotourl= addUrlParameter($gotourl,"lid=". $x->id,true); + } +} else if ( isset($_POST['lid']) ) { + $tt->setReference($_POST['lid']); + $tt->ref = getObject($dbconn,$tt->link_id); + $gotourl= addUrlParameter($gotourl,"lid=". $_POST['lid'],true); +} +if (!is_object($tt->ref)) { + $msg .= sprintf($lang['Err0009'],$lang['TimetrackRef']) ."<br />"; +} +// worker +if ( isset($_POST['wfn']) ) { + if ( empty($_POST['wfn']) ) { + $msg .= sprintf($lang['Err0009'],$lang['TimetrackWorker']) ."<br />"; + $gotourl = addBadField($gotourl,'wfn',true); + } else { + $x = check_field(StripSlashes($_POST['wfn']),"wfn","wl","a"); + $tt->setWorker($x->id); + $gotourl= addUrlParameter($gotourl,"wid=". $x->id,true); + } +} else if ( isset($_POST['wid']) ) { + $tt->setWorker($_POST['wid']); + $gotourl= addUrlParameter($gotourl,"wid=". $_POST['wid'],true); +} +// description +if ( empty($_POST['desc']) ) { + $msg .= sprintf($lang['Err0009'],$lang['Description']) ."<br />"; + $gotourl = addBadField($gotourl,'desc',true); +} else { + if ( isset($_POST['desc']) ) { + $tt->setDescription(StripSlashes($_POST['desc'])); + $gotourl= addUrlParameter($gotourl,"desc=". UrlEncode($tt->desc),true); + } +} +// state +if ( isset($_POST['state']) ) { + $tt->setState($_POST['state']); + $gotourl= addUrlParameter($gotourl,"state=". UrlEncode($tt->state),true); +} - # Read the Work Day - if (isset($_POST['jsc_wd']) || isset($_POST['wd_d'])) { - $wd = new TUTOS_Date_Time(0); - $wd->setDateTimeF('wd',1); - if ( !$wd->checkDMY() ) { - $msg .= sprintf($lang['Err0038'],$lang['Date']) ."<br />"; - } else { - $gotourl= addUrlParameter($gotourl,"wd=". $wd->getYYYYMMDD(),true); - } - $tt->setWorkday($wd); - } - if (isset($_POST['jsc_start']) || isset($_POST['start_d'])) { - $start = new TUTOS_Date_Time(); - $start->setDateTimeF('start',0); - if ( !$start->checkDMY() ) { - $msg .= sprintf($lang['Err0038'],$lang['AppStart']) ."<br />"; - } else { - $gotourl= addUrlParameter($gotourl,'start='. $start->getYYYYMMDDHHMM(),true); - } - $tt->setStart($start); - } - if (isset($_POST['jsc_end']) || isset($_POST['end_d'])) { - $end = new TUTOS_Date_Time(); - $end->setDateTimeF("end",0); - if ( !$end->checkDMY(true) ) { - $msg .= sprintf($lang['Err0038'],$lang['AppEnd']) ."<br />"; - } else { - $gotourl= addUrlParameter($gotourl,"end=". $end->getYYYYMMDDHHMM(),true); - } - $tt->setEnd($end); - if ( $tt->t_end->notime == 0 ) { - $tt->setVolume( ($tt->t_end->getTimeStamp() - $tt->t_start->getTimeStamp()) / 3600.0); - } - } +// Read the Work Day +if (isset($_POST['jsc_wd']) || isset($_POST['wd_d'])) { + $wd = new TUTOS_Date_Time(0); + $wd->setDateTimeF('wd',1); + if ( !$wd->checkDMY() ) { + $msg .= sprintf($lang['Err0038'],$lang['Date']) ."<br />"; + } else { + $gotourl= addUrlParameter($gotourl,"wd=". $wd->getYYYYMMDD(),true); + } + $tt->setWorkday($wd); +} +if (isset($_POST['jsc_start']) || isset($_POST['start_d'])) { + $start = new TUTOS_Date_Time(); + $start->setDateTimeF('start',0); + if ( !$start->checkDMY() ) { + $msg .= sprintf($lang['Err0038'],$lang['AppStart']) ."<br />"; + } else { + $gotourl= addUrlParameter($gotourl,'start='. $start->getYYYYMMDDHHMM(),true); + } + $tt->setStart($start); +} +if (isset($_POST['jsc_end']) || isset($_POST['end_d'])) { + $end = new TUTOS_Date_Time(); + $end->setDateTimeF("end",0); + if ( !$end->checkDMY(true) ) { + $msg .= sprintf($lang['Err0038'],$lang['AppEnd']) ."<br />"; + } else { + $gotourl= addUrlParameter($gotourl,"end=". $end->getYYYYMMDDHHMM(),true); + } + $tt->setEnd($end); + if ( $tt->t_end->notime == 0 ) { + $tt->setVolume( ($tt->t_end->getTimeStamp() - $tt->t_start->getTimeStamp()) / 3600.0); + } +} - # volume - if ( $tt->t_start->notime == 1 ) { - if ( !checkfloat($_POST['volume'],false) ) { - $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeDone']) ."<br />"; - $gotourl = addBadField($gotourl,'volume',true); - } else { - $gotourl= addUrlParameter($gotourl,"volume=". UrlEncode($_POST['volume']),true); - $tt->setVolume($_POST['volume']); - } - } - # distance - if ( isset($_POST['distance']) && $_POST['distance'] != "" ) { - $gotourl= addUrlParameter($gotourl,"distance=".UrlEncode($_POST['distance']),true); +// volume +if ( $tt->t_start->notime == 1 ) { + // the worked time + $volume = trim($_POST['volume']); + if ( !checkHHMM($volume,$false) && !checkfloat($volume,false) ) { + $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeDone']) ."<br />"; + $gotourl = addBadField($gotourl,'volume',true); + } else { + $gotourl= addUrlParameter($gotourl,"volume=". UrlEncode($volume),true); + $tt->setVolume($volume); + } +} +// distance +if ( isset($_POST['distance']) && $_POST['distance'] != "" ) { + $gotourl= addUrlParameter($gotourl,"distance=".UrlEncode($_POST['distance']),true); - if ( !checkfloat($_POST['distance'],false) ) { - $msg .= sprintf($lang['Err0009'],$lang['Distance']) ."<br />"; - $gotourl = addBadField($gotourl,'distance',true); - } else { - $tt->setDistance($_POST['distance']); - } - } + if ( !checkfloat($_POST['distance'],false) ) { + $msg .= sprintf($lang['Err0009'],$lang['Distance']) ."<br />"; + $gotourl = addBadField($gotourl,'distance',true); + } else { + $tt->setDistance($_POST['distance']); + } +} - # volume todo - if ( isset($_POST['volume_todo']) && $_POST['volume_todo'] != "" ) { - $gotourl= addUrlParameter($gotourl,"volume_todo=".UrlEncode($_POST['volume_todo']),true); +// volume todo +if ( isset($_POST['volume_todo']) && $_POST['volume_todo'] != "" ) { + $gotourl= addUrlParameter($gotourl,"volume_todo=".UrlEncode($_POST['volume_todo']),true); - if ( !checkfloat($_POST['volume_todo'],false) ) { - $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeTodo']) ."<br />"; - $gotourl = addBadField($gotourl,'volume_todo',true); - } else { - $tt->setVolumeTodo($_POST['volume_todo']); - } - } + if ( !checkfloat($_POST['volume_todo'],false) ) { + $msg .= sprintf($lang['Err0009'],$lang['TaskVolumeTodo']) ."<br />"; + $gotourl = addBadField($gotourl,'volume_todo',true); + } else { + $tt->setVolumeTodo($_POST['volume_todo']); + } +} - if ( !checkfloat($_POST['cph'],true) ) { - $msg .= sprintf($lang['Err0017'],$lang['TTcph']) ."<br />"; - $gotourl = addBadField($gotourl,'cph',true); - } else { - $gotourl= addUrlParameter($gotourl,"cph=". UrlEncode($_POST['cph']),true); - $tt->setCph($_POST['cph']); - } - # currency - if ( isset($_POST['currency']) ) { - $tt->setCurrency($_POST['currency']); - $gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($tt->currency),true); - } - # - # Parse additional custom fields - # - $msg .= parse_custom_fields($tt->gettype(),$tt); +if ( !checkfloat($_POST['cph'],true) ) { + $msg .= sprintf($lang['Err0017'],$lang['TTcph']) ."<br />"; + $gotourl = addBadField($gotourl,'cph',true); +} else { + $gotourl= addUrlParameter($gotourl,"cph=". UrlEncode($_POST['cph']),true); + $tt->setCph($_POST['cph']); +} +// currency +if ( isset($_POST['currency']) ) { + $tt->setCurrency($_POST['currency']); + $gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($tt->currency),true); +} +// +// Parse additional custom fields +// +$msg .= parse_custom_fields($tt->gettype(),$tt); - # other modules - $msg .= module_parseforms($current_user,$tt,$gotourl); +// other modules +$msg .= module_parseforms($current_user,$tt,$gotourl); - if ( $msg == "" ) { - $dbconn->Begin("WORK"); - $msg .= $tt->save(); - if (isset($_POST['finished']) &&($_POST['finished']) == 1 && $tt->ref->mod_ok()) { - $x = $tt->ref->state; - if ($tt->ref->getType() == 'task') { - $tt->ref->setState(TASK_FINISH); - } - if ($tt->ref->getType() == 'product') { - $tt->ref->setState(PROD_STATE_FINISH); - } - $msg .= $tt->ref->save(); - } - $dbconn->Commit("WORK"); - $gotourl = $tt->ref->getUrl(); - } +if ( $msg == "" ) { + $dbconn->Begin("WORK"); + $msg .= $tt->save(); + if (isset($_POST['finished']) &&($_POST['finished']) == 1 && $tt->ref->mod_ok()) { + $x = $tt->ref->state; + if ($tt->ref->getType() == 'task') { + $tt->ref->setState(TASK_FINISH); + } + if ($tt->ref->getType() == 'product') { + $tt->ref->setState(PROD_STATE_FINISH); + } + $msg .= $tt->ref->save(); + } + $dbconn->Commit("WORK"); + $gotourl = $tt->ref->getUrl(); +} leave_insert($dbconn,$gotourl,$msg); ?> Index: check.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/check.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- check.php 5 Apr 2009 18:59:11 -0000 1.41 +++ check.php 5 May 2009 04:26:49 -0000 1.42 @@ -1,6 +1,6 @@ <?php /* - * Copyright 1999 - 2008 by Gero Kohnert + * Copyright 1999 - 2009 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 @@ -12,6 +12,9 @@ * do background jobs * - check for appointments that ask for remembering * - check for bugs that are OPEN for too long + * - remove old debug and session files + * - run database scripts + * - call check routines in all modules * * @modulegroup BASE * @module check @@ -25,108 +28,108 @@ require_once 'timetrack.pinc'; - /* - * remove old session files - */ - Function remove_sessionfiles () { - global $tutos; +/** + * remove old session files + */ +Function remove_sessionfiles () { + global $tutos; - $handle = opendir($tutos[sessionpath]); - if (! $handle ){ - return; - } - while (false !== ($file = readdir($handle))) { - if ( ! ereg("^sess_",$file) ) { - continue; - } + $handle = opendir($tutos[sessionpath]); + if (! $handle ){ + return; + } + while (false !== ($file = readdir($handle))) { + if ( ! ereg("^sess_",$file) ) { + continue; + } - $filename = $tutos[sessionpath] ."/". $file; + $filename = $tutos[sessionpath] ."/". $file; - if ( ! is_writeable($filename) ) continue; + if ( ! is_writeable($filename) ) continue; - if (filesize($filename) == 0) { - unlink($filename); - continue; - } - $age = time() - filemtime($filename); - if ($age < (2* $tutos[timetolive] * 60)) { - continue; - } + if (filesize($filename) == 0) { + unlink($filename); + continue; + } + $age = time() - filemtime($filename); + if ($age < (2* $tutos[timetolive] * 60)) { + continue; + } # echo $filename." ".date ("F d Y H:i:s.", filemtime($filename))." ". $age/3600 ."<br>\n"; - unlink($filename); - } - closedir($handle); - } - /* - * remove old debug files - */ - Function remove_debugfiles () { - global $tutos; + unlink($filename); + } + closedir($handle); +} +/** + * remove old debug files + */ +Function remove_debugfiles () { + global $tutos; - $handle = opendir(dirname($tutos[errlog])); - if (! $handle ){ - return; - } - while (false !== ($file = readdir($handle))) { - if ( ! ereg("^".basename($tutos[errlog]),$file) ) { - continue; - } - if ($file == basename($tutos[errlog])) continue; - if ($file == basename($tutos[errlog]).".log") continue; + $handle = opendir(dirname($tutos[errlog])); + if (! $handle ){ + return; + } + while (false !== ($file = readdir($handle))) { + if ( ! ereg("^".basename($tutos[errlog]),$file) ) { + continue; + } + if ($file == basename($tutos[errlog])) continue; + if ($file == basename($tutos[errlog]).".log") continue; - $filename = $tutos[sessionpath] ."/". $file; - if ( ! is_writeable($filename) ) continue; + $filename = $tutos[sessionpath] ."/". $file; + if ( ! is_writeable($filename) ) continue; - # calc the age in days - $age = (time() - filemtime($filename)) / 86400; - if ($age < 60) { - continue; - } + // calc the age in days + $age = (time() - filemtime($filename)) / 86400; + if ($age < 60) { + continue; + } #echo $filename." ". $age ."<br>"; - unlink($filename); - } - closedir($handle); - } + unlink($filename); + } + closedir($handle); +} - if ( ! isset($_GET['dbnr']) ) { - $dbnr = 0; - } else { - $dbnr = $_GET['dbnr']; - } - $_SESSION['dbnr'] = $dbnr; - $dbconn = DB_Open($dbnr); - $current_user = new tutos_user($dbconn); - $current_user->f_name = "TUTOS"; - $current_user->l_name = "(remember service)"; - $current_user->admin = 1; - $msg = ""; +if ( ! isset($_GET['dbnr']) ) { + $dbnr = 0; +} else { + $dbnr = $_GET['dbnr']; +} +$_SESSION['dbnr'] = $dbnr; +$dbconn = DB_Open($dbnr); +$current_user = new tutos_user($dbconn); +$current_user->f_name = "TUTOS"; +$current_user->l_name = "(remember service)"; +$current_user->admin = 1; +$msg = ""; - ReadLang($lang); - loadmodules('check','new'); +ReadLang($lang); +loadmodules('check','new'); - session_write_close(); +session_write_close(); - # run some DB cleanups that might be neccessary - $msg .= $dbconn->checkservice(); +// run some DB cleanups that might be neccessary +$msg .= $dbconn->checkservice(); - $msg .= appointment::checkservice($current_user); +$msg .= appointment::checkservice($current_user); - foreach($tutos[activemodules] as $i => $f) { - $x = new $tutos[modules][$f][name]($dbconn); - $msg .= $x->checkservice($current_user); - unset($x); - } +foreach($tutos[activemodules] as $i => $f) { + $x = new $tutos[modules][$f][name]($dbconn); + $msg .= $x->checkservice($current_user); + unset($x); +} - if ( ($tutos[debug] == 1) && ($msg != "") ) { - echo $msg ."<br />"; - echo "--> ". $current_user->getFullName() ."<br />"; - } - $dbconn->Close(); +if ( ($tutos[debug] == 1) && ($msg != "") ) { + echo $msg ."<br />"; + echo "--> ". $current_user->getFullName() ."<br />"; +} +$dbconn->Close(); - # remove old session files - remove_sessionfiles(); - # remove old debug files - remove_debugfiles(); +// remove old session files +remove_sessionfiles(); +// remove old debug files +remove_debugfiles(); ?> \ No newline at end of file Index: module_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_overview.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- module_overview.php 29 Mar 2009 18:25:40 -0000 1.10 +++ module_overview.php 5 May 2009 04:26:49 -0000 1.11 @@ -20,165 +20,165 @@ loadlayout(); function get_url_data($u) { - global $tutos; + global $tutos; - $timeout = 10; - $redir = ""; - $errno = ""; - $errstr = ""; - $r = array(); - $url = parse_url($u); + $timeout = 10; + $redir = ""; + $errno = ""; + $errstr = ""; + $r = array(); + $url = parse_url($u); # var_dump($url); # var_dump($u); - if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { - $fp = fsockopen($url['host'], "80", $errno, $errstr, $timeout); - } else { - $fp = fsockopen($tutos['proxy_host'], $tutos['proxy_port'], $errno, $errstr, $timeout); - } - if (!$fp) return $errno." ".$errstr; //just quit on error - - if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { - fputs($fp, "GET " . $url['path'].(isset($url['query']) ? "?".$url['query']:"") . " HTTP/1.0\r\n". - "Host: " . $url['host'] . "\r\n". - "User-Agent: TUTOS\r\n". - "Connection: close\r\n". - "Cache-Control: no-cache\r\n". - "Pragma: no-cache\r\n". - "\r\n"); - } else { - fputs($fp, "GET " . $u . " HTTP/1.0\r\n". - "Host: " . $url['host'] . "\r\n". - "User-Agent: TUTOS\r\n". - "Connection: close\r\n". - "Proxy-Connection: close\r\n". - "Accept-Encoding: deflate\r\n". - "Cache-Control: no-cache\r\n". - "Pragma: no-cache\r\n". - "\r\n"); - } - $head = true; - while(!feof($fp)) { - $x = fgets($fp, 8192); - if (eregi("^location:(.*)",$x,$reg)) { - $redir = trim($reg[1]); - if (isset($url['query'])) { - $redir .= "?". $url['query']; - } - - break; + if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { + $fp = fsockopen($url['host'], "80", $errno, $errstr, $timeout); + } else { + $fp = fsockopen($tutos['proxy_host'], $tutos['proxy_port'], $errno, $errstr, $timeout); } + if (!$fp) return $errno." ".$errstr; //just quit on error - if ($head) { - if ($x == "\r\n") { - $head = false; - } - continue; + if (!isset($tutos['proxy_host']) || empty($tutos['proxy_host']) ) { + fputs($fp, "GET " . $url['path'].(isset($url['query']) ? "?".$url['query']:"") . " HTTP/1.0\r\n". + "Host: " . $url['host'] . "\r\n". + "User-Agent: TUTOS\r\n". + "Connection: close\r\n". + "Cache-Control: no-cache\r\n". + "Pragma: no-cache\r\n". + "\r\n"); + } else { + fputs($fp, "GET " . $u . " HTTP/1.0\r\n". + "Host: " . $url['host'] . "\r\n". + "User-Agent: TUTOS\r\n". + "Connection: close\r\n". + "Proxy-Connection: close\r\n". + "Accept-Encoding: deflate\r\n". + "Cache-Control: no-cache\r\n". + "Pragma: no-cache\r\n". + "\r\n"); } + $head = true; + while(!feof($fp)) { + $x = fgets($fp, 8192); + if (eregi("^location:(.*)",$x,$reg)) { + $redir = trim($reg[1]); + if (isset($url['query'])) { + $redir .= "?". $url['query']; + } - $r[] = $x; - } - fclose($fp); - if ($redir != "") { - $r = get_url_data($redir); - } - return $r; + break; + } + + if ($head) { + if ($x == "\r\n") { + $head = false; + } + continue; + } + + $r[] = $x; + } + fclose($fp); + if ($redir != "") { + $r = get_url_data($redir); + } + return $r; } /** * display an overview of all TUTOS modules */ class Module_overview extends layout { - /** - * the data display part - */ - Function info() { - global $lang,$tutos; + /** + * the data display part + */ + Function info() { + global $lang,$tutos; - $line = 0; + $line = 0; - echo "This table was delivered from ". $this->url ."<br />"; - foreach($this->infos as $f) { - echo $f ."<br />\n"; - } - if (count($this->mods) == 0) { - return; - } - $header = $this->mods[0]; + echo "This table was delivered from ". $this->url ."<br />"; + foreach($this->infos as $f) { + echo $f ."<br />\n"; + } + if (count($this->mods) == 0) { + return; + } + $header = $this->mods[0]; - echo $this->OverviewTableStart(); - echo "<thead>\n"; - echo "<tr>\n"; - echo $this->orderHeader("","Action",""); - foreach($header as $f) { - echo $this->orderHeader("",$f,""); - } - echo "</tr>\n"; - echo "</thead>\n"; - foreach($this->mods as $i => $m) { - if ($i == 0) continue; + echo $this->OverviewTableStart(); + echo "<thead>\n"; + echo "<tr>\n"; + echo $this->orderHeader("","Action",""); + foreach($header as $f) { + echo $this->orderHeader("",$f,""); + } + echo "</tr>\n"; + echo "</thead>\n"; + foreach($this->mods as $i => $m) { + if ($i == 0) continue; - echo $this->OverviewRowStart($line); + echo $this->OverviewRowStart($line); - echo "<td>\n"; - if (isset($tutos[modules][$m[0]])) { - echo "<font color=\"green\">\n"; - echo "known"; - if ($tutos[ $tutos[modules][$m[0]]['perm'] ] != 0) { - echo "<br />and <b>enabled</b>"; - } - } else { - echo "<font color=\"red\">\n"; - echo "unknown"; - } - echo "</font>\n"; - echo "</td>\n"; + echo "<td>\n"; + if (isset($tutos[modules][$m[0]])) { + echo "<font color=\"green\">\n"; + echo "known"; + if ($tutos[ $tutos[modules][$m[0]]['perm'] ] != 0) { + echo "<br />and <b>enabled</b>"; + } + } else { + echo "<font color=\"red\">\n"; + echo "unknown"; + } + echo "</font>\n"; + echo "</td>\n"; - foreach($m as $f) { - echo "<td>". urlReplace($f,1) ." </td>\n"; - } - echo $this->OverviewRowEnd($line++); - } + foreach($m as $f) { + echo "<td>". urlReplace($f,1) ." </td>\n"; + } + echo $this->OverviewRowEnd($line++); + } - echo $this->OverviewTableEnd(); - } - /** - * prepare - */ - Function prepare() { - global $msg,$lang,$tutos; + echo $this->OverviewTableEnd(); + } + /** + * prepare + */ + Function prepare() { + global $msg,$lang,$tutos; - $this->name = $lang['AdminModOverview']; - $this->css_class = 'overviewbox'; + $this->name = $lang['AdminModOverview']; + $this->css_class = 'overviewbox'; - $this->url = "http://www.tutos.org/modules.php"; - $this->mods = array(); - $this->infos = array(); - $this->url = addUrlParameter($this->url,"version=". $tutos[version]); - $this->url = addUrlParameter($this->url,"format=plain"); - $r = get_url_data($this->url); - if (count($r) == 0) { - $msg = 'Failed'; - $this->stop == true; - return; - } - $x = split('[|]',$r[0]); - foreach ($r as $line) { - if (ereg("^@",$line)) { - $this->infos[] = "<i>". substr($line,1) ."</i>"; - continue; - } - if (strlen(trim($line)) == 0) continue; + $this->url = "http://www.tutos.org/modules.php"; + $this->mods = array(); + $this->infos = array(); + $this->url = addUrlParameter($this->url,"version=". $tutos[version]); + $this->url = addUrlParameter($this->url,"format=plain"); + $r = get_url_data($this->url); + if (count($r) == 0) { + $msg = 'Failed'; + $this->stop == true; + return; + } + $x = split('[|]',$r[0]); + foreach ($r as $line) { + if (ereg("^@",$line)) { + $this->infos[] = "<i>". substr($line,1) ."</i>"; + continue; + } + if (strlen(trim($line)) == 0) continue; - $x = split('[|]',$line); - if (count($x) == 1) { - $this->infos[] = $x[0]; - continue; - } - $this->mods[] = $x; - } + $x = split('[|]',$line); + if (count($x) == 1) { + $this->infos[] = $x[0]; + continue; + } + $this->mods[] = $x; + } - } - } + } +} session_write_close(); $l = new Module_overview($current_user); @@ -186,6 +186,6 @@ $dbconn->close(); ?> <!-- - CVS Info: $Id$ - $Author$ ---> \ No newline at end of file +CVS Info: $Id$ + $Author$ + --> \ No newline at end of file Index: task_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_overview.php,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- task_overview.php 5 Apr 2009 18:59:11 -0000 1.115 +++ task_overview.php 5 May 2009 04:26:49 -0000 1.116 @@ -58,7 +58,7 @@ $q .= $this->dbconn->like("t.autoname", $this->search); $q .= " OR "; $q .= $this->dbconn->like("t.description", $this->search); - // customized search fields + // customized search fields $custom = get_custom_search_fields($this,'task'); foreach ($custom as $ti => $tx) { if($tx[type] != "VARCHAR") continue; @@ -69,7 +69,7 @@ $qpre = " AND "; } - // get customized non textual search fields + // get customized non textual search fields $custom = get_custom_sql_select('task','t',$this->link); foreach ($custom as $s) { $q .= $qpre; @@ -78,12 +78,12 @@ $qpre = " AND "; } - // State limit + // State limit if ($this->state != -2) { $q .= $qpre ." t.status = ".$this->state; $qpre = " AND "; } - // time limit + // time limit if ($this->start->notime != 1) { $q .= $qpre ." t.s_start >= ".$this->dbconn->Date($this->start); $qpre = " AND "; @@ -131,7 +131,7 @@ $this->headlineinfo = $n.' '. $lang['Tasks']; } $res->free(); - return; + return; } /** * display the info @@ -205,7 +205,7 @@ $r .= makelink($l,$lang['TaskViewNormal']); } -# The main display part + // The main display part if ( $this->small == 0 ) { $cols = 9; $custom = get_custom_overview_fields($this,'task'); @@ -515,6 +515,8 @@ $this->link = 'task_overview.php'; $this->headlineinfo = ''; + $classic_search = true; + if ( ! $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { $msg .= sprintf($lang['Err0022'],"'". $this->name ."'"); $this->stop = true; @@ -589,6 +591,9 @@ // Call via other object if ( isset($_REQUEST['id']) ) { + // TODO multiple project references + if (is_array($_REQUEST['id'])) { + } // We show everything that belongs to id (no other filter apply) if (false == is_numeric($_REQUEST['id'])) { $msg .= sprintf($lang['Err0012'],"id",$_REQUEST['id']); @@ -617,16 +622,24 @@ $x = task::getaddlink($this->user,$this->parent,$lang['NewEntry']); $this->addMenu($x); + $classic_search = false; } else if ( isset($_REQUEST['name']) ) { // Classical Search $this->parent = new dummy($this->dbconn); $this->fld = "worker"; $this->select_by_name(); + $classic_search = true; } else { $this->parent = new dummy($this->dbconn); $this->parent->min_start = new TUTOS_Date_Time(); $this->parent->max_end = new TUTOS_Date_Time(0); + $classic_search = true; + } + + if ( isset($_REQUEST['small']) ) { + $this->small = $_REQUEST['small']; } + $this->addHidden("small",$this->small); // menu $x = task::getSelectLink($this->user,$lang['Search']); @@ -635,8 +648,19 @@ } $this->addMenu($x); + if ( $this->format != "paper" ) { + $ll = addUrlParameter($this->link,"format=paper"); + $ll = addUrlParameter($ll,"small=".$this->small); + $x = array( url => $ll, + text => $lang['Printable'], + info => $lang['PrintableInfo'], + category => array("product","view") + ); + $this->addMenu($x); + } + // The PNG Gantt functionality, using JpGraph Tools, to be installed - if( $tutos[usejpgraph] && ($this->parent->id != -1) ) { + if( $tutos[usejpgraph] && !$classic_search ) { $x = array( url => "task_gantt.php?id=". $this->parent->id, text => $lang['TaskGantt'], info => $lang['TaskGantt'], @@ -667,10 +691,6 @@ $this->addMenu($x); } - if ( isset($_REQUEST['small']) ) { - $this->small = $_REQUEST['small']; - } - $this->addHidden("small",$this->small); } } Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- admin_show.php 8 Apr 2009 20:36:54 -0000 1.100 +++ admin_show.php 5 May 2009 04:26:49 -0000 1.101 @@ -50,7 +50,7 @@ $q = "SELECT count(*) as c from ". $dbconn->prefix . $tbl; $r = @$dbconn->exec($q,0); if ( !is_object($r) || (1 != $r->numrows()) ) { - return ''; + return 'n/a'; } $cnt = $r->get(0, "c"); $r->free(); |
From: Gero K. <gok...@us...> - 2009-05-05 04:27:00
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29006 Modified Files: ToDo Log Message: updates Index: ToDo =================================================================== RCS file: /cvsroot/tutos/tutos/ToDo,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- ToDo 12 Dec 2008 14:49:13 -0000 1.55 +++ ToDo 5 May 2009 04:26:49 -0000 1.56 @@ -163,9 +163,10 @@ Expenses in Freemind Search for CustomFields (Task/Projects...) -partly done - + partly done + StateEngine to check allowed state transitions in objects + DONE in 1.5 File restore with correct former name and file type @@ -174,6 +175,8 @@ Tags on all objects Using PHPUnit or similar for unittest while developing + + # # # EOF |