tutos-commits Mailing List for TUTOS (Page 5)
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
|
From: <gok...@us...> - 2014-02-22 18:27:47
|
Revision: 1242 http://sourceforge.net/p/tutos/code/1242 Author: gokohnert Date: 2014-02-22 18:27:42 +0000 (Sat, 22 Feb 2014) Log Message: ----------- fixes per user config, history length dpends on maxshort Modified Paths: -------------- trunk/php/address_show.php trunk/php/layout/layout_base.pinc trunk/php/product.pinc trunk/php/webelements.p3 Modified: trunk/php/address_show.php =================================================================== --- trunk/php/address_show.php 2014-02-20 14:10:00 UTC (rev 1241) +++ trunk/php/address_show.php 2014-02-22 18:27:42 UTC (rev 1242) @@ -297,7 +297,7 @@ add_module_addlinks($this,$this->obj); // add tree link - $this->addMenu($this->obj->getTreeLink()); + $this->addMenu($this->obj->getTreeLink($this->user)); // add this page to the browsehistory of the users session $this->addtohistory(); Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2014-02-20 14:10:00 UTC (rev 1241) +++ trunk/php/layout/layout_base.pinc 2014-02-22 18:27:42 UTC (rev 1242) @@ -978,7 +978,7 @@ * add the currently visible TUTOS object to the session history */ function addtohistory() { - global $lang; + global $lang,$tutos; if ($this->stop) return; if (!isset($this->obj)) return; @@ -991,7 +991,7 @@ } } reset($_SESSION['history']); - while(count($_SESSION['history']) > 5) { + while(count($_SESSION['history']) >= (2*$tutos['maxshort'])) { foreach($_SESSION['history'] as $i => $x) { unset( $_SESSION['history'][$i] ); break; Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2014-02-20 14:10:00 UTC (rev 1241) +++ trunk/php/product.pinc 2014-02-22 18:27:42 UTC (rev 1242) @@ -1033,7 +1033,7 @@ $x .= $w->getLink(); } if ( !empty($this->roledesc[$role][$i]) ) { - $x .= ' ('. myentities($this->obj->roledesc[$role][$i]) .')'; + $x .= ' ('. myentities($this->roledesc[$role][$i]) .')'; } } $r .= $ly->showdata($x,$ly->width -1); Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2014-02-20 14:10:00 UTC (rev 1241) +++ trunk/php/webelements.p3 2014-02-22 18:27:42 UTC (rev 1242) @@ -2763,15 +2763,15 @@ // handle default selection if (isset($_REQUEST['def_'.$fld]) && $_REQUEST['def_'.$fld] == 1) { // remove - //$info = addLine($info,'default:'.$fld); $obj->def_tutos[$fld] = true; write_config_value($dbconn,$fld,$tutos['cfg'][$fld]['section'],$obj); return true; } else if ($obj != null && $obj->getType() == 'user') { $obj->def_tutos[$fld] = false; } else { - if (!isset($tutos[$fld]) && isset($tutos['cfg'][$fld]['default']) ) + if (!isset($tutos[$fld]) && isset($tutos['cfg'][$fld]['default']) ) { $val = $tutos['cfg'][$fld]['default']; + } } @@ -2782,7 +2782,6 @@ } else { $val = 1; } - // $info = addLine($info,'set:'.$fld.' to '.$val); break; case 'int': $val = $_REQUEST[$fld]; @@ -2807,7 +2806,6 @@ } else { $val = $_REQUEST[$fld]; } - // $info = addLine($info,'set:'.$fld.' to '.$val); break; case 'stc': if (!isset($_REQUEST[$fld]) ) { @@ -2815,22 +2813,20 @@ } else { $val = implode(',',$_REQUEST[$fld]); } - // $info = addLine($info,'set:'.$fld.' to '.$val); break; default: $info = addLine($info,'unknown:'.$fld.' '.$tutos['cfg'][$fld][type]); break; } - - if ($stop) + if ($stop) { return false; - - if ($obj == null || $obj->getType() == 'user') + } + if ($obj == null || $obj->getType() == 'user') { $tutos[$fld] = $val; - else + } else { $obj->tutos[$fld] = $val; - + } write_config_value($dbconn,$fld,$tutos['cfg'][$fld]['section'],$obj); return true; } @@ -2942,7 +2938,7 @@ $r = $dbconn->Exec($q); $r->free(); - if ( ($obj != null) && isset($obj->def_tutos) && isset($obj->def_tutos[$name])) { + if ( ($obj != null) && isset($obj->def_tutos) && (true == $obj->def_tutos[$name])) { return; // use default -> no object specific handling } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-20 14:10:03
|
Revision: 1241 http://sourceforge.net/p/tutos/code/1241 Author: gokohnert Date: 2014-02-20 14:10:00 +0000 (Thu, 20 Feb 2014) Log Message: ----------- add tree icon Modified Paths: -------------- trunk/php/base.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/theme_base.pinc trunk/php/product_show.php trunk/php/task_show.php Added Paths: ----------- trunk/html/arrow_branch.png Added: trunk/html/arrow_branch.png =================================================================== (Binary files differ) Index: trunk/html/arrow_branch.png =================================================================== --- trunk/html/arrow_branch.png 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/html/arrow_branch.png 2014-02-20 14:10:00 UTC (rev 1241) Property changes on: trunk/html/arrow_branch.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/png \ No newline at end of property Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/php/base.pinc 2014-02-20 14:10:00 UTC (rev 1241) @@ -1019,15 +1019,15 @@ /** * create a link to the tree page */ - function getTreeLink ($text = '') { + function getTreeLink (tutos_user $user,$text = '') { global $lang,$tutos; if ($this->getTreeStructure(0) == '') { return null; } return array( url => 'tree.php?id='.$this->id, - text => ($text == '' ? 'TREE': $text), - category => array('show',self::getType(),'view',$this->getType()) + text => ($text == '' ? 'Treebrowser': $text), + category => array('view','tree') ); } Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/php/layout/new2_layout.pinc 2014-02-20 14:10:00 UTC (rev 1241) @@ -653,6 +653,8 @@ $ti = $this->theme->getImage(add,'menu2'); } else if ( in_array('del',$m[category]) ) { $ti = $this->theme->getImage(del,'menu2'); + } else if ( in_array('tree',$m[category]) ) { + $ti = $this->theme->getImage(tree,'menu2'); } else if ( in_array('search',$m[category]) ) { $ti = '?'; } else if ($mode == 3) { @@ -828,7 +830,7 @@ $t = ''; if ($img) { - $t = '<span class="spacer1">'.(isset($m[image])?$m[image]:"").'</span>'; + $t = '<span class="spacer1">'.(isset($m[image])?$m[image]:'').'</span>'; if (isset($m[text])) $t .=' <span class="spacer2">'. myentities($m[text]).'</span>'; } else { Modified: trunk/php/layout/theme_base.pinc =================================================================== --- trunk/php/layout/theme_base.pinc 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/php/layout/theme_base.pinc 2014-02-20 14:10:00 UTC (rev 1241) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2013 by Gero Kohnert + * Copyright 2003 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -11,7 +11,7 @@ */ $tutos['files'][__FILE__] = '$Rev$'; -# Image IDs +// Image IDs define ('addresses',2); define ('teams',5); define ('user',6); @@ -46,6 +46,7 @@ define ('find',35); define ('edit',36); define ('html',37); +define ('tree',38); /** * @@ -157,6 +158,7 @@ $this->i[find] = $this->findImage('find'); $this->i[edit] = $this->findImage('pencil'); $this->i[mail] = $this->findImage('email'); + $this->i[tree] = $this->findImage('arrow_branch'); $this->a[up] = "UP"; $this->a[down] = "DOWN"; @@ -180,7 +182,6 @@ return ''; } } - if (isset($this->i[$type])) { if (!empty($this->i[$type])) { return '<img class="'. $purpose .' icon icon_'. $type .'" src="'. $this->i[$type] .'" alt="'. (isset($this->a[$type]) ? $this->a[$type] : '') .'" />'; Modified: trunk/php/product_show.php =================================================================== --- trunk/php/product_show.php 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/php/product_show.php 2014-02-20 14:10:00 UTC (rev 1241) @@ -192,7 +192,7 @@ add_module_addlinks($this,$this->obj); // add tree link - $this->addMenu($this->obj->getTreeLink()); + $this->addMenu($this->obj->getTreeLink($this->user)); // add this page to the browsehistory of the users session $this->addtohistory(); Modified: trunk/php/task_show.php =================================================================== --- trunk/php/task_show.php 2014-02-20 07:59:51 UTC (rev 1240) +++ trunk/php/task_show.php 2014-02-20 14:10:00 UTC (rev 1241) @@ -157,7 +157,7 @@ add_module_addlinks($this,$this->obj); // add tree link - $this->addMenu($this->obj->getTreeLink()); + $this->addMenu($this->obj->getTreeLink($this->user)); // add this page to the browsehistory of the users session $this->addtohistory(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-20 07:59:54
|
Revision: 1240 http://sourceforge.net/p/tutos/code/1240 Author: gokohnert Date: 2014-02-20 07:59:51 +0000 (Thu, 20 Feb 2014) Log Message: ----------- more tree stuff Modified Paths: -------------- trunk/php/base.pinc trunk/php/custom.pinc trunk/php/note/note.pinc Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2014-02-20 07:58:58 UTC (rev 1239) +++ trunk/php/base.pinc 2014-02-20 07:59:51 UTC (rev 1240) @@ -127,7 +127,7 @@ if (!isset($x['field'])) continue; if (isset($x['custom']) && $x['custom']) continue; if (!isset($x['ftype'])) $x['ftype'] = ''; - if ($x['ftype'] == 'ObjectRelBack') continue; + // if ($x['ftype'] == 'ObjectRelBack') continue; $fld = $x['field']; if (isset($this->$fld)) { @@ -144,6 +144,10 @@ } } else if ($x['ftype'] == 'Object') { $this->$fld = null; + } else if ($x['ftype'] == 'ObjectRel') { + $this->$fld = array(); + } else if ($x['ftype'] == 'ObjectRelBack') { + $this->$fld = array(); } else { $this->$fld = ''; } @@ -178,6 +182,10 @@ } } else if ($x['ftype'] == 'Object') { $this->$fld = null; + } else if ($x['ftype'] == 'ObjectRel') { + $this->$fld = array(); + } else if ($x['ftype'] == 'ObjectRelBack') { + $this->$fld = array(); } else { $this->$fld = ''; } @@ -258,11 +266,19 @@ if (!isset($x['custom'])) continue; if (!$x['custom']) continue; if (!isset($x['ftype'])) $x['ftype'] = ''; - if ($x['ftype'] == 'ObjectRel') continue; - if ($x['ftype'] == 'ObjectRelBack') continue; + // if ($x['ftype'] == 'ObjectRel') continue; + // if ($x['ftype'] == 'ObjectRelBack') continue; $fld = '_fld_'.$i; - if ($x[type] == 'TS_TYPE') { + if ($x['ftype'] == 'ObjectRel') { + if (isset($this->relations[$x['rel_id']])) { + $this->$fld = $this->relations[$x['rel_id']]; + } + } else if ($x['ftype'] == 'ObjectRelBack') { + if (isset($this->back_relations[$x['rel_id']])) { + $this->$fld = $this->back_relations[$x['rel_id']]; + } + } else if ($x[type] == 'TS_TYPE') { $this->$fld = $r->getDateTime($pos, $i); } else if ($x['ftype'] == 'Object') { $xx = @$r->get($pos,$i); @@ -286,16 +302,6 @@ $this->id = $r->getInt($pos, 'id'); $this->creation = $r->getDateTime($pos, 'creation'); - // - // read custom database fields - // - $this->read_custom_result($r,$pos,$this->gettype()); - - - // we have a real object so we reset the acl - # $this->acl[0] = array(); - acl_read($this); - // TODO: save description // read relations $fail = false; @@ -334,6 +340,16 @@ $this->cache_store('_r'.$this->id,$this->relations); $this->cache_store('_br'.$this->id,$this->back_relations); } + // + // read custom database fields + // + $this->read_custom_result($r,$pos,$this->gettype()); + + + // we have a real object so we reset the acl + # $this->acl[0] = array(); + acl_read($this); + $g_hash[$this->id] = &$this; $this->run_after_read_hook(); Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2014-02-20 07:58:58 UTC (rev 1239) +++ trunk/php/custom.pinc 2014-02-20 07:59:51 UTC (rev 1240) @@ -1739,6 +1739,7 @@ continue; } + // TODO: this should never be reached if (!isset($x['ftype'])) $x['ftype'] = ''; if (!isset($x['hideempty'])) $x['hideempty'] = false; @@ -1969,4 +1970,4 @@ return $r; } -?> +?> \ No newline at end of file Modified: trunk/php/note/note.pinc =================================================================== --- trunk/php/note/note.pinc 2014-02-20 07:58:58 UTC (rev 1239) +++ trunk/php/note/note.pinc 2014-02-20 07:59:51 UTC (rev 1240) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -30,15 +30,16 @@ foreach ($obj->list[usenotes] as $i => $f) { if ( ($n >= $rows) && ( $x != $rows ) ) { - $r .= " ". $user->layout->theme->getImage(folder,'list') ." ". makelink("note/note_overview.php?link_id=". $obj->id,sprintf($lang['AllEntries'], count($obj->list[usenotes]))); + $r .= ' '. $user->layout->theme->getImage(folder,'list') .' '. makelink('note/note_overview.php?link_id='. $obj->id,sprintf($lang['AllEntries'], count($obj->list[usenotes]))); break; } - $r .= $user->layout->theme->getImage(note::getHtmlIcon(),'list') ." ". $f->getLink() ." ". $f->creation->getDateTime(); - $r .= " ".(is_object($f->creator) ? $f->creator->getLink($f->creator->getShortname()):"")."<br />\n"; + $r .= $user->layout->theme->getImage(note::getHtmlIcon(),'list') .' '. $f->getLink() .' '. $f->creation->getDateTime(); + $r .= ' '.(is_object($f->creator) ? $f->creator->getLink($f->creator->getShortname()):'')."<br />\n"; $n++; } return $r; } + /** * ask a note's event type */ @@ -90,12 +91,12 @@ $this->init($dbconn); - $this->name = ''; - $this->note = ''; - $this->etype = 7; - $this->ref = -1; - $this->link_id = $current_user->id; - $this->remember = new TUTOS_Date_Time(0); + $this->name = ''; + $this->note = ''; + $this->etype = 7; + $this->ref = -1; + $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(); } @@ -112,7 +113,6 @@ $this->note = $r->get($pos, "note"); $this->etype = $r->get($pos, 'etype'); $this->remember = $r->getDateTime($pos, "remember"); - $this->creator = $r->getObject($pos, 'creator'); parent::read_result($r,$pos); @@ -194,12 +194,12 @@ $this->read_reference(); - $n =str_replace("\n","<br />",myentities(wordwrap($this->note,80))); - $n =str_replace("\r","",$n); - $n =str_replace("\\","\\\\",$n); + $n = str_replace("\n","<br />",myentities(wordwrap($this->note,80))); + $n = str_replace("\r","",$n); + $n = str_replace("\\","\\\\",$n); - $t =myentities($this->name); - $t =str_replace("\\","\\\\",$t); + $t = myentities($this->name); + $t = str_replace("\\","\\\\",$t); $h = myentities($this->ref->getFullName()); $h = preg_replace("#\r\n#"," ",$h); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-20 07:59:01
|
Revision: 1239 http://sourceforge.net/p/tutos/code/1239 Author: gokohnert Date: 2014-02-20 07:58:58 +0000 (Thu, 20 Feb 2014) Log Message: ----------- fix marking of search terms Modified Paths: -------------- trunk/php/stuff/stuff.pinc trunk/php/stuff/stuff_overview.php Modified: trunk/php/stuff/stuff.pinc =================================================================== --- trunk/php/stuff/stuff.pinc 2014-02-19 10:22:23 UTC (rev 1238) +++ trunk/php/stuff/stuff.pinc 2014-02-20 07:58:58 UTC (rev 1239) @@ -261,6 +261,30 @@ } /** + * Popup for stuff + */ + function getPopInfo() { + global $tutos,$lang; + + $t = myentities($this->name); + $t = str_replace("\\","\\\\",$t); + + $n = str_replace("\n","<br />",myentities(wordwrap($this->desc,80))); + $n = str_replace("\r","",$n); + $n = str_replace("\\","\\\\",$n); + + $info = ''; + $info .= '<table class="popupinfo">'; + $info .= '<tr><th>'. $lang[$this->getType()] .' '. $t .'</th></tr>'; + $info .= '<tr><td><pre>'; + $info .= $n; + $info .= '</pre></td></tr>'; + $info .= $this->custom_popup_content(); + $info .= '</table>'; + return $info; + } + + /** * Save stuff to DB */ function save() { Modified: trunk/php/stuff/stuff_overview.php =================================================================== --- trunk/php/stuff/stuff_overview.php 2014-02-19 10:22:23 UTC (rev 1238) +++ trunk/php/stuff/stuff_overview.php 2014-02-20 07:58:58 UTC (rev 1239) @@ -202,7 +202,6 @@ return $this->pdf_info(); } - foreach($tutos[currencies] as $c) { $sum[1][$c] = 0; } @@ -306,7 +305,7 @@ } else { $x = ''; } - $x = $this->mark_filter(myentities($x),'ownerfn'); + $x = $this->mark_filter(myentities($x),'owner'); $r .= $this->OverviewRowBlock((is_object($c->owner) ? $c->owner->getLink($x):'-'),'over_l'); } // Source @@ -316,7 +315,7 @@ } else { $x = ''; } - $x = $this->mark_filter(myentities($x),'sourcefn'); + $x = $this->mark_filter(myentities($x),'s_source'); $r .= $this->OverviewRowBlock((is_object($c->source) ? $c->source->getLink($x):'-'),'over_l'); } // User @@ -326,7 +325,7 @@ } else { $x = ''; } - $x = $this->mark_filter(myentities($x),'userfn'); + $x = $this->mark_filter(myentities($x),'s_user'); $r .= $this->OverviewRowBlock((is_object($c->suser) ? $c->suser->getLink($x):'-'),'over_l'); } // Inventory ID This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-19 10:22:26
|
Revision: 1238 http://sourceforge.net/p/tutos/code/1238 Author: gokohnert Date: 2014-02-19 10:22:23 +0000 (Wed, 19 Feb 2014) Log Message: ----------- first ceckin eith tree support in product/task Modified Paths: -------------- trunk/html/default.css trunk/php/address_show.php trunk/php/ajax.php trunk/php/base.pinc trunk/php/db/db_firebird.pinc trunk/php/db/db_interbase.pinc trunk/php/db/db_sqlite3.pinc trunk/php/history_show.php trunk/php/layout/layout_base.pinc trunk/php/layout/new_base.pinc trunk/php/module_base.pinc trunk/php/product.pinc trunk/php/product_show.php trunk/php/task.pinc trunk/php/task_show.php Added Paths: ----------- trunk/html/css/32px.png trunk/html/css/40px.png trunk/html/css/jstree.style.min.css trunk/html/css/normalize.css trunk/html/css/throbber.gif trunk/html/js/jstree.min.js trunk/php/tree.php trunk/php/treedata.php Added: trunk/html/css/32px.png =================================================================== (Binary files differ) Index: trunk/html/css/32px.png =================================================================== --- trunk/html/css/32px.png 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/html/css/32px.png 2014-02-19 10:22:23 UTC (rev 1238) Property changes on: trunk/html/css/32px.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/png \ No newline at end of property Added: trunk/html/css/40px.png =================================================================== (Binary files differ) Index: trunk/html/css/40px.png =================================================================== --- trunk/html/css/40px.png 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/html/css/40px.png 2014-02-19 10:22:23 UTC (rev 1238) Property changes on: trunk/html/css/40px.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/png \ No newline at end of property Added: trunk/html/css/jstree.style.min.css =================================================================== --- trunk/html/css/jstree.style.min.css (rev 0) +++ trunk/html/css/jstree.style.min.css 2014-02-19 10:22:23 UTC (rev 1238) @@ -0,0 +1 @@ +.jstree-node,.jstree-children,.jstree-container-ul{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:link,.jstree-anchor:visited,.jstree-anchor:hover,.jstree-anchor:active{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-no-icons .jstree-themeicon,.jstree-anchor>.jstree-themeicon-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;-moz-box-shadow:5px 5px 4px -4px #666;-webkit-box-shadow:2px 2px 2px #999;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none;display:inline}.vakata-context li>a{display:block;padding:0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;-moz-text-shadow:1px 1px 0 #fff;-webkit-text-shadow:1px 1px 0 #fff;text-shadow:1px 1px 0 #fff;-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;-moz-box-shadow:0 0 2px #0a6aa1;-webkit-box-shadow:0 0 2px #0a6aa1;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator a,.vakata-context .vakata-context-separator a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;-moz-text-shadow:0 0 0 transparent;-webkit-text-shadow:0 0 0 transparent;text-shadow:0 0 0 transparent;-moz-box-shadow:0 0 0 transparent;-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-icon,#jstree-dnd .jstree-copy{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}#jstree-dnd.jstree-default .jstree-ok,#jstree-dnd.jstree-default .jstree-er{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:16px;height:16px}#jstree-dnd.jstree-default .jstree-ok{background-position:-9px -71px}#jstree-dnd.jstree-default .jstree-er{background-position:-39px -71px}.jstree-default>.jstree-striped{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-hovered,.jstree-default>.jstree-wholerow-ul .jstree-clicked{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-moz-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#beebff),color-stop(100%,#a8e4ff));background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-o-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:-ms-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-node,.jstree-default .jstree-icon{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-anchor>.jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-node,.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default .jstree-clicked>.jstree-checkbox{background-position:-228px -4px}.jstree-default .jstree-clicked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-node,.jstree-default-small .jstree-icon{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-anchor>.jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-node,.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small .jstree-clicked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small .jstree-clicked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-node,.jstree-default-large .jstree-icon{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-anchor>.jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-node,.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large .jstree-clicked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large .jstree-clicked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-size:120px 200px}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-anchor>.jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive .jstree-clicked>.jstree-checkbox,.jstree-default-responsive .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon,.jstree-default-responsive .jstree-checkbox{background-image:url(40px.png);background-size:120px 200px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none}}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0} \ No newline at end of file Property changes on: trunk/html/css/jstree.style.min.css ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/css \ No newline at end of property Added: trunk/html/css/normalize.css =================================================================== --- trunk/html/css/normalize.css (rev 0) +++ trunk/html/css/normalize.css 2014-02-19 10:22:23 UTC (rev 1238) @@ -0,0 +1,423 @@ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8+, and Opera + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} Property changes on: trunk/html/css/normalize.css ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/css \ No newline at end of property Added: trunk/html/css/throbber.gif =================================================================== (Binary files differ) Index: trunk/html/css/throbber.gif =================================================================== --- trunk/html/css/throbber.gif 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/html/css/throbber.gif 2014-02-19 10:22:23 UTC (rev 1238) Property changes on: trunk/html/css/throbber.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +image/gif \ No newline at end of property Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/html/default.css 2014-02-19 10:22:23 UTC (rev 1238) @@ -15,6 +15,12 @@ * */ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + #tutosversion { font-weight: normal; vertical-align: top; Added: trunk/html/js/jstree.min.js =================================================================== (Binary files differ) Index: trunk/html/js/jstree.min.js =================================================================== --- trunk/html/js/jstree.min.js 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/html/js/jstree.min.js 2014-02-19 10:22:23 UTC (rev 1238) Property changes on: trunk/html/js/jstree.min.js ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/javascript \ No newline at end of property Modified: trunk/php/address_show.php =================================================================== --- trunk/php/address_show.php 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/address_show.php 2014-02-19 10:22:23 UTC (rev 1238) @@ -50,8 +50,8 @@ $r .= " ". myentities($this->obj->getFullName()) ."\n"; $r .= " ". myentities($this->obj->location[$this->lid]->street1) ."\n"; $r .= " ". myentities($this->obj->location[$this->lid]->street2) ."\n"; -#ToDo: localize this - $adrformat = "%s - %s %s"; + #ToDo: localize this + $adrformat = "%s - %s %s"; $r .= " ". sprintf($adrformat,$this->obj->location[$this->lid]->country , $this->obj->location[$this->lid]->zip , $this->obj->location[$this->lid]->city )."\n"; $r .= " ". $lang['countrycde'][$this->obj->location[$this->lid]->country] ."\n"; $r .= "\n\n\n"; @@ -296,6 +296,9 @@ } add_module_addlinks($this,$this->obj); + // add tree link + $this->addMenu($this->obj->getTreeLink()); + // add this page to the browsehistory of the users session $this->addtohistory(); } Modified: trunk/php/ajax.php =================================================================== --- trunk/php/ajax.php 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/ajax.php 2014-02-19 10:22:23 UTC (rev 1238) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2005 - 2013 by Gero Kohnert + * Copyright 2005 - 2014 by Gero Kohnert * * SVN Info $Id$ * $Author$ @@ -121,7 +121,7 @@ $res = array(); $cnt = 0; -# error_log('G|'.$c.'| '.$item.' '.json_encode($mods).' '.$id."\r\n",3,$tutos[errlog]); + # error_log('G|'.$c.'| '.$item.' '.json_encode($mods).' '.$id."\r\n",3,$tutos[errlog]); if ($c == 'R') { // search for stakeholder (people having a role) in a given project @@ -219,12 +219,12 @@ $c = usedepartment; } -# error_log('Check '.$c."\r\n",3,$tutos[errlog]); + # error_log('Check '.$c."\r\n",3,$tutos[errlog]); if (!isset($tutos['classes'][$c])) continue; -# error_log('Check '.$tutos['classes'][$c]."\r\n",3,$tutos[errlog]); + # error_log('Check '.$tutos['classes'][$c]."\r\n",3,$tutos[errlog]); $x = new $tutos['classes'][$c]($dbconn); $xcnt = $x->search_by_name($res,$current_user,$item,1); -# error_log('Found '.$xcnt."\r\n",3,$tutos[errlog]); + # error_log('Found '.$xcnt."\r\n",3,$tutos[errlog]); foreach ($res as $a => $b) { if (! $b->see_ok()) continue; $r .= add_item ($b,($a<0)); Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/base.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -953,6 +953,69 @@ } /** + * get the detail info page (initial) + */ + function getAsHtmlPre(layout $ly) { + $r = ''; + $r .= $ly->DataTableStart(); + $r .= $ly->headline_gui(); + $r .= $ly->CreatorInfoLine($ly->obj,$ly->width); + return $r; + } + + /** + * get the detail info page (later) + */ + function getAsHtmlPost(layout $ly) { + $r = ''; + $r .= show_custom_fields($ly,$ly->obj->gettype(),$ly->obj,$ly->width); + $r .= show_module_infolists($ly->user,$ly->obj,$ly->width); + if ( $ly->format != "paper" ) { + $r .= $ly->getHistoryLink(); + } + $r .= $ly->DataTableEnd(); + return $r; + } + + /** + * get the detail info page + */ + function getAsHtml(layout $ly) { + global $lang; + + $r = ''; + $ly->width = 4; + $r .= $this->getAsHtmlPre($ly); + $r .= $ly->ContentRowStart(); + $r .= $ly->showdata('<pre>'.$this->getAsText($lang).'</pre>',$ly->width); + $r .= $ly->ContentRowEnd(); + $r .= $this->getAsHtmlPost($ly); + return $r; + } + + /** + * get the tree related to this object + */ + function getTreeStructure($key) { + return ''; + } + + /** + * create a link to the tree page + */ + function getTreeLink ($text = '') { + global $lang,$tutos; + + if ($this->getTreeStructure(0) == '') { + return null; + } + return array( url => 'tree.php?id='.$this->id, + text => ($text == '' ? 'TREE': $text), + category => array('show',self::getType(),'view',$this->getType()) + ); + } + + /** * get the modification info as text */ function getModText (&$lang) { Modified: trunk/php/db/db_firebird.pinc =================================================================== --- trunk/php/db/db_firebird.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/db/db_firebird.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -90,7 +90,7 @@ /** */ function open() { - global $phperrmsg; + global $phperrmsg,$tutos; $of = $this->openfunc; Modified: trunk/php/db/db_interbase.pinc =================================================================== --- trunk/php/db/db_interbase.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/db/db_interbase.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -110,11 +110,16 @@ /** */ function open() { - global $phperrmsg; + global $phperrmsg,$tutos; $of = $this->openfunc; - $c = @$of($this->db->host.":".$this->db->name,$this->db->user,$this->db->pass); + $n = $this->db->name; + if (substr($n,0,1) != "/") { + $n = $tutos['base'].'/'.$n; + } + + $c = @$of($this->db->host.":".$n,$this->db->user,$this->db->pass); if ($c == false) { Fatal_Error("Opening the Interbase database ".$this->getFullName() ,ibase_errmsg() ); } Modified: trunk/php/db/db_sqlite3.pinc =================================================================== --- trunk/php/db/db_sqlite3.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/db/db_sqlite3.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -101,8 +101,8 @@ } $this->conn = &$c; - $r = $this->exec('PRAGMA temp_store_directory = \''.$tutos[sessionpath].'\''); - $r->free(); + // deprecated $r = $this->exec('PRAGMA temp_store_directory = \''.$tutos[sessionpath].'\''); + // deprecated $r->free(); $r = $this->exec('PRAGMA encoding = \'UTF-8\''); $r->free(); } Modified: trunk/php/history_show.php =================================================================== --- trunk/php/history_show.php 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/history_show.php 2014-02-19 10:22:23 UTC (rev 1238) @@ -294,7 +294,7 @@ $arg++; } if ( $this->adr_id != -1 && is_object($this->adr)) { - $this->header .= $this->hpre.$lang['User'] .' = '. $this->adr->getFullName(); + $this->header .= $this->hpre.$lang['User'] .' = '. $this->adr->getLink(); $this->hpre = '<br />'; } if ( isset($_GET['adr_fn']) && ($_GET['adr_fn'] != '') ) { Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/layout/layout_base.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -215,7 +215,7 @@ } /** - * add the usual javasccript links for top of page + * add the usual javascript links for top of page */ function add_js_links_head() { global $tutos; @@ -233,7 +233,7 @@ } /** - * add the usual javasccript links for the end of page + * add the usual javascript links for the end of page */ function add_js_links_end() { global $tutos; @@ -315,6 +315,7 @@ $r = ''; // $r .= $this->add_css_link($tutos['base'] .'/html/css/ui-lightness/jquery-ui.custom.css'); + $r .= $this->add_css_link($tutos['base'] .'/html/css/normalize.css'); $r .= $this->add_css_link($tutos['base'] .'/html/css/smoothness/jquery-ui.custom.css'); $r .= $this->add_css_link($tutos['base'] .'/html/default.css'); $r .= $this->add_css_link($tutos['base'] .'/html/'.$this->getLayoutName() .'.css'); Modified: trunk/php/layout/new_base.pinc =================================================================== --- trunk/php/layout/new_base.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/layout/new_base.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2013 by Gero Kohnert + * Copyright 2003 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Modified: trunk/php/module_base.pinc =================================================================== --- trunk/php/module_base.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/module_base.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2013 by Gero Kohnert + * Copyright 2002 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -465,6 +465,15 @@ } /** + * the referenced obj asked for an tree + */ + static function obj_getTree (tutos_base $obj) { + $r = ''; + // $r .= '<li id="XXX'.$obj->id.'X">'.self::getType().'</li>'; + return $r; + } + + /** * a obj form is submitted * parse the values */ Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/product.pinc 2014-02-19 10:22:23 UTC (rev 1238) @@ -978,6 +978,173 @@ } /** + * get the detail info page + */ + function getAsHtml(layout $ly) { + global $table,$lang,$tutos; + + $this->readroles(); + + $ly->width = 4; + $r = ''; + $r .= $this->getAsHtmlPre($ly); + + if (is_object($this->pic_file)) { + $r .= $ly->ContentRowStart(); + $r .= $ly->showfield(''); + $x = makelink($this->pic_file->getUrl() ."&format=show", + '<img alt="'. $this->getFullName() .'" class="logopic" src="'. addSessionKey($this->pic_file->getUrl().'&format=show') .'">', + $this->getFullName()); + $r .= $ly->showdata($x,$ly->width-1); + $r .= $ly->ContentRowEnd(); + } + + $r .= $ly->showfield_data_row($this,$table['product']['name'],$ly->width -1,1); + $r .= $ly->showfield_data_row($this,$table['product']['version'],$ly->width -1,1); + + $r .= $ly->ContentRowStart(); + $r .= $ly->showfield($lang['ProdState']); + $r .= $ly->showdata($this->getStateColorBlock().$this->getState(),1); + $x = preg_split('#,#',$tutos['prod_activ_states']); + if (!in_array($this->state,$x)) { + $r .= $ly->showfield($lang['ProdProb']); + $r .= $ly->showdata($this->obj->probability ."%",1); + } else { + $r .= $ly->showdata(' ',2); + } + $r .= $ly->ContentRowEnd(); + + // roles + foreach ($lang['ProdRole'] as $role => $x ) { + if ( !isset($this->role[$role]) || (count($this->role[$role]) == 0) ) { + continue; + } + $r .= $ly->ContentRowStart(); + $r .= $ly->showfield($lang['ProdRole'][$role]); + $x = ''; + $pre = ''; + foreach ($this->role[$role] as $i => $w) { + $x .= $pre; + $pre = "<br />\n"; + + if ( $w->getType() == "department" ) { + $x .= $w->getLink( $w->getFullName() ); + } else { + $x .= $w->getLink(); + } + if ( !empty($this->roledesc[$role][$i]) ) { + $x .= ' ('. myentities($this->obj->roledesc[$role][$i]) .')'; + } + } + $r .= $ly->showdata($x,$ly->width -1); + $r .= $ly->ContentRowEnd(); + } + + $r .= $ly->showfield_data_row($this,$table['product']['description'],$ly->width -1,1); + $r .= $ly->showfield_data_row($this,$table['product']['desc1'],$ly->width -1,1); + $r .= $ly->showfield_data_row($this,$table['product']['desc2'],$ly->width -1,1); + + // Classification + for ( $cl = 1;$cl <= $this->classes; $cl++) { + if ( count($this->cl[$cl]) == 0 ) { + continue; + } + $r .= $ly->ContentRowStart(); + $r .= $ly->showfield($lang['ProdClass'.$cl]); + $x = ''; + foreach ($this->cl[$cl] as $i => $f) { + if ( isset ($lang['ProdClasses'.$cl][$f]) ) { + $x .= $lang['ProdClasses'.$cl][$f] . "<br />\n"; + } else { + $x .= $f . "<br />\n"; + } + } + $r .= $ly->showdata($x,$ly->width -1); + $r .= $ly->ContentRowEnd(); + } + + // pricing + if ( $this->price != '' || $this->cost != '') { + $r .= $ly->ContentRowStart(); + if ($this->price != '') { + $r .= $ly->showfield($lang['ProdPrice']); + $x= array($this->price,$this->currency); + $r .= $ly->showdata(handle('money',$x,my_number_format($this->price,2) .' <b>'. $this->currency .'</b>')); + } else { + $r .= $ly->showdata('',2); + } + + if ($this->cost != '') { + $r .= $ly->showfield($lang['ProdCost']); + $x= array($this->cost,$this->currency); + $r .= $ly->showdata(handle('money',$x,my_number_format($this->cost,2) .' <b>'. $this->currency .'</b>')); + } else { + $r .= $ly->showdata('',2); + } + $r .= $ly->ContentRowEnd(); + } + if ( ($this->p_start->notime == 0) || ($this->p_end->notime == 0) ) { + $r .= $ly->ContentRowStart(); + $r .= $ly->showfield($lang['ProdStart']); + $r .= $ly->showdata($this->p_start->GetLinkDate()); + $r .= $ly->showfield($lang['ProdEnd']); + $r .= $ly->showdata($this->p_end->GetLinkDate()); + $r .= $ly->ContentRowEnd(); + } + $r .= $ly->showfield_data_row($this,$table['product']['path'],$ly->width -1,1); + + $r .= product::infolist($ly->user,$this,$ly->width,$ly->format); + $r .= task::infolist($ly->user,$this,$ly->width,$ly->format); + $r .= appointment::infolist($ly->user,$this,$ly->width,$ly->format); + + $r .= $this->getAsHtmlPost($ly); + return $r; + } + + /** + * get the tree related to this object + */ + function getTreeStructure($key) { + global $lang,$tutos; + + loadmodules($this->getType(),'show'); + + // error_log('product->getTreeStructure:'.$key.' '.$this.print_r($tutos[activemodules],true)."\n",3,$tutos[errlog]); + $this->readroles(); + $r = '<li id="'.$this->id.'X'.$key.'">'.$lang[$this->getType()].' '.$this->getFullName(); + + $rr = ''; + foreach (array(10,11,12,13) as $x) { + if ( isset($this->role[$x] ) && is_array($this->role[$x]) && count($this->role[$x]) ) { + $rr .= ' <li id="'.$this->id.'X'.$key.'XR'.$x.'">'.$lang['ProdRole'][$x]."\n"; + $rr .= ' <ul>'."\n"; + foreach($this->role[$x] as $i => $o) { + $rr .= ' <li class="jstree-closed" id="'.$i.'X'.uniqid().'">'.$lang[$o->getType()].' '.$o->getFullName().'</li>'."\n"; + } + $rr .= ' </ul>'."\n"; + $rr .= ' </li>'."\n"; + } + } + // Tasks + $rr .= task::obj_getTree($this); + + foreach($tutos[activemodules] as $f) { + $x = new $tutos[modules][$f][name]($this->dbconn); + if ( ! is_subclass_of($x,'tutos_module') ) { + continue; + } + $rr .= $x->obj_getTree($this); // referencing us + } + if ($rr != '') { + $r .= "\n".' <ul>'."\n"; + $r .= $rr; + $r .= ' </ul>'."\n"; + } + $r .= '</li>'."\n"; + return $r; + } + + /** * Return a url to the clone page */ function getCloneURL() { Modified: trunk/php/product_show.php =================================================================== --- trunk/php/product_show.php 2014-02-17 13:43:42 UTC (rev 1237) +++ trunk/php/product_show.php 2014-02-19 10:22:23 UTC (rev 1238) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -33,38 +33,6 @@ */ class Product_show extends layout { /** - * List Roles - */ - Function showrole($role) { - global $lang; - - $r = ''; - if ( isset($this->obj->role[$role]) && (count($this->obj->role[$role]) > 0) ) { - $r .= $this->ContentRowStart(); - $r .= $this->showfield($lang['ProdRole'][$role]); - $n = 0; - $x = ''; - foreach ($this->obj->role[$role] as $i => $w) { - if ( $n > 0 ) { - $x .= "<br />\n"; - } - if ( $w->getType() == "department" ) { - $x .= $w->getLink( $w->getFullName() ); - } else { - $x .= $w->getLink(); - } - if ( !empty($this->obj->roledesc[$role][$i]) ) { - $x .= ' ('. myentities($this->obj->roledesc[$role][$i]) .")"; - } - $n++; - } - $r .= $this->showdata($x,$this->width -1); - $r .= $this->ContentRowEnd(); - } - return $r; - } - - /** * display the info */ Function info() { @@ -77,169 +45,7 @@ return $r; } - $this->width = 4; - $r .= $this->DataTableStart(); - $r .= $this->headline_gui(); - $r .= $this->CreatorInfoLine($this->obj,$this->width); - if (is_object($this->obj->pic_file)) { - $r .= $this->ContentRowStart(); - $r .= $this->showfield(''); - $x = makelink($this->obj->pic_file->getUrl() ."&format=show", - '<img alt="'. $this->obj->getFullName() .'" class="logopic" src="'. addSessionKey($this->obj->pic_file->getUrl().'&format=show') .'">', - $this->obj->getFullName()); - $r .= $this->showdata($x,$this->width-1); - $r .= $this->ContentRowEnd(); - } - $r .= $this->showfield_data_row($this->obj,$table['product']['name'],$this->width -1,1); - $r .= $this->showfield_data_row($this->obj,$table['product']['version'],$this->width -1,1); - - $r .= $this->ContentRowStart(); - $r .= $this->showfield($lang['ProdState']); - $r .= $this->showdata($this->obj->getStateColorBlock().$this->obj->getState(),1); - $x = preg_split('#,#',$tutos['prod_activ_states']); - if (!in_array($this->obj->state,$x)) { - $r .= $this->showfield($lang['ProdProb']); - $r .= $this->showdata($this->obj->probability ."%",1); - } else { - $r .= $this->showdata(' ',2); - } - $r .= $this->ContentRowEnd(); - - $this->obj->readroles(); - foreach ($lang['ProdRole'] as $role => $x ) { - $r .= $this->showrole($role); - } - - $r .= $this->showfield_data_row($this->obj,$table['product']['description'],$this->width -1,1); - $r .= $this->showfield_data_row($this->obj,$table['product']['desc1'],$this->width -1,1); - $r .= $this->showfield_data_row($this->obj,$table['product']['desc2'],$this->width -1,1); - - // Classification - for ( $cl = 1;$cl <= $this->obj->classes; $cl++) { - if ( count($this->obj->cl[$cl]) > 0 ) { - $r .= $this->ContentRowStart(); - $r .= $this->showfield($lang['ProdClass'.$cl]); - $x = ''; - @reset($this->obj->cl[$cl]); - while ( list ($i,$f) = @each ($this->obj->cl[$cl]) ) { - if ( isset ($lang['ProdClasses'.$cl][$f]) ) { - $x .= $lang['ProdClasses'.$cl][$f] . "<br />\n"; - } else { - $x .= $f . "<br />\n"; - } - } - $r .= $this->showdata($x,$this->width -1); - $r .= $this->ContentRowEnd(); - } - } - - if ( $this->obj->price != '' || $this->obj->cost != '') { - $r .= $this->ContentRowStart(); - if ($this->obj->price != '') { - $r .= $this->showfield($lang['ProdPrice']); - $x= array($this->obj->price,$this->obj->currency); - $r .= $this->showdata(handle('money',$x,my_number_format($this->obj->price,2) .' <b>'. $this->obj->currency .'</b>')); - } else { - $r .= $this->showdata('',2); - } - - if ($this->obj->cost != '') { - $r .= $this->showfield($lang['ProdCost']); - $x= array($this->obj->cost,$this->obj->currency); - $r .= $this->showdata(handle('money',$x,my_number_format($this->obj->cost,2) .' <b>'. $this->obj->currency .'</b>')); - } else { - $r .= $this->showdata('',2); - } - $r .= $this->ContentRowEnd(); - } - if ( ($this->obj->p_start->notime == 0) || ($this->obj->p_end->notime == 0) ) { - $r .= $this->ContentRowStart(); - $r .= $this->showfield($lang['ProdStart']); - $r .= $this->showdata($this->obj->p_start->GetLinkDate()); - $r .= $this->showfield($lang['ProdEnd']); - $r .= $this->showdata($this->obj->p_end->GetLinkDate()); - $r .= $this->ContentRowEnd(); - } - $r .= $this->showfield_data_row($this->obj,$table['product']['path'],$this->width -1,1); - - // Show additional custom fields - $r .= show_custom_fields($this,$this->obj->gettype(),$this->obj,$this->width); - - $r .= appointment::infolist($this->user,$this->obj,$this->width,$this->format); - - if ( $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { - $this->obj->readTasks(); - if ( count($this->obj->tasklist) >0 ) { - $r .= $this->ContentRowStart(); - $r .= $this->showfield($lang['Tasks']); - - $d = ''; - $d .= $this->theme->getImage(folder,'list') .' '; - $d .= makelink('task_overview.php?id='.$this->obj->id, $lang['TaskOverview'], - sprintf($lang['TaskOverviewInfo'], - $this->obj->getFullName())); - - $d .= makelink('task_overview.php?id='.$this->obj->id.'&fld=worker', - ' [++] ', sprintf($lang['TaskOverviewInfo'], - $this->obj->getFullName())); - $d .= "<br />\n"; - $n = 1; - $x = count($this->obj->tasklist); - - if ( $this->format == "paper" ) { - $rows = count($this->obj->tasklist); - } else { - $rows = $tutos['maxshort']; - } - - foreach ($this->obj->tasklist as $i => $f ) { - if ( ($n >= $rows) && ( $x != $rows ) ) { - $d .= $this->theme->getImage(folder,'list') .' '; - $d .= makelink('task_overview.php?id='. $this->obj->id, - sprintf($lang['AllEntries'], count($this->obj->tasklist))); - break; - } - if (!$f->see_ok()) continue; - $d .= $this->theme->getImage(task,'list') .' '; - if ($f->milestone == 1) { - $d .= $lang['TaskMilestone'].' '; - } - $d .= $f->getLink(); - // Additional conntected stuff - $rx = ''; - if ($tutos['task_show_fileinfo'] == 1) { - tutos_file::obj_read($f); - if (count($f->list[usedocmanagement]) > 0) { - $rx .= count($f->list[usedocmanagement]).' '.$lang['Files']; - } - } - if ($tutos['task_show_buginfo'] == 1) { - bug::obj_read($f); - if (count($f->list[usebugtracking][1]) > 0) { - if ($d != '') $d .= ' '; - $rx .= ($rx == '' ? '':', ').count($f->list[usebugtracking][1]).' '.$lang['Bugs']; - } - } - if ($rx != '') { - $d .= ' ('.$rx.')'; - } - $d .= "<br />\n"; - $n++; - } - - $r .= $this->showdata($d,$this->width -1); - $r .= $this->Content... [truncated message content] |
From: <gok...@us...> - 2014-02-17 13:43:49
|
Revision: 1237 http://sourceforge.net/p/tutos/code/1237 Author: gokohnert Date: 2014-02-17 13:43:42 +0000 (Mon, 17 Feb 2014) Log Message: ----------- fix Modified Paths: -------------- trunk/php/history.pinc Modified: trunk/php/history.pinc =================================================================== --- trunk/php/history.pinc 2014-02-14 10:15:56 UTC (rev 1236) +++ trunk/php/history.pinc 2014-02-17 13:43:42 UTC (rev 1237) @@ -48,7 +48,7 @@ } else $query->addWC('obj_id',$obj,'OBJ'); } - if ( is_int($adr_id) && ($adr_id != -1) ) { + if ( is_numeric($adr_id) && ($adr_id != -1) ) { $query->addWC('adr_id',$adr_id,'INT'); } if ( is_array($adr_id) && count(($adr_id)) ) { @@ -88,7 +88,7 @@ $r = $query->runSelect(); - // echo $oldfilter.' | '.$newfilter.' |'.$query->getSelect().'<br>'; + // echo $oldfilter.' | '.$newfilter.' |'.$query->getSelect().'<br>'; $n = $r->numrows(); $obj->history_size = $n; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-14 10:15:58
|
Revision: 1236 http://sourceforge.net/p/tutos/code/1236 Author: gokohnert Date: 2014-02-14 10:15:56 +0000 (Fri, 14 Feb 2014) Log Message: ----------- fix Modified Paths: -------------- trunk/php/stuff/stuff_overview.php Modified: trunk/php/stuff/stuff_overview.php =================================================================== --- trunk/php/stuff/stuff_overview.php 2014-02-14 08:15:51 UTC (rev 1235) +++ trunk/php/stuff/stuff_overview.php 2014-02-14 10:15:56 UTC (rev 1236) @@ -341,7 +341,7 @@ // Price $x = my_number_format($c->price,2).' '. $c->currency; if (is_object($c->ref)) { - $x .= $c->ref->getLink($x); + $x = $c->ref->getLink($x); } $r .= $this->OverviewRowBlock($x,'over_r'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-14 08:15:54
|
Revision: 1235 http://sourceforge.net/p/tutos/code/1235 Author: gokohnert Date: 2014-02-14 08:15:51 +0000 (Fri, 14 Feb 2014) Log Message: ----------- fix linebreaks in expense stuff list. Show maps for picture metadata Modified Paths: -------------- trunk/php/file/file.pinc trunk/php/google_earth/google_earth.pinc trunk/php/stuff/stuff.pinc Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2014-02-13 15:06:07 UTC (rev 1234) +++ trunk/php/file/file.pinc 2014-02-14 08:15:51 UTC (rev 1235) @@ -607,7 +607,7 @@ if (is_array($exif)) { foreach($exif as $key => $val) { if (gettype($val) == "array") { - $r .= "\t". $key ."<br />\n"; + $r .= "\t<b>". $key ."</b><br />\n"; foreach($val as $k2 => $v2) { if ($k2 == "MakerNote") { $r .= "\t\t". $k2 ." => ". gettype($v2)."<br />\n"; @@ -629,6 +629,9 @@ $r .= "\t\t". $k2 ." => [". gettype($v2)."]<br />\n"; } } + if ($key == 'GPS') { + $r .= handle('geodata',$val,'MAP'); + } } else { $r .= "\t". $key ." => ". chop($val) ."<br />\n"; } Modified: trunk/php/google_earth/google_earth.pinc =================================================================== --- trunk/php/google_earth/google_earth.pinc 2014-02-13 15:06:07 UTC (rev 1234) +++ trunk/php/google_earth/google_earth.pinc 2014-02-14 08:15:51 UTC (rev 1235) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2005 - 2013 by Gero Kohnert + * Copyright 2005 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -54,14 +54,52 @@ $id = $tutos['googlehandler_show']; $showmap = false; - $url = 'http://maps.google.com'; - if ($obj->getType() == 'location') { + $url = 'https://maps.google.com'; + if (is_Object($obj) && $obj->getType() == 'location') { $query = $obj->street1.','.$obj->zip.' '.$obj->city.' '.$obj->country; $url = addUrlParameter($url, 'q='.urlencode($query)); $mode = 1; $showmap = true; $width = 250; $height = 250; + $url = addUrlParameter($url, 't=h'); + $url = addUrlParameter($url, 'spn=0.1,0.1'); + } else if (is_array($obj)) { + // lat long calc from http://www.gps-forum.net/gps-aus-exif-daten-und-konvertierung-fur-google-maps-t4242-15.html + if ($obj['GPSLatitude'][0] == NULL) { + return; + } + $constante = "4294967296"; + $xgrad = explode("/",$obj['GPSLatitude'][0]); + $xgrad = $xgrad[0]/$xgrad[1]; + $xminuten = explode("/",$obj['GPSLatitude'][1]); + $xminuten = ($xminuten[0]/$xminuten[1])/60; + $xsekunden = explode("/",$obj['GPSLatitude'][2]); + if ($xsekunden[0] < 0) { $xsekunden[0] = $constante + $xsekunden[0]; } + $xsekunden = ($xsekunden[0]/$xsekunden[1])/3600; + + $ygrad = explode("/",$obj['GPSLongitude'][0]); + $ygrad = $ygrad[0]/$ygrad[1]; + $yminuten = explode("/",$obj['GPSLongitude'][1]); + $yminuten = ($yminuten[0]/$yminuten[1])/60; + $ysekunden = explode("/",$obj['GPSLongitude'][2]); + if ($ysekunden[0] < 0) { $ysekunden[0] = $constante + $ysekunden[0]; } + $ysekunden = ($ysekunden[0]/$ysekunden[1])/3600; + + ($obj['GPSLatitudeRef'] == "N") ? $lat = $xgrad+$xminuten+$xsekunden : $lat = ($xgrad+$xminuten+$xsekunden)*-1; + ($obj['GPSLongitudeRef'] == "E") ? $long = $ygrad+$yminuten+$ysekunden : $long = ($ygrad+$yminuten+$ysekunden)*-1; + // echo '<a href="http://maps.google.de/maps?client=safari&q='.$latitude.',%2B'.$longitude.'&oe=UTF-8&ie=UTF8&hl=de&t=h&z=19" target="_blank">Google</a>'; + + + $url = addUrlParameter($url, 'll='.$lat.','.$long.''); + $url = addUrlParameter($url, 'q='.$lat.','.$long.''); + $mode = 1; + $showmap = true; + $width = 250; + $height = 250; + $url = addUrlParameter($url, 't=h'); + $url = addUrlParameter($url, 'spn=0.1,0.1'); + $query = $lat.','.$long; } else { $query = $arg; $x = explode(' ', $arg); @@ -72,13 +110,13 @@ $mode = 2; $width = 500; $height = 400; + $url = addUrlParameter($url, 't=h'); + $url = addUrlParameter($url, 'spn=0.1,0.1'); } if (!isset($tutos['googlemapkey'][$current_user->dbconn->db->id])) { $showmap = false; } - $url = addUrlParameter($url, 't=h'); - $url = addUrlParameter($url, 'spn=0.1,0.1'); if ($cnt == 1) { $msg .= '<a target="map" href="'. $url .'">'. $arg .'</a>'; Modified: trunk/php/stuff/stuff.pinc =================================================================== --- trunk/php/stuff/stuff.pinc 2014-02-13 15:06:07 UTC (rev 1234) +++ trunk/php/stuff/stuff.pinc 2014-02-14 08:15:51 UTC (rev 1235) @@ -554,13 +554,18 @@ if ( ! $layout->user->feature_ok(USESTUFF,PERM_SEE) ) { return $r; } + $cnt = 0; if ( ($obj->gettype() == 'expense') ) { - $r .= '<td class="over_l">'; + $r .= '<td class="over_ml">'; stuff::obj_read($obj); $opre = ''; foreach($obj->list[USESTUFF] as $o) { $r .= $opre.$o->getLink(); $opre = ', '; + if (3 == $cnt % 4) { + $opre = ', '."\n"; + } + $cnt++; } $r .= ($opre == '' ? ' ':'')."</td>\n"; } @@ -582,4 +587,4 @@ return $r; } } -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-13 15:06:10
|
Revision: 1234 http://sourceforge.net/p/tutos/code/1234 Author: gokohnert Date: 2014-02-13 15:06:07 +0000 (Thu, 13 Feb 2014) Log Message: ----------- fix missing remove of old links when changing link Modified Paths: -------------- trunk/php/file/file_ins.php Modified: trunk/php/file/file_ins.php =================================================================== --- trunk/php/file/file_ins.php 2014-02-10 11:48:10 UTC (rev 1233) +++ trunk/php/file/file_ins.php 2014-02-13 15:06:07 UTC (rev 1234) @@ -88,8 +88,8 @@ /* Check Input */ -$log = ""; -# $links = array(); +$log = ''; +$links = array(); if ( isset($_REQUEST['Xid']) ) { @@ -111,12 +111,16 @@ if ( !isset($_REQUEST['link_id']) || !is_array($_REQUEST['link_id'])) { $msg = addLine($msg,sprintf($lang['Err0009'],$lang['FileReference'])); } else { + $links = $f->links; foreach($_REQUEST['link_id'] as $i => $j) { $l = getObject($f->dbconn,$j); if (is_object($l)) { - # $links[$l->id] = &$l; $f->addReference($l); } + // no need to delete this link + if (isset($links[$l->id])) { + unset($links[$l->id]); + } $gotourl = addUrlParameter($gotourl,"link_id[]=". UrlEncode($l->id),true); unset($l); } @@ -138,9 +142,12 @@ // cool we got an exact input foreach ($l as $x) { $f->addReference($x); - # $links[$x->id] = &$x; unset ($x); } + // no need to delete this link + if (isset($links[$x->id])) { + unset($links[$x->id]); + } } else if ( count($l) > $tutos['maxselect']) { $msg = addLine($msg,sprintf($lang['Err0018'],$lang[$c].":".$n,count($l))); $msg = addLine($msg,$lang['Err0006']); @@ -155,15 +162,23 @@ } } -// delete references if ( isset($_REQUEST['del']) && is_array($_REQUEST['del'])) { - foreach($_REQUEST['del'] as $i => $j) { - # unset($links[$j]); - $f->delReference($j); - $gotourl = addUrlParameter($gotourl,"del[]=". UrlEncode($j),true); - } + $del = $_REQUEST['del']; +} else { + $del = array(); } +// additionally delete old links that have not been refreshed +foreach ($links as $i => $l) { + $del[] = $i; +} + +// delete references +foreach($del as $i) { + $f->delReference($i); + $gotourl = addUrlParameter($gotourl,"del[]=". UrlEncode($i),true); +} + // check for at least one reference if (count($f->links) == 0) { $msg = addLine($msg,sprintf($lang['Err0009'],$lang['FileReference'])); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-10 11:48:15
|
Revision: 1233 http://sourceforge.net/p/tutos/code/1233 Author: gokohnert Date: 2014-02-10 11:48:10 +0000 (Mon, 10 Feb 2014) Log Message: ----------- interpret spaces in search as % Modified Paths: -------------- trunk/php/db/db_mysql.pinc trunk/php/db/db_mysqli.pinc trunk/php/db/db_pg.pinc Modified: trunk/php/db/db_mysql.pinc =================================================================== --- trunk/php/db/db_mysql.pinc 2014-02-07 06:51:49 UTC (rev 1232) +++ trunk/php/db/db_mysql.pinc 2014-02-10 11:48:10 UTC (rev 1233) @@ -342,6 +342,7 @@ function like3($name,$not=false,$cs=false) { $name = preg_replace('#\\\#','\\\\\\',$name); $name = preg_replace("#'#","\'",$name); + $name = preg_replace('# #','%',$name); $x = func_num_args(); if ($x < 4) die('missing args for like3'); @@ -374,7 +375,7 @@ } } if ($cnt > 1) { - $name = preg_replace('# #','%',$name); + // $name = preg_replace('# #','%',$name); $fld = 'CONCAT('.$fld.')'; } if ($cs) { Modified: trunk/php/db/db_mysqli.pinc =================================================================== --- trunk/php/db/db_mysqli.pinc 2014-02-07 06:51:49 UTC (rev 1232) +++ trunk/php/db/db_mysqli.pinc 2014-02-10 11:48:10 UTC (rev 1233) @@ -348,6 +348,7 @@ function like3($name,$not=false,$cs=false) { $name = preg_replace('#\\\#','\\\\\\',$name); $name = preg_replace("#'#","\'",$name); + $name = preg_replace('# #','%',$name); $x = func_num_args(); if ($x < 4) die('missing args for like3'); @@ -380,7 +381,7 @@ } } if ($cnt > 1) { - $name = preg_replace('# #','%',$name); + // $name = preg_replace('# #','%',$name); $fld = 'CONCAT('.$fld.')'; } if ($cs) { Modified: trunk/php/db/db_pg.pinc =================================================================== --- trunk/php/db/db_pg.pinc 2014-02-07 06:51:49 UTC (rev 1232) +++ trunk/php/db/db_pg.pinc 2014-02-10 11:48:10 UTC (rev 1233) @@ -450,6 +450,7 @@ function like3($name,$not=false,$cs=false) { $name = preg_replace('#\\\#','\\\\\\',$name); $name = preg_replace("#'#","''",$name); + $name = preg_replace('# #','%',$name); $x = func_num_args(); if ($x < 4) die('missing args for like3'); @@ -474,9 +475,9 @@ $cnt++; } } - if ($cnt > 1) { - $name = preg_replace('# #','%',$name); - } + // if ($cnt > 1) { + // $name = preg_replace('# #','%',$name); + // } if ($cs) { return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-07 06:51:52
|
Revision: 1232 http://sourceforge.net/p/tutos/code/1232 Author: gokohnert Date: 2014-02-07 06:51:49 +0000 (Fri, 07 Feb 2014) Log Message: ----------- update year Modified Paths: -------------- trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2014-02-06 15:33:26 UTC (rev 1231) +++ trunk/php/layout/new2_layout.pinc 2014-02-07 06:51:49 UTC (rev 1232) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2003 - 2013 by Gero Kohnert + * Copyright 2003 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -489,7 +489,7 @@ $r .= ' dir="ltr"'; $r .= '>'."\n"; - $r .= "<!-- \nCopyright 1999 - 2013 by Gero Kohnert gok...@us... et al\n"; + $r .= "<!-- \nCopyright 1999 - 2014 by Gero Kohnert gok...@us... et al\n"; $r .= "all rights reserved\n-->\n"; $r .= " <head>\n"; $r .= " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=". $lang['content_encoding'] ."\"".$c; Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2014-02-06 15:33:26 UTC (rev 1231) +++ trunk/php/layout/new_layout.pinc 2014-02-07 06:51:49 UTC (rev 1232) @@ -399,7 +399,7 @@ $r .= ' dir="ltr"'; $r .= '>'."\n"; - $r .= "<!-- Copyright 1999 - 2013 by Gero Kohnert gok...@us... et al -->\n"; + $r .= "<!-- Copyright 1999 - 2014 by Gero Kohnert gok...@us... et al -->\n"; $r .= "<!-- all rights reserved -->\n"; $r .= " <head>\n"; // $r .= ' <base href="'.getBaseUrl().'"'.$c; @@ -883,4 +883,4 @@ return 'new_layout'; } } -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-06 15:33:29
|
Revision: 1231 http://sourceforge.net/p/tutos/code/1231 Author: gokohnert Date: 2014-02-06 15:33:26 +0000 (Thu, 06 Feb 2014) Log Message: ----------- keep info Modified Paths: -------------- trunk/php/task_overview.php Modified: trunk/php/task_overview.php =================================================================== --- trunk/php/task_overview.php 2014-02-06 15:25:44 UTC (rev 1230) +++ trunk/php/task_overview.php 2014-02-06 15:33:26 UTC (rev 1231) @@ -846,6 +846,10 @@ } $this->addHidden("small",$this->small); + if ( isset($_REQUEST['fld']) ) { + $this->addHidden("fld",$_REQUEST['fld']); + } + // menu $x = task::getSelectLink($this->user,$lang['Search']); if ($this->ext != 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-06 15:25:47
|
Revision: 1230 http://sourceforge.net/p/tutos/code/1230 Author: gokohnert Date: 2014-02-06 15:25:44 +0000 (Thu, 06 Feb 2014) Log Message: ----------- keep sorting Modified Paths: -------------- trunk/php/product_overview.php Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2014-02-04 14:28:58 UTC (rev 1229) +++ trunk/php/product_overview.php 2014-02-06 15:25:44 UTC (rev 1230) @@ -591,6 +591,7 @@ $r = ''; if ( $this->format != "stat" ) { + foreach ($this->pshow as $i => $f) { if ( $f == 0 ) { $schecked[$i] = ""; @@ -634,6 +635,12 @@ $r .= hiddenFormElements(); // save the hidden stuff for the other form $x = $this->hidden; + if ($this->order_fld != '') + $this->addHidden('xf',$this->order_fld); + if ($this->order_dir != '') + $this->addHidden('xo',$this->order_dir); + if (isset($_GET['start'])) + $this->addHidden('start',$_GET['start']); $r .= $this->getHidden(); $this->hidden = $x; $r .= "</form>\n"; @@ -992,4 +999,4 @@ $l = new Product_overview($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-04 14:29:01
|
Revision: 1229 http://sourceforge.net/p/tutos/code/1229 Author: gokohnert Date: 2014-02-04 14:28:58 +0000 (Tue, 04 Feb 2014) Log Message: ----------- fix session store of states Modified Paths: -------------- trunk/php/timetrack/timetrack.pinc trunk/php/timetrack/timetrack_overview.php trunk/php/timetrack/timetrack_select.php Modified: trunk/php/timetrack/timetrack.pinc =================================================================== --- trunk/php/timetrack/timetrack.pinc 2014-02-03 13:19:39 UTC (rev 1228) +++ trunk/php/timetrack/timetrack.pinc 2014-02-04 14:28:58 UTC (rev 1229) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -39,14 +39,14 @@ $r = "<select id=\"state\" multiple=\"multiple\" name=\"state[]\">\n"; foreach ($stc->states as $f) { $r .= ' <option value="'. $f->stc_state .'" style="background:'.$f->color.'"'; - if ( isset($default[$f->stc_state]) ) { + if ( isset($default[$f->stc_state]) && ($default[$f->stc_state] == 1) ) { $r .= ' selected="selected"'; } $r .= '>'. myentities($f->getFullName()) ."</option>\n"; } foreach ($additional as $i => $f) { $r .= ' <option value="'.$i.'"'; - if ( isset($default[$i]) ) { + if ( isset($default[$i]) && ($default[$i] == 1) ) { $r .= ' selected="selected"'; } $r .= ">". myentities($f) ."</option>\n"; Modified: trunk/php/timetrack/timetrack_overview.php =================================================================== --- trunk/php/timetrack/timetrack_overview.php 2014-02-03 13:19:39 UTC (rev 1228) +++ trunk/php/timetrack/timetrack_overview.php 2014-02-04 14:28:58 UTC (rev 1229) @@ -714,6 +714,7 @@ // Search for state + $_SESSION[usetimetrack.'__state'] = array(); if ( isset($_GET['state']) && is_numeric($_GET['state'])) { $_GET['state'] = array($_GET['state']); } @@ -866,4 +867,4 @@ $l = new Timetrack_overview($current_user); $l->display(); $dbconn->Close(); -?> +?> \ No newline at end of file Modified: trunk/php/timetrack/timetrack_select.php =================================================================== --- trunk/php/timetrack/timetrack_select.php 2014-02-03 13:19:39 UTC (rev 1228) +++ trunk/php/timetrack/timetrack_select.php 2014-02-04 14:28:58 UTC (rev 1229) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -122,8 +122,9 @@ $this->td->setDateTime($_SESSION[usetimetrack.'__t']); } if ( isset($_SESSION[usetimetrack.'__state']) ) { - foreach($_SESSION[usetimetrack.'__state'] as $s) + foreach($_SESSION[usetimetrack.'__state'] as $s) { $this->state[$s] = 1; + } } else { $this->state[-2] = 1; } @@ -142,4 +143,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-02-03 13:19:43
|
Revision: 1228 http://sourceforge.net/p/tutos/code/1228 Author: gokohnert Date: 2014-02-03 13:19:39 +0000 (Mon, 03 Feb 2014) Log Message: ----------- fix Modified Paths: -------------- trunk/php/db/db_db2.pinc Modified: trunk/php/db/db_db2.pinc =================================================================== --- trunk/php/db/db_db2.pinc 2014-01-31 17:29:37 UTC (rev 1227) +++ trunk/php/db/db_db2.pinc 2014-02-03 13:19:39 UTC (rev 1228) @@ -300,7 +300,7 @@ if (is_array($arg)) { foreach ($arg as $a) { if (!$cs) { - $a = 'UPPER('.$a.')'; + $a = ' UPPER('.$a.')'; } $fld .= $pre.$a; $pre = ",' ',"; @@ -309,7 +309,7 @@ } else { if (empty($arg)) continue; if (!$cs) { - $arg = 'UPPER('.$arg.')'; + $arg = ' UPPER('.$arg.')'; } $fld .= $pre.$arg; $pre = ",' ',"; @@ -652,4 +652,4 @@ } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-31 17:29:40
|
Revision: 1227 http://sourceforge.net/p/tutos/code/1227 Author: gokohnert Date: 2014-01-31 17:29:37 +0000 (Fri, 31 Jan 2014) Log Message: ----------- fix Modified Paths: -------------- trunk/php/db/db_mysql.pinc trunk/php/db/db_mysqli.pinc Modified: trunk/php/db/db_mysql.pinc =================================================================== --- trunk/php/db/db_mysql.pinc 2014-01-29 09:05:19 UTC (rev 1226) +++ trunk/php/db/db_mysql.pinc 2014-01-31 17:29:37 UTC (rev 1227) @@ -357,7 +357,7 @@ if (is_array($arg)) { foreach ($arg as $a) { if (!$cs) { - $a = 'UPPER('.$a.')'; + $a = ' UPPER('.$a.')'; } $fld .= $pre.$a; $pre = ",' ',"; @@ -366,7 +366,7 @@ } else { if (empty($arg)) continue; if (!$cs) { - $arg = 'UPPER('.$arg.')'; + $arg = ' UPPER('.$arg.')'; } $fld .= $pre.$arg; $pre = ",' ',"; Modified: trunk/php/db/db_mysqli.pinc =================================================================== --- trunk/php/db/db_mysqli.pinc 2014-01-29 09:05:19 UTC (rev 1226) +++ trunk/php/db/db_mysqli.pinc 2014-01-31 17:29:37 UTC (rev 1227) @@ -363,7 +363,7 @@ if (is_array($arg)) { foreach ($arg as $a) { if (!$cs) { - $a = 'UPPER('.$a.')'; + $a = ' UPPER('.$a.')'; } $fld .= $pre.$a; $pre = ",' ',"; @@ -372,7 +372,7 @@ } else { if (empty($arg)) continue; if (!$cs) { - $arg = 'UPPER('.$arg.')'; + $arg = ' UPPER('.$arg.')'; } $fld .= $pre.$arg; $pre = ",' ',"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 09:05:24
|
Revision: 1226 http://sourceforge.net/p/tutos/code/1226 Author: gokohnert Date: 2014-01-29 09:05:19 +0000 (Wed, 29 Jan 2014) Log Message: ----------- display customer id in department_show Modified Paths: -------------- trunk/php/department_show.php trunk/php/location.pinc Modified: trunk/php/department_show.php =================================================================== --- trunk/php/department_show.php 2014-01-29 08:04:55 UTC (rev 1225) +++ trunk/php/department_show.php 2014-01-29 09:05:19 UTC (rev 1226) @@ -76,6 +76,7 @@ $r .= Show_LocFields($this->user,$lang['acc_info1'],$this->obj,"acc_info1",1); $r .= Show_LocFields($this->user,$lang['acc_info2'],$this->obj,"acc_info2",1); $r .= Show_LocFields($this->user,$lang['acc_nr'],$this->obj,"acc_nr",1); + $r .= Show_LocFields($this->user,$lang['AdrCustumerID'],$this->obj,"customer_id",1); } $ra = $this->dbconn->Exec($this->q); Modified: trunk/php/location.pinc =================================================================== --- trunk/php/location.pinc 2014-01-29 08:04:55 UTC (rev 1225) +++ trunk/php/location.pinc 2014-01-29 09:05:19 UTC (rev 1226) @@ -196,8 +196,8 @@ $this->$f = ''; } } - $this->c_id = $r->get($pos, 'c_id'); - $this->d_id = $r->get($pos, 'd_id'); + $this->c_id = $r->get($pos, 'c_id'); + $this->d_id = $r->get($pos, 'd_id'); if ( !empty($this->d_id) ) { $this->department = $this->department->read($this->d_id,$this->department); @@ -659,7 +659,7 @@ /** * a input form (used in comapny_new */ - function inputform (&$layout) { + function inputform (layout $layout) { global $lang,$table; $r = ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 08:04:59
|
Revision: 1225 http://sourceforge.net/p/tutos/code/1225 Author: gokohnert Date: 2014-01-29 08:04:55 +0000 (Wed, 29 Jan 2014) Log Message: ----------- removed debug output Modified Paths: -------------- trunk/php/product_overview.php Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2014-01-29 07:34:27 UTC (rev 1224) +++ trunk/php/product_overview.php 2014-01-29 08:04:55 UTC (rev 1225) @@ -859,7 +859,7 @@ $this->q = preg_replace('# where#i',','.$s.' WHERE',$this->q); } } - $msg = addLine($msg,$this->q); + //$msg = addLine($msg,$this->q); check_dbacl($this->dbconn, $this->q, $this->user->id); // Order of output This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 07:34:31
|
Revision: 1224 http://sourceforge.net/p/tutos/code/1224 Author: gokohnert Date: 2014-01-29 07:34:27 +0000 (Wed, 29 Jan 2014) Log Message: ----------- now search in a concat string of fields instead of single fileds (will find things like name-space-version), updated sqlite3 driver Modified Paths: -------------- trunk/php/admin/demodata.p3 trunk/php/admin/scheme.php trunk/php/config_default.pinc trunk/php/db/db.pinc trunk/php/db/db_db2.pinc trunk/php/db/db_firebird.pinc trunk/php/db/db_interbase.pinc trunk/php/db/db_mssql.pinc trunk/php/db/db_mssqlnative.pinc trunk/php/db/db_mysql.pinc trunk/php/db/db_mysqli.pinc trunk/php/db/db_oci.pinc trunk/php/db/db_ora.pinc trunk/php/db/db_pg.pinc trunk/php/db/db_sqlite.pinc trunk/php/db/db_sqlite3.pinc trunk/php/db/table.pinc trunk/php/db.p3 trunk/php/webelements.p3 Modified: trunk/php/admin/demodata.p3 =================================================================== --- trunk/php/admin/demodata.p3 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/admin/demodata.p3 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2004 - 2010 by Gero Kohnert + * Copyright 2004 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Modified: trunk/php/admin/scheme.php =================================================================== --- trunk/php/admin/scheme.php 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/admin/scheme.php 2014-01-29 07:34:27 UTC (rev 1224) @@ -138,51 +138,51 @@ $tutos[demo] = 0; // Superuser is allowed to do everything -# foreach ($tutos['defaultperm'] as $i => $f) { - # $tutos['defaultperm'][$i] = 1; - # } - unset ($tutos['defaultperm']); - $tutos['defaultperm'] = array(); + # foreach ($tutos['defaultperm'] as $i => $f) { + # $tutos['defaultperm'][$i] = 1; + # } + unset ($tutos['defaultperm']); + $tutos['defaultperm'] = array(); - $adr = new tutos_address($this->obj); - $adr->f_name = "Super"; - $adr->l_name = "User"; - $adr->birthday = new TUTOS_Date_Time(); - $adr->creator = $adr; + $adr = new tutos_address($this->obj); + $adr->f_name = "Super"; + $adr->l_name = "User"; + $adr->birthday = new TUTOS_Date_Time(); + $adr->creator = $adr; - $q = 'DELETE FROM '. $adr->tablename .' WHERE f_name = '. $adr->dbconn->String($adr->f_name) .' AND l_name = '. $adr->dbconn->String($adr->l_name); - $r = $adr->dbconn->exec($q); - $r->free(); + $q = 'DELETE FROM '. $adr->tablename .' WHERE f_name = '. $adr->dbconn->String($adr->f_name) .' AND l_name = '. $adr->dbconn->String($adr->l_name); + $res = $adr->dbconn->exec($q); + $res->free(); - $r .= $adr->save(); + $r .= $adr->save(); - $this->user = new tutos_user($this->obj); - $this->user->updatepw = 1; - $this->user->login = "superuser"; - if (isset($tutos['pw']) && $tutos['pw'] == 1 && $tutos[debug] == 1) { - $this->user->pw = 'tutos'; - } else { - $this->user->pw = generatePassword(); - } - $this->user->id = $adr->id; - $this->user->admin = 1; + $this->user = new tutos_user($this->obj); + $this->user->updatepw = 1; + $this->user->login = "superuser"; + if (isset($tutos['pw']) && $tutos['pw'] == 1 && $tutos[debug] == 1) { + $this->user->pw = 'tutos'; + } else { + $this->user->pw = generatePassword(); + } + $this->user->id = $adr->id; + $this->user->admin = 1; - $q = "DELETE FROM ". $this->user->tablename ." WHERE login = ". $this->user->dbconn->String($this->user->login); - $r = $this->user->dbconn->exec($q); - $r->free(); + $q = "DELETE FROM ". $this->user->tablename ." WHERE login = ". $this->user->dbconn->String($this->user->login); + $res = $this->user->dbconn->exec($q); + $res->free(); - foreach ($tutos[modules] as $rx => $x) { - if (!isset($tutos[modules][$rx][file])) continue; - $loc = dirname($tutos['base'] ."/". $tutos[modules][$rx][file]); - if (file_exists($loc.'/demodata.p3')) { - loadmodule($rx); + foreach ($tutos[modules] as $rx => $x) { + if (!isset($tutos[modules][$rx][file])) continue; + $loc = dirname($tutos['base'] ."/". $tutos[modules][$rx][file]); + if (file_exists($loc.'/demodata.p3')) { + loadmodule($rx); + } } - } - $r .= $this->user->save(); - $r .= $this->user->save_permissions(); - $r .= $this->obj->after_update_db(); - return $r; + $r .= $this->user->save(); + $r .= $this->user->save_permissions(); + $r .= $this->obj->after_update_db(); + return $r; } /** @@ -393,4 +393,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/config_default.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -74,8 +74,8 @@ // 5 = MS SQL (beta) // 7 = Interbase // 8 = Oracle OCI connection -// 11 = SQLITE -// 12 = SQLITE 3 +// 11 = SQLITE (database name is the database filename located absolute or relative to tutos basedir) +// 12 = SQLITE 3 (database name is the database filename located absolute or relative to tutos basedir) // 13 = MSSQL (native) (beta) // $tutos[dbtype][0] = 1; Modified: trunk/php/db/db.pinc =================================================================== --- trunk/php/db/db.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -317,16 +317,26 @@ return ''; } - function unLike($fld1,$name,$fld2 = "",$fld3 = "") { + final function unLike($fld1,$name,$fld2 = "",$fld3 = "") { return $this->Like($fld1,$name,$fld2,$fld3,true); } - function unLike2($fld,$name) { + final function unLike2($fld,$name) { return $this->Like2($fld,$name,true); } - abstract function Like($fld1,$name,$fld2 = "",$fld3 = "",$not=false); + /** + * case insensitive string compare + */ + final function Like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { + return $this->Like3($name,$not,false,$fld1,$fld2,$fld3); + } + /** + * case sensitive strict string compare + */ + final function Like2($fld,$name,$not=false) { + return $this->Like3($name,$not,true,$fld); + } - abstract function Like2($fld,$name,$not=false); - + abstract function Like3($name,$not=false,$cs=false); /** * lock a table t */ @@ -338,6 +348,19 @@ * set the timezone */ function timezone($tz) { + global $tutos; + + strftime("%H:%M %Z"); + + if ( empty($tz)) { + $tz = $tutos[defaultTZ]; + } + if ($tz == getenv('TZ')) { + return; + } + putenv ("TZ=".$tz); + + return $tz; } /** @@ -880,10 +903,8 @@ } function needCount(){ } - function Like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { + function Like3($name,$not=false,$cs=false) { } - function Like2($fld,$name,$not=false) { - } function getFullName() { return 'fake_db'; } Modified: trunk/php/db/db_db2.pinc =================================================================== --- trunk/php/db/db_db2.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_db2.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2007 - 2011 by Gero Kohnert + * Copyright 2007 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id: db_mysql.pinc,v 1.38 2007/08/08 11:36:06 gokohnert Exp $ * $Author: gokohnert $ */ +$tutos['files'][__FILE__] = '$Rev: 1116 $'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'db2format1'; $tutos['dateformat'][] = 'db2format2'; @@ -35,8 +36,8 @@ function db2format1(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-1][0-9])-([0-9]{2}) ([0-2][0-9]):([0-5][0-9]):([0-5][0-9])$", $str, $regs ) ) { -# Init via DB 2000-09-16 19:39:00 MySQL - $d->year = (integer)$regs[1]; + # Init via DB 2000-09-16 19:39:00 MySQL + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = (integer)$regs[4]; @@ -52,8 +53,8 @@ function db2format2(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})$", $str, $regs ) ) { -# Init via DB YYYY-MM-DD - $d->year = (integer)$regs[1]; + # Init via DB YYYY-MM-DD + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = 0; @@ -279,74 +280,86 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld = "CONCAT(". $fld ." ,' '," .$fld2; - if ( $fld3 != "" ) { - $fld .= ",' ',". $fld3; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","\'",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + if (!$cs) { + $a = 'UPPER('.$a.')'; + } + $fld .= $pre.$a; + $pre = ",' ',"; + $cnt++; + } + } else { + if (empty($arg)) continue; + if (!$cs) { + $arg = 'UPPER('.$arg.')'; + } + $fld .= $pre.$arg; + $pre = ",' ',"; + $cnt++; } - $fld .= ")"; } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("[\]","\\\\",$name); - $name = eregi_replace("'","\'",$name); - return (" UPPER(". $fld .")".($not ? " not":"")." like '%". strtoupper($name) ."%' "); + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); + $fld = 'CONCAT('.$fld.')'; + } + if ($cs) { + return (' '. $fld .($not ?' !=':' =')." BINARY '". $name ."' "); + } else { + return ($fld .($not ? ' not':'')." like '%". mb_strtoupper($name) ."%' "); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - $name = eregi_replace("[\]","\\\\",$name); - $name = eregi_replace("'","\'",$name); - return (" ". $fld .($not ? " !":" ")."= BINARY '". $name ."' "); - } - /* --------------------------------------------------------------------------- - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; } -# MYSQL has its own mechanism return "PASSWORD('".$pw."')"; } - /* --------------------------------------------------------------------------- + + /** */ function begin($t) { return "X"; } - /* --------------------------------------------------------------------------- + + /** */ function commit($t) { return "Y"; } - /* --------------------------------------------------------------------------- + + /** */ function abort($t) { return ""; } - /* --------------------------------------------------------------------------- + + /** */ function lock($t) { return ""; } - /* --------------------------------------------------------------------------- - */ - function timezone($tz) { - global $tutos; - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - /** */ function getFullname() { @@ -560,11 +573,11 @@ $now = new TUTOS_Date_Time(); $diff = $now->getTimestamp() - $this->db->lastanalyze->getTimeStamp(); -# only once a day - if ( $diff < 86400 ) return; + # only once a day + if ( $diff < 86400 ) return; -# read the table definitions of modules - @include_once $tutos['base'] ."/php/db/table.pinc"; + # read the table definitions of modules + @include_once $tutos['base'] ."/php/db/table.pinc"; foreach ($tutos[modules] as $r => $x) { if (isset($tutos[modules][$r][file]) && file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) { @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc"; Modified: trunk/php/db/db_firebird.pinc =================================================================== --- trunk/php/db/db_firebird.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_firebird.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2005 - 2011 by Gero Kohnert + * Copyright 2005 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'fbformat1'; $tutos['dateformat'][] = 'fbformat2'; @@ -249,31 +250,47 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= "|| ' ' ||". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","?",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = "|| ' ' ||"; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = "|| ' ' ||"; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= "|| ' ' ||". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " not":"")." like '%". strtoupper($name) ."%' "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' upper('.$fld.')' .($not ? ' not':'')." like '%". mb_strtoupper($name) ."%' "); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /** - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; @@ -306,22 +323,6 @@ /** */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - # $this->exec("SET TIME ZONE '". $tz ."'"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - # $this->exec("SET TIME ZONE '". $tutos[defaultTZ] ."'"); - } - } - - /** - */ function getFullname() { return "Firebird: ". $this->db->host .":". $this->db->name ; } Modified: trunk/php/db/db_interbase.pinc =================================================================== --- trunk/php/db/db_interbase.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_interbase.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2011 by Gero Kohnert + * Copyright 2001 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'ibformat1'; $tutos['dateformat'][] = 'ibformat2'; $tutos['dateformat'][] = 'ibformat3'; @@ -36,8 +37,8 @@ function ibformat1(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})([-+][0-9]{1,2}[:0-9]{0,3})$", $str, $regs ) ) { -# Init via DB 1999-11-27 12:34:56+02 Postgres - $d->year = (integer)$regs[1]; + # Init via DB 1999-11-27 12:34:56+02 Postgres + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = (integer)$regs[4]; @@ -54,8 +55,8 @@ function ibformat2(&$d,$str) { $regs = array(); if ( ereg( "^([0-1][0-9])/([0-3][0-9])/([0-9]{4})$", $str, $regs ) ) { -# Init via MM/DD/YYYY - $d->month = (integer)$regs[1]; + # Init via MM/DD/YYYY + $d->month = (integer)$regs[1]; $d->day = (integer)$regs[2]; $d->year = (integer)$regs[3]; $d->hour = 0; @@ -71,8 +72,8 @@ function ibformat3(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-1][0-9])-([0-3][0-9])$", $str, $regs ) ) { -# Init via YYYY-MM-DD - $d->year = (integer)$regs[1]; + # Init via YYYY-MM-DD + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = 0; @@ -255,31 +256,47 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= "|| ' ' ||". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","?",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = "|| ' ' ||"; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = "|| ' ' ||"; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= "|| ' ' ||". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " not":"")." like '%". strtoupper($name) ."%' "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' lower('.$fld.')' .($not ? ' not':'')." like E'%". mb_strtolower($name) ."%' escape ''"); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /** - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; @@ -312,20 +329,6 @@ /** */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "Interbase: ". $this->db->host .":". $this->db->name ; } @@ -505,8 +508,8 @@ * set the offset of rows */ function setoffset($cnt) { -# disabled - $this->offset = 0; + # disabled + $this->offset = 0; } /** @@ -516,7 +519,7 @@ if ( isset($this->result[$pos-$this->offset][$fld]) || (0 == $this->result[$pos-$this->offset][$fld]) ) { return $this->result[$pos-$this->offset][$fld]; } else { -# echo "<br />POS:".$pos ." | FLD:". $fld ." | * <br />\n"; + # echo "<br />POS:".$pos ." | FLD:". $fld ." | * <br />\n"; return; } } Modified: trunk/php/db/db_mssql.pinc =================================================================== --- trunk/php/db/db_mssql.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_mssql.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2011 by Gero Kohnert + * Copyright 2001 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'mssqlformat1'; $tutos['dateformat'][] = 'mssqlformat2'; @@ -169,7 +170,7 @@ $numrows = mssql_num_rows($x); $numcols = mssql_num_fields($x); -#echo "X: ". $numrows." ".$numcols."<br />"; + #echo "X: ". $numrows." ".$numcols."<br />"; if ( $numcols == 0 ) { return $result; } @@ -192,7 +193,7 @@ Fatal_Error("got no id",$query); } $id = $r->get(0, "s_id"); -#echo "XXX:".$id; + #echo "XXX:".$id; $r->free(); return $id; } @@ -268,32 +269,47 @@ } /** - * case sensitive strict string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= "+ ' ' +". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","?",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = " + ' ' + "; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = " + ' ' + "; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= "+ ' ' +". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " not":"")." like UPPER('%". $name ."%') "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' upper('.$fld.')' .($not ? ' not':'')." like upper('%". mb_strtoupper($name) ."%')"); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - #$name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /** - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; @@ -327,26 +343,6 @@ /** */ - function lock($t) { - return ""; - } - - /** - */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "MS SQL:". $this->db->user ."@" .$this->db->host ." ". $this->db->name; } @@ -555,4 +551,4 @@ return; } } -?> +?> \ No newline at end of file Modified: trunk/php/db/db_mssqlnative.pinc =================================================================== --- trunk/php/db/db_mssqlnative.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_mssqlnative.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2011 by Gero Kohnert + * Copyright 2001 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -12,11 +12,12 @@ * this database driver was orignally given to the TUTOS project by Microsoft * */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'mssqlformat1'; $tutos['dateformat'][] = 'mssqlformat2'; @@ -41,9 +42,9 @@ $regs = array(); if ( ereg( "^([A-Za-z]{3}) ([0-9]*) ([ 0-9]*) ([ 0-9]*):([0-9]*)([A-Z]{2})$", $str, $regs ) ) { -# Init via DB Apr 14 2004 8:23AM + # Init via DB Apr 14 2004 8:23AM - $d->month = $tutos['mssql'][$regs[1]]; + $d->month = $tutos['mssql'][$regs[1]]; $d->day = (integer)$regs[2]; $d->year = (integer)$regs[3]; @@ -57,7 +58,7 @@ } $d->format = 22; -# echo "QQQ:".$str."<br />"; + # echo "QQQ:".$str."<br />"; } return; } @@ -70,9 +71,9 @@ $regs = array(); if ( ereg( "^([0-9]*) ([0-9]*) ([0-9]*) ([ 0-9]*):([0-9]*)$", $str, $regs ) ) { -# Init via DB 13 01 2004 8:23AM + # Init via DB 13 01 2004 8:23AM - $d->day = (integer)$regs[1]; + $d->day = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->year = (integer)$regs[3]; @@ -85,7 +86,7 @@ } $d->format = 23; -#echo "QQQ:".$str."<br />"; + #echo "QQQ:".$str."<br />"; } return; } @@ -96,7 +97,7 @@ * @package DB */ class db_mssqlnative extends tutos_db { - /* --------------------------------------------------------------------------- + /** */ function db_mssqlnative(&$db) { global $tutos; @@ -105,6 +106,7 @@ sqlsrv_configure("WarningsReturnAsErrors", 0); $tutos[use_check_dbacl] = 0; } + /** * open the DB connection */ @@ -119,8 +121,7 @@ $this->conn = &$c; } - function ErrorMsg() - { + function ErrorMsg() { $strError = ''; $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL); if($retErrors != null) { @@ -135,8 +136,7 @@ return $strError; } - function ErrorNo() - { + function ErrorNo() { $err = sqlsrv_errors(SQLSRV_ERR_ALL); if($err[0]) return $err[0]['code']; else return -1; @@ -150,18 +150,21 @@ sqlsrv_close($this->conn); $this->conn = -1; } - /* --------------------------------------------------------------------------- + + /** */ function notime() { -#return ("'1970-1-1 00:00:00'"); + #return ("'1970-1-1 00:00:00'"); return "null"; } - /* --------------------------------------------------------------------------- + + /** */ function now() { return "getdate()"; } - /* --------------------------------------------------------------------------- + + /** */ function exec($query,$showerror = 1) { if ( $this->conn == -1 ) { @@ -185,7 +188,8 @@ return $result; } - /* --------------------------------------------------------------------------- + + /** */ function nextid($name = 'id') { sqlsrv_begin_transaction($this->conn); @@ -209,7 +213,8 @@ sqlsrv_commit($this->conn); return $id; } - /* --------------------------------------------------------------------------- + + /** */ function setSeqID($id,$name = "id") { sqlsrv_begin_transaction($this->conn); @@ -223,7 +228,8 @@ sqlsrv_commit($this->conn); return $id; } - /* --------------------------------------------------------------------------- + + /** */ function getSeqID($name = "id") { $query = 'SELECT id FROM '. $this->prefix . $name .' ORDER BY id DESC'; @@ -235,18 +241,21 @@ $r->free(); return $id; } - /* --------------------------------------------------------------------------- + + /** */ function string($t) { $t = str_replace("'","''",$t); return "'". $t ."'"; } - /* --------------------------------------------------------------------------- + + /** */ function text($t) { return $this->string($t); } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datetimestring for d */ function datetime(&$d) { @@ -259,7 +268,8 @@ $x = sprintf("'%04d-%02d-%02d %02d:%02d:%02d'",$t->year,$t->month,$t->day,$t->hour,$t->min,$t->sec); return $x; } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datestring for d */ function date(&$d) { @@ -275,32 +285,47 @@ } /** - * case sensitive strict string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= " + ' ' + ". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","?",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = " + ' ' + "; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = " + ' ' + "; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= " + ' ' + ". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " NOT":"")." LIKE UPPER('%". $name ."%') "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' upper('.$fld.')' .($not ? ' not':'')." like upper('%". mb_strtoupper($name) ."%')"); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - #$name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /** - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; @@ -331,26 +356,6 @@ /** */ - function lock($t) { - return ""; - } - - /** - */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { $arrServerInfo = sqlsrv_server_info($this->conn); return 'MS SQL '.$arrServerInfo['SQLServerName'].' ('.$arrServerInfo['SQLServerVersion'].'):'. $this->db->user .'@'.$this->db->host .' '. $arrServerInfo['CurrentDatabase']; @@ -414,8 +419,8 @@ $c = ereg_replace("U","UNIQUE",$c); $c = ereg_replace("NN","NOT NULL",$c); /*if (!strstr($c,"NOT NULL")) { - $c .= " NULL"; - }*/ + $c .= " NULL"; + }*/ $q .= $pre. $this->colname($i) ." ". $t ." ". $c; $pre = ","; $comment[] = array('table'=>$this->prefix . $tbl[name],'column'=>$this->colname($i),'comment'=>$f[Desc]); Modified: trunk/php/db/db_mysql.pinc =================================================================== --- trunk/php/db/db_mysql.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_mysql.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -12,9 +12,9 @@ $tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'mysqlformat1'; $tutos['dateformat'][] = 'mysqlformat2'; @@ -337,30 +337,51 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = ' UPPER('.$fld1.')'; - if ( $fld2 != "" ) { - $fld = " CONCAT(UPPER(". $fld .") ,' ',UPPER(".$fld2; - if ( $fld3 != "" ) { - $fld .= "),' ',UPPER(". $fld3; - } - $fld .= "))"; - } - $name = preg_replace('# #','%',$name); + function like3($name,$not=false,$cs=false) { $name = preg_replace('#\\\#','\\\\\\',$name); $name = preg_replace("#'#","\'",$name); - return ($fld .($not ?" not ":" ")."like '%". mb_strtoupper($name) ."%' "); - } - /** - * case sensitive strict string compare - */ - function like2($fld,$name,$not=false) { - $name = preg_replace('#\\\#','\\\\\\',$name); - $name = preg_replace("#'#","\'",$name); - return (" ". $fld .($not ?" !=":" =")." BINARY '". $name ."' "); + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + if (!$cs) { + $a = 'UPPER('.$a.')'; + } + $fld .= $pre.$a; + $pre = ",' ',"; + $cnt++; + } + } else { + if (empty($arg)) continue; + if (!$cs) { + $arg = 'UPPER('.$arg.')'; + } + $fld .= $pre.$arg; + $pre = ",' ',"; + $cnt++; + } + } + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); + $fld = 'CONCAT('.$fld.')'; + } + if ($cs) { + return (' '. $fld .($not ?' !=':' =')." BINARY '". $name ."' "); + } else { + return ($fld .($not ? ' not':'')." like '%". mb_strtoupper($name) ."%' "); + } } /** @@ -380,20 +401,6 @@ /** */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "MYSQL:". $this->db->user ."@". $this->db->name ." on ". $this->db->host; } Modified: trunk/php/db/db_mysqli.pinc =================================================================== --- trunk/php/db/db_mysqli.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_mysqli.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2013 by Gero Kohnert + * Copyright 2001 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -12,9 +12,9 @@ $tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'mysqlformat1'; $tutos['dateformat'][] = 'mysqlformat2'; @@ -343,30 +343,51 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = ' UPPER('.$fld1.')'; - if ( $fld2 != "" ) { - $fld = " CONCAT(UPPER(". $fld .") ,' ',UPPER(".$fld2; - if ( $fld3 != "" ) { - $fld .= "),' ',UPPER(". $fld3; - } - $fld .= "))"; - } - $name = preg_replace('# #','%',$name); + function like3($name,$not=false,$cs=false) { $name = preg_replace('#\\\#','\\\\\\',$name); $name = preg_replace("#'#","\'",$name); - return ($fld .($not ? ' not':'')." like '%". mb_strtoupper($name) ."%' "); - } - /** - * case sensitive strict string compare - */ - function like2($fld,$name,$not=false) { - $name = preg_replace('#\\\#','\\\\\\',$name); - $name = preg_replace("#'#","\'",$name); - return (" ". $fld .($not ?" !=":" =")." BINARY '". $name ."' "); + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + if (!$cs) { + $a = 'UPPER('.$a.')'; + } + $fld .= $pre.$a; + $pre = ",' ',"; + $cnt++; + } + } else { + if (empty($arg)) continue; + if (!$cs) { + $arg = 'UPPER('.$arg.')'; + } + $fld .= $pre.$arg; + $pre = ",' ',"; + $cnt++; + } + } + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); + $fld = 'CONCAT('.$fld.')'; + } + if ($cs) { + return (' '. $fld .($not ?' !=':' =')." BINARY '". $name ."' "); + } else { + return ($fld .($not ? ' not':'')." like '%". mb_strtoupper($name) ."%' "); + } } /** @@ -398,20 +419,6 @@ /** */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "MYSQLI:". $this->db->user ."@". $this->db->name ." on ". $this->db->host; } Modified: trunk/php/db/db_oci.pinc =================================================================== --- trunk/php/db/db_oci.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_oci.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2011 by Gero Kohnert + * Copyright 2002 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'ociformat1'; if (!extension_loaded('oci8')) { @@ -30,8 +31,8 @@ function ociformat1(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { -# Init via DB 1999-11-27 12:34:56 see NLS_DATE_FORMAT - $d->year = (integer)$regs[1]; + # Init via DB 1999-11-27 12:34:56 see NLS_DATE_FORMAT + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = (integer)$regs[4]; @@ -42,13 +43,13 @@ return; } -/** --------------------------------------------------------------------------- +/** * oracle database connection class * * @package DB */ class db_oci extends tutos_db { - /* --------------------------------------------------------------------------- + /** */ function db_oci(&$db) { global $tutos; @@ -67,7 +68,7 @@ putenv("ORACLE_SID=".$this->db->name); putenv("ORACLE_HOME=".$this->db->home); -# putenv("NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1"); + # putenv("NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1"); $of = $this->openfunc; $c = @$of($this->db->user,$this->db->pass,$this->db->name); @@ -89,6 +90,7 @@ OciExecute($stmt); OCIFreeStatement ($stmt); } + /** * close the DB connection */ @@ -98,24 +100,28 @@ OciLogOff($this->conn); $this->conn = -1; } + /** * return more info about server client etc */ function moreinfo() { return "Server:". OCIServerVersion($this->conn); } - /* --------------------------------------------------------------------------- + + /** */ function notime() { -#return ("'1970-1-1 00:00:00'"); + #return ("'1970-1-1 00:00:00'"); return "null"; } - /* --------------------------------------------------------------------------- + + /** */ function now() { return "sysdate"; } - /* --------------------------------------------------------------------------- + + /** */ function exec($query,$showerror = 1) { if ( $this->conn == -1 ) { @@ -125,8 +131,8 @@ $x = new result_oci($this); -# Parse will fail on nonexistant tables - $p = ociparse($this->conn,$query); + # Parse will fail on nonexistant tables + $p = ociparse($this->conn,$query); if ( false == $p ) { if ($showerror == 1) { Fatal_Error("Exec ". $this->conn ." !PARSE|". $this->error(),$query); @@ -168,7 +174,8 @@ return $x; } - /* --------------------------------------------------------------------------- + + /** */ function nextid($name = "id") { $query = "SELECT ". $this->prefix . $name .".nextval FROM dual"; @@ -180,7 +187,8 @@ $r->free(); return $id; } - /* --------------------------------------------------------------------------- + + /** */ function setSeqID($id,$name = "id") { $query = "DROP SEQUENCE ". $this->prefix . $name; @@ -191,7 +199,8 @@ return $id; } - /* --------------------------------------------------------------------------- + + /** */ function getSeqID($name = "id") { $query = "SELECT ". $this->prefix . $name .".currval FROM dual"; @@ -203,13 +212,15 @@ $r->free(); return $id; } - /* --------------------------------------------------------------------------- + + /** */ function string($t) { $t = str_replace("'","''",$t); return "'". $t ."'"; } - /* --------------------------------------------------------------------------- + + /** */ function text($t) { if ( $this->txtlen > 0 ) { @@ -217,10 +228,11 @@ } return "'". $t ."'"; } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datetimestring for d */ - function datetime(&$d) { + function datetime(TUTOS_Date_Time $d) { if ( $d->notime == 1) { return "null"; } @@ -230,10 +242,11 @@ $x = sprintf("to_Date('%04d-%02d-%02d %02d:%02d:%02d','YYYY-MM-DD HH24:MI:SS')",$t->year,$t->month,$t->day,$t->hour,$t->min,$t->sec); return $x; } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datestring for d */ - function date(&$d) { + function date(TUTOS_Date_Time $d) { if ( $d->notime == 1) { return "null"; } @@ -246,82 +259,56 @@ } /** - * case insensitive string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= "|| ' ' ||". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","''",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = "|| ' ' ||"; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = "|| ' ' ||"; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= "|| ' ' ||". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " not":" ")."like '%". strtoupper($name) ."%' "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' lower('.$fld.')' .($not ? ' not':'')." like '%". mb_strtolower($name) ."%' "); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - #$name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /* --------------------------------------------------------------------------- - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; } return "'". crypt($pw,"271166") ."'"; } - /* --------------------------------------------------------------------------- - */ - function begin($t) { - # $r = $this->Exec("BEGIN ". $t ); - # $r = $this->Exec("BEGIN"); - return "X"; - } - /* --------------------------------------------------------------------------- - */ - function commit($t) { - # $r = $this->Exec("COMMIT ". $t); - # $r = $this->Exec("COMMIT"); - # $r = $this->Exec("END "); - return "Y"; - } /** */ - function abort($t) { - return ""; - } - - /** - */ - function lock($t) { - return ""; - } - - /** - */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "ORACLE OCI:". $this->db->name; } @@ -494,28 +481,28 @@ $now = new TUTOS_Date_Time(); $diff = $now->getTimestamp() - $this->db->lastanalyze->getTimeStamp(); -# only once a day - if ( $diff < 86400 ) return; + # only once a day + if ( $diff < 86400 ) return; -# read the table definitions of modules - @include_once $tutos['base'] ."/php/db/table.pinc"; + # read the table definitions of modules + @include_once $tutos['base'] ."/php/db/table.pinc"; foreach ($tutos[modules] as $r => $x) { if (isset($tutos[modules][$r][file]) && file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) { @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc"; } } -# foreach ($table as $i => $f) { - # $q = "optimize ". $f[name]; - # $this->Exec($q,0); - # } -# see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96533/stats.htm#26713 - $cur = Ora_Do ($this->conn,"call DBMS_STATS.GATHER_SCHEMA_STATS('". $this->db->user ."')"); - Ora_Close($cur); + # foreach ($table as $i => $f) { + # $q = "optimize ". $f[name]; + # $this->Exec($q,0); + # } + # see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96533/stats.htm#26713 + $cur = Ora_Do ($this->conn,"call DBMS_STATS.GATHER_SCHEMA_STATS('". $this->db->user ."')"); + Ora_Close($cur); - $this->db->setLastAnalyze($now); - $msg = $this->db->save(); - return $msg; + $this->db->setLastAnalyze($now); + $msg = $this->db->save(); + return $msg; } /* --------------------------------------------------------------------------- */ @@ -533,8 +520,8 @@ /* --------------------------------------------------------------------------- */ function get($pos,$fld) { -# Copy the whole thing (force a string != null) - return "".$this->result[$pos-$this->offset][strtoupper($fld)]; + # Copy the whole thing (force a string != null) + return "".$this->result[$pos-$this->offset][strtoupper($fld)]; } /* --------------------------------------------------------------------------- */ Modified: trunk/php/db/db_ora.pinc =================================================================== --- trunk/php/db/db_ora.pinc 2014-01-29 07:31:52 UTC (rev 1223) +++ trunk/php/db/db_ora.pinc 2014-01-29 07:34:27 UTC (rev 1224) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2011 by Gero Kohnert + * Copyright 2001 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -9,11 +9,12 @@ * SVN Info $Id$ * $Author$ */ +$tutos['files'][__FILE__] = '$Rev$'; require_once 'db.pinc'; -# -# Register parse functions for datetime -# +// +// Register parse functions for datetime +// $tutos['dateformat'][] = 'oraformat1'; /** @@ -22,8 +23,8 @@ function oraformat1(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})$", $str, $regs ) ) { -# Init via DB 1999-11-27 12:34:56 see NLS_DATE_FORMAT - $d->year = (integer)$regs[1]; + # Init via DB 1999-11-27 12:34:56 see NLS_DATE_FORMAT + $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = (integer)$regs[4]; @@ -59,7 +60,7 @@ putenv("ORACLE_SID=".$this->db->name); putenv("ORACLE_HOME=".$this->db->home); -# putenv("NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1"); + # putenv("NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1"); $of = $this->openfunc; $c = @$of($this->db->user."@".$this->db->name,$this->db->pass); @@ -89,7 +90,7 @@ /* --------------------------------------------------------------------------- */ function notime() { -#return ("'1970-1-1 00:00:00'"); + #return ("'1970-1-1 00:00:00'"); return "null"; } /* --------------------------------------------------------------------------- @@ -122,8 +123,8 @@ } } -# Parse will fail on nonexistant tables - $p = @ora_parse($x->cur,$query); + # Parse will fail on nonexistant tables + $p = @ora_parse($x->cur,$query); if ( false == $p ) { if ($showerror == 1) { Fatal_Error("Exec ". $this->conn ." !PARSE|". $this->error($x->cur),$query); @@ -234,10 +235,11 @@ } return "'". $t ."'"; } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datetimestring for d */ - function datetime(&$d) { + function datetime(TUTOS_Date_Time $d) { if ( $d->notime == 1) { return "null"; } @@ -247,10 +249,11 @@ $x = sprintf("to_Date('%04d-%02d-%02d %02d:%02d:%02d','YYYY-MM-DD HH24:MI:SS')",$t->year,$t->month,$t->day,$t->hour,$t->min,$t->sec); return $x; } - /* --------------------------------------------------------------------------- + + /** * give Database formatted datestring for d */ - function date(&$d) { + function date(TUTOS_Date_Time $d) { if ( $d->notime == 1) { return "null"; } @@ -263,32 +266,47 @@ } /** - * case sensitive strict string compare + * string compare with many flds */ - function like($fld1,$name,$fld2 = "",$fld3 = "",$not=false) { - $fld = $fld1; - if ( $fld2 != "" ) { - $fld .= "|| ' ' ||". $fld2; + function like3($name,$not=false,$cs=false) { + $name = preg_replace('#\\\#','\\\\\\',$name); + $name = preg_replace("#'#","''",$name); + + $x = func_num_args(); + if ($x < 4) die('missing args for like3'); + + $cnt = 0; + $fld = ''; + $pre = ''; + $y = 4; + while ($y <= $x) { + $arg = func_get_arg($y-1); + $y++; + if (is_array($arg)) { + foreach ($arg as $a) { + $fld .= $pre.$a; + $pre = "|| ' ' ||"; + $cnt++; + } + } else { + if (empty($arg)) continue; + $fld .= $pre.$arg; + $pre = "|| ' ' ||"; + $cnt++; + } } - if ( $fld3 != "" ) { - $fld .= "|| ' ' ||". $fld3; + if ($cnt > 1) { + $name = preg_replace('# #','%',$name); } - $name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","?",$name); - return (" UPPER(". $fld .")".($not ? " not":" ")."like '%". strtoupper($name) ."%' "); + if ($cs) { + return (' '. $fld .($not ? " !=":" =")." '". $name ."' "); + } else { + return (' lower('.$fld.')' .($not ? ' not':'')." like '%". mb_strtolower($name) ."%' "); + } } /** - * case sensitive strict string compare */ - function like2($fld,$name,$not=false) { - #$name = eregi_replace(" ","%",$name); - $name = eregi_replace("'","''",$name); - return (" ". $fld .($not ? " !":" ")."= '". $name ."' "); - } - - /** - */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; @@ -298,48 +316,6 @@ /** */ - function begin($t) { - # $r = $this->Exec("BEGIN ". $t ); - # $r = $this->Exec("BEGIN"); - return "X"; - } - /** - */ - function commit($t) { - # $r = $this->Exec("COMMIT ". $t); - # $r = $this->Exec("COMMIT"); - # $r = $this->Exec("END "); - return "Y"; - } - - /** - */ - function abort($t) { - return ""; - } - - /** - */ - function lock($t) { - return ""; - } - - /** - */ - function timezone($tz) { - global $tutos; - - if ( !empty($tz)) { - putenv ("TZ=".$tz); - strftime("%H:%M %Z"); - } else { - putenv ("TZ=". $tutos[defaultTZ]); - strftime("%H:%M %Z"); - } - } - - /** - */ function getFullname() { return "ORACLE:". $this->db->name; } @@ -508,28 +484,28 @@ $now = new TUTOS_Date_Time(); $diff = $now->getTimestamp() - $this->db->lastanalyze->getTimeStamp(); -# only once a day - if ( $diff < 86400 ) return; + # only once a day + if ( $diff < 86400 ) return; -# read the table definitions of modules - @include_once $tutos['base'] ."/php/db/table.pinc"; + # read the table definitions of modules + @include_once $tutos['base'] ."/php/db/table.pinc"; foreach ($tutos[modules] as $r => $x) { if (isset($tutos[modules][$r][file]) && file_exists(dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc") ) { @include_once dirname($tutos['base'] ."/". $tutos[modules][$r][file]) ."/mtable.pinc"; } } -# foreach ($table as $i => $f) { - # $q = "optimize ". $f[name]; - # $this->Exec($q,0); - # } -# see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96533/stats.htm#26713 - $cur = Ora_Do ($this->conn,"call DBMS_STATS.GATHER_SCHEMA_STATS('". $this->db->user ."')"); - Ora_Close($cur); + # foreach ($table as $i => $f) { + # $q = "optimize ". $f[name]; + # $this->Exec($q,0); + # } + # see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a96533/stats.htm#26713 + $cur =... [truncated message content] |
From: <gok...@us...> - 2014-01-29 07:31:54
|
Revision: 1223 http://sourceforge.net/p/tutos/code/1223 Author: gokohnert Date: 2014-01-29 07:31:52 +0000 (Wed, 29 Jan 2014) Log Message: ----------- fix Modified Paths: -------------- trunk/php/note/note_overview.php trunk/php/note/note_select.php trunk/php/product.pinc trunk/php/product_overview.php Modified: trunk/php/note/note_overview.php =================================================================== --- trunk/php/note/note_overview.php 2014-01-29 07:30:14 UTC (rev 1222) +++ trunk/php/note/note_overview.php 2014-01-29 07:31:52 UTC (rev 1223) @@ -87,6 +87,10 @@ $r .= $this->orderHeader('',$lang['NoteCreator'],$this->link2); $this->flds++; } + if ($this->head['etype']) { + $r .= $this->orderHeader('et',$lang['NoteEventType'],$this->link2); + $this->flds++; + } $r .= show_custom_overview_headers($this,'note',$this->link2); $r .= $this->MassUpdateHeader(); $r .= $this->OverviewHeadLineEnd(); @@ -122,6 +126,9 @@ if ($this->head['creator']) { $r .= $this->OverviewRowBlock(((!(is_numeric($b->creator) && $b->creator == -1)) ? $b->creator->getLink($b->creator->getShortname()):$lang['HistoryDeleted']),'over_l'); } + if ($this->head['etype']) { + $r .= $this->OverviewRowBlock($lang['NoteEventTypes'][$b->etype],'over_l'); + } $r .= show_custom_overview_data($this,'note',$b); $r .= $this->MassUpdateField($b); $r .= $this->OverviewRowEnd($line++); @@ -227,6 +234,7 @@ $this->head['link_id'] = true; $this->head['creator'] = true; + $this->head['etype'] = false; $reftype = ''; $name = ''; @@ -400,6 +408,8 @@ overview_arg($this,'f',OVERVIEW_ARG_D_FROM,'note',array('creation'),'created','n.'); // End Date for search overview_arg($this,'t',OVERVIEW_ARG_D_TO,'note',array('creation'),'created','n.'); + // EventType + overview_arg($this,'et',OVERVIEW_ARG_INT,'note',array('etype'),array('NoteEventType','NoteEventTypes'),'n.','a'); //# check_dbacl($this->dbconn, $this->q, $this->user->id); WONT WORK // sorting @@ -438,4 +448,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/note/note_select.php =================================================================== --- trunk/php/note/note_select.php 2014-01-29 07:30:14 UTC (rev 1222) +++ trunk/php/note/note_select.php 2014-01-29 07:31:52 UTC (rev 1223) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * submitted by "Nonn" <nonn at resce.com> * * This program is free software; you can redistribute it and/or modify it @@ -52,7 +52,7 @@ $r .= $this->ContentRowStart('ext'); $r .= $this->showfieldc($lang['NoteRefType'],0,'reftype'); - $r .= $this->showdata($this->NoteAskRefType($this->nsrt,0),2); + $r .= $this->showdata($this->NoteAskRefType($this->nsrt,1),2); $r .= $this->ContentRowEnd(); $r .= $this->ContentRowStart('ext'); @@ -70,6 +70,11 @@ $r .= $this->showdata($this->nsfd->EnterDate("f",1).' - '.$this->nstd->EnterDate("t",1),2); $r .= $this->ContentRowEnd(); + $r .= $this->ContentRowStart('ext'); + $r .= $this->showfieldc($lang['NoteEventType'],0,'et'); + $r .= $this->showdata(SelectLangArray('et','NoteEventTypes',-1,true,0,true),2); + $r .= $this->ContentRowEnd(); + // add custom selectors $x = get_custom_selectors('note'); foreach ($x as $s) { @@ -162,6 +167,7 @@ $lang['NoteReferences'][7] = &$lang['Task']; # $lang['NoteReferences'][8] = &$lang['Installation']; # $lang['NoteReferences'][9] = &$lang['Checklist']; + # $lang['NoteReferences'][10] = &$lang['File']; } } @@ -172,4 +178,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2014-01-29 07:30:14 UTC (rev 1222) +++ trunk/php/product.pinc 2014-01-29 07:31:52 UTC (rev 1223) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -33,7 +33,7 @@ * Build a query by analyzing given POSTS/GETS * shared use in sales forecast and product_overview */ -function prepare_product_overview(layout &$obj) { +function prepare_product_overview(layout $obj) { global $tutos,$lang,$table; // save for later Modified: trunk/php/product_overview.php =================================================================== --- trunk/php/product_overview.php 2014-01-29 07:30:14 UTC (rev 1222) +++ trunk/php/product_overview.php 2014-01-29 07:31:52 UTC (rev 1223) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -859,7 +859,7 @@ $this->q = preg_replace('# where#i',','.$s.' WHERE',$this->q); } } - // $msg = addLine($msg,$this->q); + $msg = addLine($msg,$this->q); check_dbacl($this->dbconn, $this->q, $this->user->id); // Order of output @@ -992,4 +992,4 @@ $l = new Product_overview($current_user); $l->display(); $dbconn->Close(); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 07:30:17
|
Revision: 1222 http://sourceforge.net/p/tutos/code/1222 Author: gokohnert Date: 2014-01-29 07:30:14 +0000 (Wed, 29 Jan 2014) Log Message: ----------- mass insert Modified Paths: -------------- trunk/php/acl.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2014-01-29 07:29:25 UTC (rev 1221) +++ trunk/php/acl.pinc 2014-01-29 07:30:14 UTC (rev 1222) @@ -313,15 +313,20 @@ $q = 'DELETE FROM '. $obj->dbconn->prefix.$table['acldefault'][name].' WHERE obj_id = '. $id; $res = $obj->dbconn->Exec($q); $res->free(); + $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acldefault'][name].' (obj_id,adr_id,perm) VALUES '; + $pre = ''; if ( isset($obj->acldefault) && (count($obj->acldefault) > 0) ) { foreach($obj->acldefault as $i => $f) { if ( ($i == MYTEAMS) || ( ($i > -1) && (gettype($i) == 'integer') && ($f > 0) ) ) { - $q = 'INSERT INTO '. $obj->dbconn->prefix.$table['acldefault'][name].' (obj_id,adr_id,perm) VALUES ('. $id .','. $i .','. $f .')'; - $res = $obj->dbconn->Exec($q); - $res->free(); + $q .= $pre. '('. $id .','. $i .','. $f .')'; + $pre = ','; } } } + if ($pre != '') { + $res = $obj->dbconn->Exec($q); + $res->free(); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 07:29:29
|
Revision: 1221 http://sourceforge.net/p/tutos/code/1221 Author: gokohnert Date: 2014-01-29 07:29:25 +0000 (Wed, 29 Jan 2014) Log Message: ----------- fix release resultset Modified Paths: -------------- trunk/php/watchlist/watchlist.pinc Modified: trunk/php/watchlist/watchlist.pinc =================================================================== --- trunk/php/watchlist/watchlist.pinc 2014-01-29 07:28:39 UTC (rev 1220) +++ trunk/php/watchlist/watchlist.pinc 2014-01-29 07:29:25 UTC (rev 1221) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -127,7 +127,8 @@ $q .= ' AND adr_id = '. $aid . ' AND '.$this->dbconn->like('comment',$comment); else $q .= ' AND '.$this->dbconn->like('comment',$comment); - $this->dbconn->Exec($q); + $r = $this->dbconn->Exec($q); + $r->free(); return $msg; } @@ -141,7 +142,8 @@ $msg = ""; $this->remove($oid,$aid,$comment); $q = "INSERT into ". $this->tablename .' (obj_id,adr_id,comment,creation) VALUES ('. $oid .','. $aid .','.$this->dbconn->string($comment).','. $this->dbconn->now() .")"; - $this->dbconn->Exec($q); + $r = $this->dbconn->Exec($q); + $r->free(); return $msg; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-29 07:28:44
|
Revision: 1220 http://sourceforge.net/p/tutos/code/1220 Author: gokohnert Date: 2014-01-29 07:28:39 +0000 (Wed, 29 Jan 2014) Log Message: ----------- fix release resultset Modified Paths: -------------- trunk/php/team.pinc trunk/php/user.pinc Modified: trunk/php/team.pinc =================================================================== --- trunk/php/team.pinc 2014-01-24 09:16:04 UTC (rev 1219) +++ trunk/php/team.pinc 2014-01-29 07:28:39 UTC (rev 1220) @@ -568,12 +568,18 @@ $msg = ''; $q = 'DELETE FROM '. $this->dbconn->prefix.$table['acl'][name].' where obj_id < 0 AND adr_id = '. $this->id; - $this->dbconn->Exec($q); + $r = $this->dbconn->Exec($q); + $r->free(); + $q = 'INSERT INTO '. $this->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES '; + $pre = ''; foreach ($this->p as $i => $f) { - $q = 'INSERT INTO '. $this->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES ('. $i .','. $this->id .','. $f .')'; - $this->dbconn->Exec($q); + $q .= $pre .'('. $i .','. $this->id .','. $f .')'; } + if ($pre != '') { + $r = $this->dbconn->Exec($q); + $r->free(); + } return $msg; } Modified: trunk/php/user.pinc =================================================================== --- trunk/php/user.pinc 2014-01-24 09:16:04 UTC (rev 1219) +++ trunk/php/user.pinc 2014-01-29 07:28:39 UTC (rev 1220) @@ -378,9 +378,14 @@ $q = 'DELETE FROM '. $this->dbconn->prefix.$table['acl'][name].' where obj_id < 0 AND adr_id = '. $this->id; $r = $this->dbconn->Exec($q); $r->free(); + + $q = 'INSERT INTO '. $this->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES'; + $pre = ''; foreach ($this->p as $i => $f) { - $q = 'INSERT INTO '. $this->dbconn->prefix.$table['acl'][name].' (obj_id,adr_id,perm) VALUES ('. $i .','. $this->id .','. $f .')'; - #error_log($q,3,$tutos[errlog]); + $q .= $pre.'('. $i .','. $this->id .','. $f .')'; + $pre = ','; + } + if ($pre != '') { $r = $this->dbconn->Exec($q); $r->free(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-24 09:16:09
|
Revision: 1219 http://sourceforge.net/p/tutos/code/1219 Author: gokohnert Date: 2014-01-24 09:16:04 +0000 (Fri, 24 Jan 2014) Log Message: ----------- fixed sorting of subtables Modified Paths: -------------- trunk/php/address_tools.p3 trunk/php/company_show.php trunk/php/department_show.php trunk/php/layout/layout_base.pinc Modified: trunk/php/address_tools.p3 =================================================================== --- trunk/php/address_tools.p3 2014-01-16 08:31:22 UTC (rev 1218) +++ trunk/php/address_tools.p3 2014-01-24 09:16:04 UTC (rev 1219) @@ -166,7 +166,7 @@ * starting with layout->start * */ -Function address_overview (layout $layout,$res,$target = "") { +Function address_overview (layout $layout,$res,$target = "",$key = 'ss') { global $lang, $tutos, $current_user,$msg,$info; $r = ''; @@ -178,7 +178,7 @@ $x = 0; // TODO COPY is too expensive - $nav = $layout->getSubSession(); + $nav = $layout->getSubSession($key); $nav['link'] = $layout->link1; if ( !isset($nav['list'])) { $np = array(); @@ -207,7 +207,7 @@ return $r; } - $ss = $layout->putSubSession($nav); + $ssA = $layout->putSubSession($nav); if ( $layout->maxshow == 0 ) { $layout->maxshow = $n; @@ -345,7 +345,7 @@ } if ( $layout->head['f_name'] ) { $b = $layout->mark_filter(myentities($address->f_name),'name'); - $r .= ' <td rowspan="'. $c .'" class="over_l">'. makelink($address->getUrl('ss='.$ss),$b) ."</td>\n"; + $r .= ' <td rowspan="'. $c .'" class="over_l">'. makelink($address->getUrl($key.'='.$ssA),$b) ."</td>\n"; } if ( $layout->head['m_name'] ) { $b = $layout->mark_filter(myentities($address->m_name),'name'); @@ -353,7 +353,7 @@ } if ( $layout->head['l_name'] ) { $b = $layout->mark_filter(myentities($address->l_name),'name'); - $r .= ' <td rowspan="'. $c .'" class="over_l">'. makelink($address->getUrl('ss='.$ss),$b) ."</td>\n"; + $r .= ' <td rowspan="'. $c .'" class="over_l">'. makelink($address->getUrl($key.'='.$ssA),$b) ."</td>\n"; } if ( $layout->head['birthday'] ) { $r .= ' <td rowspan="'. $c .'" class="over_l">'. $address->birthday->getLinkDate() ."</td>\n"; @@ -513,7 +513,7 @@ $a++; } - $r .= $layout->list_navigation(addUrlParameter($layout->link1,'ss='.$ss),$layout->flds,$layout->start,$a,$n,'astart'); + $r .= $layout->list_navigation(addUrlParameter($layout->link1,$key.'='.$ssA),$layout->flds,$layout->start,$a,$n,'astart'); if ( ($tutos[massupdate] == 1) && !empty($target) ) { $r .= $layout->UpdateRowStart($layout->flds -2); Modified: trunk/php/company_show.php =================================================================== --- trunk/php/company_show.php 2014-01-16 08:31:22 UTC (rev 1218) +++ trunk/php/company_show.php 2014-01-24 09:16:04 UTC (rev 1219) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -103,7 +103,7 @@ $r .= "<tr>\n"; $r .= " <td colspan=\"". $cols ."\">\n"; - $r .= address_overview($this,$ra,"company_show.php"); + $r .= address_overview($this,$ra,'company_show.php','ssA'); $r .= " </td>\n"; $r .= "</tr>\n"; @@ -171,7 +171,7 @@ * */ Function prepare() { - global $msg,$lang; + global $msg,$lang,$table; $this->name = $lang['CompanyDetail']; $this->obj = new company($this->dbconn); @@ -213,10 +213,18 @@ $this->link1 = addUrlParameter($this->link1,'id='. $this->obj->id); $this->link2 = addUrlParameter($this->link2,'id='. $this->obj->id); + if (isset($_REQUEST['ss'])) { + $this->link2 = addUrlParameter($this->link2,'ss='. $_REQUEST['ss']); + } + $this->q = 'SELECT distinct(a.id) , a.* FROM '; + $this->q .= $this->dbconn->prefix .$table['address'][name].' a, ' ; + $this->q .= $this->dbconn->prefix.$table['location'][name].' l, '; + $this->q .= $this->dbconn->prefix.$table['address1'][name].' r '; + $this->q .= 'WHERE l.c_id = '. $this->obj->id .' AND a.id = r.adr_id AND r.loc_id = l.id AND ( l.d_id is null OR l.d_id = -1 ) '; - $this->q = "SELECT distinct(a.id) , a.* FROM ". $this->dbconn->prefix ."addresses a, ". $this->dbconn->prefix ."location l, ". $this->dbconn->prefix ."adrloc r WHERE l.c_id = ". $this->obj->id ." AND a.id = r.adr_id AND r.loc_id = l.id AND ( l.d_id is null OR l.d_id = -1 ) "; - if ( isset($_GET['xf']) && isset($_GET['xo']) ) { + $this->order_fld = $_REQUEST['xf']; + $this->order_dir = ($_REQUEST['xo'] == 1 ? 1:2); $this->q .= " ORDER by " . $_GET['xf']; if ( $_GET['xo'] == 1 ) { $this->q .= " ASC "; Modified: trunk/php/department_show.php =================================================================== --- trunk/php/department_show.php 2014-01-16 08:31:22 UTC (rev 1218) +++ trunk/php/department_show.php 2014-01-24 09:16:04 UTC (rev 1219) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2013 by Gero Kohnert + * Copyright 1999 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -85,7 +85,7 @@ $r .= "<tr>\n"; $r .= " <td colspan=\"". $cols ."\">\n"; - $r .= address_overview($this,$ra,'department_show.php'); + $r .= address_overview($this,$ra,'department_show.php','ssA'); $r .= " </td>\n"; $r .= "</tr>\n"; } @@ -106,7 +106,7 @@ * action via massupdate */ Function action() { - global $lang,$msg; + global $lang,$msg,$info; $this->obj = new department($this->dbconn); if (isset($_GET['id'])) { @@ -126,7 +126,7 @@ $b->read_locs_data(); foreach($b->locall as $i => $f) { if ($f->department->id == $this->obj->id) { - $msg = addLine($msg,$lang['Delete'].':'.$b->getLink().'@'.$f->department->getFullName() .' + '. $f->company->getFullName()); + $info = addLine($info,$lang['Delete'].':'.$b->getLink().'@'.$f->department->getFullName() .' + '. $f->company->getFullName()); $this->dbconn->Begin("WORK"); $f->setCompany(null); $f->setDepartment(null); @@ -144,11 +144,12 @@ $this->redirect = acl_action(); } } + /** * prepare */ Function prepare() { - global $msg,$tutos,$lang; + global $msg,$tutos,$lang,$table; $this->name = $lang['DepartmentDetail']; $this->obj = new department($this->dbconn); @@ -189,9 +190,18 @@ $this->link1 = addUrlParameter($this->link1,'id='. $this->obj->id); $this->link2 = addUrlParameter($this->link2,'id='. $this->obj->id); - $this->q = 'SELECT distinct(a.id),a.* FROM '. $this->dbconn->prefix .'addresses a, '. $this->dbconn->prefix .'location l, '. $this->dbconn->prefix .'adrloc r WHERE l.d_id = '. $this->obj->id .' AND a.id = r.adr_id AND r.loc_id = l.id '; + if (isset($_REQUEST['ss'])) { + $this->link2 = addUrlParameter($this->link2,'ss='. $_REQUEST['ss']); + } + $this->q = 'SELECT distinct(a.id),a.* FROM '. $this->dbconn->prefix .$table['address'][name].' a, '; + $this->q .= $this->dbconn->prefix .$table['location'][name].' l, '; + $this->q .= $this->dbconn->prefix .$table['address1'][name].' r '; + $this->q .= 'WHERE l.d_id = '. $this->obj->id .' AND a.id = r.adr_id AND r.loc_id = l.id '; + if ( isset($_GET['xf']) && isset($_GET['xo']) ) { + $this->order_fld = $_REQUEST['xf']; + $this->order_dir = ($_REQUEST['xo'] == 1 ? 1:2); $this->q .= " ORDER by " . $_GET['xf']; if ( $_GET['xo'] == 1 ) { $this->q .= ' ASC '; Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2014-01-16 08:31:22 UTC (rev 1218) +++ trunk/php/layout/layout_base.pinc 2014-01-24 09:16:04 UTC (rev 1219) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2013 by Gero Kohnert + * Copyright 2002 - 2014 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -146,7 +146,12 @@ $this->nav = null; if ( isset($_REQUEST['ss']) ) { $this->subsession = $_REQUEST['ss']; - $this->nav = $this->getSubSession(); + $this->nav = $this->getSubSession('ss'); + $this->navkey = 'ss'; + } else if ( isset($_REQUEST['ssA']) ) { + # $this->subsession = $_REQUEST['ssA']; + # $this->nav = $this->getSubSession('ssA'); + # $this->navkey = 'ssA'; } // load the theme if possible if ( isset($_REQUEST['th']) ) { @@ -1166,14 +1171,14 @@ if ($next != '') $n = getObject($this->obj->dbconn,$next); if (is_object($p)) - $r .= '   '.$p->getLink($this->theme->getImage(left,'list').$lang['NavBack'],'ss='.$this->subsession); + $r .= '   '.$p->getLink($this->theme->getImage(left,'list').$lang['NavBack'],$this->navkey.'='.$this->subsession); $r.= '   ('.$c.'/'.count($this->nav['list']).')'; if (is_object($n)) - $r .= '   '.$n->getLink($lang['NavNext'].$this->theme->getImage(right,'list'),'ss='.$this->subsession); + $r .= '   '.$n->getLink($lang['NavNext'].$this->theme->getImage(right,'list'),$this->navkey.'='.$this->subsession); } if ($this->nav['link'] != '') { - $arg = 'ss='.$this->subsession; + $arg = $this->navkey.'='.$this->subsession; if ($c > 0) { $c = floor(($c-1)/$tutos['maxshow'])*$tutos['maxshow']; $arg .= '&start='.$c; @@ -1186,12 +1191,12 @@ /** * drop/invalidate the current subsession */ - function dropSubSession() { + function dropSubSession($key = 'ss') { if (!isset($_SESSION['nav'])) { return; } - if (isset($_REQUEST['ss'])) { - $found = $_REQUEST['ss']; + if (isset($_REQUEST[$key])) { + $found = $_REQUEST[$key]; if (!isset($_SESSION['nav'][$found]) || !is_array($_SESSION['nav'][$found])) { return; } @@ -1204,23 +1209,23 @@ * create a subsession */ function createSubSession($id) { - $_SESSION['nav'][$id] = array(); - $_SESSION['nav'][$id]['link'] = ''; + $_SESSION['nav'][$id] = array(); + $_SESSION['nav'][$id]['link'] = ''; $_SESSION['nav'][$id]['title'] = ''; - $_SESSION['nav'][$id]['id'] = $id; - $_SESSION['nav'][$id]['use'] = time()-1; + $_SESSION['nav'][$id]['id'] = $id; + $_SESSION['nav'][$id]['use'] = time()-1; } /** * get a valid subsession id * needed to navigate in the result of an overview (offers back prev next links in detail pages) */ - function getSubSession() { + function getSubSession($key = 'ss') { if (!isset($_SESSION['nav'])) { $_SESSION['nav'] = array(); } - if (isset($_REQUEST['ss'])) { - $found = $_REQUEST['ss']; + if (isset($_REQUEST[$key])) { + $found = $_REQUEST[$key]; if (!isset($_SESSION['nav'][$found]) || !is_array($_SESSION['nav'][$found])) { $this->createSubSession($found); } @@ -1228,7 +1233,7 @@ return $_SESSION['nav'][$found]; } // create all missing - for ($i = 0; $i < 10; $i++) { + for ($i = 0; $i < 15; $i++) { if (!isset($_SESSION['nav'][$i])) { $this->createSubSession($i); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2014-01-16 08:31:25
|
Revision: 1218 http://sourceforge.net/p/tutos/code/1218 Author: gokohnert Date: 2014-01-16 08:31:22 +0000 (Thu, 16 Jan 2014) Log Message: ----------- bug export CSV/EXCEL fixing long text Modified Paths: -------------- trunk/php/bugtracking/bug_overview.php Modified: trunk/php/bugtracking/bug_overview.php =================================================================== --- trunk/php/bugtracking/bug_overview.php 2014-01-16 08:27:31 UTC (rev 1217) +++ trunk/php/bugtracking/bug_overview.php 2014-01-16 08:31:22 UTC (rev 1218) @@ -60,7 +60,8 @@ Function info_csv() { global $lang; - Header("Content-Type: text/plain"); + export_headers('TUTOS_BugExport','csv'); + # Header("Content-Type: text/plain"); $r = ''; $r .= txt2csv('ID'); $r .= txt2csv($lang['BugID']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |