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
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
(6) |
15
(4) |
16
(3) |
17
(4) |
18
|
19
|
20
|
21
(3) |
22
|
23
(2) |
24
(2) |
25
|
26
|
27
|
28
(15) |
29
(3) |
30
|
|
|
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11362 Modified Files: ca.p3 cs.p3 de.p3 el.p3 en.p3 es-mx.p3 es-ni.p3 es-ve.p3 es.p3 file.pinc file_ins.php file_new.php fr.p3 hu.p3 it.p3 ja.p3 ko.p3 nl.p3 pl.p3 pt-br.p3 pt.p3 ru.p3 sv.p3 tw.p3 vi.p3 zh.p3 Log Message: alternate way: connect to an existing file instead of uploading Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/tw.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tw.p3 13 Mar 2008 11:02:34 -0000 1.6 +++ tw.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "ä½¿ç¨æä»¶ç®¡ç"; Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/pl.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pl.p3 13 Mar 2008 11:02:32 -0000 1.7 +++ pl.p3 29 Sep 2009 14:49:38 -0000 1.8 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "używanie zarzÄ dcy dokumentów"; Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/pt-br.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pt-br.p3 13 Mar 2008 11:02:32 -0000 1.6 +++ pt-br.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "use docmanagement"; @@ -60,4 +69,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/en.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- en.p3 16 Aug 2009 08:55:20 -0000 1.10 +++ en.p3 29 Sep 2009 14:49:38 -0000 1.11 @@ -53,6 +53,8 @@ $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + $lang['FileConfig'] = "configure documentmanagement"; $lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; $lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; Index: pt.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/pt.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pt.p3 13 Mar 2008 11:02:32 -0000 1.7 +++ pt.p3 29 Sep 2009 14:49:38 -0000 1.8 @@ -54,6 +54,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "usar GESTÃO DE DOCUMENTOS"; @@ -61,4 +70,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/fr.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fr.p3 13 Mar 2008 11:02:25 -0000 1.6 +++ fr.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "Gérer des documents"; @@ -61,4 +70,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/ru.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ru.p3 13 Mar 2008 11:02:33 -0000 1.6 +++ ru.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "менеджеÑа докÑменÑов"; @@ -60,4 +69,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/nl.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- nl.p3 13 Mar 2008 11:02:25 -0000 1.6 +++ nl.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "gebruik docmanagement"; @@ -61,4 +70,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/it.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- it.p3 13 Mar 2008 11:02:25 -0000 1.7 +++ it.p3 29 Sep 2009 14:49:38 -0000 1.8 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "Usa Gestione documenti"; @@ -61,4 +70,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/ko.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ko.p3 13 Mar 2008 11:02:25 -0000 1.6 +++ ko.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -53,6 +53,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "use docmanagement"; Index: es-ve.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/es-ve.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es-ve.p3 17 Jun 2008 19:31:54 -0000 1.7 +++ es-ve.p3 29 Sep 2009 14:49:38 -0000 1.8 @@ -54,6 +54,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "usar admin. documentos"; Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/es-mx.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- es-mx.p3 17 Jun 2008 19:31:54 -0000 1.6 +++ es-mx.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "usar admin. documentos"; Index: ca.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/ca.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ca.p3 13 Mar 2008 11:02:19 -0000 1.6 +++ ca.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "Utilitzar gestió documents"; @@ -60,4 +69,4 @@ ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: file_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_new.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- file_new.php 4 Jun 2009 16:05:12 -0000 1.35 +++ file_new.php 29 Sep 2009 14:49:38 -0000 1.36 @@ -191,6 +191,51 @@ $r .= "</form>\n"; $r .= $lang['FldsRequired'] ."\n"; $r .= $this->setfocus("fileadd.name"); + + + if ( ($this->obj->id > 0) || count($this->obj->links) == 0 ) { + return $r; + } + // alternativ: connect a given link_id to a existing file + $r .= "<p /><p /><form id=\"fileadd2\" name=\"fileadd2\" enctype=\"multipart/form-data\" method=\"post\" action=\"file_ins.php\">\n"; + $this->addHidden("alt",'1'); + $r .= $this->DataTableStart(); + $r .= $this->Headline($lang['FileConnect']); + + + $r .= "<tr>\n"; + $r .= $this->showfield($lang['FileReference'],0,"link_id_".$cnt); + foreach($this->obj->links as $a) { + break; + } + $r .= $this->showdata($lang[$a->getType()].': '.$a->getLink(),5); + $this->addHidden("link_id",$a->id); + $r .= "</tr>\n"; + + $r .= "<tr>\n"; + $r .= $this->showfield($lang['FileNameDoc'],1,"file3"); + $r .= " <td colspan=\"5\">\n"; + $r .= select_from_array_or_input($this->obj,"file3",$this->target,1,array(usedocmanagement)); + $r .= " </td>\n"; + $r .= "</tr>\n"; + + $r .= "<tr>\n"; + if ( isset($this->obj->id) && ($this->obj->id != -1) ) { + $r .= submit_reset(0,1,1,1,1,0); + } else { + $r .= submit_reset(0,-1,1,1,1,0); + } + $r .= "</tr>\n"; + + $r .= $this->DataTableEnd(); + $r .= hiddenFormElements(); + $r .= $this->getHidden(); + $r .= $this->markBadFields(); + $r .= "</form>\n"; + $r .= $lang['FldsRequired'] ."\n"; + + + return $r; } /** @@ -224,6 +269,8 @@ } } + preset_from_array_or_input($this->obj,'file3',"file3"); + if ( isset($_GET['link_id']) && is_array($_GET['link_id']) ){ $arr = $_GET['link_id']; foreach($arr as $i) { Index: cs.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/cs.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cs.p3 13 Mar 2008 11:02:19 -0000 1.6 +++ cs.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "použÃt správu dokumentu"; Index: ja.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/ja.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ja.p3 13 Mar 2008 11:02:25 -0000 1.6 +++ ja.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "ããã¥ã¡ã³ã"; Index: es-ni.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/es-ni.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- es-ni.p3 17 Jun 2008 19:31:54 -0000 1.6 +++ es-ni.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "use administración de documentos"; Index: vi.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/vi.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vi.p3 13 Mar 2008 11:02:34 -0000 1.6 +++ vi.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "Quản lý tà i liá»u"; Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/es.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es.p3 13 Mar 2008 11:02:23 -0000 1.7 +++ es.p3 29 Sep 2009 14:49:38 -0000 1.8 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Cambiado %s de %s a %s"; $lang['FileDelSuccess'] = "Archivo \"%s\" eliminado"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Archivo temporal %s no encontrado. Es posible que sea demasiado grande"; $lang['perm'][usedocmanagement] = "Usar gestión documentos"; @@ -61,4 +70,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: file.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file.pinc,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- file.pinc 20 Aug 2009 10:40:54 -0000 1.90 +++ file.pinc 29 Sep 2009 14:49:38 -0000 1.91 @@ -230,6 +230,7 @@ parent::read_result($r,$pos); return; } + /** * read linked objects */ @@ -253,6 +254,7 @@ } $result->free(); } + /** * save links */ @@ -264,6 +266,40 @@ $this->dbconn->Exec($q); } } + + /** + * search for a file + * fill a array with possible files + * mode 1 fill objects + * mode 0 do not fill objects + */ + function search_by_name(&$arr,&$user,$name,$mode = 1) { + global $table; + + if ( trim($name) == "" ) return 0; + + $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix .$table['file'][name] ." WHERE". $user->dbconn->Like("name",$name,"version"); + $q .= " order by name"; + check_dbacl($user->dbconn, $q, $user->id); + $r = $user->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ( $a < $n ) { + if ($mode == 1) { + $x = new tutos_file($user->dbconn); + $x->read_result($r,$a); + $arr[$x->id] = &$x; + unset($x); + } else { + $id = $r->get($a,'id'); + $arr[$id] = $id; + } + $a++; + } + $r->free(); + return $n; + } + /** * fill the internal neighbour list with possible objects where an object * currently attached/referencing to THIS could be reattached @@ -285,6 +321,7 @@ return $this->neighbours; } + /** * get a list of possible new parents for each existing parent */ @@ -301,30 +338,35 @@ unset ($f); } } + /** * Return the full name */ function getFullname() { return $this->name ." ". $this->version; } + /** * Return an URL to show this file */ function getURL() { return "file/file_show.php?id=".$this->id ; } + /** * Return an URL to modify this file */ function getModURL() { return "file/file_new.php?id=".$this->id ; } + /** * Return an URL to delete this file */ function getDelURL() { return "file/file_del.php?id=". $this->id; } + /** * Return a link to this file */ @@ -332,7 +374,7 @@ global $lang; if ( empty($text) ) { - $text = $this->name; + $text = $this->getFullName(); } if ( empty($text) ) { $text = "?"; @@ -348,6 +390,7 @@ return myentities($text); } } + /** * Shows more info on files */ @@ -488,6 +531,7 @@ } return $r; } + /** * download this file */ @@ -515,6 +559,7 @@ } } } + /** * get the thumbnail of an image file */ @@ -535,6 +580,7 @@ } return; } + /** * Show this file */ @@ -716,6 +762,7 @@ echo $this->filename . ": <span class=\"warn\">Cannot Show files in this format ". $this->filetype . "<b> please use download</b> !</span>"; return; } + /** * Are deletes allowed ? */ @@ -732,6 +779,7 @@ } return acl_del_ok($this); } + /** * Are modifications allowed ? */ @@ -748,6 +796,7 @@ } return acl_mod_ok($this); } + /** * make a list of _old_ versions */ @@ -790,24 +839,28 @@ } } } + /** * set the document name */ function setName($value) { return $this->setStrField("name",$value,"FileNameDoc"); } + /** * set the file's name */ function setFilename($value) { return $this->setStrField("filename",$value,"FileName"); } + /** * set the version */ function setVersion($value) { return $this->setStrField("version",$value,"FileVersion"); } + /** * set the author */ @@ -818,6 +871,7 @@ } return; } + /** * add a reference */ @@ -828,6 +882,7 @@ } return; } + /** * del a reference */ @@ -838,6 +893,7 @@ } return; } + /** * Save file reference to DB * Copy file to repository @@ -1015,6 +1071,7 @@ $msg .= parent::save(); return $msg; } + /** * delete the database entry */ @@ -1032,12 +1089,12 @@ $q = "UPDATE ". $this->dbconn->prefix ."addresses set pic_id = -1 where pic_id = ". $this->id; $this->dbconn->Exec($q); -# Delete the file + // Delete the file if ( file_exists($this->base ."/". $this->fileloc) ) { @unlink($this->base ."/". $this->fileloc); } -# Delete older versions + // Delete older versions if ($this->vsys == FILE_RCS) { if (file_exists($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v")) { @unlink($this->base ."/". dirname($this->fileloc) ."/RCS/". basename($this->fileloc) .",v"); @@ -1048,7 +1105,7 @@ } else if ( $this->vsys == FILE_COPY ) { $xx = $this->base ."/". $this->fileloc; -# Read all files that look like $xx + // Read all files that look like $xx $d = @opendir(dirname($xx)); if ( $d != false ) { @rewinddir($d); @@ -1066,6 +1123,7 @@ $msg .= parent::delete(); return $msg; } + /** * Transfer reference ids according to given table */ @@ -1088,24 +1146,28 @@ } return; } + /** * get the type of object */ function gettype () { - return "file"; + return 'file'; } + /** * get the type id of object */ function gettypeid () { return usedocmanagement; } + /** * get the icon type */ function getHtmlIcon () { return 'paper'; } + /** * resolve a history Tag (to be called from history_show) */ @@ -1195,6 +1257,7 @@ return; } + /** * reads the list of dociment and get a summary */ @@ -1213,6 +1276,7 @@ $x = makelink("file/file_overview.php?link_id=".$obj->id,$r); return $x; } + /** * create a smalllist of products related to the given object */ @@ -1267,6 +1331,7 @@ $r .= "</tr>\n"; return $r; } + /** * create a link where a note to for the given object could be added */ @@ -1305,6 +1370,7 @@ } return $msg; } + /** * create a link to an overview page */ @@ -1389,7 +1455,6 @@ return $r; } - /** * get the local file list for uploading into tutos * formatted as html select Index: file_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_ins.php,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- file_ins.php 28 Sep 2009 11:30:28 -0000 1.33 +++ file_ins.php 29 Sep 2009 14:49:38 -0000 1.34 @@ -26,17 +26,58 @@ $msg = ''; +if ( empty($_POST['gotourl']) ) { + $gotourl = "file/file_new.php"; +} else { + $gotourl = $_POST['gotourl']; +} + $f = new tutos_file($dbconn); +// handle the alternative way of creating an filelink +if (isset($_POST['alt']) && $_POST['alt'] == 1) { + if ( isset($_REQUEST['file3fn']) ) { + $m = check_field(StripSlashes($_POST['file3fn']),"file3fn","file3l",array(usedocmanagement)); + if ( is_object($m) ) { + $f = $m; + } + } + + + if ( !isset($_REQUEST['link_id']) ) { + $msg .= sprintf($lang['Err0009'],$lang['FileReference']) ."<br />"; + } else { + $j = $_REQUEST['link_id']; + $l = getObject($f->dbconn,$j); + $gotourl = addUrlParameter($gotourl,"link_id=". UrlEncode($l->id),true); + } + + if ( $msg == "" ) { + if (is_object($l) && is_object($f)) { + $f->addReference($l); + $gotourl = $l->getUrl(); + + $dbconn->Begin("WORK"); + $msg .= $f->save(); + $dbconn->Commit("WORK"); + } + + } + + $gotourl = addMessage($gotourl,$msg,true); + $gotourl = addSessionKey($gotourl,true); + + Header("Status: 302 Moved Temporarily"); + Header("Location: ". dirname(getBaseUrl()) ."/". $gotourl); + $dbconn->Close(); + exit; +} + + /* Check Input */ $log = ""; # $links = array(); -if ( empty($_POST['gotourl']) ) { - $gotourl = "file/file_new.php"; -} else { - $gotourl = $_POST['gotourl']; -} if ( isset($_REQUEST['id']) ) { $f = $f->read($_REQUEST['id'],$f); @@ -44,8 +85,7 @@ $f->readLinks(); } if ( $f->id == -1 ) { -# Versioning System could only be set at first save - + // Versioning System could only be set at first save if ( isset($_REQUEST['vsys']) ) { $f->vsys = $_POST['vsys']; } @@ -102,7 +142,7 @@ } } -# delete references +// delete references if ( isset($_POST['del']) && is_array($_POST['del'])) { foreach($_POST['del'] as $i => $j) { unset($links[$j]); Index: hu.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/hu.p3,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- hu.p3 13 Mar 2008 11:02:25 -0000 1.11 +++ hu.p3 29 Sep 2009 14:49:38 -0000 1.12 @@ -51,6 +51,15 @@ $lang['FileChanged'] = "%s megváltozott %s-ról %s-ra"; $lang['FileDelSuccess'] = "\"%s\" fájl törölve"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "A(z) %s átmeneti fájl hiányzik. Talán túl nagy"; $lang['perm'][usedocmanagement] = "dokumentumkezelés használata"; @@ -60,4 +69,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: el.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/el.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- el.p3 13 Mar 2008 11:02:21 -0000 1.6 +++ el.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "ÏÏήÏη διαÏείÏιÏÎ·Ï ÎºÎµÎ¹Î¼ÎνÏν"; Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/zh.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- zh.p3 13 Mar 2008 11:02:34 -0000 1.6 +++ zh.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "use docmanagement"; Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/de.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- de.p3 16 Aug 2009 08:55:20 -0000 1.10 +++ de.p3 29 Sep 2009 14:49:38 -0000 1.11 @@ -53,6 +53,8 @@ $lang['FileDelSuccess'] = "Dokument \"%s\" gelöscht"; $lang['FileLocalInfo'] = "Local files in<br>%s"; +$lang['FileConnect'] = "ALTERNATIV: zu einem bestehendenDokument verbinden"; + $lang['FileConfig'] = "Dokumentenmanagement konfigurieren"; $lang['FileConfigHelpFilePerm'] = "Rechte für Dateien im Repository"; $lang['FileConfigHelpDirPerm'] = "Rechte für Verzeichnisse im Repository"; Index: sv.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/sv.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- sv.p3 13 Mar 2008 11:02:34 -0000 1.6 +++ sv.p3 29 Sep 2009 14:49:38 -0000 1.7 @@ -52,6 +52,15 @@ $lang['FileChanged'] = "Changed %s from %s to %s"; $lang['FileDelSuccess'] = "File \"%s\" deleted"; $lang['FileLocalInfo'] = "Local files in<br>%s"; + +$lang['FileConnect'] = "OR alternatively connect to an existing document"; + +$lang['FileConfig'] = "configure documentmanagement"; +$lang['FileConfigHelpFilePerm'] = "Permission for files in the repository"; +$lang['FileConfigHelpDirPerm'] = "Permission for directories in the repository"; +$lang['FileConfigHelpLocalAllow'] = "allow local uploads on the webserver\r\n(i.e. files are not uploaded but searched locally on the server in a defined directory)"; +$lang['FileConfigHelpLocalSearchPath'] = "direcory for local search on the server"; + $lang['File_Err001'] = "Temporary file %s missing. Maybe too big"; $lang['perm'][usedocmanagement] = "använd dokumenthantering"; @@ -61,4 +70,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> |
From: Gero K. <gok...@us...> - 2009-09-29 13:20:37
|
Update of /cvsroot/tutos/tutos/php/stc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1885 Modified Files: stc.pinc Log Message: fix Index: stc.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/stc/stc.pinc,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- stc.pinc 20 Aug 2009 10:41:46 -0000 1.15 +++ stc.pinc 29 Sep 2009 13:20:23 -0000 1.16 @@ -570,7 +570,7 @@ if (!$used_default && isset($this->states[$default]) && $default != STC_NOT_EXISTANT ) { $r .= '<option value="'.$default.'" style="background:'.$this->states[$default]->color.'"'; $r .= ' selected="selected"'; - $r .= '>3'; + $r .= '>'; $r .= $this->states[$default]->getFullName(); $r .= '</option>'."\n"; $used_default = true; |
From: Gero K. <gok...@us...> - 2009-09-29 11:40:06
|
Update of /cvsroot/tutos/tutos/php/testmanager In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25688 Modified Files: testrun_new.php Log Message: fix Index: testrun_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_new.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- testrun_new.php 14 Sep 2009 08:22:01 -0000 1.12 +++ testrun_new.php 29 Sep 2009 11:39:54 -0000 1.13 @@ -106,12 +106,17 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['TestrunSuiteB'],0,'test_id'); - $r .= ' <td colspan="5"><select name="test_id" id="test_id">'; - testsuite::obj_read($this->obj->ref); - foreach ($this->obj->ref->list[usetestsuite] as $i => $f) { - $r .= ' <option value="'.$i.'" '.($this->obj->test_id == $i ? 'selected="selected"':'').'>'.$f->getFullName()."</option>\n"; + if ( isset ($this->obj->id) && ( $this->obj->id != -1 ) ) { + $this->addhidden("test_id",$this->obj->test_id); + $r .= $this->showdata(is_object($this->obj->suite) ? $this->obj->suite->getLink():'',5); + } else { + $r .= ' <td colspan="5"><select name="test_id" id="test_id">'; + testsuite::obj_read($this->obj->ref); + foreach ($this->obj->ref->list[usetestsuite] as $i => $f) { + $r .= ' <option value="'.$i.'" '.($this->obj->test_id == $i ? 'selected="selected"':'').'>'.$f->getFullName()."</option>\n"; + } + $r .= " </select></td>\n"; } - $r .= " </select></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:45
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/note Modified Files: note.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- note.pinc 14 Sep 2009 11:11:51 -0000 1.80 +++ note.pinc 28 Sep 2009 11:30:28 -0000 1.81 @@ -94,7 +94,7 @@ $this->link_id = $current_user->id; $this->remember = new TUTOS_Date_Time(0); $this->tablename = $this->dbconn->prefix .$table['note'][name]; - $this->run_postinit_hook(); + $this->run_postinit_hook(); } /** * fill the object data with a given resultset @@ -571,6 +571,7 @@ ); return $x; } + /** * Return Info about connected notes to a object */ @@ -601,6 +602,7 @@ $r->free(); return; } + /** * delete note entries for a object */ @@ -648,13 +650,13 @@ $m->setSubject($this->replace_mail_tags($x->creator->lg['EmailRememberNote'],$x->creator->lg)); $x->make_mail_body($body,$x->creator); - $count1 = 0; - $body = preg_replace('/@ATTACH_NOTE@/','',$body,-1,$count1); + $count1 = 0; + $body = preg_replace('/@ATTACH_NOTE@/','',$body,-1,$count1); $m->addBody($body,$mformat,$lang['Note'],"",$x->creator->lg['content_encoding']); - if ($count1 > 0) { - $m->addBody($x->note,"text/plain",$lang['NoteDescription'],"",$x->creator->lg['content_encoding']); - } + if ($count1 > 0) { + $m->addBody($x->note,"text/plain",$lang['NoteDescription'],"",$x->creator->lg['content_encoding']); + } $msg .= $m->send(); $x->remember = new TUTOS_Date_Time(0); $x->save(); |
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php Modified Files: address.pinc address_overview.php address_show.php admin_show.php ajax.php base.pinc company.pinc custom.pinc db.p3 department.pinc location.pinc mail_ins.php module_base.pinc product.pinc res_cal_select.php task.pinc task_ins.php team.pinc timetrack.pinc webelements.p3 Log Message: rework of check_field and ajax to be more flexible in future Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- base.pinc 15 Sep 2009 08:18:54 -0000 1.129 +++ base.pinc 28 Sep 2009 11:30:27 -0000 1.130 @@ -206,7 +206,7 @@ acl_read($this); $g_hash[$this->id] = &$this; - $this->run_after_read_hook(); + $this->run_after_read_hook(); return; } /** @@ -307,7 +307,7 @@ $r = "<systemid>". $this->dbconn->db->systemid ."</systemid>\n"; $r .= "<id>". $this->id ."</id>\n"; $r .= "<creation>". $this->creation->exportXML_body() ."</creation>\n"; - // datetime of last modification + // datetime of last modification if ( $current_user->feature_ok(usehistory,PERM_SEE) ) { $d = history_get_lastmod($this); if ($d) { @@ -576,7 +576,7 @@ * get the info as text */ function getAsText (&$lang) { - // defaults to fullname + // defaults to fullname $r = ''; $r .= $this->getFullName() ."\n"; return $r; @@ -585,7 +585,7 @@ * get the modification info as text */ function getModText (&$lang) { -# defaults to fullname + // defaults to fullname $r = ''; $r .= "<table border=\"1\">\n"; $r .= ' <tr><th> </th><th>'.$lang['HistoryFld'].'</th><th>'.$lang['HistoryOldV'].'</th><th>'.$lang['HistoryNewV']."</th></tr>\n"; @@ -613,24 +613,28 @@ $r .= "</table>\n"; return $r; } + /** * get a url to this object */ function getURL () { return "showobject.php?id=".$this->id; } + /** * get a url to the modify page of this object */ function getModURL () { return "mytutos.php"; } + /** * get a url to the delete script of this object */ function getDelURL () { return "delobject.php?id=".$this->id; } + /** * get a link to this object */ @@ -640,6 +644,7 @@ } return makelink($this->getURL(),myentities($text),sprintf("%s",$this->getFullname())); } + /** * get a ulink to the objects history */ @@ -660,6 +665,7 @@ } return $ret; } + /** * get the timespan where this object is active * return a array with start, end , description @@ -722,6 +728,7 @@ return true; } } + /** * set and check a datetime field with value from GET */ @@ -738,6 +745,7 @@ return true; } } + /** * fill the internal neighbour list with possible objects where a object * currently attached/referncing to THIS could be reattached @@ -771,7 +779,6 @@ return $s; } - /** * add the custom fields to the query (called by save methods) */ @@ -817,6 +824,7 @@ # echo $x[type] ." ". $fld ." ". $this->$fld ."<br />"; } } + /** * Save object and references to this object from DB */ @@ -832,14 +840,15 @@ $msg .= acl_save($this); $msg .= history_save($this); - // all exiting objects are hashed so we do not need to save the id + // all exiting objects are hashed so we do not need to save the id if ( ! isset($g_hash[$this->id]) ) { $msg .= $this->save_obj_id(); $g_hash[$this->id] = &$this; } - $msg .= $this->run_postsave_hook(); + $msg .= $this->run_postsave_hook(); return $msg; } + /** * Save the object id (used for faster getObject) */ @@ -861,6 +870,7 @@ $r->free(); return $msg; } + /** * delete the object id (used for faster getObject) */ @@ -871,6 +881,7 @@ $r->free(); return $msg; } + /** * Delete object and references to this object from DB */ @@ -892,9 +903,10 @@ if (isset( $_SESSION['history'][$this->id] ) ) { unset( $_SESSION['history'][$this->id] ); } - $msg .= $this->run_postdel_hook(); + $msg .= $this->run_postdel_hook(); return $msg; } + /** * Transfer reference ids according to given table */ @@ -907,30 +919,35 @@ } return; } + /** * the type of this TUTOS object */ function getType () { return 'base'; } + /** * get the type id of object */ function getTypeId () { return noobject; } + /** * get the icon as a image html tag */ function getHtmlIcon () { return ''; } + /** * get the help index */ function getHelpIndex () { return ''; } + /** * resolve a history Tag (to be called from history_show) */ @@ -946,6 +963,7 @@ return 'TUTOS Object:'.$lang[$this->getType()].' '.$this->getFullName().' (ID='.$this->id.')'; } + /** * get a array with virtual groups */ @@ -956,6 +974,7 @@ $x[$this->getTypeId()][1] = $lang[$this->getType()].':Creator'; return $x; } + /** * get a array with virtual groups members */ @@ -974,6 +993,7 @@ } return $x; } + /** * calculate a virt group id by a given index */ @@ -981,19 +1001,19 @@ return -((-$this->getTypeId() << ACLSHIFT) + $i); } - /** - * - * - * run variuos custom code via hooks - * - * - */ + /** + * + * + * run variuos custom code via hooks + * + * + */ - /** - * called before save in order to manipulate things - * a false return should abort the save - */ - function run_presave_hook() { + /** + * called before save in order to manipulate things + * a false return should abort the save + */ + function run_presave_hook() { global $tutos; $r = ''; @@ -1006,13 +1026,13 @@ } } return $r; - } + } - /** - * called just after saving - * output will be appended to $msg - */ - function run_postsave_hook() { + /** + * called just after saving + * output will be appended to $msg + */ + function run_postsave_hook() { global $tutos; $r = ''; @@ -1025,13 +1045,13 @@ } } return $r; - } + } - /** - * called just after deleting - * output will be appended to $msg - */ - function run_postdel_hook() { + /** + * called just after deleting + * output will be appended to $msg + */ + function run_postdel_hook() { global $tutos; $r = ''; @@ -1044,13 +1064,13 @@ } } return $r; - } + } - /** - * called in the insert scripts - * output will be appended to $msg and disallow save - */ - function run_check_hook() { + /** + * called in the insert scripts + * output will be appended to $msg and disallow save + */ + function run_check_hook() { global $tutos; $r = ''; @@ -1063,13 +1083,13 @@ } } return $r; - } + } - /** - * called after reading in results - * in order to manipulate stuff read in - */ - function run_after_read_hook() { + /** + * called after reading in results + * in order to manipulate stuff read in + */ + function run_after_read_hook() { global $tutos; $r = ''; @@ -1082,13 +1102,13 @@ } } return $r; - } + } - /** - * called at the end of init - * - */ - function run_postinit_hook() { + /** + * called at the end of init + * + */ + function run_postinit_hook() { global $tutos; $r = ''; @@ -1101,6 +1121,13 @@ } } return $r; - } + } + + /** + * search objects of this class by name + */ + function search_by_name(&$arr,&$user,$name,$mode = 1) { + return 0; + } } ?> \ No newline at end of file Index: mail_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/mail_ins.php,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- mail_ins.php 29 Mar 2009 18:25:40 -0000 1.41 +++ mail_ins.php 28 Sep 2009 11:30:27 -0000 1.42 @@ -156,7 +156,7 @@ # $msg .= "<br />". $m->getToAscii(); } if ($tutos[fckeditor] == 1) { - $m->addBody(strtr(ereg_replace("\r\n", "\n", StripSlashes($_POST['body'])), "\r", "\n"), "text/html", "TUTOS", "", $lang['content_encoding']); + $m->addBody(strtr(ereg_replace("\r\n", "\n", StripSlashes("<html></body>".$_POST['body'])."</body></html>"), "\r", "\n"), "text/html", "TUTOS", "", $lang['content_encoding']); } else { $m->addBody(strtr(ereg_replace("\r\n", "\n", StripSlashes($_POST['body'])), "\r", "\n"), "text/plain", "TUTOS", "", $lang['content_encoding']); } Index: ajax.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/ajax.php,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ajax.php 20 Aug 2009 10:40:54 -0000 1.13 +++ ajax.php 28 Sep 2009 11:30:27 -0000 1.14 @@ -54,7 +54,15 @@ echo '<?xml version="1.0" encoding="'. $lang['content_encoding'] .'" ?>'."\n"; echo '<tutos generated="'.time().'">'."\n"; -$grp = $_REQUEST["grp"]; +$grp = json_decode($_REQUEST["grp"]); +$mods = json_decode(base64_decode($_REQUEST["mods"])); + +if (!is_array($grp)) { + echo '</tutos>'."\n"; + return; +} + + $item = 0; $cut = false; $id = -1; @@ -70,90 +78,36 @@ $filter = ''; } - -if (strstr($grp,'a')) { - $r = array(); - $cnt = 0; - tutos_address::search_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } -} -if (strstr($grp,'t')) { - $r = array(); - $cnt = 0; - team::search_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } -} -if (strstr($grp,'p')) { - require_once 'product.pinc'; - $r = array(); - $cnt = 0; - product::search_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } -} -if (strstr($grp,'c')) { - $r = array(); - $cnt = 0; - company::search_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } -} -if (strstr($grp,'d')) { - $r = array(); - $cnt = 0; - department::search_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } +foreach($mods as $c => $m) { +# error_log('Load '.$c .' '.$m."\r\n",3,$tutos[errlog]); + loadmodule($m); } -// search for roles in a given project -if (strstr($grp,'R') && $id != -1) { - require_once 'product.pinc'; + +foreach ($grp as $c) { $r = array(); - $obj = getObject($dbconn,$id); - if (method_exists($obj,'search_roles_by_name')) { - $cnt = 0; - $obj->search_roles_by_name($r,$current_user,$item); - foreach ($r as $a => $b) { - echo add_item ($b); - if($cnt++ == 5) { - $cut = true; - break; - } - } - } -} + $cnt = 0; +# error_log('|'.$c.'| '.$item.' '.json_encode($mods)."\r\n",3,$tutos[errlog]); -// Search Filenames in Upload Dir -read_config_values_by_tag($current_user->dbconn,array('file')); -if ($tutos['file_local_allow']) { - if (strstr($grp,'f')) { + if ($c == 'R') { + // search for roles in a given project + if ($id == -1) continue; + require_once 'product.pinc'; + $obj = getObject($dbconn,$id); + if (method_exists($obj,'search_roles_by_name')) { + $obj->search_roles_by_name($r,$current_user,$item); + foreach ($r as $a => $b) { + echo add_item ($b); + if($cnt++ == 5) { + $cut = true; + break; + } + } + } + continue; + } else if ($c == 'f') { + if (! $tutos['file_local_allow']) continue; + // Search Filenames in Upload Dir + read_config_values_by_tag($current_user->dbconn,array('file')); echo add_filename ('-',0); if ($dh = opendir($tutos['file_local_searchpath'])) { while (($file = readdir($dh)) !== false) { @@ -171,8 +125,24 @@ echo ' <error>nodir'."\n"; echo ' </error>'."\n"; } + continue; + } + + if (!isset($tutos['classes'][$c])) continue; +# error_log('Check '.$tutos['classes'][$c]."\r\n",3,$tutos[errlog]); + $x = new $tutos['classes'][$c]($dbconn); + $xcnt = $x->search_by_name($r,$current_user,$item); +# error_log('Found '.$xcnt."\r\n",3,$tutos[errlog]); + foreach ($r as $a => $b) { + echo add_item ($b); + if($cnt++ == 5) { + $cut = true; + break; + } } } + + if ($cut) { echo ' <limited>'."\n"; echo ' </limited>'."\n"; Index: location.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/location.pinc,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- location.pinc 15 Sep 2009 08:18:54 -0000 1.98 +++ location.pinc 28 Sep 2009 11:30:27 -0000 1.99 @@ -153,7 +153,7 @@ $this->tablename = $this->dbconn->prefix .$table['location'][name]; $this->tablename2 = $this->dbconn->prefix .$table['address1'][name]; - $this->run_postinit_hook(); + $this->run_postinit_hook(); } /** * read the referenced object Index: timetrack.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack.pinc,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- timetrack.pinc 5 Aug 2009 08:40:51 -0000 1.99 +++ timetrack.pinc 28 Sep 2009 11:30:27 -0000 1.100 @@ -476,7 +476,7 @@ if ($this->wday->ts < $this->ref->r_start->ts) { $this->ref->setRStart($this->wday); } - } + } if ( $this->ref->r_end->notime == 1 ) { $this->ref->setREnd($this->wday); } else { Index: res_cal_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/res_cal_select.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- res_cal_select.php 29 Jun 2009 08:55:51 -0000 1.8 +++ res_cal_select.php 28 Sep 2009 11:30:27 -0000 1.9 @@ -94,7 +94,7 @@ $this->name = $lang['ResCal']; $this->center = true; $this->css_class = 'selectbox'; - $this->base = null; + $this->base = null; // TODO permission check if ( isset($_GET['id']) ) { Index: department.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/department.pinc,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- department.pinc 15 Sep 2009 08:18:54 -0000 1.77 +++ department.pinc 28 Sep 2009 11:30:27 -0000 1.78 @@ -32,27 +32,27 @@ $this->invlist = array(); $this->member = array(); $this->acl[$current_user->id] = $tutos[delok]; - $this->run_postinit_hook(); + $this->run_postinit_hook(); } - /** - * - */ - function read_result ( &$r,$pos ) { - if ( ! isset($pos) ) return; + /** + * + */ + function read_result ( &$r,$pos ) { + if ( ! isset($pos) ) return; - $this->c_id = $r->get($pos, "c_id"); - $this->name = $r->get($pos, "name"); - if (empty($this->name) ) { - $this->name = "?"; - } - if ( !empty($this->c_id) ) { - $this->company = $this->company->read($this->c_id,$this->company); + $this->c_id = $r->get($pos, "c_id"); + $this->name = $r->get($pos, "name"); + if (empty($this->name) ) { + $this->name = "?"; + } + if ( !empty($this->c_id) ) { + $this->company = $this->company->read($this->c_id,$this->company); + } + $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); + parent::read_result($r,$pos); + return; } - $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); - parent::read_result($r,$pos); - return; - } /** * Read all locations references @@ -115,36 +115,41 @@ * mode 0 do not fill objects */ function search_by_name(&$arr,&$user,$name,$mode = 1) { - if ( trim($name) == "" ) return; + global $table; + + if ( trim($name) == "" ) return 0; - $pos = strpos($name," / "); - if ( $pos == false ) { - $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix ."departments WHERE". $user->dbconn->Like("name",$name); - $q .= " order by name "; - } else { - $dname = substr($name,0,$pos); - $cname = substr($name,$pos + 3); - $q = "SELECT ".($mode == 1 ? 'd.*':'d.id')." from ". $user->dbconn->prefix ."departments d , ". $user->dbconn->prefix ."companies c WHERE (c.id = d.c_id) AND (". $user->dbconn->Like("d.name",$dname) .") AND (". $user->dbconn->Like("c.name",$cname) .")"; - $q .= " order by c.name,d.name "; - } - check_dbacl($user->dbconn, $q, $user->id); - $r = $user->dbconn->Exec($q); - $n = $r->numrows(); - $a = 0; - while ( $a < $n ) { - if ($mode == 1) { - $x = new department($user->dbconn); - $x->read_result($r,$a); - $arr[$x->id] = &$x; - unset($x); - } else { - $id = $r->get($a,'id'); - $arr[$id] = $id; - } - $a++; - } - $r->free(); - return; + $pos = strpos($name," / "); + if ( $pos == false ) { + $q = "SELECT ".($mode == 1 ? '*':'id')." from "; + $q .= $user->dbconn->prefix.$table['department'][name]." WHERE". $user->dbconn->Like("name",$name); + $q .= " order by name "; + } else { + $cname = substr($name,0,$pos); + $dname = substr($name,$pos + 3); + $q = "SELECT ".($mode == 1 ? 'd.*':'d.id')." from "; + $q .= $user->dbconn->prefix .$table['department'][name].' d , '. $user->dbconn->prefix .$table['company'][name].' c '; + $q .= ' WHERE (c.id = d.c_id) AND ('. $user->dbconn->Like("d.name",$dname) .") AND (". $user->dbconn->Like("c.name",$cname) .")"; + $q .= " order by c.name,d.name "; + } + check_dbacl($user->dbconn, $q, $user->id); + $r = $user->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ( $a < $n ) { + if ($mode == 1) { + $x = new department($user->dbconn); + $x->read_result($r,$a); + $arr[$x->id] = &$x; + unset($x); + } else { + $id = $r->get($a,'id'); + $arr[$id] = $id; + } + $a++; + } + $r->free(); + return $n; } /** @@ -252,7 +257,7 @@ list ($j,$l) = @each ($this->location); $url = "department_new.php?id=". $this->id ."&loc_id=". $l->id; } else { - $url = "department_new.php?id=". $this->id; + $url = "department_new.php?id=". $this->id; } return $url; } @@ -264,23 +269,23 @@ return $this->company->getUrl(); } - /** - * Return a link to this department - */ - function getLink($text = "") { - global $lang; + /** + * Return a link to this department + */ + function getLink($text = "") { + global $lang; - if ($this->id == -1) return; + if ($this->id == -1) return; - if ( empty($text) ) { - $text = $this->getFullName(); - } - if ( $this->see_ok() ) { - return makelink($this->getURL() , myentities($text), sprintf($lang['DepLinkInfo'],$this->name,$this->company->getFullName()) ); - } else { - return myentities($text); + if ( empty($text) ) { + $text = $this->getFullName(); + } + if ( $this->see_ok() ) { + return makelink($this->getURL() , myentities($text), sprintf($lang['DepLinkInfo'],$this->name,$this->company->getFullName()) ); + } else { + return myentities($text); + } } - } /** * get the Full Name @@ -325,70 +330,70 @@ department::obj_read($obj); if ( count($obj->list[usedepartment]) > 0 ) { - $r .= "<tr>\n"; - $r .= $user->layout->showfield($lang['Departments']); - $r .= " <td valign=\"top\" colspan=\"".($cols-1)."\">\n"; - $pre = ""; - foreach($obj->list[usedepartment] as $i => $f) { - $r .= $pre . $obj->list[usedepartment][$i]->getLink($obj->list[usedepartment][$i]->name) ."\n"; - $pre = "<br />\n"; - } - $r .= " </td>\n"; - $r .= "</tr>\n"; + $r .= "<tr>\n"; + $r .= $user->layout->showfield($lang['Departments']); + $r .= " <td valign=\"top\" colspan=\"".($cols-1)."\">\n"; + $pre = ""; + foreach($obj->list[usedepartment] as $i => $f) { + $r .= $pre . $obj->list[usedepartment][$i]->getLink($obj->list[usedepartment][$i]->name) ."\n"; + $pre = "<br />\n"; + } + $r .= " </td>\n"; + $r .= "</tr>\n"; } return $r; } - /** - * create a link where a departmenty could be added - */ - static function getaddlink (&$user,&$obj,$text = "") { - global $lang; + /** + * create a link where a departmenty could be added + */ + static function getaddlink (&$user,&$obj,$text = "") { + global $lang; - if (! is_object($obj) ) return ""; - if (! $obj->see_ok() ) return ""; + if (! is_object($obj) ) return ""; + if (! $obj->see_ok() ) return ""; - if ( $obj->gettype() == "department" ) { - $x = array( url => "department_new.php?cid=". $obj->company->id, - confirm => false, - text => ($text == "" ? $lang['DepartmentCreate']:$text), - info => sprintf($lang['DepCreateInfo'], $obj->company->getFullName()), - category => array("department","new","obj") - ); - } else { - $x = array( url => "department_new.php?cid=". $obj->id, - confirm => false, - text => ($text == "" ? $lang['DepartmentCreate']:$text), - info => sprintf($lang['DepCreateInfo'], $obj->getFullName()), - category => array("department","new","module") - ); + if ( $obj->gettype() == "department" ) { + $x = array( url => "department_new.php?cid=". $obj->company->id, + confirm => false, + text => ($text == "" ? $lang['DepartmentCreate']:$text), + info => sprintf($lang['DepCreateInfo'], $obj->company->getFullName()), + category => array("department","new","obj") + ); + } else { + $x = array( url => "department_new.php?cid=". $obj->id, + confirm => false, + text => ($text == "" ? $lang['DepartmentCreate']:$text), + info => sprintf($lang['DepCreateInfo'], $obj->getFullName()), + category => array("department","new","module") + ); + } + return $x; } - return $x; - } - /** - * Read all departments for given company - */ - static function obj_read(&$obj) { + /** + * Read all departments for given company + */ + static function obj_read(&$obj) { - if (! is_object($obj) ) return; - if ( isset($obj->list[usedepartment]) ) return; + if (! is_object($obj) ) return; + if ( isset($obj->list[usedepartment]) ) return; - $obj->list[usedepartment] = array(); + $obj->list[usedepartment] = array(); - $q = "SELECT * FROM ". $obj->dbconn->prefix ."departments WHERE c_id = ". $obj->id ." ORDER BY name"; - $r = $obj->dbconn->Exec($q); - $n = $r->numrows(); - $a = 0; - while ( $a < $n ) { - $x = new department($obj->dbconn); - $x->read_result($r,$a); - $obj->list[usedepartment][$x->id] = &$x; - $a++; - unset($x); + $q = "SELECT * FROM ". $obj->dbconn->prefix ."departments WHERE c_id = ". $obj->id ." ORDER BY name"; + $r = $obj->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ( $a < $n ) { + $x = new department($obj->dbconn); + $x->read_result($r,$a); + $obj->list[usedepartment][$x->id] = &$x; + $a++; + unset($x); + } + $r->free(); + return; } - $r->free(); - return; - } /** * delete departments of an object @@ -400,7 +405,7 @@ if ( count($obj->list[usedepartment]) > 0 ) { foreach ($obj->list[usedepartment] as $i => $f) { $msg .= $obj->list[usedepartment][$i]->delete(); - } + } } return $msg; } @@ -418,4 +423,5 @@ return $r; } } +$tutos['classes'][usedepartment] = 'department'; ?> \ No newline at end of file Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.376 retrieving revision 1.377 diff -u -d -r1.376 -r1.377 --- webelements.p3 17 Sep 2009 16:54:32 -0000 1.376 +++ webelements.p3 28 Sep 2009 11:30:27 -0000 1.377 @@ -151,26 +151,33 @@ $r .= " </select>\n"; return $r; } + /** * some standard procedures after reading */ Function ReadLangFinish(&$lang,$type) { -# echo ">ReadFinish:".count($lang). " ". $type ."<br />\n"; // Set the common fields // Object Types - $lang['team'] = &$lang['Team']; - $lang['product'] = &$lang['ProductP']; - $lang['address'] = &$lang['Address']; - $lang['user'] = &$lang['User']; - $lang['appointment'] = &$lang['Appointment']; - $lang['department'] = &$lang['Department']; - $lang['company'] = &$lang['Company']; - $lang['task'] = &$lang['Task']; - $lang['timetrack'] = &$lang['Timetrack']; - $lang['database'] = &$lang['DB']; - $lang['location'] = &$lang['Location']; + $lang['team'] = &$lang['Team']; + $lang[useteams] = &$lang['Team']; + $lang['product'] = &$lang['ProductP']; + $lang[useprojects] = &$lang['ProductP']; + $lang['address'] = &$lang['Address']; + $lang[useaddressbook] = &$lang['Address']; + $lang['task'] = &$lang['Task']; + $lang[usetaskmanagement] = &$lang['Task']; + $lang['company'] = &$lang['Company']; + $lang[usecompany] = &$lang['Company']; + $lang['department'] = &$lang['Department']; + $lang[usedepartment] = &$lang['Department']; -# Aliases + $lang['user'] = &$lang['User']; + $lang['appointment'] = &$lang['Appointment']; + $lang['timetrack'] = &$lang['Timetrack']; + $lang['database'] = &$lang['DB']; + $lang['location'] = &$lang['Location']; + + // Aliases if (isset($lang['ProdRole'])) { foreach ($lang['ProdRole'] as $r => $x) { $lang['ProdRole'.$r] = &$lang['ProdRole'][$r]; @@ -462,7 +469,7 @@ if ( isset($_SERVER['HTTP_REFERER']) ) { $msg .= "Referer:\t". $_SERVER['HTTP_REFERER'] ."\n"; } - if (is_object($current_user)) { + if (is_object($current_user) && isset($lang['AdrFormat2'])) { $msg .= "TUTOS User:\t". $current_user->getFullName() ."\n"; } $msg .= "TUTOS Version:\t". $tutos[version] ."\n"; @@ -592,6 +599,7 @@ trigger_error("TUTOS FATAL Error:\n\t".$text1."\n\t".$text2); exit; } + /** * Print the parts of header neccessary for overlib */ @@ -621,6 +629,7 @@ echo "<!-- LOOKING for a readable overlib in : ". $o1 ."-->\n\n"; } } + /** * The start of a double table */ @@ -633,7 +642,8 @@ $r .= "<table class=\"inner\" border=\"0\" cellpadding=\"". $innerpad ."\" cellspacing=\"". $innersp ."\">\n"; return $r; } -/* + +/** * The start of a double table */ Function DoubleTableEnd() { @@ -736,20 +746,22 @@ return $r; } } + /** * remove html */ function removehtml($s) { # return html_entity_decode($s); - $s = preg_replace("/<[\/]?[bui]+>/i","",$s); - $s = preg_replace("/"/",'"',$s); - $s = preg_replace("/</",'<',$s); - $s = preg_replace("/>/",'>',$s); - $s = preg_replace("/&/",'&',$s); - $s = preg_replace("/ /",' ',$s); - $s = preg_replace("/→/",'â',$s); - return $s; + $s = preg_replace("/<[\/]?[bui]+>/i","",$s); + $s = preg_replace("/"/",'"',$s); + $s = preg_replace("/</",'<',$s); + $s = preg_replace("/>/",'>',$s); + $s = preg_replace("/&/",'&',$s); + $s = preg_replace("/ /",' ',$s); + $s = preg_replace("/→/",'â',$s); + return $s; } + /** * substitute image tags with links */ @@ -872,6 +884,7 @@ } return $href; } + /** * store message for display on next page */ @@ -882,12 +895,14 @@ } return $gotourl; } + /** * store badfield names in url for next page */ Function addBadField($gotourl,$msg,$http = false) { return addUrlParameter($gotourl,"bad[]=". urlencode($msg),$http); } + /** * add keys to a url * @@ -948,6 +963,7 @@ } return $href . $add; } + /** * print the hidden Form Elements * @@ -979,6 +995,7 @@ } return $r; } + /** * create a link in navigation menu */ @@ -998,6 +1015,7 @@ return sprintf ("<a class=\"nodeco\" href=\"%s\" %s "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,$attr,myentities($info,1),myentities($info),$text); } } + /** * create a link */ @@ -1024,6 +1042,7 @@ return sprintf ("<a href=\"%s\" $target "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,myentities($info,1),myentities($info),$text); } } + /** * create a link with confirmation * @@ -1042,6 +1061,7 @@ return sprintf ("<a class=\"nodeco\" href=\"%s\" "if (! confirm('%s ?')) { return false };\" "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,myentities($info,1),myentities($info,1),myentities($info),$text); } } + /** * check a field for a time formatted as HH:MM * the reformated thing is stored as float in the given variable @@ -1056,6 +1076,7 @@ } return false; } + /** * check a field for a float * the reformated float is stored in the given variable @@ -1116,7 +1137,7 @@ return $arr; } -/* --------------------------------------------------------------------------- +/** * check a given name * field = name in url * field2 = arrayname for selections url @@ -1133,10 +1154,42 @@ Function check_field($name,$field,$field2,$mode = "at",$obj = null) { global $tutos,$dbconn,$msg,$gotourl,$lang,$current_user; +#echo $name .'|'.$field.'|'.$field2.'|'.$mode."<br />"; $gotourl= addUrlParameter($gotourl,$field."=".UrlEncode($name),true); if ( empty($name) ) { return 0; } + + // mode sould be a array of object types + $ma = array(); // mode array + if (!is_array($mode)) { + if ( strstr($mode,"a") != FALSE ) { + $ma[] = useaddressbook; + } + if ( strstr($mode,"t") != FALSE ) { + $ma[] = useteams; + } + if ( strstr($mode,"c") != FALSE ) { + $ma[] = usecompany; + } + if ( strstr($mode,"d") != FALSE ) { + $ma[] = usedepartment; + } + if ( strstr($mode,"p") != FALSE ) { + $ma[] = useprojects; + } + // search roles and stakeholders only + if ( strstr($mode,"R") != FALSE ) { + $ma[] = 'R'; + } + if ( strstr($mode,"i") != FALSE ) { + $ma[] = useinstmanagement; + } + } else { + $ma = $mode; + } + unset($mode); + $n = 0; $n1 = 0; $n2 = 0; @@ -1144,6 +1197,8 @@ $n4 = 0; $n5 = 0; $n6 = 0; + $res = array(); + $nullmsg = ''; // search for a given object ID $qid = ''; @@ -1155,107 +1210,39 @@ } } - if ( strstr($mode,"a") != FALSE ) { - $q1 = 'SELECT * from '. $dbconn->prefix .'addresses WHERE'. $dbconn->Like ("f_name",$name,"m_name","l_name"); - $q1 .= ' OR '. $dbconn->Like ("l_name",$name,"f_name","m_name"); - $q1 .= $qid; - check_dbacl($dbconn, $q1, $current_user->id); - $r1 = $dbconn->Exec($q1); - $n1 = $r1->numrows(); - $n += $n1; - } - if ( strstr($mode,"t") != FALSE ) { - $q2 = 'SELECT * from '. $dbconn->prefix .'teams WHERE'. $dbconn->Like ("name",$name); - $q2 .= $qid; - check_dbacl($dbconn, $q2, $current_user->id); - $r2 = $dbconn->Exec($q2); - $n2 = $r2->numrows(); - $n += $n2; - } - if ( strstr($mode,"d") != FALSE ) { - // in order to find equally named departement within companies we try - // to use the first word as a company search string - $pos = strpos($name," / "); - if ( $pos == false ) { - $q3 = "SELECT * from ". $dbconn->prefix ."departments WHERE". $dbconn->Like("name",$name); - $q3 .= $qid; - check_dbacl($dbconn, $q3, $current_user->id); - } else { - $cname = trim(substr($name,0,$pos)); - $dname = trim(substr($name,$pos + 3)); - $q3 = "SELECT d.* from ". $dbconn->prefix ."departments d , ". $dbconn->prefix ."companies c WHERE (c.id = d.c_id) AND (". $dbconn->Like("d.name",$dname) .") AND (". $dbconn->Like("c.name",$cname) .")"; - $q3 .= $qid2; -# echo $dname . " | ". $cname ."<br />".$q3; - } - $r3 = $dbconn->Exec($q3); - $n3 = $r3->numrows(); - $n += $n3; - } - if ( strstr($mode,"c") != FALSE ) { - $q4 = "SELECT * from ". $dbconn->prefix ."companies WHERE". $dbconn->Like("name",$name); - $q4 .= $qid; - check_dbacl($dbconn, $q4, $current_user->id); - $r4 = $dbconn->Exec($q4); - $n4 = $r4->numrows(); - $n += $n4; - } - if ( strstr($mode,"p") != FALSE ) { - $q5 = "SELECT * from ". $dbconn->prefix ."products WHERE". $dbconn->Like("name",$name,"version"); - $q5 .= $qid; - check_dbacl($dbconn, $q5, $current_user->id); - $r5 = $dbconn->Exec($q5); - $n5 = $r5->numrows(); - $n += $n5; - } - if ( class_exists( 'installation') && (strstr($mode,"i") != FALSE) ) { - $q6 = "SELECT * from ". $dbconn->prefix ."installations WHERE". $dbconn->Like("id",$name); - $q6 .= $qid; - check_dbacl($dbconn, $q6, $current_user->id); - $r6 = $dbconn->Exec($q6); - $n6 = $r6->numrows(); - $n += $n6; - } - // search roles and stakeholders only - if ( strstr($mode,"R") != FALSE && is_object($obj) && isset($obj->search_id)) { - // search_by_role - $r7 = array(); - $sobj = getObject($obj->dbconn,$obj->search_id); - if (method_exists($sobj,'search_roles_by_name')) { - $sobj->search_roles_by_name($r7,$obj,$name); - $n7 = count($r7); - $n += $n7; - unset($sobj); - } - } + foreach ($ma as $c) { + if ($c == 'R') { + continue; + if (!is_object($obj) || !isset($obj->search_id)) { + continue; + } + $sobj = getObject($obj->dbconn,$obj->search_id); + if (method_exists($sobj,'search_roles_by_name')) { + $cnt = $sobj->search_roles_by_name($res,$obj,$name); + $n += $cnt; + unset($sobj); + } + $nullmsg .= sprintf($lang['Err0012'],$lang['ProdRoles'],$name) ."<br />"; +# echo ' = '.$cnt."<br />"; + continue; + } + +# echo 'CHECK:'.$c.' '.$lang[$c]; + $x = new $tutos['classes'][$c]($dbconn); + $cnt = $x->search_by_name($res,$current_user,$name,1); + if ($cnt == 0) { + $nullmsg .= sprintf($lang['Err0012'],$lang[$c],$name) ."<br />"; + } +# echo ' = '.$cnt."<br />"; + $n += $cnt; + unset($x); + } + if ( 0 == $n) { - if ( strstr($mode,"c") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['Company'],$name) ."<br />"; - $r4->free(); - } - if ( strstr($mode,"d") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['Department'],$name) ."<br />"; - $r3->free(); - } - if ( strstr($mode,"t") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['Team'],$name) ."<br />"; - $r2->free(); - } - if ( strstr($mode,"a") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['Address'],$name) ."<br />"; - $r1->free(); - } - if ( strstr($mode,"p") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['ProductP'],$name) ."<br />"; - $r5->free(); - } - if ( class_exists( 'installation') && (strstr($mode,"i") != FALSE) ) { - $msg .= sprintf($lang['Err0012'],$lang['Installation'],$name) ."<br />"; - $r6->free(); - } - if ( strstr($mode,"R") != FALSE ) { - $msg .= sprintf($lang['Err0012'],$lang['ProdRoles'],$name) ."<br />"; - } + $msg .= $nullmsg; + +#echo $msg ."<br />"; return 0; } if ( $n > $tutos[maxselect] ) { @@ -1270,105 +1257,18 @@ $msg .= sprintf($lang['Err0018'],$name,$n) ."<br />"; // Ask for detailed selection $msg .= $lang['Err0006'] ."<br />"; - if ( strstr($mode,"a") != FALSE ) { - $a = 0; - while ( $a < $n1 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r1->get($a, "id"),true); - $a++; - } - $r1->free(); - } - if ( strstr($mode,"t") != FALSE ) { - $a = 0; - while ( $a < $n2 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r2->get($a, "id"),true); - $a++; - } - $r2->free(); - } - if ( strstr($mode,"d") != FALSE ) { - $a = 0; - while ( $a < $n3 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r3->get($a, "id"),true); - $a++; - } - $r3->free(); - } - if ( strstr($mode,"c") != FALSE ) { - $a = 0; - while ( $a < $n4 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r4->get($a, "id"),true); - $a++; - } - $r4->free(); - } - if ( strstr($mode,"p") != FALSE ) { - $a = 0; - while ( $a < $n5 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r5->get($a, "id"),true); - $a++; - } - $r5->free(); - } - if ( class_exists( 'installation') && (strstr($mode,"i") != FALSE) ) { - $a = 0; - while ( $a < $n6 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r6->get($a, "id"),true); - $a++; - } - $r6->free(); - } - if ( strstr($mode,"R") != FALSE ) { - $a = 0; - while ( $a < $n7 ) { - $gotourl = addUrlParameter($gotourl,$field2."[]=".$r7[$a],true); - $a++; - } - } + + foreach ($res as $i => $j) { + $gotourl = addUrlParameter($gotourl,$field2."[]=".$i,true); +#echo 'found:'.$j ."<br />"; + } return 0; } - if ( $n1 == 1 ) { - $a = new tutos_address($dbconn); - $a->read_result($r1,0); - } elseif ( $n2 == 1 ) { - $a = new team($dbconn); - $a->read_result($r2,0); - } elseif ( $n3 == 1 ) { - $a = new department($dbconn); - $a->read_result($r3,0); - } elseif ( $n4 == 1 ) { - $a = new company($dbconn); - $a->read_result($r4,0); - } elseif ( $n5 == 1 ) { - $a = new product($dbconn); - $a->read_result($r5,0); - } elseif ( class_exists( 'installation') && ($n6 == 1) ) { - $a = new installation($dbconn); - $a->read_result($r6,0); - } elseif ( $n7 == 1 ) { - foreach($r7 as $a) { - break; - } - } - if ( strstr($mode,"a") != FALSE ) { - $r1->free(); - } - if ( strstr($mode,"t") != FALSE ) { - $r2->free(); - } - if ( strstr($mode,"d") != FALSE ) { - $r3->free(); - } - if ( strstr($mode,"c") != FALSE ) { - $r4->free(); - } - if ( strstr($mode,"p") != FALSE ) { - $r5->free(); - } - if ( class_exists( 'installation') && (strstr($mode,"i") != FALSE) ) { - $r6->free(); - } + foreach($res as $a) { + break; + } + if (! $a->see_ok()) { $msg .= sprintf($lang['Err0012'],$lang[$a->getType()],$name) ."<br />"; return 0; @@ -1377,9 +1277,11 @@ $msg .= sprintf($lang['Err0001'],$lang[$a->getType()],$a->getFullname()) ."<br />"; return 0; } +#echo 'RETURN:'.$a."<br />"; return $a; } -/* --------------------------------------------------------------------------- + +/** * enter a tax rate * */ @@ -1409,7 +1311,8 @@ } return $r; } -/* --------------------------------------------------------------------------- + +/** * enter a currency * */ @@ -1444,7 +1347,8 @@ return strcasecmp($a->getFullName(),$b->getFullName()); } -/* --------------------------------------------------------------------------- + +/** * find the object from a given id by scanning the tables * */ @@ -1491,7 +1395,8 @@ } return $type; } -/* --------------------------------------------------------------------------- + +/** * find the object from a given id * */ @@ -1615,27 +1520,27 @@ $ref = $ref->read($id,$ref); break; default: -# Check module + // Check module $ref = -1; - foreach ($tutos[modules] as $r => $x) { - if ( $x['perm'] == $type ) { - loadmodule($r); - $ref = &new $x[name]($dbconn); - if ( ! method_exists($ref,'read') ) { - echo "missing read method ". $id ." ". $r ."<br />"; - } - $ref = $ref->read($id,$ref); - if ( is_object($ref) && ($ref->id == $id) ) { - break; + foreach ($tutos[modules] as $r => $x) { + if ( $x['perm'] == $type ) { + loadmodule($r); + $ref = &new $x[name]($dbconn); + if ( ! method_exists($ref,'read') ) { + echo "missing read method ". $id ." ". $r ."<br />"; + } + $ref = $ref->read($id,$ref); + if ( is_object($ref) && ($ref->id == $id) ) { + break; + } + $ref = -1; } - $ref = -1; } - } - break; + break; } -# if we are here we have found something that has no entry in -# the hashtable + // if we are here we have found something that has no entry in + // the hashtable if( (is_object($ref)) && ! $found_by_hash ) { $g_hash['fail']++; $ref->save_obj_id(); @@ -1649,6 +1554,7 @@ } return $ref; } + /** * preset a object from check_field results */ @@ -1676,6 +1582,7 @@ } } } + /** * make a selection list by given array of form [id] = $obj * obj == Object holding the lists @@ -1685,6 +1592,45 @@ Function select_from_array_or_input(&$obj,$name,$sobj,$none,$grp,$size = 20) { global $lang,$tutos; + $ma = array(); + if (!is_array($grp)) { + if ( strstr($grp,"a") != FALSE ) { + $ma[] = useaddressbook; + } + if ( strstr($grp,"t") != FALSE ) { + $ma[] = useteams; + } + if ( strstr($grp,"c") != FALSE ) { + $ma[] = usecompany; + } + if ( strstr($grp,"d") != FALSE ) { + $ma[] = usedepartment; + } + if ( strstr($grp,"p") != FALSE ) { + $ma[] = useprojects; + } + // search roles and stakeholders only + if ( strstr($grp,"R") != FALSE ) { + $ma[] = 'R'; + } + if ( strstr($grp,"i") != FALSE ) { + $ma[] = useinstmanagement; + } + } else { + $ma = $grp; + } + + // colect the modules to load for ajax.php + $mods = array(); + foreach ($ma as $c) { + foreach ($tutos[modules] as $mi => $m) { + if ($m['perm'] == $c) { + $mods[$c] = $mi; + } + } + } + + $r = ''; if ( isset($obj->xl[$name]) && (count($obj->xl[$name]) > 0) ) { $r .= '<select id="'. $name .'" name="'. $name ."id\">\n"; @@ -1708,8 +1654,9 @@ $r .= "</select>\n"; } else { // AJAX stuff + $me = base64_encode(json_encode($mods)); if (!isset($obj->search_id)) $obj->search_id = -1; - $js = ' '; + $js = ' '; # $js = ' '; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { @@ -1724,6 +1671,7 @@ } return $r; } + /** * make a help link if possible * @@ -1746,7 +1694,6 @@ return $x; } - /** * Make some submit reset table entries * @@ -1782,6 +1729,7 @@ } return $r; } + /** * parse and use the values form the order-header function (see below) */ @@ -1805,11 +1753,12 @@ $query .= " ORDER by ". $def; } } + /** * add task ids of an object to a list */ Function add_task_ids(&$ref,&$q,&$sep) { -# Read the tasks + // Read the tasks $ref->readTasks(); if ( count($ref->fulltasklist) > 0 ) { foreach($ref->fulltasklist as $i => $f) { @@ -1820,6 +1769,7 @@ } } } + /** * add bug ids of an object to a list */ @@ -1836,11 +1786,12 @@ } } } + /** * add installation ids of an object to a list */ Function add_inst_ids(&$ref,&$q,&$sep) { -# Read the insts + // Read the installations if (! class_exists('installation')) { return; } @@ -1861,7 +1812,8 @@ function format_asText($label,$info) { return substr($label.str_repeat(" ",20),0,20) .": ". $info ."\n"; } -/* --------------------------------------------------------------------------- + +/** * Find a suitable mail template file for user $to */ function findMailTemplate($name,&$to,&$body,$path,&$mformat) { @@ -1937,6 +1889,7 @@ $body = join ('', file ($fn)); return true; } + /** * */ @@ -1950,6 +1903,7 @@ $text = str_replace('Â','-',$text); return eregi_replace("&#([0-9]{3,5});","&#\\1;",htmlspecialchars($text)); } + /** * convert text for pdf excel etc... */ @@ -1960,6 +1914,7 @@ } return iconv($lang['content_encoding'],'ISO-8859-1',$text); } + /** * convert text back from pdf excel etc... */ @@ -1970,6 +1925,7 @@ } return iconv('ISO-8859-1',$lang['content_encoding'],$text); } + /** * prepare a search pattern for reg expressions * i.e. escape everything that might be misinterpreted @@ -1983,7 +1939,9 @@ return $pattern; } - +/** + * load the graphics library + */ function load_jpgraph($arr,$path = '') { global $tutos,$msg; @@ -2096,6 +2054,7 @@ $r->free(); } + /** * write a config value */ @@ -2111,6 +2070,7 @@ $r = $dbconn->Exec($q); $r->free(); } + /** * delete a config value */ @@ -2121,6 +2081,7 @@ $r = $dbconn->Exec($q); $r->free(); } + /** * leave a insert script */ Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.190 retrieving revision 1.191 diff -u -d -r1.190 -r1.191 --- db.p3 15 Sep 2009 08:18:54 -0000 1.190 +++ db.p3 28 Sep 2009 11:30:27 -0000 1.191 @@ -444,6 +444,7 @@ $tutos['task_autoname'] = '%Y-%m-X'; $tutos['proxy_port'] = ''; $tutos['proxy_host'] = ''; + /* --------------------------------------------------------------------------- * Open the Database */ Index: team.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/team.pinc,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- team.pinc 29 Jun 2009 12:12:28 -0000 1.108 +++ team.pinc 28 Sep 2009 11:30:27 -0000 1.109 @@ -180,9 +180,11 @@ * mode 0 do not fill objects */ function search_by_name(&$arr,&$user,$name,$mode = 1) { - if ( trim($name) == "" ) return; + global $table; - $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix ."teams WHERE". $user->dbconn->Like ("name",$name); + if ( trim($name) == "" ) return 0; + + $q = 'SELECT '.($mode == 1 ? '*':'id').' from '. $user->dbconn->prefix.$table['team'][name] ." WHERE". $user->dbconn->Like ("name",$name); $q .= " order by name "; check_dbacl($user->dbconn, $q, $user->id); $r = $user->dbconn->Exec($q); @@ -202,7 +204,7 @@ } $r->free(); - return; + return $n; } /** @@ -693,4 +695,5 @@ return $r; } } +$tutos['classes'][useteams] = 'team'; ?> \ No newline at end of file Index: company.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/company.pinc,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- company.pinc 15 Sep 2009 08:18:54 -0000 1.75 +++ company.pinc 28 Sep 2009 11:30:27 -0000 1.76 @@ -38,7 +38,7 @@ $this->invlist = array(); $this->member = array(); $this->acl[$current_user->id] = $tutos[delok]; - $this->run_postinit_hook(); + $this->run_postinit_hook(); } /** @@ -139,9 +139,10 @@ * mode 0 do not fill objects */ function search_by_name(&$arr,&$user,$name,$mode = 1) { - if ( trim($name) == "" ) return; + global $table; - $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix ."companies WHERE". $user->dbconn->Like("name",$name); + if ( trim($name) == "" ) return 0; + $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix .$table['company'][name]." WHERE". $user->dbconn->Like("name",$name); $q .= " order by name "; check_dbacl($user->dbconn, $q, $user->id); $r = $user->dbconn->Exec($q); @@ -154,14 +155,14 @@ $arr[$x->id] = &$x; unset($x); } else { - $id = $r->get($a,'id'); - $arr[$id] = $id; + $id = $r->get($a,'id'); + $arr[$id] = $id; } $a++; } $r->free(); - return; + return $n; } /** @@ -297,100 +298,109 @@ return 'company_show.php?id='. $this->id; } - /** - * Return a url to modify this company - */ - function getModURL() { - if ( count($this->location) > 0 ) { - @reset($this->location); - list ($j,$l) = @each ($this->location); - $url = "company_new.php?id=". $this->id ."&loc_id=". $l->id; - } else { - $url = "company_new.php?id=". $this->id; + /** + * Return a url to modify this company + */ + function getModURL() { + if ( count($this->location) > 0 ) { + @reset($this->location); + list ($j,$l) = @each ($this->location); + $url = 'company_new.php?id='. $this->id ."&loc_id=". $l->id; + } else { + $url = 'company_new.php?id='. $this->id; + } + return $url; } - return $url; - } - /** - * the url where we go after deleting this object - */ - function get_after_del_url () { - return "address_select.php" ; - } - /** - * Return a link to this company - */ - function getLink($text = "") { - global $lang; - if ($this->id == -1) return; - if ($this->id == "") return; + /** + * the url where we go after deleting this object + */ + function get_after_del_url () { + return 'address_select.php' ; + } - if ( empty($text) ) { - $text = $this->name; + /** + * Return a link to this company + */ + function getLink($text = "") { + global $lang; + + if ($this->id == -1) return; + if ($this->id == "") return; + + if ( empty($text) ) { + $text = $this->name; + } + if ( $this->see_ok() ) { + return makelink($this->getURL() , myentities($text), sprintf($lang['CompanyLinkInfo'], $this->name)); + } else { + return myentities($text); + } } - if ( $this->see_ok() ) { - return makelink($this->getURL() , myentities($text), sprintf($lang['CompanyLinkInfo'], $this->name)); - } else { - return myentities($text); + + /** + * This is not a user + */ + function isUser () { + return 0; } - } - /** - * This is not a user - */ - function isUser () { - return 0; - } - /** - * get the type of object - */ - function gettype () { - return "company"; - } - /** - * get the type id of object - */ - function gettypeid () { - return usecompany; - } - /** - * Data of XML export - */ - function exportXML_body ($only_ids = false) { - $this->read_locs_data(); - $r = parent::exportXML_body(); - if (!$only_ids) { - $r .= "<name>". htmlspecialchars($this->name) ."</name>\n"; - } - if ( isset($this->location) && (count($this->location) > 0) ) { - foreach($this->location as $i => $f) { - $r .= $f->exportXML_start(); - $r .= $f->exportXML_body($only_ids); - $r .= $f->exportXML_end(); - } + + /** + * get the type of object + */ + function gettype () { + return "company"; } - return $r; - } - /** - * parse XML import - */ - function parseXML ($fld,$data,$attrs) { - parent::parseXML($fld,$data,$attrs); - if ($fld == "name") { - $this->setName($data); + + /** + * get the type id of object + */ + function gettypeid () { + return usecompany; } - return; - } - /** - * get the help index - */ - function getHelpIndex () { - global $lang; - $r = ""; - $r .= "<h3>". makelink("help.php?p=glossary#company",$lang["Company"],$lang["Company"]) ."</h3><ul>\n"; - $r .= "<li>". makelink("help.php?p=company_show",$lang["show"],$lang["show"]) ."</li>\n"; - $r .= "</ul>\n"; - return $r; - } + /** + * Data of XML export + */ + function exportXML_body ($only_ids = false) { + $this->read_locs_data(); + $r = parent::exportXML_body(); + if (!$only_ids) { + $r .= "<name>". htmlspecialchars($this->name) ."</name>\n"; + } + if ( isset($this->location) && (count($this->location) > 0) ) { + foreach($this->location as $i => $f) { + $r .= $f->exportXML_start(); + $r .= $f->exportXML_body($only_ids); + $r .= $f->exportXML_end(); + } + } + return $r; + } + + /** + * parse XML import + */ + function parseXML ($fld,$data,$attrs) { + parent::parseXML($fld,$data,$attrs); + if ($fld == "name") { + $this->setName($data); + } + return; + } + + /** + * get the help index + */ + function getHelpIndex () { + global $lang; + + $r = ''; + $r .= '<h3>'. makelink("help.php?p=glossary#company",$lang["Company"],$lang["Company"]) ."</h3><ul>\n"; + $r .= '<li>'. makelink("help.php?p=company_show",$lang["show"],$lang["show"]) ."</li>\n"; + $r .= "</ul>\n"; + return $r; + } } +$tutos['classes'][usecompany] = 'company'; ?> \ No newline at end of file Index: custom.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/custom.pinc,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- custom.pinc 17 Sep 2009 16:54:32 -0000 1.39 +++ custom.pinc 28 Sep 2009 11:30:27 -0000 1.40 @@ -140,7 +140,7 @@ $x[1] .= '<input id="'.$parsename.'_no" name="'. $parsename .'" value="0" type="radio">'.$lang['no'].' </input>'; $x[1] .= '<input id="'.$parsename.'_any" name="'. $parsename .'" value="-1" type="radio">'.$lang['any'].' </input>'; } else if ($tx['ftype'] == 'Object') { - if (!isset($tx[size])) $tx[size] = 20; + if (!isset($tx[size])) $tx[size] = 20; // ajax // a project based search is not possible without a object $tx['otype'] = str_replace('R','atdc',$tx['otype']); @@ -479,7 +479,7 @@ $r .= $xx->EnterDateTime($parsename,1); $r .= " </td>\n"; } else if ($x['ftype'] == 'Object') { - if (!isset($x[size])) $x[size] = 20; + if (!isset($x[size])) $x[size] = 20; if (!isset($x['otype'])) $x['otype'] = 'a'; $r .= ' <td colspan="'.($cols-1)."\">\n"; $xx = &$obj->$fld; Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- admin_show.php 4 Aug 2009 13:16:05 -0000 1.104 +++ admin_show.php 28 Sep 2009 11:30:27 -0000 1.105 @@ -325,10 +325,10 @@ $r = ''; if ( ($tutos[debug] == 1) && ($this->mode == 'debugfile') ) { - if ( ! $this->user->isAdmin() ) { - $r .= $this->error("Only real admins are allowed to see this"); - return $r; - } + if ( ! $this->user->isAdmin() ) { + $r .= $this->error("Only real admins are allowed to see this"); + return $r; + } $r .= '<pre>'; $fd = fopen($tutos[errlog],"r"); $r .= fread ($fd, filesize ($tutos[errlog])); @@ -337,10 +337,10 @@ return $r; } if ( ($tutos[debug] == 1) && ($this->mode == 'logfile') ) { - if ( ! $this->user->isAdmin() ) { - $r .= $this->error("Only real admins are allowed to see this"); - return $r; - } + if ( ! $this->user->isAdmin() ) { + $r .= $this->error("Only real admins are allowed to see this"); + return $r; + } $r .= '<pre>'; $fd = fopen($tutos[errlog].'.log',"r"); ... [truncated message content] |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:43
|
Update of /cvsroot/tutos/tutos/php/drawboard In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/drawboard Modified Files: drawboard.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: drawboard.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/drawboard/drawboard.pinc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- drawboard.pinc 29 Jun 2009 08:55:51 -0000 1.8 +++ drawboard.pinc 28 Sep 2009 11:30:28 -0000 1.9 @@ -90,7 +90,7 @@ * read info */ function read_info () { - // open a socket to get user info + // open a socket to get user info $this->users = "?"; $this->running = false; if ($this->info == -1) { |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:39
|
Update of /cvsroot/tutos/tutos/php/doctracker In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/doctracker Modified Files: doctracker.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: doctracker.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/doctracker/doctracker.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- doctracker.pinc 21 Jul 2009 14:18:52 -0000 1.3 +++ doctracker.pinc 28 Sep 2009 11:30:28 -0000 1.4 @@ -29,23 +29,23 @@ } foreach ($obj->list[usedoctracker] as $i => $f) { - if ( $cols > 0 ) { - $r .= "<tr><td colspan=\"". $cols ."\">\n"; - } - if ( ($n >= $rows) && ( $x != $rows ) ) { - $r .= " ". $user->layout->theme->getImage(folder,'list') ." ". makelink("doctracker/doc_overview.php?refid=". $obj->id,sprintf($lang['AllEntries'], count($obj->list[usedoctracker]))); - if ( $cols > 0 ) { - $r .= "</td></tr>\n"; - } - break; - } - $r .= ' '. $user->layout->theme->getImage(paper,'list') .($f->activ == 1 ? ' ':'<i>'). $f->getLink() .' '. $f->creation->getDateTime(); - $r .= ' '.(is_object($f->creator) ? $f->creator->getLink($f->creator->getShortname()):'')."<br />\n"; - $r .= ($f->activ == 1 ? '':'</i>'); - if ( $cols > 0 ) { - $r .= "</td></tr>\n"; - } - $n++; + if ( $cols > 0 ) { + $r .= "<tr><td colspan=\"". $cols ."\">\n"; + } + if ( ($n >= $rows) && ( $x != $rows ) ) { + $r .= " ". $user->layout->theme->getImage(folder,'list') ." ". makelink("doctracker/doc_overview.php?refid=". $obj->id,sprintf($lang['AllEntries'], count($obj->list[usedoctracker]))); + if ( $cols > 0 ) { + $r .= "</td></tr>\n"; + } + break; + } + $r .= ' '. $user->layout->theme->getImage(paper,'list') .($f->activ == 1 ? ' ':'<i>'). $f->getLink() .' '. $f->creation->getDateTime(); + $r .= ' '.(is_object($f->creator) ? $f->creator->getLink($f->creator->getShortname()):'')."<br />\n"; + $r .= ($f->activ == 1 ? '':'</i>'); + if ( $cols > 0 ) { + $r .= "</td></tr>\n"; + } + $n++; } return $r; } @@ -79,7 +79,7 @@ function read_result (&$r, $pos ) { $this->ref_id = $r->get($pos, 'ref_id'); $this->ref_number = $r->get($pos, 'ref_number'); -// $this->path = $r->get($pos, 'path'); + // $this->path = $r->get($pos, 'path'); $this->counts = json_decode($r->get($pos, 'counts'),true); $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); @@ -90,9 +90,9 @@ /** * Set the path */ -// function setPath($value) { -// return $this->setStrField('path',$value,'DocTrackOwnerPath'); -// } + // function setPath($value) { + // return $this->setStrField('path',$value,'DocTrackOwnerPath'); + // } /** * Return a File Name */ @@ -146,46 +146,46 @@ $msg = ''; if ( $this->ref_id == -1 ) { - $this->ref = $this->creator; - $this->ref_id = $this->creator->id; + $this->ref = $this->creator; + $this->ref_id = $this->creator->id; } $q = new query($this->dbconn); $q->setTable($this->tablename); $q->addFV('ref_id',$this->ref_id,'INT'); $q->addFV('ref_number',$this->ref_number,'STRING',$table['docowner']['ref_number'][size]); -// $q->addFV('path',$this->path,'STRING',$table['docowner']['path'][size]); + // $q->addFV('path',$this->path,'STRING',$table['docowner']['path'][size]); $q->addFV('counts',json_encode($this->counts),'STRING',$table['docowner']['counts'][size]); $this->save_custom_fields($q); if ( $this->id < 0 ) { - $this->modified = array(); - if ( isset($this->newid) ) { - $this->id = $this->newid; - $q->addFV("id",$this->id,""); - } else { - $this->id = $q->addFV("id",-1,"NEXTID"); - // adopt the permissions from the referenced object - $this->acl = $this->ref->acl; - acl_default($this,$this->creator); + $this->modified = array(); + if ( isset($this->newid) ) { + $this->id = $this->newid; + $q->addFV("id",$this->id,""); + } else { + $this->id = $q->addFV("id",-1,"NEXTID"); + // adopt the permissions from the referenced object + $this->acl = $this->ref->acl; + acl_default($this,$this->creator); - // Prepare the history - $this->modified[] = array ( "field" => "DocOwnerCreate" , - "old" => "-1" , - "new" => $this->id, - "obj_id" => $this->ref_id - ); - $this->modified[] = array ( "field" => "created" , - "old" => $this->getType() , - "new" => $this->id, - "obj_id" => $this->id - ); - } - $q->addFV("creator",$this->creator,"OBJ"); - $q->addFV("creation",$this->creation,"DATETIME"); - $query = $q->getInsert(); + // Prepare the history + $this->modified[] = array ( "field" => "DocOwnerCreate" , + "old" => "-1" , + "new" => $this->id, + "obj_id" => $this->ref_id + ); + $this->modified[] = array ( "field" => "created" , + "old" => $this->getType() , + "new" => $this->id, + "obj_id" => $this->id + ); + } + $q->addFV("creator",$this->creator,"OBJ"); + $q->addFV("creation",$this->creation,"DATETIME"); + $query = $q->getInsert(); } else { - $q->addWC("id",$this->id,""); - $query = $q->getUpdate(); + $q->addWC("id",$this->id,""); + $query = $q->getUpdate(); } $r = $this->dbconn->Exec($query); $r->free(); @@ -203,7 +203,7 @@ * create */ function doctracker(&$dbconn) { - global $table,$tutos; + global $table,$tutos; $this->init($dbconn); $this->owner = null; @@ -266,7 +266,7 @@ $this->owner = new docowner($this->dbconn); $n = $r->numrows(); if ($n == 1) { - $this->owner->read_result($r,0); + $this->owner->read_result($r,0); } $r->free(); $this->owner->ref_id = $this->ref_id; @@ -301,20 +301,20 @@ * Return a link to this note */ function getLink($text = "") { - global $lang; + global $lang; - if ( empty($text) ) { - $text = myentities($this->getFullName()); - } + if ( empty($text) ) { + $text = myentities($this->getFullName()); + } - if ( $this->see_ok() ) { - if (is_object($this->creator)) - return makelink($this->getURL() ,$text,sprintf($lang['DocTrackLinkI'], $this->creator->getFullName()),$this->getPopInfo()); - else - return makelink($this->getURL() ,$text,sprintf($lang['DocTrackLinkI'], $lang['HistoryDeleted']),$this->getPopInfo()); - } else { - return $text; - } + if ( $this->see_ok() ) { + if (is_object($this->creator)) + return makelink($this->getURL() ,$text,sprintf($lang['DocTrackLinkI'], $this->creator->getFullName()),$this->getPopInfo()); + else + return makelink($this->getURL() ,$text,sprintf($lang['DocTrackLinkI'], $lang['HistoryDeleted']),$this->getPopInfo()); + } else { + return $text; + } } /** * set the project number part @@ -338,7 +338,7 @@ * Return a fullname */ function getFullname() { - global $lang,$tutos; + global $lang,$tutos; if ($this->number != '') { return $this->number .''; @@ -352,19 +352,19 @@ $name = $this->format; // ORG if (isset($lang['DocTrackOrgs'][$this->org])) { - $t = explode(' ',$lang['DocTrackOrgs'][$this->org]); - $org = $t[0]; + $t = explode(' ',$lang['DocTrackOrgs'][$this->org]); + $org = $t[0]; } else { - $org = ''; + $org = ''; } $name = eregi_replace("&ORG",$org,$name); // Type if (isset($lang['DocTrackTypes'][$this->type])) { - $t = explode(' ',$lang['DocTrackTypes'][$this->type]); - $type = $t[0]; + $t = explode(' ',$lang['DocTrackTypes'][$this->type]); + $type = $t[0]; } else { - $type = ''; + $type = ''; } $name = eregi_replace("&TYPE",$type,$name); $name = eregi_replace("&PNUM",''.$this->pnum,$name); @@ -450,9 +450,9 @@ $txt = $this->getFileName(); } $path = $this->path; - if (is_object($this->ref)) { - $path = eregi_replace('@BASE@',$this->ref->path,$path); - } + if (is_object($this->ref)) { + $path = eregi_replace('@BASE@',$this->ref->path,$path); + } if (eregi("^file:",$path)) { $url = $path; } else if (eregi("^\\\\",$path)) { @@ -561,9 +561,9 @@ * Set the path */ function setPath($value) { - // TODO: cut the project part - $value = str_replace($this->ref->path,'@BASE@',$value); - return $this->setStrField('path',$value,'DocTrackPath'); + // TODO: cut the project part + $value = str_replace($this->ref->path,'@BASE@',$value); + return $this->setStrField('path',$value,'DocTrackPath'); } /** * Set the type @@ -747,29 +747,29 @@ switch ($f['field']) { case 'DocTrackCreate': case 'DocTrackNewRev': - $x = $f; - $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; - if ( $f['old'] <= 0 ) { + $x = $f; + $x['field'] = isset( $lang[$f['field']]) ? $lang[$f['field']] : $f['field']; + if ( $f['old'] <= 0 ) { $x['old'] = ''; - } else { + } else { $b = getObject($this->dbconn,$f['old']); if ( is_object($b) ) { - $x['old'] = $b->getLink(); + $x['old'] = $b->getLink(); } else { - $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; + $x['old'] = makelink("history_show.php?id=". $f['old'],$lang['HistoryDeleted']) ; } - } - if ( $f['new'] <= 0 ) { + } + if ( $f['new'] <= 0 ) { $x['new'] = ''; - } else { + } else { $b = getObject($this->dbconn,$f['new']); if ( is_object($b) ) { - $x['new'] = $b->getLink(); + $x['new'] = $b->getLink(); } else { - $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; + $x['new'] = makelink("history_show.php?id=". $f['new'],$lang['HistoryDeleted']) ; } - } - break; + } + break; } return $x; } @@ -797,9 +797,9 @@ } $r .= "<tr>\n"; if ($obj->gettype() == 'doctracker') { - $r .= $user->layout->showfield($lang['DocTrackOtherRevs']); + $r .= $user->layout->showfield($lang['DocTrackOtherRevs']); } else { - $r .= $user->layout->showfield($lang['DocTracker']); + $r .= $user->layout->showfield($lang['DocTracker']); } $r .= " <td valign=\"top\" colspan=\"".($cols-1)."\">\n"; if ( $format == "paper" ) { @@ -895,7 +895,7 @@ if (! $obj->see_ok() ) return ""; if ($obj->getType() == "note" ) return ""; - $x = array( url => "doctracker/doc_new.php?refid=". $obj->id, + $x = array( url => 'doctracker/doc_new.php?refid='. $obj->id, confirm => false, text => ($text == "" ? $lang['DocTrackCreate']:$text), info => sprintf($lang['DocTrackCreateInfo'], $obj->getFullName()), @@ -913,7 +913,7 @@ if ( ! $user->feature_ok(usedoctracker,PERM_SEL) ) { return; } - return array( url => "doctracker/doc_select.php", + return array( url => 'doctracker/doc_select.php', image => $user->layout->theme->getImage(doctracker::getHtmlIcon(),'menu'), text => ($text == "" ? $lang['DocTrackSearch']: $text), info => $lang['SearchForDocTrack'], |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:39
|
Update of /cvsroot/tutos/tutos/php/layout In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/layout Modified Files: classic_layout.pinc layout_base.pinc new2_layout.pinc new_layout.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: new_layout.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/layout/new_layout.pinc,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- new_layout.pinc 17 Sep 2009 13:52:44 -0000 1.99 +++ new_layout.pinc 28 Sep 2009 11:30:28 -0000 1.100 @@ -549,7 +549,7 @@ $r .= ' <script type="text/javascript" language="JavaScript" src="'.$tutos['base'].'/html/tutos.js"></script>'."\n"; $r .= " </head>\n"; $r .= " <body>\n"; - $r .= '<div style="z-index:1;position:absolute;left:10%;top:10%;text-align:center;opacity:0.3;-moz-opacity:0.5;-khtml-opacity:0.5;filter: alpha(opacity=50);width:80%;height:80%;background-color:#000;border:0px solid black;display:none;color:white;font-size:30pt;font-weight:bold" id="loading"><br /><br /><div id="scrollme">...Loading...</div></div>'; + $r .= '<div style="z-index:1;position:absolute;left:10%;top:10%;text-align:center;opacity:0.3;-moz-opacity:0.5;-khtml-opacity:0.5;filter: alpha(opacity=50);width:80%;height:80%;background-color:#000;border:0px solid black;display:none;color:white;font-size:30pt;font-weight:bold" id="loading"><br /><br /><div id="scrollme">...Loading...</div><br /><img src="'.$tutos['base'].'/html/loading.gif'.'"</img></div>'; $r .= '<script type="text/javascript" language="JavaScript">loader = window.setTimeout("loading(1);",1500);</script>'."\n"; return $r; } @@ -825,6 +825,8 @@ // Start the HTML echo $this->HTML_Start(); flush(); + $this->read_data(); + flush(); echo $this->layout_start(); flush(); if ($this->stop == false ) { @@ -834,12 +836,14 @@ echo $this->layout_stop(); echo $this->HTML_Stop(); } else if ( $this->format == 'paper' ) { + $this->read_data(); echo $this->PrintHeader($this->name); if ($this->stop == false ) { echo $this->info(); } echo $this->PrintFooter(); } else { + $this->read_data(); echo $this->info(); } } Index: classic_layout.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/layout/classic_layout.pinc,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- classic_layout.pinc 9 Jul 2009 19:39:00 -0000 1.57 +++ classic_layout.pinc 28 Sep 2009 11:30:28 -0000 1.58 @@ -188,6 +188,7 @@ Header("Location: ". getBaseUrl(). addSessionKey($this->redirect,true)); return; } + $this->read_data(); $this->buildmenu(); Index: layout_base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/layout/layout_base.pinc,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- layout_base.pinc 19 Jul 2009 19:21:56 -0000 1.55 +++ layout_base.pinc 28 Sep 2009 11:30:28 -0000 1.56 @@ -176,6 +176,12 @@ return "prepare not implemented"; } /** + * read the neccessary data + */ + function read_data() { + return ''; + } + /** * display naviagtion */ function navigate() { Index: new2_layout.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/layout/new2_layout.pinc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- new2_layout.pinc 23 Jul 2009 13:03:53 -0000 1.4 +++ new2_layout.pinc 28 Sep 2009 11:30:28 -0000 1.5 @@ -664,13 +664,18 @@ $r .= ' <script type="text/javascript" language="JavaScript" src="'.$tutos['base'].'/html/tutos.js"></script>'."\n"; $r .= " </head>\n"; $r .= " <body>\n"; + $r .= '<div style="z-index:1;position:absolute;left:10%;top:10%;text-align:center;opacity:0.3;-moz-opacity:0.5;-khtml-opacity:0.5;filter: alpha(opacity=50);width:80%;height:80%;background-color:#000;border:0px solid black;display:none;color:white;font-size:30pt;font-weight:bold" id="loading"><br /><br /><div id="scrollme">...Loading...</div></div>'; + $r .= '<script type="text/javascript" language="JavaScript">loader = window.setTimeout("loading(1);",1500);</script>'."\n"; return $r; } Function HTML_Stop() { - return " </body>\n</html>\n"; + $r = ''; + $r .= '<script type="text/javascript" language="JavaScript">loading(0);</script>'."\n"; + $r .= " </body>\n</html>\n"; + return $r; } /** * print a menu walk through this->menu @@ -969,7 +974,11 @@ if ( ($this->format == 'html') || ($this->format == 'stat') || ($this->format == 'checklist')) { // Start the HTML echo $this->HTML_Start(); + flush(); + $this->read_data(); + flush(); echo $this->layout_start(); + flush(); if ($this->stop == false ) { echo $this->info(); } @@ -977,15 +986,16 @@ echo $this->layout_stop(); echo $this->HTML_Stop(); } else if ( $this->format == 'paper' ) { + $this->read_data(); echo $this->PrintHeader($this->name); if ($this->stop == false ) { echo $this->info(); } echo $this->PrintFooter(); } else { + $this->read_data(); echo $this->info(); } -#@ob_end_flush(); } /** * navigation for lists @@ -1133,4 +1143,4 @@ return 'new2_layout'; } } -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:39
|
Update of /cvsroot/tutos/tutos/php/invoice In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/invoice Modified Files: invoice.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- invoice.pinc 29 Jun 2009 08:55:51 -0000 1.79 +++ invoice.pinc 28 Sep 2009 11:30:28 -0000 1.80 @@ -1057,7 +1057,7 @@ $obj->list[useinvoice] = array(); if ( ($obj->getType() == "product") || ($obj->getType() == "installation") ) { $q = "SELECT * from ". $obj->dbconn->prefix ."invoice where link_id = ". $obj->id ." order by creation desc"; - // the given object is referenced somewhere + // the given object is referenced somewhere $q2 = "SELECT inv_id from ". $obj->dbconn->prefix ."invoice_pos where ref_id = ". $obj->id; } else if ( ($obj->getType() == "company") || ($obj->getType() == "department") ) { |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/installation In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/installation Modified Files: installation.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: installation.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation.pinc,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- installation.pinc 14 Jun 2009 19:53:23 -0000 1.56 +++ installation.pinc 28 Sep 2009 11:30:28 -0000 1.57 @@ -233,6 +233,49 @@ return myentities($text); } } + + /** + * search for a installation + * fill a array with possible installations + * mode 1 fill objects + * mode 0 do not fill objects + */ + function search_by_name(&$arr,&$user,$name,$mode = 1) { + global $table; + + $qid = ''; + if ( trim($name) == "" ) return 0; + + if (ereg('#([0-9]*)',trim($name),$regs)) { + if(is_numeric($regs[1])) { + $qid = ' or id = '.$regs[1]; + } + } + + $q = "SELECT ".($mode == 1 ? '*':'id')." from ". $user->dbconn->prefix .$table['installation'][name]." WHERE". $user->dbconn->Like("id",$name); + $q .= $qid; + + check_dbacl($user->dbconn, $q, $user->id); + $r = $user->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ( $a < $n ) { + if ($mode == 1) { + $x = new installation($user->dbconn); + $x->read_result($r,$a); + $arr[$x->id] = &$x; + unset($x); + } else { + $id = $r->get($a,'id'); + $arr[$id] = $id; + } + $a++; + } + $r->free(); + + return $n; + } + /** * set the Description */ |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/db In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/db Modified Files: db.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: db.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db.pinc,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- db.pinc 29 Jun 2009 12:12:28 -0000 1.26 +++ db.pinc 28 Sep 2009 11:30:27 -0000 1.27 @@ -17,187 +17,209 @@ * @module db */ abstract class tutos_db { - var $prefix; - var $db; - /** - * initialize db connection - */ - function init(&$db) { - $this->conn = -1; - $this->lastquery = ""; [...990 lines suppressed...] + $cnt = $rc->get(0, "c"); + $rc->free(); + if ($this->range_start == -1) { + $this->range_start = $cnt - $this->range_cnt; + } + } + + $q = $this->getSelect(); + $r = $this->dbconn->Exec($q); + + if ( $this->use_range && $this->dbconn->needcount()) { + $r->setrows($cnt); + $r->setoffset($this->range_start); + } + return $r; + } } ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/html In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/html Modified Files: tutos.js Log Message: rework of check_field and ajax to be more flexible in future Index: tutos.js =================================================================== RCS file: /cvsroot/tutos/tutos/html/tutos.js,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- tutos.js 17 Sep 2009 13:52:27 -0000 1.18 +++ tutos.js 28 Sep 2009 11:30:27 -0000 1.19 @@ -251,7 +251,7 @@ /** * some AJAX stuff */ -function load_TUTOS_List(base,name,fld,grp,objid) { +function load_TUTOS_List(base,name,fld,grp,objid,mods) { if (fld != "") { // Obtain an XMLHttpRequest instance var req = newXMLHttpRequest(); @@ -271,7 +271,7 @@ // Send form encoded data stating that I want to add the // specified item to the display list. - req.send("action=search&item="+fld+"&grp="+grp+"&id="+objid); + req.send("action=search&item="+fld+"&grp="+grp+"&id="+objid+"&mods="+mods); } } |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004 Modified Files: Makefile Log Message: rework of check_field and ajax to be more flexible in future Index: Makefile =================================================================== RCS file: /cvsroot/tutos/tutos/Makefile,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- Makefile 31 Jul 2009 09:04:07 -0000 1.109 +++ Makefile 28 Sep 2009 11:30:27 -0000 1.110 @@ -15,6 +15,9 @@ # # # $Log$ +# Revision 1.110 2009/09/28 11:30:27 gokohnert +# rework of check_field and ajax to be more flexible in future +# # Revision 1.109 2009/07/31 09:04:07 gokohnert # better mail template handling and documentation # @@ -729,8 +732,8 @@ html/new_layout.css \ html/new2_layout.css \ html/classic_layout.css \ - html/nuke.css \ - html/red.css \ + html/nuke.css \ + html/red.css \ html/blue.css \ html/tutos.css \ html/white.css |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/file In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/file Modified Files: file_config.php file_import.php file_ins.php mconfig.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: file_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_ins.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- file_ins.php 5 Aug 2009 08:27:25 -0000 1.32 +++ file_ins.php 28 Sep 2009 11:30:28 -0000 1.33 @@ -72,7 +72,7 @@ // add a new reference if (isset($_POST['reftype']) && ($_POST['reftype'] != "0") ) { $l = array(); - // search the appropiate object class + // search the appropiate object class $c = trim($_POST['reftype']); $n = trim($_POST['refname']); $gotourl = addUrlParameter($gotourl,"reftype=". UrlEncode($c),true); @@ -82,7 +82,7 @@ if (method_exists($x,"search_by_name")) { $x->search_by_name($l,$current_user,$n); if ( 1 == count($l)) { - // cool we got an exact input + // cool we got an exact input foreach ($l as $x) { $f->addReference($x); # $links[$x->id] = &$x; @@ -204,7 +204,7 @@ } if ( isset($_POST['afn']) ) { - // Check the author full name + // Check the author full name $author = check_field($_REQUEST['afn'],"afn","al","at"); } Index: file_config.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_config.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- file_config.php 16 Aug 2009 08:55:20 -0000 1.2 +++ file_config.php 28 Sep 2009 11:30:28 -0000 1.3 @@ -35,10 +35,10 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_fileperm'); $r .= '<td><select name="file_fileperm">'; - $perms = array('0600','0640','0660','0644','0664','0666'); - foreach ($perms as $p) { - $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; - } + $perms = array('0600','0640','0660','0644','0664','0666'); + foreach ($perms as $p) { + $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; + } $r .= '</select></td>'; $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpFilePerm'].'</pre></td>'; $r .= $this->OverviewRowEnd($line++); @@ -46,10 +46,10 @@ $r .= $this->OverviewRowStart($line); $r .= $this->showfield('file_dirperm'); $r .= '<td><select name="file_dirperm">'; - $perms = array('0700','0750','0770','0755','0775','0777'); - foreach ($perms as $p) { - $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; - } + $perms = array('0700','0750','0770','0755','0775','0777'); + foreach ($perms as $p) { + $r .= '<option value="'.$p.'" '.($tutos['file_fileperm'] == $p ? 'selected="selected"':'').'>'.$p.'</option>'; + } $r .= '</select></td>'; $r .= '<td colspan="2" class="pre"><pre>'.$lang['FileConfigHelpDirPerm'].'</pre></td>'; $r .= $this->OverviewRowEnd($line++); Index: file_import.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_import.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- file_import.php 5 Aug 2009 08:27:25 -0000 1.3 +++ file_import.php 28 Sep 2009 11:30:28 -0000 1.4 @@ -28,53 +28,53 @@ # get the id of the object where we should add the given file $id = auth_cmdline::getParameter("i"); if ($id == "") { - die("no id given\nYou should use a -i parameter in the cmdline\n"); + die("no id given\nYou should use a -i parameter in the cmdline\n"); } if (!is_numeric($id)) { - die("id '". $id ."' is not a number\n"); + die("id '". $id ."' is not a number\n"); } $ref = getObject($dbconn,$id); if (!is_object($ref)) { - die("id '". $id ."' is not a known object\n"); + die("id '". $id ."' is not a known object\n"); } if (! $ref->use_ok()) { - die(sprintf($lang['Err0001'],$lang[$ref->getType()],$ref->getFullName())."\n"); + die(sprintf($lang['Err0001'],$lang[$ref->getType()],$ref->getFullName())."\n"); } # check the given file $fname = auth_cmdline::getParameter("f"); if ($fname == "") { # die("no filename given\nYou should use a -f parameter in the cmdline\n"); - // we use stdin - $fname = "-"; + // we use stdin + $fname = "-"; } if ($fname == "-") { - $fname = tempnam ($tutos[sessionpath], "import"); - $fname1 = "php://stdin"; - $fd1 = fopen($fname1,"rb"); - $fd2 = fopen($fname,"w"); - while (!feof($fd1)) { -# echo "A:".fread($fd1,4096); - fwrite($fd2,fread($fd1,4096)); - } - fclose($fd1); - fclose($fd2); - $orgname = $fname1; + $fname = tempnam ($tutos[sessionpath], "import"); + $fname1 = "php://stdin"; + $fd1 = fopen($fname1,"rb"); + $fd2 = fopen($fname,"w"); + while (!feof($fd1)) { +# echo "A:".fread($fd1,4096); + fwrite($fd2,fread($fd1,4096)); + } + fclose($fd1); + fclose($fd2); + $orgname = $fname1; } else { - $orgname = $fname; + $orgname = $fname; } if (!file_exists($fname)) { - die("file ". $fname ." is not there\n"); + die("file ". $fname ." is not there\n"); } if (!is_file($fname)) { - die("file ". $fname ." is not a file\n"); + die("file ". $fname ." is not a file\n"); } if (!is_readable($fname)) { - die("file ". $fname ." is not readable\n"); + die("file ". $fname ." is not readable\n"); } if (0 == filesize($fname)) { - die("file ". $fname ." is empty\n"); + die("file ". $fname ." is empty\n"); } $ct = auth_cmdline::getParameter("ct"); @@ -82,19 +82,19 @@ if ($ct) { #$ct = $ct; } else if ( eregi("\.doc$",$fname) ) { - $ct = "application/msword"; + $ct = "application/msword"; } else if ( eregi("\.xls$",$fname) ) { - $ct = "application/vnd-ms-excel"; + $ct = "application/vnd-ms-excel"; } else if ( eregi("\.ppt$",$fname) ) { - $ct = "application/vnd.ms-powerpoint"; + $ct = "application/vnd.ms-powerpoint"; } else if ( eregi("\.pdf$",$fname) ) { - $ct = "application/pdf"; + $ct = "application/pdf"; } else if ( eregi("\.gif$",$fname) ) { - $ct = "image/gif"; + $ct = "image/gif"; } else if ( eregi("\.jp[e]g$",$fname) ) { - $ct = "image/jpeg"; + $ct = "image/jpeg"; } else { - $ct = "text/plain"; + $ct = "text/plain"; } # @@ -102,65 +102,65 @@ # if (false) { # via direct copy (might have problems with permisssions) - $obj = new tutos_file($dbconn); - $obj->setAuthor($current_user); - $obj->setVersion("1"); - $obj->setFileName(basename($fname)); - $obj->setName(basename($orgname)); + $obj = new tutos_file($dbconn); + $obj->setAuthor($current_user); + $obj->setVersion("1"); + $obj->setFileName(basename($fname)); + $obj->setName(basename($orgname)); - $obj->logtxt = "automated initial import from ".$orgname ; - $obj->vsys = FILE_RCS; - $obj->nocheck = true; - $obj->filetype = $ct; - $obj->filesize = filesize($fname); - $obj->tmploc = $fname; - $obj->addReference($ref); + $obj->logtxt = "automated initial import from ".$orgname ; + $obj->vsys = FILE_RCS; + $obj->nocheck = true; + $obj->filetype = $ct; + $obj->filesize = filesize($fname); + $obj->tmploc = $fname; + $obj->addReference($ref); - $owner = fileowner($obj->base); - $group = filegroup($obj->base); - echo $obj->save(); - @chgrp(dirname($obj->base ."/". $obj->fileloc),$group); - @chown(dirname($obj->base ."/". $obj->fileloc),$owner); - @chgrp($obj->base ."/". $obj->fileloc,$group); - @chown($obj->base ."/". $obj->fileloc,$owner); + $owner = fileowner($obj->base); + $group = filegroup($obj->base); + echo $obj->save(); + @chgrp(dirname($obj->base ."/". $obj->fileloc),$group); + @chown(dirname($obj->base ."/". $obj->fileloc),$owner); + @chgrp($obj->base ."/". $obj->fileloc,$group); + @chown($obj->base ."/". $obj->fileloc,$owner); } else { - // via http - $uname = auth_cmdline::getParameter("u"); - $pw = auth_cmdline::getParameter("p"); - $dbnr = auth_cmdline::getParameter("d"); - // this requires the file to be readable by the server process - if ($orgname == $fname) { - $orgname = $fname; - // it is not a temp file so copy it - $fname = tempnam ($tutos['file_local_searchpath'], "import"); - @copy ($orgname , $fname); - } - @chmod($fname,0666); - $url = getBaseUrl(true) ."php/file/file_ins.php"; - $url = addUrlParameter($url,"uname=".$uname,true); - $url = addUrlParameter($url,"pw=".$pw,true); - $url = addUrlParameter($url,"dbnr=".$dbnr,true); - $url = addUrlParameter($url,"link_id[]=".$ref->id,true); - $n = auth_cmdline::getParameter("n"); - if ($n) { - $url = addUrlParameter($url,"name=".urlencode($n),true); - } else { - $url = addUrlParameter($url,"name=".urlencode($orgname),true); - } - $url = addUrlParameter($url,"ct=".urlencode($ct),true); - $url = addUrlParameter($url,"file2=".urlencode(basename($fname)),true); + // via http + $uname = auth_cmdline::getParameter("u"); + $pw = auth_cmdline::getParameter("p"); + $dbnr = auth_cmdline::getParameter("d"); + // this requires the file to be readable by the server process + if ($orgname == $fname) { + $orgname = $fname; + // it is not a temp file so copy it + $fname = tempnam ($tutos['file_local_searchpath'], "import"); + @copy ($orgname , $fname); + } + @chmod($fname,0666); + $url = getBaseUrl(true) ."php/file/file_ins.php"; + $url = addUrlParameter($url,"uname=".$uname,true); + $url = addUrlParameter($url,"pw=".$pw,true); + $url = addUrlParameter($url,"dbnr=".$dbnr,true); + $url = addUrlParameter($url,"link_id[]=".$ref->id,true); + $n = auth_cmdline::getParameter("n"); + if ($n) { + $url = addUrlParameter($url,"name=".urlencode($n),true); + } else { + $url = addUrlParameter($url,"name=".urlencode($orgname),true); + } + $url = addUrlParameter($url,"ct=".urlencode($ct),true); + $url = addUrlParameter($url,"file2=".urlencode(basename($fname)),true); - $fd = fopen($url,"r"); - while ($fd && !feof($fd)) { - echo fgets($fd,4096); - } - fclose($fd); + $fd = fopen($url,"r"); + while ($fd && !feof($fd)) { + echo fgets($fd,4096); + } + fclose($fd); } if ($orgname != $fname) { - echo "\ndeleted ". $fname ." size:". filesize($fname) ."\n"; - @unlink($fname); + echo "\ndeleted ". $fname ." size:". filesize($fname) ."\n"; + @unlink($fname); } $dbconn->Close(); /* Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/mconfig.pinc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mconfig.pinc 14 Aug 2009 07:50:03 -0000 1.12 +++ mconfig.pinc 28 Sep 2009 11:30:28 -0000 1.13 @@ -22,7 +22,7 @@ Desc => 'document management', file => 'php/file/file.pinc', 'overview' => 'file/file_overview.php', - 'configurl' => 'file/file_config.php', + 'configurl' => 'file/file_config.php', 'perm' => usedocmanagement ); # |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/testmanager In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/testmanager Modified Files: testrun_ins.php Log Message: rework of check_field and ajax to be more flexible in future Index: testrun_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/testmanager/testrun_ins.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- testrun_ins.php 28 Jul 2009 18:34:51 -0000 1.3 +++ testrun_ins.php 28 Sep 2009 11:30:28 -0000 1.4 @@ -44,7 +44,7 @@ $dbconn->Begin("WORK"); $msg .= $obj->parse_input($obj->run); $dbconn->Commit("WORK"); -# echo $msg."<br> ".$gotourl; +# echo $msg."<br> ".$gotourl; leave_insert($dbconn,'../'.$gotourl,$msg); exit; } @@ -101,4 +101,4 @@ * CVS Info: $Id$ * $Author$ */ -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/expense In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/expense Modified Files: expense_ins.php Log Message: rework of check_field and ajax to be more flexible in future Index: expense_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/expense/expense_ins.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- expense_ins.php 16 Aug 2009 08:55:39 -0000 1.12 +++ expense_ins.php 28 Sep 2009 11:30:28 -0000 1.13 @@ -65,76 +65,76 @@ $gotourl= addUrlParameter($gotourl,"people=". UrlEncode($u->people),true); } if ( isset($_POST['city']) ) { - $u->setCity(StripSlashes($_POST['city'])); - $gotourl= addUrlParameter($gotourl,"city=". UrlEncode($u->city),true); + $u->setCity(StripSlashes($_POST['city'])); + $gotourl= addUrlParameter($gotourl,"city=". UrlEncode($u->city),true); } if ( isset($_POST['country']) ) { - $u->setCountry(StripSlashes($_POST['country'])); - $gotourl= addUrlParameter($gotourl,"country=". UrlEncode($u->country),true); + $u->setCountry(StripSlashes($_POST['country'])); + $gotourl= addUrlParameter($gotourl,"country=". UrlEncode($u->country),true); } if ( empty($_POST['currency']) ) { - $msg .= sprintf($lang['Err0009'],$lang['Currency']) ."<br />"; + $msg .= sprintf($lang['Err0009'],$lang['Currency']) ."<br />"; } else { - $u->setCurrency(StripSlashes($_POST['currency'])); - $gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($u->currency),true); + $u->setCurrency(StripSlashes($_POST['currency'])); + $gotourl= addUrlParameter($gotourl,"currency=". UrlEncode($u->currency),true); } if ( isset($_POST['mop']) ) { - $u->setMop($_POST['mop']); - $gotourl= addUrlParameter($gotourl,"mop=". UrlEncode($u->mop),true); + $u->setMop($_POST['mop']); + $gotourl= addUrlParameter($gotourl,"mop=". UrlEncode($u->mop),true); } if ( isset($_POST['ccentre']) ) { - $u->setCCentre(StripSlashes($_POST['ccentre'])); - $gotourl= addUrlParameter($gotourl,"ccentre=". UrlEncode($u->ccentre),true); + $u->setCCentre(StripSlashes($_POST['ccentre'])); + $gotourl= addUrlParameter($gotourl,"ccentre=". UrlEncode($u->ccentre),true); } if ( isset($_POST['description']) ) { - $u->setDescription(StripSlashes($_POST['description'])); - $gotourl= addUrlParameter($gotourl,"description=". UrlEncode($u->description),true); + $u->setDescription(StripSlashes($_POST['description'])); + $gotourl= addUrlParameter($gotourl,"description=". UrlEncode($u->description),true); } if ( empty($_POST['link_id']) ) { - $msg .= "No Link ID given !<br />"; + $msg .= "No Link ID given !<br />"; } else { - $u->setReference($_POST['link_id']); - $gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true); - $u->read_reference(); + $u->setReference($_POST['link_id']); + $gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true); + $u->read_reference(); } if ( empty($_POST['adr_id']) ) { - $msg .= "No Address ID given !<br />"; + $msg .= "No Address ID given !<br />"; } else { - $u->setAdrReference($_POST['adr_id']); - $gotourl= addUrlParameter($gotourl,"adr_id=". $u->adr_id,true); - $u->read_adr_reference(); + $u->setAdrReference($_POST['adr_id']); + $gotourl= addUrlParameter($gotourl,"adr_id=". $u->adr_id,true); + $u->read_adr_reference(); } if ( isset($_POST['invoice']) ) { - $u->setInvoice(StripSlashes($_POST['invoice'])); - $gotourl= addUrlParameter($gotourl,"invoice=". UrlEncode($u->invoice),true); + $u->setInvoice(StripSlashes($_POST['invoice'])); + $gotourl= addUrlParameter($gotourl,"invoice=". UrlEncode($u->invoice),true); } if ( empty($_POST['gamount']) ) { - $msg .= sprintf($lang['Err0009'],$lang['ExpenseGAmount']) ."<br />"; + $msg .= sprintf($lang['Err0009'],$lang['ExpenseGAmount']) ."<br />"; } else { - $u->setGAmount(StripSlashes($_POST['gamount'])); - $gotourl= addUrlParameter($gotourl,"gamount=". UrlEncode($u->gamount),true); + $u->setGAmount(StripSlashes($_POST['gamount'])); + $gotourl= addUrlParameter($gotourl,"gamount=". UrlEncode($u->gamount),true); } if ( isset($_POST['deduction']) ) { - $u->setDeduction(StripSlashes($_POST['deduction'])); - $gotourl= addUrlParameter($gotourl,"deduction=". UrlEncode($u->deduction),true); + $u->setDeduction(StripSlashes($_POST['deduction'])); + $gotourl= addUrlParameter($gotourl,"deduction=". UrlEncode($u->deduction),true); } if ( isset($_POST['itax']) ) { - $u->setITax(StripSlashes($_POST['itax'])); - $gotourl= addUrlParameter($gotourl,"itax=". UrlEncode($u->itax),true); + $u->setITax(StripSlashes($_POST['itax'])); + $gotourl= addUrlParameter($gotourl,"itax=". UrlEncode($u->itax),true); } $t_start = new TUTOS_Date_Time(); $t_start->setDateTimeF("t_start"); if ( ( !$t_start->checkDMY()) || (-1 == $t_start->getTimeStamp() ) ) { - $msg .= sprintf($lang['Err0038'],$lang['ExpenseStartTime']) ."<br />"; + $msg .= sprintf($lang['Err0038'],$lang['ExpenseStartTime']) ."<br />"; } else { - $u->setStartTime($t_start); - $gotourl= addUrlParameter($gotourl,"t_start=". $t_start->getYYYYMMDDHHMM(),true); + $u->setStartTime($t_start); + $gotourl= addUrlParameter($gotourl,"t_start=". $t_start->getYYYYMMDDHHMM(),true); } $t_end = new TUTOS_Date_Time(); $t_end->setDateTimeF("t_end"); if ( ( !$t_end->checkDMY()) || (-1 == $t_end->getTimeStamp()) ) { #$msg .= sprintf($lang['Err0038'],$lang['ExpenseEndTime']) ."<br />"; - $t->end->notime = 1; + $t->end->notime = 1; $u->setEndTime($t_end); } else { $u->setEndTime($t_end); @@ -149,10 +149,10 @@ $msg .= module_parseforms($current_user,$u,$gotourl); if ( !$bad && $msg == "" ) { - $dbconn->Begin("WORK"); - $msg .= $u->save(); - $dbconn->Commit("WORK"); - $gotourl = $u->getURL(); + $dbconn->Begin("WORK"); + $msg .= $u->save(); + $dbconn->Commit("WORK"); + $gotourl = $u->getURL(); } leave_insert($dbconn,'../'.$gotourl,$msg); @@ -161,4 +161,4 @@ * $Author$ */ -?> +?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/localization In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/localization Modified Files: holiday_es.pinc holiday_es_ve.pinc holiday_ko.pinc holiday_pt.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: holiday_es.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/holiday_es.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- holiday_es.pinc 17 Jun 2008 19:25:21 -0000 1.3 +++ holiday_es.pinc 28 Sep 2009 11:30:28 -0000 1.4 @@ -9,22 +9,22 @@ * Type = 1 marks the day red in the calendar */ - $tutos[cal][] = array( - array( Date => "01-01", type => 1, Desc => "Año Nuevo (ES)"), - array( Date => "06-01", type => 1, Desc => "Reyes (ES)"), - array( Date => "29-03", type => 1, Desc => "Viernes Santo (ES)"), - array( Date => "01-04", type => 1, Desc => "Lunes de Pascua (ES)"), - array( Date => "01-05", type => 1, Desc => "Fiesta del Trabajo (ES)"), - array( Date => "24-06", type => 1, Desc => "San Juan (ES)"), - array( Date => "15-08", type => 1, Desc => "Asuncion (ES)"), - array( Date => "12-10", type => 1, Desc => "Dia de la Hispanidad (ES)"), - array( Date => "01-11", type => 1, Desc => "Todos los Santos (ES)"), - array( Date => "06-12", type => 1, Desc => "Constitución (ES)"), - array( Date => "08-12", type => 1, Desc => "Inmaculada Concepción (ES)"), - array( Date => "25-12", type => 1, Desc => "Navidad (ES)"), - ); + $tutos[cal][] = array( + array( Date => "01-01", type => 1, Desc => "Año Nuevo (ES)"), + array( Date => "06-01", type => 1, Desc => "Reyes (ES)"), + array( Date => "29-03", type => 1, Desc => "Viernes Santo (ES)"), + array( Date => "01-04", type => 1, Desc => "Lunes de Pascua (ES)"), + array( Date => "01-05", type => 1, Desc => "Fiesta del Trabajo (ES)"), + array( Date => "24-06", type => 1, Desc => "San Juan (ES)"), + array( Date => "15-08", type => 1, Desc => "Asuncion (ES)"), + array( Date => "12-10", type => 1, Desc => "Dia de la Hispanidad (ES)"), + array( Date => "01-11", type => 1, Desc => "Todos los Santos (ES)"), + array( Date => "06-12", type => 1, Desc => "Constitución (ES)"), + array( Date => "08-12", type => 1, Desc => "Inmaculada Concepción (ES)"), + array( Date => "25-12", type => 1, Desc => "Navidad (ES)"), + ); ### Local Variables: *** ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Index: holiday_ko.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/holiday_ko.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- holiday_ko.pinc 17 Jun 2008 19:25:21 -0000 1.3 +++ holiday_ko.pinc 28 Sep 2009 11:30:28 -0000 1.4 @@ -12,49 +12,49 @@ $tutos[cal][] = array( - /*4ëêµê²½ì¼*/ - /*Four important day of remeberance*/ + /*4ëêµê²½ì¼*/ + /*Four important day of remeberance*/ array( Date => "01-03", type => 1, Desc => "ì¼ì¼ì "), - // the day when the movement of restoring independance to korea started + // the day when the movement of restoring independance to korea started array( Date => "17-07", type => 1, Desc => "ì íì "), - // the day when constitutional law created + // the day when constitutional law created array( Date => "15-08", type => 1, Desc => "ê´ë³µì "), - // the day when korea regained its independance + // the day when korea regained its independance array( Date => "03-10", type => 1, Desc => "ê°ì²ì "), - // the Foundation day of Korea + // the Foundation day of Korea - /*ë²ì ê³µí´ì¼*/ - /*holidays by law*/ + /*ë²ì ê³µí´ì¼*/ + /*holidays by law*/ array( Date => "01-01", type => 1, Desc => "ì ì "), - // Western New Years Day + // Western New Years Day array( Date => "05-04", type => 1, Desc => "ì목ì¼"), - // the day for planting Trees + // the day for planting Trees array( Date => "05-19", type => 1, Desc => "ìíì¼"), - // buddha's birthday - /*ìë ¥ì´ë¤!*/ - /*above entry is calculated by lunar calendar! every year it + // buddha's birthday + /*ìë ¥ì´ë¤!*/ + /*above entry is calculated by lunar calendar! every year it changes in julian calendar. for 2002, its 05-19*/ - /*this is continuous problem for all far east countries. + /*this is continuous problem for all far east countries. there are luna calendar in php, - may have to try adding it */ + may have to try adding it */ array( Date => "05-05", type => 1, Desc => "ì´ë¦°ì´ë "), - // children's day + // children's day array( Date => "06-06", type => 1, Desc => "íì¶©ì¼"), - // memorial day + // memorial day array( Date => "25-12", type => 1, Desc => "ì±íì "), - // christmas + // christmas - /*ëª ì */ - /*festival day*/ - /*all festival days are in lunar calendar!*/ + /*ëª ì */ + /*festival day*/ + /*all festival days are in lunar calendar!*/ array( Date => "11-02", type => 1, Desc => "ì¤ë "), array( Date => "12-02", type => 1, Desc => "ì¤ë "), array( Date => "13-02", type => 1, Desc => "ì¤ë "), - // seol, new year festival + // seol, new year festival array( Date => "20-09", type => 1, Desc => "ì¶ì"), array( Date => "21-09", type => 1, Desc => "ì¶ì"), array( Date => "22-09", type => 1, Desc => "ì¶ì"), - // chusuk, thanks giving festival + // chusuk, thanks giving festival ); ### Local Variables: *** Index: holiday_es_ve.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/holiday_es_ve.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- holiday_es_ve.pinc 17 Jun 2008 19:25:21 -0000 1.3 +++ holiday_es_ve.pinc 28 Sep 2009 11:30:28 -0000 1.4 @@ -9,20 +9,20 @@ * Type = 1 marks the day red in the calendar */ - $tutos[cal][] = array( - array( Date => "01-01", type => 1, Desc => "Año Nuevo (VE)"), - array( Date => "06-01", type => 1, Desc => "Reyes (VE)"), - array( Date => "19-04", type => 1, Desc => "Declaración de Independencia (VE)"), - array( Date => "01-05", type => 1, Desc => "Dia del Trabajo (VE)"), - array( Date => "24-06", type => 1, Desc => "Batalla de Carabobo (VE)"), - array( Date => "05-07", type => 1, Desc => "Dia de la Independencia (VE)"), - array( Date => "24-07", type => 1, Desc => "Natalicio del Libertador (VE)"), - array( Date => "12-10", type => 1, Desc => "Descubrimiento de América (VE)"), - array( Date => "17-12", type => 1, Desc => "Muerte del Libertador (VE)"), - array( Date => "25-12", type => 1, Desc => "Navidad (VE)"), - ); + $tutos[cal][] = array( + array( Date => "01-01", type => 1, Desc => "Año Nuevo (VE)"), + array( Date => "06-01", type => 1, Desc => "Reyes (VE)"), + array( Date => "19-04", type => 1, Desc => "Declaración de Independencia (VE)"), + array( Date => "01-05", type => 1, Desc => "Dia del Trabajo (VE)"), + array( Date => "24-06", type => 1, Desc => "Batalla de Carabobo (VE)"), + array( Date => "05-07", type => 1, Desc => "Dia de la Independencia (VE)"), + array( Date => "24-07", type => 1, Desc => "Natalicio del Libertador (VE)"), + array( Date => "12-10", type => 1, Desc => "Descubrimiento de América (VE)"), + array( Date => "17-12", type => 1, Desc => "Muerte del Libertador (VE)"), + array( Date => "25-12", type => 1, Desc => "Navidad (VE)"), + ); ### Local Variables: *** ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Index: holiday_pt.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/holiday_pt.pinc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- holiday_pt.pinc 17 Jun 2008 19:25:21 -0000 1.3 +++ holiday_pt.pinc 28 Sep 2009 11:30:28 -0000 1.4 @@ -13,22 +13,22 @@ * Type = 1 marks the day red in the calendar */ - $tutos[cal][] = array( - array( Date => "01-01", type => 1, Desc => "Ano Novo (PT)"), - array( Date => "04-03", type => 1, Desc => "Carnaval (PT)"), - array( Date => "18-04", type => 1, Desc => "Sexta-feira Santa (PT)"), - array( Date => "20-04", type => 1, Desc => "Dia de Páscoa (PT)"), - array( Date => "25-04", type => 1, Desc => "25 de Abril (PT)"), - array( Date => "01-05", type => 1, Desc => "Dia do Trabalhador (PT)"), - array( Date => "10-06", type => 1, Desc => "Dia de Portugal (PT)"), - array( Date => "13-06", type => 1, Desc => "Santo António de Lisboa (PT)"), - array( Date => "15-08", type => 1, Desc => "Assunção de Nº Senhora (PT)"), - array( Date => "05-10", type => 1, Desc => "Implantação da República (PT)"), - array( Date => "01-11", type => 1, Desc => "Todos os Santos (PT)"), - array( Date => "01-12", type => 1, Desc => "Restauração da Independência (PT)"), - array( Date => "08-12", type => 1, Desc => "Imaculada Conceição (PT)"), - array( Date => "25-12", type => 1, Desc => "Natal (PT)"), - ); + $tutos[cal][] = array( + array( Date => "01-01", type => 1, Desc => "Ano Novo (PT)"), + array( Date => "04-03", type => 1, Desc => "Carnaval (PT)"), + array( Date => "18-04", type => 1, Desc => "Sexta-feira Santa (PT)"), + array( Date => "20-04", type => 1, Desc => "Dia de Páscoa (PT)"), + array( Date => "25-04", type => 1, Desc => "25 de Abril (PT)"), + array( Date => "01-05", type => 1, Desc => "Dia do Trabalhador (PT)"), + array( Date => "10-06", type => 1, Desc => "Dia de Portugal (PT)"), + array( Date => "13-06", type => 1, Desc => "Santo António de Lisboa (PT)"), + array( Date => "15-08", type => 1, Desc => "Assunção de Nº Senhora (PT)"), + array( Date => "05-10", type => 1, Desc => "Implantação da República (PT)"), + array( Date => "01-11", type => 1, Desc => "Todos os Santos (PT)"), + array( Date => "01-12", type => 1, Desc => "Restauração da Independência (PT)"), + array( Date => "08-12", type => 1, Desc => "Imaculada Conceição (PT)"), + array( Date => "25-12", type => 1, Desc => "Natal (PT)"), + ); ### Local Variables: *** ### mode:iso-accents *** ### coding:utf-8 *** |
From: Gero K. <gok...@us...> - 2009-09-28 11:30:38
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28004/php/bugtracking Modified Files: bug.pinc Log Message: rework of check_field and ajax to be more flexible in future Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- bug.pinc 14 Sep 2009 11:11:51 -0000 1.100 +++ bug.pinc 28 Sep 2009 11:30:27 -0000 1.101 @@ -271,15 +271,15 @@ $this->short = ''; $this->medium = ''; $this->plandate = new TUTOS_Date_Time(0); // planned solve date - $this->solvedate = new TUTOS_Date_Time(0); // real solvedate - - $this->tablename = $this->dbconn->prefix .$table['bug'][name]; + $this->solvedate = new TUTOS_Date_Time(0); // real solvedate + + $this->tablename = $this->dbconn->prefix .$table['bug'][name]; $this->tablename2 = $this->dbconn->prefix .$table['bug2'][name]; $this->tablename3 = $this->dbconn->prefix .$table['bug3'][name]; $this->acl[$current_user->id] = $tutos[modok]; $this->bughist = array(); - $this->run_postinit_hook(); + $this->run_postinit_hook(); } function exportXML_body ($only_ids = false) { |
From: Gero K. <gok...@us...> - 2009-09-24 14:00:35
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6055/php Modified Files: history_show.php Log Message: fix Index: history_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/history_show.php,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- history_show.php 14 Jun 2009 19:53:22 -0000 1.92 +++ history_show.php 24 Sep 2009 14:00:14 -0000 1.93 @@ -109,7 +109,7 @@ $r .= $this->OverviewRowStart($line); if ( $this->id == -1 ) { $this->obj = getObject($this->dbconn,$f["obj_id"],1); - if ( !is_object($this->obj) ) { + if ( !is_object($this->obj) || ($this->obj->getType() == 'base') ) { $r .= ' <td colspan="2"><b> '. $f["obj_id"] ."</b></td>\n"; } else { $r .= ' <td> '. $lang[$this->obj->getType()] .'</td><td> <b>'. $this->obj->getLink() ."</b></td>\n"; |
From: Gero K. <gok...@us...> - 2009-09-24 14:00:29
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6055/php/note Modified Files: note_ins.php Log Message: fix Index: note_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note_ins.php,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- note_ins.php 1 Apr 2009 09:21:16 -0000 1.24 +++ note_ins.php 24 Sep 2009 14:00:14 -0000 1.25 @@ -73,6 +73,8 @@ # other modules $msg .= module_parseforms($current_user,$u,$gotourl); +$msg .= $u->run_check_hook(); + if ( $msg == "" ) { $dbconn->Begin("WORK"); $msg .= $u->save(); |
From: Gero K. <gok...@us...> - 2009-09-23 09:35:09
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5538/php Modified Files: app_overview.php app_select.php team_overview.php team_select.php Log Message: stored queries Index: app_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_select.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- app_select.php 29 Mar 2009 18:25:40 -0000 1.30 +++ app_select.php 23 Sep 2009 09:34:56 -0000 1.31 @@ -84,6 +84,11 @@ $r .= $this->getHidden(); $r .= "</form>\n"; + // shortcuts with urls + if (class_exists('url')) { + $r .= url::getFastSelect($this); + } + $r .= $this->setfocus("appsearch.name"); return $r; } @@ -93,10 +98,16 @@ Function prepare() { global $msg,$lang; + $this->layout_id = usecalendar; $this->name = $lang['AppsSearch']; $this->center = true; $this->css_class = 'selectbox'; + if ( ! $this->user->feature_ok(usecalendar,PERM_SEL) ) { + $msg .= sprintf($lang['Err0022'],"'". $this->name ."'"); + $this->stop = true; + } + // Defaults for search $this->asfd = new TUTOS_Date_Time(0); $this->astd = new TUTOS_Date_Time(0); Index: app_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_overview.php,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- app_overview.php 29 Mar 2009 18:25:40 -0000 1.65 +++ app_overview.php 23 Sep 2009 09:34:56 -0000 1.66 @@ -190,6 +190,7 @@ Function prepare() { global $lang,$msg; + $this->layout_id = usecalendar; $this->name = $lang['AppointOverview']; $this->css_class = 'overviewbox'; @@ -330,6 +331,11 @@ $m = appointment::getAddLink($this->user,$this->user); } $this->addMenu($m); + + if (class_exists('url')) { + $this->addMenu(url::getAddLinkPreset($this->user,$this)); + } + } } Index: team_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_select.php,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- team_select.php 29 Mar 2009 18:25:41 -0000 1.10 +++ team_select.php 23 Sep 2009 09:34:56 -0000 1.11 @@ -50,6 +50,11 @@ $r .= $this->getHidden(); $r .= "</form>\n"; + // shortcuts with urls + if (class_exists('url')) { + $r .= url::getFastSelect($this); + } + $r .= $this->setfocus("teamsearch.name"); return $r; } @@ -59,6 +64,7 @@ Function prepare() { global $msg,$lang; + $this->layout_id = useteams; $this->name = $lang['TeamSearch']; $this->center = true; $this->css_class = 'selectbox'; Index: team_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_overview.php,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- team_overview.php 30 Mar 2009 15:48:05 -0000 1.61 +++ team_overview.php 23 Sep 2009 09:34:56 -0000 1.62 @@ -167,6 +167,7 @@ Function prepare() { global $lang; + $this->layout_id = useteams; $this->name = $lang['TeamOverview']; $this->css_class = 'overviewbox'; @@ -218,6 +219,11 @@ $this->result->free(); } } + + if (class_exists('url')) { + $this->addMenu(url::getAddLinkPreset($this->user,$this)); + } + } } |
From: Gero K. <gok...@us...> - 2009-09-23 09:35:07
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5538/php/url Modified Files: url_overview.php url_select.php Log Message: stored queries Index: url_select.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_select.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- url_select.php 29 Mar 2009 18:25:42 -0000 1.6 +++ url_select.php 23 Sep 2009 09:34:56 -0000 1.7 @@ -53,6 +53,11 @@ $r .= $this->getHidden(); $r .= "</form>\n"; + // shortcuts with urls + if (class_exists('url')) { + $r .= url::getFastSelect($this); + } + $r .= $this->setfocus('urlsearch.name'); return $r; } @@ -62,6 +67,7 @@ Function prepare() { global $msg,$lang; + $this->layout_id = useurl; $this->name = $lang['URLSearch']; $this->center = true; $this->css_class = 'selectbox'; @@ -80,4 +86,4 @@ <!-- CVS Info: $Id$ $Author$ - --> \ No newline at end of file + --> Index: url_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url_overview.php,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- url_overview.php 23 Jun 2009 16:06:22 -0000 1.19 +++ url_overview.php 23 Sep 2009 09:34:56 -0000 1.20 @@ -159,6 +159,7 @@ Function prepare() { global $msg,$lang; + $this->layout_id = useurl; $this->name = $lang['URLOverview']; $this->css_class = 'overviewbox'; @@ -207,6 +208,12 @@ $x = url::getSelectLink($this->user,$lang['Search']); $x[category][] = "obj"; $this->addMenu($x); + + + if (class_exists('url')) { + $this->addMenu(url::getAddLinkPreset($this->user,$this)); + } + } } @@ -217,4 +224,4 @@ <!-- CVS Info: $Id$ $Author$ - --> \ No newline at end of file + --> |
From: Gero K. <gok...@us...> - 2009-09-21 07:19:32
|
Update of /cvsroot/tutos/tutos/html In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18135 Added Files: loading.gif Log Message: initial --- NEW FILE: loading.gif --- (This appears to be a binary file; contents omitted.) |
From: Gero K. <gok...@us...> - 2009-09-21 07:17:20
|
Update of /cvsroot/tutos/tutos/php/report-engine/rep_doccheck In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17801/rep_doccheck Added Files: en.p3 rep_doccheck.pinc Log Message: initial --- NEW FILE: rep_doccheck.pinc --- <?php /** * Copyright 2009 by Gero Kohnert SIEMENS AG * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * * CVS Info: $Id: rep_doccheck.pinc,v 1.1 2009/09/21 07:17:08 gokohnert Exp $ * $Author: gokohnert $ */ loadmodules('product','show'); class rep_doccheck extends rep_base { function rep_doccheck($dbconn,$report) { $this->init($dbconn,$report); $this->format = "html"; $this->obj = -1; if (isset($_GET['id'])) { $this->obj = getObject($this->dbconn,$_GET['id']); } $this->format = "batch"; } /** * create a batch file for check the doc pathes locally */ function show() { global $tutos,$lang,$current_user; $r = ''; # header("Content-type: application/x-msdos-program"); header("Content-type: text/plain"); # header("Content-Disposition: attachment; filename=check_". $this->obj->id .".bat"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); $r .= '@echo off' ."\r\n"; $r .= 'REM ##' ."\r\n"; $r .= 'REM ## Checking Pathes and Files' ."\r\n"; $r .= 'REM ##' ."\r\n"; $r .= 'REM ##' ."\r\n"; $r .= 'title checking documents' ."\r\n"; $r .= 'echo #'.str_pad('',75,'#').'#' ."\r\n"; $r .= 'echo #'.str_pad('',75,' ').'#' ."\r\n"; $r .= 'echo #'.str_pad(' this script will test for all documents',75,' ').'#' ."\r\n"; $r .= 'echo #'.str_pad(' in the project '. $this->obj->getFullName(),75,' ').'#' ."\r\n"; $r .= 'echo #'.str_pad('',75,' ').'#' ."\r\n"; $r .= 'echo #'.str_pad('',75,'#').'#' ."\r\n"; doctracker::obj_read($this->obj); foreach($this->obj->list[usedoctracker] as $i) { $p = $i->getBaseDirName(). rtrim($i->getDirName(),'/').'/'.$i->getFileName(); # $p = ereg_replace('//','/',$p); # $p = str_replace('\\\\','\\',$p); $p = str_replace('file:///','',$p); $p = str_replace('file:/','',$p); $r .= 'if not exist '. $p .' (' ."\r\n"; $r .= ' echo -' ."\r\n"; $r .= ' echo *'.str_pad('',75,'*').'*' ."\r\n"; $r .= ' echo **** '. $p .' does not exist' ."\r\n"; $r .= ' echo '. str_pad($lang['DocTrackTypes'][$i->type].' '. $i->getFullName(),73,' ').'FAIL' ."\r\n"; $r .= ') else (' ."\r\n"; $r .= ' echo '. str_pad($lang['DocTrackTypes'][$i->type].' '. $i->getFullName(),75,' ').'OK' ."\r\n"; $r .= ')' ."\r\n"; } $r .= 'pause' ."\r\n"; $r .= 'REM ##' ."\r\n"; $r .= 'REM ## END OF FILE ' ."\r\n"; $r .= 'REM ##' ."\r\n"; $r .= 'REM ##' ."\r\n"; return $r; } function complete() { if(! class_exist('doctrack')) { return false; } return true; } function ask_form() { global $lang; $r = ''; return $r; } function getFullname() { global $lang; return $lang['rep_doccheck_name']; } function getInfo() { global $lang; $r = $lang['rep_doccheck_info'].'<br />'; return $r; } } ?> --- NEW FILE: en.p3 --- <?php /** * Copyright 2009 by Gero Kohnert SIEMENS AG * * * CVS Info: $Id: en.p3,v 1.1 2009/09/21 07:17:08 gokohnert Exp $ * $Author: gokohnert $ */ $lang['rep_doccheck_name'] = "Check Documents"; $lang['rep_doccheck_info'] = " check for the existance of documents attached to the project<br /> "; ?> |
From: Gero K. <gok...@us...> - 2009-09-21 07:16:20
|
Update of /cvsroot/tutos/tutos/php/report-engine/rep_doccheck In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17716/rep_doccheck Log Message: Directory /cvsroot/tutos/tutos/php/report-engine/rep_doccheck added to the repository |