tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
|
2
|
3
(10) |
4
|
5
|
6
|
7
|
8
(3) |
9
|
10
|
11
|
12
(10) |
13
|
14
(7) |
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
(2) |
23
(4) |
24
|
25
(2) |
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
From: Gero K. <gok...@us...> - 2008-12-25 08:54:28
|
Update of /cvsroot/tutos/tutos/php/db In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8605/php/db Added Files: db_mssqlnative.pinc Log Message: added support for mssqlnative (beta). Thanks to Microsoft --- NEW FILE: db_mssqlnative.pinc --- <?php /** * Copyright 2001 - 2008 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * CVS Info: $Id: db_mssqlnative.pinc,v 1.1 2008/12/25 08:54:22 gokohnert Exp $ * $Author: gokohnert $ * * this database driver was orignally given to the TUTOS project by Microsoft * */ require_once 'db.pinc'; # # Register parse functions for datetime # $tutos['dateformat'][] = 'mssqlformat1'; $tutos['dateformat'][] = 'mssqlformat2'; $tutos['mssql']['Jan'] = 1; $tutos['mssql']['Feb'] = 2; $tutos['mssql']['Mar'] = 3; $tutos['mssql']['Apr'] = 4; $tutos['mssql']['May'] = 5; $tutos['mssql']['Jun'] = 6; $tutos['mssql']['Jul'] = 7; $tutos['mssql']['Aug'] = 8; $tutos['mssql']['Sep'] = 9; $tutos['mssql']['Oct'] = 10; $tutos['mssql']['Nov'] = 11; $tutos['mssql']['Dec'] = 12; /** * check for string delivered in postgres format */ function mssqlformat1(&$d,$str) { global $tutos; $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 $d->month = $tutos['mssql'][$regs[1]]; $d->day = (integer)$regs[2]; $d->year = (integer)$regs[3]; $d->hour = (integer)$regs[4]; $d->min = (integer)$regs[5]; $d->sec = 0; if ($regs[6] == "PM") { $d->hour += 12; } $d->format = 22; # echo "QQQ:".$str."<br />"; } return; } /** * check for string delivered in postgres format */ function mssqlformat2(&$d,$str) { global $tutos; $regs = array(); if ( ereg( "^([0-9]*) ([0-9]*) ([0-9]*) ([ 0-9]*):([0-9]*)$", $str, $regs ) ) { # Init via DB 13 01 2004 8:23AM $d->day = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->year = (integer)$regs[3]; $d->hour = (integer)$regs[4]; $d->min = (integer)$regs[5]; $d->sec = 0; if ($regs[6] == "PM") { $d->hour += 12; } $d->format = 23; #echo "QQQ:".$str."<br />"; } return; } /** --------------------------------------------------------------------------- * MS SQL database connection class (old style) * * @package DB */ class db_mssqlnative extends tutos_db { /* --------------------------------------------------------------------------- */ function db_mssqlnative(&$db) { global $tutos; parent::init($db); sqlsrv_configure("WarningsReturnAsErrors", 0); $tutos[use_check_dbacl] = 0; } /** * open the DB connection */ function open() { global $tutos; $c = @sqlsrv_connect($this->db->host,array('UID'=>$this->db->user,'PWD'=>$this->db->pass,'Database'=>$this->db->name)); if ($c == false) { Fatal_Error("Opening the MS SQL database ".$this->getFullname() ,$this->ErrorMsg() ); } $this->conn = &$c; } function ErrorMsg() { $strError = ''; $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL); if($retErrors != null) { foreach($retErrors as $arrError) { $strError .= "SQLState: ".$arrError[ 'SQLSTATE']."\n"; $strError .= "Error Code: ".$arrError[ 'code']."\n"; $strError .= "Message: ".$arrError[ 'message']."\n"; } } else { $strError = "No errors found"; } return $strError; } function ErrorNo() { $err = sqlsrv_errors(SQLSRV_ERR_ALL); if($err[0]) return $err[0]['code']; else return -1; } /** * close the DB connection */ function close() { $this->timezone(""); sqlsrv_close($this->conn); $this->conn = -1; } /* --------------------------------------------------------------------------- */ function notime() { #return ("'1970-1-1 00:00:00'"); return "null"; } /* --------------------------------------------------------------------------- */ function now() { return "getdate()"; } /* --------------------------------------------------------------------------- */ function exec($query,$showerror = 1) { if ( $this->conn == -1 ) { $msg = "No Connection"; return -1; } $ret = sqlsrv_query($this->conn,$query); if (!$ret) { if ($showerror == 1) { Fatal_Error('Using the MS SQL database '.$this->getFullname() ,$query."\n<br /> <pre>".$this->ErrorMsg().'</pre>' ); } $this->lasterror = $this->ErrorMsg(); return -1; } $this->lastquery = $query; $this->lasterror = ''; $result = new result_mssqlnative($this,$ret); return $result; } /* --------------------------------------------------------------------------- */ function nextid($name = 'id') { sqlsrv_begin_transaction($this->conn); $ok = $this->exec('update '.$this->prefix.$name.' with (tablock,holdlock) set id = id + 1'); if (!$ok) { $this->exec('create table '.$this->prefix.$name.' (id int)'); $ok = $this->exec('insert into '.$this->prefix.$name.' with (tablock,holdlock) values(1)'); if (!$ok) { sqlsrv_rollback($this->conn); return false; } sqlsrv_commit($this->conn); return 1; } $ret = $this->exec('select id from '.$this->prefix.$name); if ( 1 != $ret->numrows()) { Fatal_Error('got no id','select id from '.$this->prefix.$name); } $id = $ret->get(0, 'id'); $ret->free(); sqlsrv_commit($this->conn); return $id; } /* --------------------------------------------------------------------------- */ function setSeqID($id,$name = "id") { sqlsrv_begin_transaction($this->conn); $this->exec("IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '". $this->prefix . $name."') drop table [".$this->prefix.$name."]"); $this->exec('create table '.$this->prefix.$name.' (id int)'); $ok = $this->exec('insert into '.$this->prefix.$name." with (tablock,holdlock) values($id)"); if (!$ok) { sqlsrv_rollback($this->conn); return false; } sqlsrv_commit($this->conn); return $id; } /* --------------------------------------------------------------------------- */ function getSeqID($name = "id") { $query = 'SELECT id FROM '. $this->prefix . $name .' ORDER BY id DESC'; $r = $this->exec($query); if ( 1 != $r->numrows()) { Fatal_Error('got no id',$query); } $id = $r->get(0, "id"); $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) { if ( $d->notime == 1) { return "null"; } $t = new TUTOS_Date_Time(); $t->setDateTimeTS($d->ts_def); // set the fields in default TZ $t->ts_def = $t->ts; $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) { if ( $d->notime == 1) { return "null"; } $t = new TUTOS_Date_Time(); $t->setDateTimeTS($d->ts_def); // set the fields in default TZ $t->ts_def = $t->ts; $x = sprintf("'%04d-%02d-%02d'",$t->year,$t->month,$t->day); return $x; } /* --------------------------------------------------------------------------- * case sensitive strict string compare */ function like($fld1,$name,$fld2 = "",$fld3 = "") { $fld = $fld1; if ( $fld2 != "" ) { $fld .= " + ' ' + ". $fld2; } if ( $fld3 != "" ) { $fld .= " + ' ' + ". $fld3; } $name = eregi_replace(" ","%",$name); $name = eregi_replace("'","?",$name); return (" UPPER(". $fld .") LIKE UPPER('%". $name ."%') "); } /* --------------------------------------------------------------------------- * case sensitive strict string compare */ function like2($fld,$name) { #$name = eregi_replace(" ","%",$name); $name = eregi_replace("'","''",$name); return (" ". $fld ." = '". $name ."' "); } /* --------------------------------------------------------------------------- */ function password($pw) { if ( $this->db->crypt != 1 ) { return "'". $pw ."'"; } return "'". crypt($pw,"271166") ."'"; } /* --------------------------------------------------------------------------- */ function begin($t) { sqlsrv_begin_transaction($this->conn); return "X"; } /* --------------------------------------------------------------------------- */ function commit($t) { sqlsrv_commit($this->conn); return "Y"; } /* --------------------------------------------------------------------------- */ function abort($t) { sqlsrv_rollback($this->conn); 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() { $arrServerInfo = sqlsrv_server_info($this->conn); return 'MS SQL '.$arrServerInfo['SQLServerName'].' ('.$arrServerInfo['SQLServerVersion'].'):'. $this->db->user .'@'.$this->db->host .' '. $arrServerInfo['CurrentDatabase']; } /* --------------------------------------------------------------------------- * set persistent mode * 0 = no * 1 = yes */ function setPersistent($mode) { //persistant connections not supported } /* --------------------------------------------------------------------------- */ function error($r = "") { return "DBerror: ". $this->getFullName() ." |<pre>". $this->ErrorMsg()."</pre>|"; } /** * Clear a table * tbl = name of table * truncate a table */ function truncatetable($tbl) { $q = "TRUNCATE ". $this->prefix . $tbl; return $this->exec($q,0); } /** * tbl = array with table description */ function droptable(&$tbl) { if (is_array($tbl)) { $q = "IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '". $this->prefix . $tbl[name]."') DROP TABLE [". $this->prefix . $tbl[name]."]" ; } else { $q = "IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '". $this->prefix . $tbl."') DROP TABLE ". $this->prefix . $tbl."]" ; } return $this->exec($q,0); } /** * tbl = array with table description */ function createtable(&$tbl) { $comment = array(); $q = "CREATE TABLE ". $this->prefix . $tbl[name] ; $pre = " ("; foreach ($tbl as $i => $f) { if (! is_array($f) ) { continue; } if ($f[type] == "ID_TYPE") { $t = "INT";//IDENTITY } else if ($f[type] == "date") { $t = "DATETIME"; } else if ($f[type] == "TS_TYPE") { $t = "DATETIME"; } else if ($f[type] == "TX_TYPE") { $t = "VARCHAR(max)";//or TEXT } else if ($f[type] == "VARCHAR") { $t = "VARCHAR(". $f[size] .")"; } else { $t = eregi_replace("VARCHAR","VARCHAR(255)",$f[type]); } $c = $f[constraints]; $c = ereg_replace("PK","PRIMARY KEY",$c); $c = ereg_replace("U","UNIQUE",$c); $c = ereg_replace("NN","NOT NULL",$c); /*if (!strstr($c,"NOT 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]); } $q .= ")"; $r = $this->exec($q,0); if ($r != -1 ) { $q = "EXEC sys.sp_addextendedproperty @name=N'MS_Description' ,@value=N'{$tbl[Desc]}' ,@level0type=N'SCHEMA',@level0name=N'dbo' ,@level1type=N'TABLE',@level1name=N'".$this->prefix . $tbl[name]."'"; $this->exec($q,0); foreach ($comment as $f ) { $q = "EXEC sys.sp_addextendedproperty @name=N'MS_Description' ,@value=N'{$f['comment']}' ,@level0type=N'SCHEMA',@level0name=N'dbo' ,@level1type=N'TABLE',@level1name=N'{$f['table']}' ,@level2type=N'COLUMN',@level2name=N'{$f['column']}'"; $this->exec($q,0); } } return $r; } /** * rename a table * oldtbl = current table descriptopn * newname = new table name */ function renametable(&$oldtbl,$newname) { $q = "EXEC sp_rename 'dbo.".$this->prefix . $oldtbl[name]."', '".$this->prefix . $newname."'"; //$q = "ALTER TABLE ". $this->prefix . $oldtbl[name] ." RENAME TO " . $this->prefix . $newname; return $this->exec($q,0); } /** * tbl = array with index description */ function dropindex(&$idx) { $q = "DROP INDEX ". $this->prefix . $idx[table].'.'. $this->prefix . $idx[name] ; return $this->exec($q,0); } /** * tbl = array with table description */ function createindex(&$idx) { if ( ! isset($idx[type]) ) { $idx[type] = ""; } $q = "CREATE ".$idx[type] ." INDEX ". $this->prefix . $idx[name] ." ON ". $this->prefix . $idx[table]; $pre = "("; @reset($idx[column]); while ( list ($i,$f) = @each ($idx[column]) ) { $q .= $pre . $this->colname($f); $pre = ","; } $q .= ")"; return $this->exec($q,0); } /** * col = array with column description */ function createcolumn($tblname,$colname,&$col) { $q = "ALTER TABLE ". $this->prefix . $tblname ." ADD ("; if ($col[type] == "ID_TYPE") { $t = "int";//or IDENTITY } else if ($col[type] == "TS_TYPE") { $t = "DATETIME"; } else if ($col[type] == "TX_TYPE") { $t = "VARCHAR(max)"; } else if ($col[type] == "VARCHAR") { $t = "VARCHAR(". $col[size] .")"; } else { $t = eregi_replace("varchar","varchar(255)",$col[type]); } $c = $col[constraints]; $c = ereg_replace("PK","PRIMARY KEY",$c); $c = ereg_replace("U","UNIQUE",$c); $c = ereg_replace("NN","NOT NULL",$c); $q .= $this->colname($colname) ." ". $t ." ". $c; $q .= ")"; $r = $this->exec($q,0); $q = "EXEC sys.sp_addextendedproperty @name=N'MS_Description' ,@value=N'{$col[Desc]}' ,@level0type=N'SCHEMA',@level0name=N'dbo' ,@level1type=N'TABLE',@level1name=N'".$this->prefix . $tblname."' ,@level2type=N'COLUMN',@level2name=N'{$this->colname($colname)}'"; $this->exec($q,0); return $r; } /** * name = name of sequencer */ function dropsequence(&$seq) { $q = "IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '". $this->prefix . $seq[name]."') drop table [". $this->prefix .$seq[name]."]"; return $this->Exec($q,0); } /** * name = name of sequencer */ function createsequence(&$seq) { sqlsrv_begin_transaction($this->conn); $this->exec("IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_name = '". $this->prefix . $seq[name]."') drop table [".$this->prefix.$seq[name]."]"); $this->exec('create table '.$this->prefix.$seq[name].' (id int)'); $ok = $this->exec('insert into '.$this->prefix.$seq[name]." with (tablock,holdlock) values({$seq['start']})"); if (!$ok) { sqlsrv_rollback($this->conn); return -1; } sqlsrv_commit($this->conn); return $ok; } /** * get the phrase to limit a selection to a specific range */ function getRange($sql,$offset,$limit) { if($offset === false || $offset == 0) { if ( strpos($sql, "SELECT") === false ) { return "TOP {$limit} " . $sql; } else { return preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP '.$limit, $sql); } } else { $sql = preg_replace('/SELECT(\s*DISTINCT)?/Dsi', 'SELECT$1 TOP(10000000) ', $sql); $sql = ' SELECT * FROM ( SELECT sub2.*, ROW_NUMBER() OVER(ORDER BY sub2.line2) AS line3 FROM ( SELECT 1 AS line2, sub1.* FROM (' . $sql . ') AS sub1 ) as sub2 ) AS sub3 WHERE line3 BETWEEN ' . ($offset+1) . ' AND ' . ($offset + $limit); return $sql; } } /** * do we need a count(*) to get the number of possible results in a select */ function needCount() { return true; } /** * method to call from check service */ function checkservice() { global $table,$sequence,$tableidx,$tutos; $now = new TUTOS_Date_Time(); $diff = $now->getTimestamp() - $this->db->lastanalyze->getTimeStamp(); # only once a day if ( $diff < 86400 ) return; # 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); $this->db->setLastAnalyze($now); $msg = $this->db->save(); return $msg; } /* --------------------------------------------------------------------------- */ function gettype() { return "MSSQLNATIVE"; } } /* * MSSQL Resultset */ class result_mssqlnative extends result { function result_mssqlnative(&$dbconn,$queryresult=false) { $this->dbconn = &$dbconn; $this->offset = 0; $this->rows = array(); $this->numFields = sqlsrv_num_fields( $queryresult); $this->fieldMeta = sqlsrv_field_metadata( $queryresult); while( $row = sqlsrv_fetch_array( $queryresult, SQLSRV_FETCH_ASSOC)) { if($row !== null) { foreach($row as $k => $v) { if (is_object($v) && method_exists($v, 'format')) {//DateTime Object //$v->setTimezone(new DateTimeZone('GMT'));//TS_ISO_8601 with a trailing 'Z' is GMT $row[$k] = $v->format("YmdHis"); } } $this->rows[] = $row;//read results into memory, cursors are not supported } } $this->setrows(count($this->rows)); sqlsrv_free_stmt( $queryresult); } /* --------------------------------------------------------------------------- */ function get($pos,$fld) { return $this->rows[$pos-$this->offset][$fld]; } /* --------------------------------------------------------------------------- */ function numrows() { return $this->rowcnt; } /* --------------------------------------------------------------------------- */ function numfields() { return $this->numFields; } /* --------------------------------------------------------------------------- */ function fieldname($nr) { $arr = array_keys($this->rows[0]); return $arr[$nr]; } /* --------------------------------------------------------------------------- */ function fieldtype($nr) { $i=0; $intType = -1; $strType = ''; foreach($this->fieldMeta as $meta) { if($nr==$i) { $intType = $meta['Type']; break; } $i++; } //http://msdn.microsoft.com/en-us/library/cc296183.aspx contains type table switch($intType) { case SQLSRV_SQLTYPE_BIGINT: $strType = 'bigint'; break; case SQLSRV_SQLTYPE_BINARY: $strType = 'binary'; break; case SQLSRV_SQLTYPE_BIT: $strType = 'bit'; break; case SQLSRV_SQLTYPE_CHAR: $strType = 'char'; break; case SQLSRV_SQLTYPE_DATETIME: $strType = 'datetime'; break; case SQLSRV_SQLTYPE_DECIMAL/*($precision, $scale)*/: $strType = 'decimal'; break; case SQLSRV_SQLTYPE_FLOAT: $strType = 'float'; break; case SQLSRV_SQLTYPE_IMAGE: $strType = 'image'; break; case SQLSRV_SQLTYPE_INT: $strType = 'int'; break; case SQLSRV_SQLTYPE_MONEY: $strType = 'money'; break; case SQLSRV_SQLTYPE_NCHAR/*($charCount)*/: $strType = 'nchar'; break; case SQLSRV_SQLTYPE_NUMERIC/*($precision, $scale)*/: $strType = 'numeric'; break; case SQLSRV_SQLTYPE_NVARCHAR/*($charCount)*/: $strType = 'nvarchar'; break; //case SQLSRV_SQLTYPE_NVARCHAR('max'): $strType = 'nvarchar(MAX)'; break; case SQLSRV_SQLTYPE_NTEXT: $strType = 'ntext'; break; case SQLSRV_SQLTYPE_REAL: $strType = 'real'; break; case SQLSRV_SQLTYPE_SMALLDATETIME: $strType = 'smalldatetime'; break; case SQLSRV_SQLTYPE_SMALLINT: $strType = 'smallint'; break; case SQLSRV_SQLTYPE_SMALLMONEY: $strType = 'smallmoney'; break; case SQLSRV_SQLTYPE_TEXT: $strType = 'text'; break; case SQLSRV_SQLTYPE_TIMESTAMP: $strType = 'timestamp'; break; case SQLSRV_SQLTYPE_TINYINT: $strType = 'tinyint'; break; case SQLSRV_SQLTYPE_UNIQUEIDENTIFIER: $strType = 'uniqueidentifier'; break; case SQLSRV_SQLTYPE_UDT: $strType = 'UDT'; break; case SQLSRV_SQLTYPE_VARBINARY/*($byteCount)*/: $strType = 'varbinary'; break; //case SQLSRV_SQLTYPE_VARBINARY('max'): $strType = 'varbinary(MAX)'; break; case SQLSRV_SQLTYPE_VARCHAR/*($charCount)*/: $strType = 'varchar'; break; //case SQLSRV_SQLTYPE_VARCHAR('max'): $strType = 'varchar(MAX)'; break; case SQLSRV_SQLTYPE_XML: $strType = 'xml'; break; default: $strType = $intType; } return $strType; } /* --------------------------------------------------------------------------- */ function free() { unset($this->rows); return; } } ?> |
From: Gero K. <gok...@us...> - 2008-12-25 08:54:28
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8605/php Modified Files: config_default.pinc database.pinc Log Message: added support for mssqlnative (beta). Thanks to Microsoft Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -r1.140 -r1.141 --- config_default.pinc 14 Dec 2008 16:22:53 -0000 1.140 +++ config_default.pinc 25 Dec 2008 08:54:22 -0000 1.141 @@ -43,6 +43,7 @@ # Postgres : 5432 # MySQL : 3306 # Firebird : 3050 +# MSSQL : 1433 $tutos[dbport][0] = 5432; # # The Database user who runs TUTOS @@ -73,6 +74,7 @@ # 8 = Oracle OCI connection # 11 = SQLITE # 12 = SQLITE 3 +# 13 = MSSQL (native) (beta) # $tutos[dbtype][0] = 1; $tutos[dbalias][0] = "Postgres database"; Index: database.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/database.pinc,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- database.pinc 23 Dec 2008 15:30:58 -0000 1.72 +++ database.pinc 25 Dec 2008 08:54:22 -0000 1.73 @@ -20,6 +20,7 @@ define ('DB_TYPE_DB2',10); define ('DB_TYPE_SQLITE',11); define ('DB_TYPE_SQLITE3',12); +define ('DB_TYPE_MSSQLNATIVE',13); function CreateGUID(){ srand((double)microtime()*1000000); @@ -110,6 +111,7 @@ $this->tlist[DB_TYPE_FIREBIRD] = "Firebird"; $this->tlist[DB_TYPE_SQLITE] = "Sqlite 2"; $this->tlist[DB_TYPE_SQLITE3] = "Sqlite 3"; + $this->tlist[DB_TYPE_MSSQLNATIVE] = "MS SQL (native)"; $this->dbentryexist = false; if (isset($dbconn->prefix)) { @@ -460,6 +462,12 @@ return 1; } break; + case DB_TYPE_MSSQLNATIVE: + # MS SQL Server (native) + if ( function_exists('sqlsrv_connect') ) { + return 1; + } + break; } return 0; } @@ -520,6 +528,10 @@ } else if ( $this->type == DB_TYPE_SQLITE3 ) { require_once 'db/db_sqlite3.pinc'; $dbconn = new db_sqlite3($this); + } else if ( $this->type == DB_TYPE_MSSQLNATIVE ) { + # MS SQL (native) + require_once 'db/db_mssqlnative.pinc'; + $dbconn = new db_mssqlnative($this); } else { Fatal_Error("Unknown Database type for '".$this->id ."'", "Type is '". $this->type ."'"); } |
From: Gero K. <gok...@us...> - 2008-12-23 15:31:04
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32516/bugtracking Modified Files: bug.pinc bug_config.php en.p3 Log Message: invoice using generic config table Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- bug.pinc 14 Dec 2008 19:32:20 -0000 1.66 +++ bug.pinc 23 Dec 2008 15:30:58 -0000 1.67 @@ -580,6 +580,7 @@ */ function setName($value) { global $tutos,$sequence; + if ( $value == "auto" ) { $value = strftime($tutos['bug_autoname']); $value = eregi_replace("&X","".$this->dbconn->nextid($sequence['bugname'][name]),$value); Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/en.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- en.p3 14 Dec 2008 16:22:53 -0000 1.8 +++ en.p3 23 Dec 2008 15:30:58 -0000 1.9 @@ -87,17 +87,12 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; $lang['BugConfigHelpAutoname'] = " - a rule how to build the displayed bugid - X is substituted by the next value of the bugname sequencer of the database + a rule how to build the displayed bug id + &X is substituted by the next value of the bugname sequencer of the database all other values are handeld like the strftime function of PHP (see http://www.php.net/manual/en/function.strftime.php ) %Y year with four digits %m month 01-12 - a empty value falls back to the old mechanism with bugid from the main TUTOS - ID generator - - NOTE: a value in the database entry will override this setting !! - &X will be replaced by a unique id &Y will be replaced by a parent object id &Z will be replaced by a parent fullname"; $lang['BugConfigHelpRemember'] = " Index: bug_config.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_config.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bug_config.php 14 Dec 2008 16:22:53 -0000 1.2 +++ bug_config.php 23 Dec 2008 15:30:58 -0000 1.3 @@ -16,7 +16,7 @@ include 'permission.p3'; check_user(); - loadmodules('bugtracking','show'); + loadmodules('bugtracking','config'); loadmodule('bugtracking'); loadlayout(); |
From: Gero K. <gok...@us...> - 2008-12-23 15:31:04
|
Update of /cvsroot/tutos/tutos/php/invoice In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32516/invoice Modified Files: en.p3 invoice.pinc mconfig.pinc Added Files: invoice_config.php Log Message: invoice using generic config table Index: invoice.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice.pinc,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- invoice.pinc 14 Nov 2008 14:23:04 -0000 1.67 +++ invoice.pinc 23 Dec 2008 15:30:58 -0000 1.68 @@ -611,11 +611,19 @@ * Set the name */ function setName($value) { - global $tutos; + global $tutos,$sequence; + if ( $value == "auto" ) { - $value = strftime($tutos[invautoname]); - $value = eregi_replace("X","".$this->dbconn->nextid("invname"),$value); + $value = strftime($tutos['inv_autoname']); + $value = eregi_replace("&X","".$this->dbconn->nextid($sequence["invname"]),$value); + if (is_object($this->parent)) { + $value = eregi_replace("&Y",$this->parent->id,$value); + $value = eregi_replace("&Z",$this->parent->getFullName(),$value); + } } + + $value = eregi_replace("&Y",'',$value); + $value = eregi_replace("&Z",'',$value); $this->setStrField("name",$value,"InvoiceName"); } /** Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/en.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- en.p3 5 Apr 2007 16:14:57 -0000 1.5 +++ en.p3 23 Dec 2008 15:30:58 -0000 1.6 @@ -68,6 +68,17 @@ $lang['InvDocumentI'] = "Show Invoice as a PDF Document"; $lang['InvoiceReference'] = "Reference"; +$lang['InvoiceConfig'] = "configure bugtracking"; +$lang['InvoiceConfigHelpAutoname'] = " + a rule how to build the displayed invoice id + &X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; + ### Local Variables: *** ### mode:iso-accents *** ### coding:utf-8 *** --- NEW FILE: invoice_config.php --- <?php /** * Copyright 1999 - 2008 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * CVS Info: $Id: invoice_config.php,v 1.1 2008/12/23 15:30:58 gokohnert Exp $ * $Author: gokohnert $ */ $tutos['base'] = "../.."; ini_set("include_path",".."); include 'webelements.p3'; include 'permission.p3'; check_user(); loadmodules('invoice','config'); loadmodule('invoice'); loadlayout(); /** * display a admin page */ class invoice_config extends layout { function info() { global $lang,$table,$tutos; echo "<form id=\"invoiceconfig\" name=\"invoiceconfig\" action=\"invoice_config.php\" method=\"post\">\n"; echo $this->DataTableStart(); $line = 0; echo $this->OverviewRowStart($line); echo $this->showfield('inv_autoname'); echo '<td><input name="autoname" value="'.$tutos['inv_autoname'] .'">'; echo '</input></td>'; echo '<td colspan="2" class="pre"><pre>'.$lang['InvoiceConfigHelpAutoname'].'</pre></td>'; echo $this->OverviewRowEnd($line++); echo '<tr>'; echo submit_reset(0,1,1,1,1,0); echo '</tr>'; echo $this->DataTableEnd(); $this->addHidden("save", 1); echo hiddenFormElements(); echo $this->getHidden(); echo "</form>\n"; } function navigate() { } function prepare() { global $lang,$msg,$tutos; $this->name = $lang['InvoiceConfig']; # default if (!isset($tutos['inv_autoname'])) $tutos['inv_autoname'] = '%Y-%m-&X'; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); $this->stop = true; return; } if (isset($_REQUEST['save']) && ($_REQUEST['save'] == 1) ) { $tutos['inv_autoname'] = $_REQUEST['autoname']; write_config_value($this->dbconn,'inv_autoname','invoice'); $msg .= ' saving done '; } } } $l = new invoice_config($current_user); $l->display(); $dbconn->close(); ?> <!-- CVS Info: $Id: invoice_config.php,v 1.1 2008/12/23 15:30:58 gokohnert Exp $ $Author: gokohnert $ --> Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/mconfig.pinc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- mconfig.pinc 16 Aug 2007 12:07:15 -0000 1.10 +++ mconfig.pinc 23 Dec 2008 15:30:58 -0000 1.11 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2005 by Gero Kohnert + * Copyright 2002 - 2008 by Gero Kohnert * * Module specific configuration * @@ -17,6 +17,7 @@ name => "invoice", Desc => "maintain invoices", file => "php/invoice/invoice.pinc", + 'configurl' => "invoice/invoice_config.php", 'overview' => "invoice/invoice_select.php", 'perm' => useinvoice ); @@ -24,7 +25,6 @@ # globally enable this module # $tutos[useinvoice] = 1; -$tutos[invautoname] = "%Y-%m-X"; # # List of objects/modules where we do something with this module # and need to include this module @@ -39,4 +39,9 @@ "scheme", "expense", ); +# +# modify those values using bug_config +# here are only defaults +# +$tutos['inv_autoname'] = '%Y-%m-&X'; ?> \ No newline at end of file |
From: Gero K. <gok...@us...> - 2008-12-23 15:31:03
|
Update of /cvsroot/tutos/tutos/php/db In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32516/db Modified Files: db_mysql.pinc Log Message: invoice using generic config table Index: db_mysql.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db_mysql.pinc,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- db_mysql.pinc 10 Nov 2008 18:36:06 -0000 1.44 +++ db_mysql.pinc 23 Dec 2008 15:30:58 -0000 1.45 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2007 by Gero Kohnert + * Copyright 2001 - 2008 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 @@ -530,17 +530,17 @@ * name = name of sequencer */ function createsequence(&$seq) { - $q = "create table ". $this->prefix . $seq[name] ." (nextval int not null)"; + $q = "create table ". $this->prefix . $seq[name] ." (nextval int not null)"; $q .= " ENGINE=MyISAM"; -# Does not work on older mysql (< 4.1) + # Does not work on older mysql (< 4.1) $q .= " CHARACTER SET utf8"; - $q .= " COMMENT='". $tbl[Desc] ."'"; - $x = $this->Exec($q,0); - if (!is_object($x)) { - return -1; - } - $q = "insert into ". $this->prefix . $seq[name] ." values (". $seq['start'] .");"; - return $this->Exec($q,0); + $q .= " COMMENT='". $seq[Desc] ."'"; + $x = $this->Exec($q,0); + if (!is_object($x)) { + return -1; + } + $q = "insert into ". $this->prefix . $seq[name] ." values (". $seq['start'] .");"; + return $this->Exec($q,0); } /** * get the phrase to limit a selection to a specific range |
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32516 Modified Files: admin_show.php appointment.pinc database.pinc database_new.php database_show.php db.p3 history_show.php Log Message: invoice using generic config table Index: database_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_new.php,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- database_new.php 14 Dec 2008 16:22:53 -0000 1.35 +++ database_new.php 23 Dec 2008 15:30:58 -0000 1.36 @@ -142,10 +142,10 @@ # echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["bugautoname"][size] ."\" id=\"bugautoname\" name=\"bugautoname\" value=\"". $this->obj->bugautoname ."\" /></td>\n"; # echo "</tr>\n"; - echo "<tr>\n"; - echo $this->showfieldc($lang['CfgInvAutoName'],0,"invautoname"); - echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["invautoname"][size] ."\" id=\"invautoname\" name=\"invautoname\" value=\"". $this->obj->invautoname ."\" /></td>\n"; - echo "</tr>\n"; +# echo "<tr>\n"; +# echo $this->showfieldc($lang['CfgInvAutoName'],0,"invautoname"); +# echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["invautoname"][size] ."\" id=\"invautoname\" name=\"invautoname\" value=\"". $this->obj->invautoname ."\" /></td>\n"; +# echo "</tr>\n"; echo "<tr>\n"; echo $this->showfieldc($lang['CfgTaskAutoName'],0,"taskautoname"); Index: appointment.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/appointment.pinc,v retrieving revision 1.207 retrieving revision 1.208 diff -u -d -r1.207 -r1.208 --- appointment.pinc 3 Dec 2008 13:37:48 -0000 1.207 +++ appointment.pinc 23 Dec 2008 15:30:58 -0000 1.208 @@ -99,19 +99,23 @@ echo " </optgroup>\n"; } - if ($useOPTGROUP) { - echo ' <optgroup label="-----">'."\n"; - } + $r = ''; foreach($team as $t => $tt) { if ( isset($showed[$t]) && ($showed[$t] == 1) ) continue; $obj = getObject($current_user->dbconn,$t); if (is_object($obj)) { - echo ' <option value="'. $t .'" selected="selected">'. $obj->getFullName() ."</option>\n"; + $r .= ' <option value="'. $t .'" selected="selected">'. $obj->getFullName() ."</option>\n"; } # echo ("XXXX".$t); } - if ($useOPTGROUP) { - echo " </optgroup>\n"; + if (!empty($r)) { + if ($useOPTGROUP) { + echo ' <optgroup label="-----">'."\n"; + } + echo $r; + if ($useOPTGROUP) { + echo " </optgroup>\n"; + } } echo " </select>\n"; echo ' <input type="submit" value="GO" />'."\n"; @@ -491,7 +495,7 @@ && ( $x1->hour == 0 ) ) { $this->t_ignore = 1; - echo $this->id.' set to 1 '.$x1->min.' '.$x1->hour.'<br>'; +# echo $this->id.' set to 1 '.$x1->min.' '.$x1->hour.'<br>'; } else { $this->t_ignore = 0; } Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.178 retrieving revision 1.179 diff -u -d -r1.178 -r1.179 --- db.p3 14 Dec 2008 16:22:53 -0000 1.178 +++ db.p3 23 Dec 2008 15:30:58 -0000 1.179 @@ -99,7 +99,7 @@ define ('name',85); define ('type',86); define ('bugautoname',87); # deprecated -define ('invautoname',88); +define ('invautoname',88); # deprecated define ('vatlist',89); define ('ldapbasedn',90); @@ -407,6 +407,9 @@ if (isset($tutos[bugdelete])) { $confmsg .= '<br />check bugdelete. Instead of $tutos[bugdelete] in your config you should define it only '.makelink('bugtracking/bug_config.php','here'); } +if (isset($tutos[invautoname])) { + $confmsg .= '<br />check invautoname. Instead of $tutos[invautoname] in your config you should define it only '.makelink('invoice/invoice_config.php','here'); +} /* --------------------------------------------------------------------------- * Open the Database Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- admin_show.php 14 Dec 2008 15:13:58 -0000 1.90 +++ admin_show.php 23 Dec 2008 15:30:58 -0000 1.91 @@ -177,9 +177,9 @@ } echo ' <td align="right">'; if ( isset($url[$f[name]]) ) { - echo $this->dbconn->prefix . makelink($url[$f[name]],$f[name],$f[Desc]) ."</td>"; + echo $this->dbconn->prefix . makelink($url[$f[name]],$f[name],$f[Desc]); } else { - echo $this->dbconn->prefix . $f[name]; + echo $this->dbconn->prefix . $f[name]; } echo "</td>\n"; # if (getConfigURL()) { Index: history_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/history_show.php,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- history_show.php 14 Nov 2008 14:23:03 -0000 1.82 +++ history_show.php 23 Dec 2008 15:30:58 -0000 1.83 @@ -111,9 +111,13 @@ unset($x); } if ( $f['field'] == "TaskState" ) { - echo " <td><b> ". (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; - echo " <td> ". $lang['TaskStates'][$f["old"]] ."</td>\n"; - echo " <td> ". $lang['TaskStates'][$f["new"]] ."</td>\n"; + echo ' <td><b> '. (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; + echo ' <td> '. $lang['TaskStates'][$f["old"]] ."</td>\n"; + echo ' <td> '. $lang['TaskStates'][$f["new"]] ."</td>\n"; + } else if ( $f['field'] == "TTState" ) { + echo ' <td><b> '. (isset( $lang[$f["field"]]) ? $lang[$f["field"]] : $f["field"]) ."</b></td>\n"; + echo ' <td> '. $lang['TTStates'][$f["old"]] ."</td>\n"; + echo ' <td> '. $lang['TTStates'][$f["new"]] ."</td>\n"; } else if ( ($f['field'] == "FileCreate") || ($f['field'] == "InstCreate") || ($f['field'] == "NoteCreate") Index: database.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/database.pinc,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- database.pinc 14 Dec 2008 16:22:53 -0000 1.71 +++ database.pinc 23 Dec 2008 15:30:58 -0000 1.72 @@ -86,7 +86,7 @@ $this->logo = $tutos[logo]; $this->logolink = $tutos[logolink]; $this->bugautoname = '(deprecated)'; - $this->invautoname = $tutos[invautoname]; + $this->invautoname = '(deprecated)'; $this->taskautoname = $tutos[taskautoname]; $this->vatlist = ''; $this->version = ''; @@ -291,9 +291,9 @@ /** * set the invoice auto name string */ - function setInvAutoname($value) { - return $this->setStrField("invautoname",$value,"CfgInvAutoName"); - } +# function setInvAutoname($value) { +# return $this->setStrField("invautoname",$value,"CfgInvAutoName"); +# } /** * set the task auto name string */ @@ -356,7 +356,7 @@ $q->addFV("vatlist",$this->vatlist,"STRING",$table['database']["vatlist"][size]); # $q->addFV("bugautoname",$this->bugautoname,"STRING",$table['database']["bugautoname"][size]); - $q->addFV("invautoname",$this->invautoname,"STRING",$table['database']["invautoname"][size]); +# $q->addFV("invautoname",$this->invautoname,"STRING",$table['database']["invautoname"][size]); $q->addFV("taskautoname",$this->taskautoname,"STRING",$table['database']["taskautoname"][size]); $q->addFV("logo",$this->logo,"STRING",$table['database']["logo"][size]); $q->addFV("logolink",$this->logolink,"STRING",$table['database']["logolink"][size]); @@ -564,9 +564,9 @@ # if ( $this->bugautoname != "" ) { # $tutos[bugautoname] = $this->bugautoname; # } - if ( $this->invautoname != "" ) { - $tutos[invautoname] = $this->invautoname; - } +# if ( $this->invautoname != "" ) { +# $tutos[invautoname] = $this->invautoname; +# } if ( $this->taskautoname != "" ) { $tutos[taskautoname] = $this->taskautoname; } Index: database_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_show.php,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- database_show.php 14 Dec 2008 16:22:53 -0000 1.44 +++ database_show.php 23 Dec 2008 15:30:58 -0000 1.45 @@ -99,7 +99,7 @@ echo "</tr><tr>\n"; echo $this->showfield($lang['CfgInvAutoName']); - echo $this->showdata($this->obj->invautoname,3); + echo $this->showdata('<strike>'.$this->obj->invautoname.'</strike> (deprecated go '.makelink('invoice/invoice_config.php','here').')',3); echo "</tr><tr>\n"; echo $this->showfield($lang['CfgTaskAutoName']); |
From: Gero K. <gok...@us...> - 2008-12-22 10:49:07
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9420/php/bugtracking Modified Files: bug_new.php Log Message: some stat fixes Index: bug_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_new.php,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- bug_new.php 14 Dec 2008 19:32:20 -0000 1.31 +++ bug_new.php 22 Dec 2008 10:49:01 -0000 1.32 @@ -82,7 +82,7 @@ echo ' <td>'. $lang['BugAutoState'] .' '. $this->obj->getState() ."</td>\n"; } echo $this->showfieldc($lang['BugClass'],0,"class"); - echo " <td>". $this->obj->askClass() ."</td>\n"; + echo ' <td>'. $this->obj->askClass() ."</td>\n"; echo "</tr>\n"; echo "<tr>\n"; |
From: Gero K. <gok...@us...> - 2008-12-22 10:49:07
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9420/php Modified Files: graph_bars.php product_overview.php timetrack_overview.php Log Message: some stat fixes Index: timetrack_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_overview.php,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- timetrack_overview.php 11 May 2008 14:28:48 -0000 1.105 +++ timetrack_overview.php 22 Dec 2008 10:49:01 -0000 1.106 @@ -345,35 +345,46 @@ Function statinfo() { global $lang,$tutos; + $w = array(); + $s = array(); + $p = array(); + $n = $this->result->numrows(); $a = 0; - $v = 0; + $v = 0; # total volume while ( $a < $n ) { $tt = new timetrack($this->dbconn); $tt->read_result($this->result,$a); if ( !isset($w[$tt->worker->id]) ) { $w[$tt->worker->id] = 0; } + if ( !isset($s[$tt->state]) ) { + $s[$tt->state] = 0; + } if ( !isset($p[$tt->ref->id]) ) { $p[$tt->ref->id] = 0; } $w[$tt->worker->id] += $tt->volume; $p[$tt->ref->id] += $tt->volume; + $s[$tt->state] += $tt->volume; $v += $tt->volume; $a++; unset($tt); } + + # Header echo $this->DataTableStart(); echo "<tr>\n"; echo " <th colspan=\"5\">". $lang['TTStatsTitle'] ."</th>\n"; echo "</tr>\n"; + # Worker distribution $link = "graph_bars.php"; $link = addUrlParameter($link,"type=pie"); $link = addUrlParameter($link,"title=".$lang['TimetrackWorker']); $link = addSessionKey($link); $c = 0; - while ( list ($i,$f) = @each ($w) ) { + foreach ($w as $i => $f) { if ( $v > 0 ) { $val = number_format($f * 100.0 / $v ,2); } else { @@ -396,6 +407,30 @@ echo ' <td colspan="4" valign="top"><img src="'. $link .'" alt="'. myentities($lang['TimetrackWorker']) ."\" /></td>"; echo "</tr>\n"; + # State distribution + $link = "graph_bars.php"; + $link = addUrlParameter($link,"type=pie"); + $link = addUrlParameter($link,"title=".$lang['TTState']); + $link = addSessionKey($link); + $c = 0; + foreach ($s as $i => $f) { + if ( $v > 0 ) { + $val = number_format($f * 100.0 / $v ,2); + } else { + $val = 0; + } + $link = addUrlParameter($link,"f[". $c ."]=".$val); + $link = addUrlParameter($link,"t0[". $c ."]=". UrlEncode($lang['TTStates'][$i])); + $link = addUrlParameter($link,"t1[". $c ."]=". UrlEncode( hour_format($f) ." ". $lang['hours'])); + $c ++; + } + echo "<tr>\n"; + echo $this->showfield($lang['TTState']); + echo ' <td colspan="4" valign="top"><img src="'. $link .'" alt="'. myentities($lang['TTState']) ."\" /></td>"; + echo "</tr>\n"; + + + # Reference distribution $c = 0; $r = 0; while ( list ($i,$f) = @each ($p) ) { @@ -422,17 +457,16 @@ } # $links[$r] = addUrlParameter($links[$r],"t1[". $c ."]=". UrlEncode( hour_format($f) ." ". $lang['hours'])); $c++; - if ( $c == 10 ) { + if ( $c == 12 ) { $c = 0; } } if ( function_exists('ImageCreate') ) { - @reset($links); - while ( list ($i,$f) = @each ($links) ) { + foreach ($links as $i => $f) { echo "<tr>\n"; echo $this->showfield($lang['TimetrackRef']); - echo "<td colspan=\"4\" valign=\"top\">\n"; - echo '<img src="'. $links[$i] .'" alt="'. myentities($lang['TimetrackRef']) ."\"/><br />\n"; + echo " <td colspan=\"4\" valign=\"top\">\n"; + echo ' <img src="'. $links[$i] .'" alt="'. myentities($lang['TimetrackRef']) ."\"/><br />\n"; echo "</td></tr>\n"; } } Index: product_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_overview.php,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- product_overview.php 12 Dec 2008 13:30:47 -0000 1.126 +++ product_overview.php 22 Dec 2008 10:49:01 -0000 1.127 @@ -553,15 +553,15 @@ echo "<tr>\n"; $link = "graph_bars.php"; $link = addSessionKey($link); + $link = addUrlParameter($link,"title=".$lang['ProdState']); $link = addUrlParameter($link,"type=pie"); - @reset($states); if ( !function_exists('ImageCreate') ) { echo " <td valign=\"top\" rowspan=\"". count($states) ."\"><b>". $lang['ProdState'] ."</b></td>"; } else { echo $this->showfield($lang['ProdState']); } $c = 0; - while ( list ($i,$f) = @each ($states) ) { + foreach ($states as $i => $f) { $val = number_format($f * 100.0 / $cnt ,2); if ( !function_exists('ImageCreate') ) { echo " <td>". $lang['ProdStates'][$i] ."</td>\n"; @@ -584,33 +584,33 @@ $link = "graph_bars.php"; $link = addSessionKey($link); $link = addUrlParameter($link,"type=pie"); - @reset($cl[$c]); + $link = addUrlParameter($link,"title=".$lang['ProdClass'.$c]); if ( !function_exists('ImageCreate') ) { echo " <td valign=\"top\" rowspan=\"". count($cl[$c]) ."\"><b>". $lang['ProdClass'.$c] ."</b></td>"; } else { - echo $this->showfield($lang['ProdClass'.$c]); - } - $x = 0; - while ( list ($i,$f) = @each ($cl[$c]) ) { - $val = number_format($f * 100.0 / $cnt ,2); - if ( !function_exists('ImageCreate') ) { - if ( isset($lang['ProdClasses'.$c][$i]) ) { - echo " <td>". $lang['ProdClasses'.$c][$i] ."</td>\n"; - } else { - echo " <td>". $i ."</td>\n"; - } - echo " <td align=\"right\">". $f ."</td>\n"; - echo " <td align=\"right\">". $val ."%</td>\n"; - } - $link = addUrlParameter($link,"f[". $x ."]=".$val); + echo $this->showfield($lang['ProdClass'.$c]); + } + $x = 0; + foreach ($cl[$c] as $i => $f) { + $val = number_format($f * 100.0 / $cnt ,2); + if ( !function_exists('ImageCreate') ) { if ( isset($lang['ProdClasses'.$c][$i]) ) { - $link = addUrlParameter($link,"t0[". $x ."]=". UrlEncode($lang['ProdClasses'.$c][$i])); + echo " <td>". $lang['ProdClasses'.$c][$i] ."</td>\n"; } else { - $link = addUrlParameter($link,"t0[". $x ."]=". $i); + echo " <td>". $i ."</td>\n"; } - $link = addUrlParameter($link,"t1[". $x ."]=". $f ); - $x++; + echo " <td align=\"right\">". $f ."</td>\n"; + echo " <td align=\"right\">". $val ."%</td>\n"; + } + $link = addUrlParameter($link,"f[". $x ."]=".$val); + if ( isset($lang['ProdClasses'.$c][$i]) ) { + $link = addUrlParameter($link,"t0[". $x ."]=". UrlEncode($lang['ProdClasses'.$c][$i])); + } else { + $link = addUrlParameter($link,"t0[". $x ."]=". $i); } + $link = addUrlParameter($link,"t1[". $x ."]=". $f ); + $x++; + } if ( function_exists('ImageCreate') ) { echo " <td colspan=\"5\" valign=\"top\"><img src=\"". $link ."\" alt=\"". $lang['ProdClass'.$c] ."\" /></td>\n"; } @@ -622,14 +622,14 @@ $link = "graph_bars.php"; $link = addSessionKey($link); $link = addUrlParameter($link,"type=pie"); - @reset($manager); + $link = addUrlParameter($link,"title=".$lang['ProdRole'][1]); if ( !function_exists('ImageCreate') ) { echo " <td valign=\"top\" rowspan=". count($manager) ."><b>". $lang['ProdRole'][1] ."</b></td>"; } else { echo $this->showfield($lang['ProdRole'][1]); } $c = 0; - while ( list ($i,$f) = @each ($manager) ) { + foreach ($manager as $i => $f) { $m = new tutos_address($this->dbconn); $m = $m->read($i,$m); if ( $m->id == -1 ) { Index: graph_bars.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/graph_bars.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- graph_bars.php 22 Feb 2008 14:07:30 -0000 1.28 +++ graph_bars.php 22 Dec 2008 10:49:01 -0000 1.29 @@ -19,12 +19,15 @@ session_write_close(); $dbconn->Close(); + define ('GB_WIDTH',800); + define ('GB_HEIGHT',300); + define ('GB_BACKGROUND',300); + function basic (&$f,&$t0,&$t1) { Header("Expires: 0"); Header("Pragma: no-cache"); Header("content-type: image/png"); - @reset($f); $x2 = count($f) * 110; if ( $x2 == 0 ) { @@ -52,10 +55,9 @@ ImageDashedLine($png,5,65,$x2 - 5,65,$c['black']); ImageLine($png,5,15,$x2 - 5,15,$c['black']); - @reset($f); $x = 0; $col = 1; - while ( list ($i,$val) = @each ($f) ) { + foreach ($f as $i => $val) { if ( $col > 4 ) { $col = 1; } @@ -106,7 +108,8 @@ $r[$i] = $t0[$i] ." (". $t1[$i] .")"; $i++; } - $graph = new PieGraph(400,200); + $graph = new PieGraph(GB_WIDTH,GB_HEIGHT); + $graph->SetBackGroundGradient('white'); if( function_exists('imageantialias') ) { $graph->img->SetAntiAliasing(); } @@ -119,7 +122,7 @@ } $p1 = new PiePlot($f); $p1->value->SetFont($font,FS_NORMAL,8); - $p1->SetSize(0.35); + $p1->SetSize(0.40); $p1->SetCenter(0.30,0.5); $p1->SetLegends($r); $graph->Add($p1); @@ -129,7 +132,9 @@ function bar (&$f,&$t0,&$t1) { global $font; - $graph = new Graph(600,300); + $graph = new Graph(GB_WIDTH,GB_HEIGHT); + $graph->SetBackGroundGradient('white'); + if( function_exists('imageantialias') ) { $graph->img->SetAntiAliasing(); } |
From: Gero K. <gok...@us...> - 2008-12-14 19:32:25
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3247/bugtracking Modified Files: bug.pinc bug_new.php bug_overview.php Log Message: fix Index: bug_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_new.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- bug_new.php 3 Dec 2008 13:37:48 -0000 1.30 +++ bug_new.php 14 Dec 2008 19:32:20 -0000 1.31 @@ -44,7 +44,7 @@ $this->addHidden("state",$this->obj->state); } - if ( ($tutos[bugautoname] != "") && ( $this->obj->id < 1) ) { + if ( ($tutos['bug_autoname'] != "") && ( $this->obj->id < 1) ) { $this->addHidden("name","auto"); } @@ -55,7 +55,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['BugID'],1,"name"); echo ' <td colspan="3">'; - if ( $tutos[bugautoname] == "" ) { + if ( $tutos['bug_autoname'] == "" ) { # name if totally free echo ' <input id="name" name="name" value="'. $this->obj->name ."\">\n"; } else { @@ -64,7 +64,7 @@ echo $this->obj->getLink(); $this->addHidden("name",$this->obj->name); } else { - $tmp = strftime($tutos[bugautoname]); + $tmp = strftime($tutos['bug_autoname']); $tmp = eregi_replace("&X",'?',$tmp); $tmp = eregi_replace("&Y",'[ID]',$tmp); $tmp = eregi_replace("&Z",'[NAME]',$tmp); Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- bug.pinc 14 Dec 2008 16:22:53 -0000 1.65 +++ bug.pinc 14 Dec 2008 19:32:20 -0000 1.66 @@ -419,7 +419,7 @@ if ( ! $current_user->feature_ok(usebugtracking,PERM_DEL) ) { return 0; } - if ( $tutos[bugdelete] == 0 ) { + if ( $tutos['bug_delete'] == 0 ) { return 0; } return acl_del_ok($this); @@ -581,7 +581,7 @@ function setName($value) { global $tutos,$sequence; if ( $value == "auto" ) { - $value = strftime($tutos[bugautoname]); + $value = strftime($tutos['bug_autoname']); $value = eregi_replace("&X","".$this->dbconn->nextid($sequence['bugname'][name]),$value); if (is_object($this->parent)) { $value = eregi_replace("&Y",$this->parent->id,$value); Index: bug_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_overview.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- bug_overview.php 21 Sep 2008 16:41:35 -0000 1.30 +++ bug_overview.php 14 Dec 2008 19:32:20 -0000 1.31 @@ -258,7 +258,7 @@ echo sprintf($lang['withmarked'],$lang['Bugs']); echo " <select name=\"action\">\n"; echo " <option value=\"-1\" selected=\"selected\">". $lang['ActionNil'] ."</option>\n"; - if ( $tutos[bugdelete] == 1 ) { + if ( $tutos['bug_delete'] == 1 ) { echo " <option value=\"-2\">". $lang['Delete'] ."</option>\n"; } foreach ( $lang['BugClasses'] as $f => $i ) { |
From: Gero K. <gok...@us...> - 2008-12-14 16:32:21
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24205/bugtracking Modified Files: mconfig.pinc Log Message: fix Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/mconfig.pinc,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mconfig.pinc 14 Dec 2008 15:13:59 -0000 1.6 +++ mconfig.pinc 14 Dec 2008 16:32:14 -0000 1.7 @@ -53,4 +53,12 @@ $tutos[modulesinc]['file'][] = "bugtracking"; $tutos[modulesinc]['watchlist'][] = "bugtracking"; +# +# modify those values using bug_config +# here are only defaults +# +$tutos['bug_long_pop'] = 0; +$tutos['bug_remember'] = 0; +$tutos['bug_delete'] = 1; +$tutos['bug_autoname'] = '%Y-%m-&X-&Y'; ?> \ No newline at end of file |
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23797 Modified Files: config_default.pinc database.pinc database_ins.php database_new.php database_show.php db.p3 webelements.p3 Log Message: more stuff in the new database stored config Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.177 retrieving revision 1.178 diff -u -d -r1.177 -r1.178 --- db.p3 12 Dec 2008 13:30:47 -0000 1.177 +++ db.p3 14 Dec 2008 16:22:53 -0000 1.178 @@ -66,7 +66,7 @@ define ('faxmail_pass',56); define ('version',57); define ('dbhome',58); -define ('bugremember',59); +define ('bugremember',59); # deprecated define ('errlog',60); define ('defaultacl',61); @@ -74,7 +74,7 @@ define ('image',63); define ('smsmail',64); define ('holiday',65); -define ('bugdelete',66); +define ('bugdelete',66); # deprecated define ('ldapserver',67); define ('ldapport',68); define ('logo',69); @@ -98,7 +98,7 @@ define ('table',84); define ('name',85); define ('type',86); -define ('bugautoname',87); +define ('bugautoname',87); # deprecated define ('invautoname',88); define ('vatlist',89); @@ -387,7 +387,6 @@ if (strstr( PHP_OS, 'WIN') ) { $sroot = getenv('SystemRoot'); if( empty($sroot) ) { - $t = new ErrMsgText(); $msg = 'No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in config.php).'; die($msg); } @@ -399,6 +398,15 @@ } } +if (isset($tutos[bugremember])) { + $confmsg .= '<br />check bugremember. Instead of $tutos[bugremember] in your config you should define it only '.makelink('bugtracking/bug_config.php','here'); +} +if (isset($tutos[bugautoname])) { + $confmsg .= '<br />check bugautoname. Instead of $tutos[bugautoname] in your config or in the database definitiion mask you should define it only '.makelink('bugtracking/bug_config.php','here'); +} +if (isset($tutos[bugdelete])) { + $confmsg .= '<br />check bugdelete. Instead of $tutos[bugdelete] in your config you should define it only '.makelink('bugtracking/bug_config.php','here'); +} /* --------------------------------------------------------------------------- * Open the Database Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.139 retrieving revision 1.140 diff -u -d -r1.139 -r1.140 --- config_default.pinc 21 Sep 2008 16:41:30 -0000 1.139 +++ config_default.pinc 14 Dec 2008 16:22:53 -0000 1.140 @@ -211,35 +211,6 @@ # $tutos[timetolive] = 240; # -# How long a bug may be open before a remember mail will be sent -# 0 = disabled -# Other values: Minutes before mail is sent (via check.php and crontab) -# 240 minutes = 4 hours (default) -# -$tutos[bugremember] = 0; -# -# a rule how to build the displayed bugid -# X is substituted by the next value of the bugname sequencer of the database -# all other values are handeld like the strftime function of PHP -# (see http://www.php.net/manual/en/function.strftime.php ) -# %Y year with four digits -# %m month 01-12 -# a empty value "" falls back to the old mechanism with bugid from the main TUTOS -# ID generator -# -# NOTE: a value in the database entry will override this setting !! -# &X will be replaced by a unique id -# &Y will be replaced by a parent object id -# &Z will be replaced by a parent fullname -# -$tutos[bugautoname] = "%Y-%m-&X-&Y"; -# -# Allow deletion of bugs -# 0 = no -# 1 = yes -# -$tutos[bugdelete] = 1; -# # a rule how to build the displayed taskid # X is substituted by the next value of the taskname sequencer of the database # all other values are handeld like the strftime function of PHP Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.340 retrieving revision 1.341 diff -u -d -r1.340 -r1.341 --- webelements.p3 14 Dec 2008 15:13:58 -0000 1.340 +++ webelements.p3 14 Dec 2008 16:22:53 -0000 1.341 @@ -201,7 +201,7 @@ } if ( isset($_REQUEST['lg']) ) { - $lg = strtolower($_PREQUEST['lg']); + $lg = strtolower($_REQUEST['lg']); } else if ($user->lang != "auto" ) { $lg = $user->lang; } @@ -929,7 +929,7 @@ if ( ! eregi("^(JavaScript:|http:|https:|mailto:|ftp:|gopher:|\./)",$href) ) { $href = $tutos['base'] ."/php/". $href; } - if ( $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != '') ) { + if ( is_object($current_user) && $current_user->feature_ok(useoverlib,PERM_SEE) && ($plus != '') ) { return sprintf ("<a href=\"%s\" $target "return overlib('%s',STATUS,'%s',".$tutos[overlibargs].")\" "nd()\">%s</a>",$href,myentities($plus,1),myentities($info,1),$text); } else { return sprintf ("<a href=\"%s\" $target "self.status='%s' ;return true;\" "self.status='';return true;\" title=\"%s\">%s</a>",$href,myentities($info,1),myentities($info),$text); Index: database_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_new.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- database_new.php 4 Jul 2008 08:36:47 -0000 1.34 +++ database_new.php 14 Dec 2008 16:22:53 -0000 1.35 @@ -137,10 +137,10 @@ echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["logolink"][size] ."\" id=\"logolink\" name=\"logolink\" value=\"". $this->obj->logolink ."\" /></td>\n"; echo "</tr>\n"; - echo "<tr>\n"; - echo $this->showfieldc($lang['CfgBugAutoName'],0,"bugautoname"); - echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["bugautoname"][size] ."\" id=\"bugautoname\" name=\"bugautoname\" value=\"". $this->obj->bugautoname ."\" /></td>\n"; - echo "</tr>\n"; +# echo "<tr>\n"; +# echo $this->showfieldc($lang['CfgBugAutoName'],0,"bugautoname"); +# echo "<td colspan=\"3\"><input size=\"50\" maxlength=\"". $table['database']["bugautoname"][size] ."\" id=\"bugautoname\" name=\"bugautoname\" value=\"". $this->obj->bugautoname ."\" /></td>\n"; +# echo "</tr>\n"; echo "<tr>\n"; echo $this->showfieldc($lang['CfgInvAutoName'],0,"invautoname"); @@ -248,9 +248,9 @@ if ( !empty($_GET['logolink']) ) { $this->obj->logolink = StripSlashes($_GET['logolink']); } - if ( !empty($_GET['bugautoname']) ) { - $this->obj->bugautoname = StripSlashes($_GET['bugautoname']); - } +# if ( !empty($_GET['bugautoname']) ) { +# $this->obj->bugautoname = StripSlashes($_GET['bugautoname']); +# } if ( !empty($_GET['invautoname']) ) { $this->obj->invautoname = StripSlashes($_GET['invautoname']); } Index: database.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/database.pinc,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- database.pinc 8 Dec 2008 15:06:14 -0000 1.70 +++ database.pinc 14 Dec 2008 16:22:53 -0000 1.71 @@ -85,7 +85,7 @@ $this->repository = 'undefined'; $this->logo = $tutos[logo]; $this->logolink = $tutos[logolink]; - $this->bugautoname = $tutos[bugautoname]; + $this->bugautoname = '(deprecated)'; $this->invautoname = $tutos[invautoname]; $this->taskautoname = $tutos[taskautoname]; $this->vatlist = ''; @@ -285,9 +285,9 @@ /** * set the bug auto name string */ - function setBugAutoname($value) { - return $this->setStrField("bugautoname",$value,"CfgBugAutoName"); - } +# function setBugAutoname($value) { +# return $this->setStrField("bugautoname",$value,"CfgBugAutoName"); +# } /** * set the invoice auto name string */ @@ -355,7 +355,7 @@ $q->addFV("cryptpw",$this->crypt,"INT"); $q->addFV("vatlist",$this->vatlist,"STRING",$table['database']["vatlist"][size]); - $q->addFV("bugautoname",$this->bugautoname,"STRING",$table['database']["bugautoname"][size]); +# $q->addFV("bugautoname",$this->bugautoname,"STRING",$table['database']["bugautoname"][size]); $q->addFV("invautoname",$this->invautoname,"STRING",$table['database']["invautoname"][size]); $q->addFV("taskautoname",$this->taskautoname,"STRING",$table['database']["taskautoname"][size]); $q->addFV("logo",$this->logo,"STRING",$table['database']["logo"][size]); @@ -561,9 +561,9 @@ if ( $this->logolink != "" ) { $tutos[logolink] = $this->logolink; } - if ( $this->bugautoname != "" ) { - $tutos[bugautoname] = $this->bugautoname; - } +# if ( $this->bugautoname != "" ) { +# $tutos[bugautoname] = $this->bugautoname; +# } if ( $this->invautoname != "" ) { $tutos[invautoname] = $this->invautoname; } Index: database_ins.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_ins.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- database_ins.php 3 Apr 2005 18:31:52 -0000 1.22 +++ database_ins.php 14 Dec 2008 16:22:53 -0000 1.23 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2005 by Gero Kohnert + * Copyright 2001 - 2008 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 @@ -66,8 +66,8 @@ $vatlist = trim(StripSlashes($_POST['vatlist'])); $gotourl = addUrlParameter($gotourl,"vatlist=". UrlEncode($vatlist),true); - $bugautoname = trim(StripSlashes($_POST['bugautoname'])); - $gotourl = addUrlParameter($gotourl,"bugautoname=". UrlEncode($bugautoname),true); +# $bugautoname = trim(StripSlashes($_POST['bugautoname'])); +# $gotourl = addUrlParameter($gotourl,"bugautoname=". UrlEncode($bugautoname),true); $invautoname = trim(StripSlashes($_POST['invautoname'])); $gotourl = addUrlParameter($gotourl,"invautoname=". UrlEncode($invautoname),true); @@ -91,7 +91,7 @@ $obj->setType($type); $obj->setLogo($logo); $obj->setLogoLink($logolink); - $obj->setBugAutoname($bugautoname); +# $obj->setBugAutoname($bugautoname); $obj->setInvAutoname($invautoname); $obj->setTaskAutoname($taskautoname); $obj->setVATlist($vatlist); Index: database_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/database_show.php,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- database_show.php 4 Jul 2008 08:36:47 -0000 1.43 +++ database_show.php 14 Dec 2008 16:22:53 -0000 1.44 @@ -95,7 +95,7 @@ echo "</tr><tr>\n"; echo $this->showfield($lang['CfgBugAutoName']); - echo $this->showdata($this->obj->bugautoname,3); + echo $this->showdata('<strike>'.$this->obj->bugautoname.'</strike> (deprecated go '.makelink('bugtracking/bug_config.php','here').')',3); echo "</tr><tr>\n"; echo $this->showfield($lang['CfgInvAutoName']); |
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23797/bugtracking Modified Files: bug.pinc bug_config.php ca.p3 cs.p3 de.p3 el.p3 en.p3 es-mx.p3 es-ni.p3 es-ve.p3 es.p3 fr.p3 hu.p3 it.p3 ja.p3 ko.p3 nl.p3 pl.p3 pt-br.p3 pt.p3 ru.p3 sv.p3 tw.p3 vi.p3 zh.p3 Log Message: more stuff in the new database stored config Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/tw.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tw.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ tw.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "使ç¨Bug 追蹤"; $lang['bug'] = &$lang['Bug']; Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pl.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- pl.p3 14 Dec 2008 15:13:59 -0000 1.8 +++ pl.p3 14 Dec 2008 16:22:53 -0000 1.9 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "używanie Åledzenia bÅÄdów"; $lang['bug'] = &$lang['Bug']; Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pt-br.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pt-br.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ pt-br.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/en.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- en.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ en.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; Index: pt.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pt.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pt.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ pt.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "usar REGISTO DE ANOMALIAS"; $lang['bug'] = &$lang['Bug']; Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/fr.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- fr.p3 14 Dec 2008 15:13:59 -0000 1.8 +++ fr.p3 14 Dec 2008 16:22:53 -0000 1.9 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Gestion des incidents"; $lang['bug'] = &$lang['Bug']; Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ru.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ru.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ ru.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "конÑÑÐ¾Ð»Ñ Ð¾Ñибок"; $lang['bug'] = &$lang['Bug']; Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/nl.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- nl.p3 14 Dec 2008 15:13:59 -0000 1.8 +++ nl.p3 14 Dec 2008 16:22:53 -0000 1.9 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "gebruik bugtracking"; $lang['bug'] = &$lang['Bug']; Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/it.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- it.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ it.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Usa bugtracking"; $lang['bug'] = &$lang['Bug']; Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ko.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ko.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ ko.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; Index: es-ve.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-ve.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es-ve.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ es-ve.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "usar seguimeinto de incidencias"; $lang['bug'] = &$lang['Bug']; Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-mx.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es-mx.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ es-mx.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "usar seguimeinto de fallos"; $lang['bug'] = &$lang['Bug']; Index: ca.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ca.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ca.p3 14 Dec 2008 15:13:59 -0000 1.6 +++ ca.p3 14 Dec 2008 16:22:53 -0000 1.7 @@ -84,6 +84,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Utilitzar gestió incidències"; $lang['bug'] = &$lang['Bug']; Index: cs.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/cs.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- cs.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ cs.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "použÃt sledovánà chyb"; $lang['bug'] = &$lang['Bug']; Index: bug_config.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- bug_config.php 14 Dec 2008 15:13:59 -0000 1.1 +++ bug_config.php 14 Dec 2008 16:22:53 -0000 1.2 @@ -38,8 +38,30 @@ echo ' <option value="1"'.($tutos['bug_long_pop'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; echo ' <option value="0"'.($tutos['bug_long_pop'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; echo '</select></td>'; - echo '<td colspan="2" class="pre">'.$lang['BugConfigHelpLongPop'].'</td>'; + echo '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpLongPop'].'</pre></td>'; + echo $this->OverviewRowEnd($line++); + echo $this->OverviewRowStart($line); + echo $this->showfield('bug_remember'); + echo '<td><input name="remember" value="'.$tutos['bug_remember'].'">'; + echo '</input></td>'; + echo '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpRemember'].'</pre></td>'; + echo $this->OverviewRowEnd($line++); + + echo $this->OverviewRowStart($line); + echo $this->showfield('bug_autoname'); + echo '<td><input name="autoname" value="'.$tutos['bug_autoname'] .'">'; + echo '</input></td>'; + echo '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpAutoname'].'</pre></td>'; + echo $this->OverviewRowEnd($line++); + + echo $this->OverviewRowStart($line); + echo $this->showfield('bug_delete'); + echo '<td><select name="delete">'; + echo ' <option value="1"'.($tutos['bug_delete'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; + echo ' <option value="0"'.($tutos['bug_delete'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; + echo '</select></td>'; + echo '<td colspan="2" class="pre"><pre>'.$lang['BugConfigHelpDelete'].'</pre></td>'; echo $this->OverviewRowEnd($line++); @@ -62,6 +84,9 @@ # default if (!isset($tutos['bug_long_pop'])) $tutos['bug_long_pop'] = 0; + if (!isset($tutos['bug_remember'])) $tutos['bug_remember'] = 0; + if (!isset($tutos['bug_autoname'])) $tutos['bug_autoname'] = '%Y-%m-&X-&Y'; + if (!isset($tutos['bug_delete'])) $tutos['bug_delete'] = 1; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); @@ -71,6 +96,12 @@ if (isset($_REQUEST['save']) && ($_REQUEST['save'] == 1) ) { $tutos['bug_long_pop'] = $_REQUEST['long_pop']; write_config_value($this->dbconn,'bug_long_pop','bugtracking'); + $tutos['bug_remember'] = $_REQUEST['remember']; + write_config_value($this->dbconn,'bug_remember','bugtracking'); + $tutos['bug_autoname'] = $_REQUEST['autoname']; + write_config_value($this->dbconn,'bug_autoname','bugtracking'); + $tutos['bug_delete'] = $_REQUEST['delete']; + write_config_value($this->dbconn,'bug_delete','bugtracking'); $msg .= ' saving done '; } } Index: ja.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ja.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ja.p3 14 Dec 2008 15:13:59 -0000 1.6 +++ ja.p3 14 Dec 2008 16:22:53 -0000 1.7 @@ -84,6 +84,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "ãã°ãã©ããã³ã°"; $lang['bug'] = &$lang['Bug']; Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- bug.pinc 14 Dec 2008 15:13:59 -0000 1.64 +++ bug.pinc 14 Dec 2008 16:22:53 -0000 1.65 @@ -1167,7 +1167,7 @@ global $tutos,$lang; $msg = ''; - if ( $tutos[bugremember] == 0 ) { + if ( $tutos['bug_remember'] == 0 ) { return $msg; } $d = new TUTOS_Date_Time(); @@ -1181,7 +1181,7 @@ $b->read_result($r,$a); $a++; - $diff = $b->creation->getTimestamp() - $d->getTimeStamp() + ($tutos[bugremember] * 60); + $diff = $b->creation->getTimestamp() - $d->getTimeStamp() + ($tutos['bug_remember'] * 60); if ( $diff > 0 ) { # A nearly fresh bug continue; @@ -1194,7 +1194,7 @@ $a1 = 0; while ( ($a1 < $n1) && ($diff < 0) ) { $d1 = $r1->getDateTime($a1, "r_time"); - $diff = $d1->getTimestamp() - $d->getTimeStamp() + ($tutos[bugremember] * 60); + $diff = $d1->getTimestamp() - $d->getTimeStamp() + ($tutos['bug_remember'] * 60); $a1++; } $r1->free(); Index: es-ni.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-ni.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- es-ni.p3 14 Dec 2008 15:13:59 -0000 1.6 +++ es-ni.p3 14 Dec 2008 16:22:53 -0000 1.7 @@ -82,6 +82,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['EmailNewBug'] = "Nuevo Fallo en %s"; $lang['EmailChangesBug'] = "Cambios en Fallo %s"; Index: vi.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/vi.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vi.p3 14 Dec 2008 15:13:59 -0000 1.6 +++ vi.p3 14 Dec 2008 16:22:53 -0000 1.7 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Theo dõi SCKT"; $lang['bug'] = &$lang['Bug']; Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- es.p3 14 Dec 2008 15:13:59 -0000 1.8 +++ es.p3 14 Dec 2008 16:22:53 -0000 1.9 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Usar gestión incidencias"; $lang['bug'] = &$lang['Bug']; Index: hu.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/hu.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- hu.p3 14 Dec 2008 15:13:59 -0000 1.10 +++ hu.p3 14 Dec 2008 16:22:53 -0000 1.11 @@ -84,6 +84,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "hibakezelõ használata"; $lang['bug'] = &$lang['Bug']; Index: el.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/el.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- el.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ el.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "ÏÏήÏη ενÏοÏιÏÎ¼Î¿Ï Î»Î±Î¸Ïν"; $lang['bug'] = &$lang['Bug']; Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/zh.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- zh.p3 14 Dec 2008 15:13:59 -0000 1.7 +++ zh.p3 14 Dec 2008 16:22:53 -0000 1.8 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/de.p3,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- de.p3 14 Dec 2008 15:13:59 -0000 1.10 +++ de.p3 14 Dec 2008 16:22:53 -0000 1.11 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "Fehlermanagement konfigurieren"; $lang['BugConfigHelpLongPop'] = "Popup Fenster mit kompletter Historie anzeigen"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "Fehlermanagement"; $lang['bug'] = &$lang['Bug']; Index: sv.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/sv.p3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sv.p3 14 Dec 2008 15:13:59 -0000 1.8 +++ sv.p3 14 Dec 2008 16:22:53 -0000 1.9 @@ -86,6 +86,25 @@ $lang['BugConfig'] = "configure bugtracking"; $lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; +$lang['BugConfigHelpAutoname'] = " + a rule how to build the displayed bugid + X is substituted by the next value of the bugname sequencer of the database + all other values are handeld like the strftime function of PHP + (see http://www.php.net/manual/en/function.strftime.php ) + %Y year with four digits + %m month 01-12 + a empty value falls back to the old mechanism with bugid from the main TUTOS + ID generator + + NOTE: a value in the database entry will override this setting !! + &X will be replaced by a unique id + &Y will be replaced by a parent object id + &Z will be replaced by a parent fullname"; +$lang['BugConfigHelpRemember'] = " + How long a bug may be open before a remember mail will be sent + 0 = disabled (default) + Other values = Minutes before mail is sent (via check.php and crontab)"; +$lang['BugConfigHelpDelete'] = "Allow deletion of bugs"; $lang['perm'][usebugtracking] = "använd bugghantering"; $lang['bug'] = &$lang['Bug']; |
Update of /cvsroot/tutos/tutos/php/bugtracking In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20208/bugtracking Modified Files: bug.pinc ca.p3 cs.p3 de.p3 el.p3 en.p3 es-mx.p3 es-ni.p3 es-ve.p3 es.p3 fr.p3 hu.p3 it.p3 ja.p3 ko.p3 mconfig.pinc nl.p3 pl.p3 pt-br.p3 pt.p3 ru.p3 sv.p3 tw.p3 vi.p3 zh.p3 Added Files: bug_config.php Log Message: new config data stored in database (with bugtracking modules as early adaptor) Index: tw.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/tw.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tw.p3 24 Jan 2008 15:23:59 -0000 1.6 +++ tw.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Bug %s æ´æ¹"; $lang['EmailStillOpen'] = "Bug %s ä»ç¶ %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "使ç¨Bug 追蹤"; $lang['bug'] = &$lang['Bug']; ?> Index: pl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pl.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- pl.p3 24 Jan 2008 09:31:29 -0000 1.7 +++ pl.p3 14 Dec 2008 15:13:59 -0000 1.8 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Zmiany dotyczÄ ce bÅÄdu %s"; $lang['EmailStillOpen'] = "BÅÄ d %s nadal %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "używanie Åledzenia bÅÄdów"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** Index: pt-br.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pt-br.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pt-br.p3 24 Jan 2008 10:28:32 -0000 1.6 +++ pt-br.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,9 +84,12 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: en.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/en.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- en.p3 27 Apr 2005 20:02:38 -0000 1.6 +++ en.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; ?> Index: pt.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/pt.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- pt.p3 24 Jan 2008 10:28:32 -0000 1.6 +++ pt.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,9 +84,12 @@ $lang['EmailChangesBug'] = "Modificações em anomalia %s"; $lang['EmailStillOpen'] = "Anomalia %s continua %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "usar REGISTO DE ANOMALIAS"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/fr.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fr.p3 5 Apr 2007 16:14:56 -0000 1.7 +++ fr.p3 14 Dec 2008 15:13:59 -0000 1.8 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changements dans l'incident %s"; $lang['EmailStillOpen'] = "Incident %s toujours %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "Gestion des incidents"; $lang['bug'] = &$lang['Bug']; @@ -92,4 +95,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ru.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ru.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ru.p3 24 Jan 2008 08:45:59 -0000 1.6 +++ ru.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "ÐÐ·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð² оÑибке %s"; $lang['EmailStillOpen'] = "ÐÑибка %s вÑе еÑе %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "конÑÑÐ¾Ð»Ñ Ð¾Ñибок"; $lang['bug'] = &$lang['Bug']; Index: nl.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/nl.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- nl.p3 5 Apr 2007 16:14:56 -0000 1.7 +++ nl.p3 14 Dec 2008 15:13:59 -0000 1.8 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Wijzigingen in foutregistratie %s"; $lang['EmailStillOpen'] = "Foutregistratie %s nog steeds %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "gebruik bugtracking"; $lang['bug'] = &$lang['Bug']; @@ -91,4 +94,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: it.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/it.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- it.p3 5 Apr 2007 16:14:56 -0000 1.6 +++ it.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "Usa bugtracking"; $lang['bug'] = &$lang['Bug']; @@ -91,4 +94,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: ko.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ko.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ko.p3 24 Jan 2008 15:41:36 -0000 1.6 +++ ko.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; ?> Index: es-ve.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-ve.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- es-ve.p3 17 Jun 2008 19:28:07 -0000 1.6 +++ es-ve.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Cambios en Fallo %s"; $lang['EmailStillOpen'] = "FALLO %s TodavÃa %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "usar seguimeinto de incidencias"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** Index: es-mx.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-mx.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- es-mx.p3 17 Jun 2008 19:28:07 -0000 1.6 +++ es-mx.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Cambios en Fallo %s"; $lang['EmailStillOpen'] = "FALLO %s TodavÃa %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "usar seguimeinto de fallos"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** Index: ca.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ca.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ca.p3 24 Jan 2008 14:58:35 -0000 1.5 +++ ca.p3 14 Dec 2008 15:13:59 -0000 1.6 @@ -82,10 +82,13 @@ $lang['EmailChangesBug'] = "Cavis a l'Erada %s"; $lang['EmailStillOpen'] = "ERRADA %s Encara %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "Utilitzar gestió incidències"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: cs.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/cs.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cs.p3 24 Jan 2008 09:08:27 -0000 1.6 +++ cs.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "ZmÄny v chybÄ %s"; $lang['EmailStillOpen'] = "Stále chyba %s %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "použÃt sledovánà chyb"; $lang['bug'] = &$lang['Bug']; --- NEW FILE: bug_config.php --- <?php /** * Copyright 1999 - 2008 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * CVS Info: $Id: bug_config.php,v 1.1 2008/12/14 15:13:59 gokohnert Exp $ * $Author: gokohnert $ */ $tutos['base'] = "../.."; ini_set("include_path",".."); include 'webelements.p3'; include 'permission.p3'; check_user(); loadmodules('bugtracking','show'); loadmodule('bugtracking'); loadlayout(); /** * display a admin page */ class bug_config extends layout { function info() { global $lang,$table,$tutos; echo "<form id=\"bugconfig\" name=\"bugconfig\" action=\"bug_config.php\" method=\"post\">\n"; echo $this->DataTableStart(); $line = 0; echo $this->OverviewRowStart($line); echo $this->showfield('bug_long_pop'); echo '<td><select name="long_pop">'; echo ' <option value="1"'.($tutos['bug_long_pop'] == 1 ? ' selected="selected"':'').'>'.$lang['yes'].'</option>'; echo ' <option value="0"'.($tutos['bug_long_pop'] == 0 ? ' selected="selected"':'').'>'.$lang['no'].'</option>'; echo '</select></td>'; echo '<td colspan="2" class="pre">'.$lang['BugConfigHelpLongPop'].'</td>'; echo $this->OverviewRowEnd($line++); echo '<tr>'; echo submit_reset(0,1,1,1,1,0); echo '</tr>'; echo $this->DataTableEnd(); $this->addHidden("save", 1); echo hiddenFormElements(); echo $this->getHidden(); echo "</form>\n"; } function navigate() { } function prepare() { global $lang,$msg,$tutos; $this->name = $lang['BugConfig']; # default if (!isset($tutos['bug_long_pop'])) $tutos['bug_long_pop'] = 0; if ( ! $this->user->isAdmin() ) { $msg .= $this->error("Only admins are allowed to see this"); $this->stop = true; return; } if (isset($_REQUEST['save']) && ($_REQUEST['save'] == 1) ) { $tutos['bug_long_pop'] = $_REQUEST['long_pop']; write_config_value($this->dbconn,'bug_long_pop','bugtracking'); $msg .= ' saving done '; } } } $l = new bug_config($current_user); $l->display(); $dbconn->close(); ?> <!-- CVS Info: $Id: bug_config.php,v 1.1 2008/12/14 15:13:59 gokohnert Exp $ $Author: gokohnert $ --> Index: ja.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/ja.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ja.p3 24 Jan 2008 15:49:53 -0000 1.5 +++ ja.p3 14 Dec 2008 15:13:59 -0000 1.6 @@ -82,6 +82,9 @@ $lang['EmailChangesBug'] = "%s ã®ãã°ã夿´"; $lang['EmailStillOpen'] = "ãã° %s ã¯ã¾ã %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "ãã°ãã©ããã³ã°"; $lang['bug'] = &$lang['Bug']; -?> \ No newline at end of file +?> Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- bug.pinc 3 Dec 2008 13:37:48 -0000 1.63 +++ bug.pinc 14 Dec 2008 15:13:59 -0000 1.64 @@ -483,7 +483,7 @@ function getPopInfo() { global $tutos,$lang; - if (!isset($tutos['bug_long_pop']) || ($tutos['bug_long_pop'] == false) ) { + if (!isset($tutos['bug_long_pop']) || ($tutos['bug_long_pop'] == 0) ) { $n =str_replace("\n","<br />",myentities(wordwrap($this->short,80))); $border = 0; } else { Index: es-ni.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es-ni.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- es-ni.p3 27 Apr 2005 20:02:38 -0000 1.5 +++ es-ni.p3 14 Dec 2008 15:13:59 -0000 1.6 @@ -80,6 +80,9 @@ $lang['BugTrack'] = "Fallos"; $lang['BugTrackInfo'] = "Base de Datos de Fallos"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['EmailNewBug'] = "Nuevo Fallo en %s"; $lang['EmailChangesBug'] = "Cambios en Fallo %s"; $lang['EmailStillOpen'] = "FALLO %s Todavía %s"; Index: vi.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/vi.p3,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vi.p3 27 Apr 2005 20:02:39 -0000 1.5 +++ vi.p3 14 Dec 2008 15:13:59 -0000 1.6 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Có thay Äá»i trong %s"; $lang['EmailStillOpen'] = "Sá»± cá» %s vẫn còn %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "Theo dõi SCKT"; $lang['bug'] = &$lang['Bug']; ?> Index: es.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/es.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- es.p3 5 Apr 2007 16:14:56 -0000 1.7 +++ es.p3 14 Dec 2008 15:13:59 -0000 1.8 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Cambios en Fallo %s"; $lang['EmailStillOpen'] = "FALLO %s TodavÃa %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "Usar gestión incidencias"; $lang['bug'] = &$lang['Bug']; @@ -91,4 +94,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: mconfig.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/mconfig.pinc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mconfig.pinc 9 Jul 2008 09:10:45 -0000 1.5 +++ mconfig.pinc 14 Dec 2008 15:13:59 -0000 1.6 @@ -1,6 +1,6 @@ <?php /* - * Copyright 2003 by Gero Kohnert + * Copyright 2003 - 2008 by Gero Kohnert * * Module specific configuration * @@ -18,6 +18,7 @@ Desc => "bug and ticket tracking", file => "php/bugtracking/bug.pinc", 'overview' => "bugtracking/bug_overview.php", + 'configurl' => "bugtracking/bug_config.php", 'perm' => usebugtracking ); # internal @@ -52,10 +53,4 @@ $tutos[modulesinc]['file'][] = "bugtracking"; $tutos[modulesinc]['watchlist'][] = "bugtracking"; - -# features -# -# Show long popups with the whole history (default = false) -# -$tutos['bug_long_pop'] = false; ?> \ No newline at end of file Index: hu.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/hu.p3,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- hu.p3 16 Apr 2007 15:30:37 -0000 1.9 +++ hu.p3 14 Dec 2008 15:13:59 -0000 1.10 @@ -82,6 +82,9 @@ $lang['EmailChangesBug'] = "Változtatások %s hibán"; $lang['EmailStillOpen'] = "%s hiba még mindig %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "hibakezelõ használata"; $lang['bug'] = &$lang['Bug']; @@ -89,4 +92,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> Index: el.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/el.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- el.p3 24 Jan 2008 09:45:05 -0000 1.6 +++ el.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "ÏÏήÏη ενÏοÏιÏÎ¼Î¿Ï Î»Î±Î¸Ïν"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** Index: zh.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/zh.p3,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- zh.p3 24 Jan 2008 15:34:00 -0000 1.6 +++ zh.p3 14 Dec 2008 15:13:59 -0000 1.7 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Changes in bug %s"; $lang['EmailStillOpen'] = "Bug %s still %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "use bugtracking"; $lang['bug'] = &$lang['Bug']; ?> Index: de.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/de.p3,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- de.p3 5 Apr 2007 16:14:56 -0000 1.9 +++ de.p3 14 Dec 2008 15:13:59 -0000 1.10 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Ãnderungen am Fehler %s"; $lang['EmailStillOpen'] = "Fehler %s ist %s"; +$lang['BugConfig'] = "Fehlermanagement konfigurieren"; +$lang['BugConfigHelpLongPop'] = "Popup Fenster mit kompletter Historie anzeigen"; + $lang['perm'][usebugtracking] = "Fehlermanagement"; $lang['bug'] = &$lang['Bug']; ### Local Variables: *** Index: sv.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/sv.p3,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sv.p3 5 Apr 2007 16:14:56 -0000 1.7 +++ sv.p3 14 Dec 2008 15:13:59 -0000 1.8 @@ -84,6 +84,9 @@ $lang['EmailChangesBug'] = "Ãndring i bugg %s"; $lang['EmailStillOpen'] = "Bugg %s är fortfarande %s"; +$lang['BugConfig'] = "configure bugtracking"; +$lang['BugConfigHelpLongPop'] = "Show long popups with the whole history"; + $lang['perm'][usebugtracking] = "använd bugghantering"; $lang['bug'] = &$lang['Bug']; @@ -91,4 +94,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> \ No newline at end of file +?> |
From: Gero K. <gok...@us...> - 2008-12-14 15:14:04
|
Update of /cvsroot/tutos/tutos/php/db In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20208/db Modified Files: table.pinc Log Message: new config data stored in database (with bugtracking modules as early adaptor) Index: table.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/table.pinc,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- table.pinc 7 Nov 2008 15:33:30 -0000 1.41 +++ table.pinc 14 Dec 2008 15:13:59 -0000 1.42 @@ -12,6 +12,7 @@ * $Author$ */ +# Object Types $table['objectids'] = array( name => 'objectids', Desc => "TUTOS object id - type referece", @@ -19,6 +20,21 @@ 'tutostype' => array(type => 'ID_TYPE', constraints => 'NN', Desc => 'tutos type (see db.p3)'), ); +# Config Table for online (not in config.php) changeable values +$table['tutos_config'] = array ( + name => 't_config', + Desc => 'TUTOS Configuration', + 'cname' => array(type => 'VARCHAR', size => 40, constraints => 'PK', Desc => "configuration name"), + 'cvalue' => array(type => 'VARCHAR', size => 250, constraints => '', Desc => "configuration value"), + 'ctag' => array(type => 'VARCHAR', size => 40, constraints => '', Desc => "configuration tag (module or similar)"), +); +$tableidx['config1'] = array( + name => "config_tag", + table => "t_config", + column => array("ctag"), + Desc => "config tags", +); + $table['people'] = array( name => 'people', Desc => 'TUTOS users', |
From: Gero K. <gok...@us...> - 2008-12-14 15:14:04
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20208 Modified Files: admin_show.php module_base.pinc webelements.p3 Log Message: new config data stored in database (with bugtracking modules as early adaptor) Index: module_base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/module_base.pinc,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- module_base.pinc 23 Jan 2008 15:01:29 -0000 1.45 +++ module_base.pinc 14 Dec 2008 15:13:58 -0000 1.46 @@ -20,7 +20,7 @@ * load modules that want to work here */ Function loadmodule($key) { - global $tutos,$lang,$current_user,$table,$tableidx,$sequence; + global $dbconn,$tutos,$lang,$current_user,$table,$tableidx,$sequence; if (! isset($tutos[modules][$key]) ) { return; @@ -46,6 +46,13 @@ if (file_exists(dirname($tutos['base'] .'/'. $tutos[modules][$key][file]) .'/mtable.pinc') ) { @include_once dirname($tutos['base'] .'/'. $tutos[modules][$key][file]) .'/mtable.pinc'; } + + # Load Config Values + if (is_object($dbconn)) { + read_config_values_by_tag($dbconn,$key); + } else { +# echo "X $key X"; + } $tutos[loadedmodules][$key] = $key; } /** Index: admin_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/admin_show.php,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- admin_show.php 8 Dec 2008 15:06:14 -0000 1.89 +++ admin_show.php 14 Dec 2008 15:13:58 -0000 1.90 @@ -86,9 +86,9 @@ global $lang,$tutos; echo "<tr>\n"; - echo " <th colspan=\"6\">". menulink("user_overview.php",$lang['AdminLoginInfo'],$lang['AdminLoginInfo']) ."</th>\n"; + echo " <th colspan=\"9\">". menulink("user_overview.php",$lang['AdminLoginInfo'],$lang['AdminLoginInfo']) ."</th>\n"; echo "</tr>\n"; - echo "<tr><td colspan=\"6\">\n"; + echo "<tr><td colspan=\"9\">\n"; echo $this->SubTableStart(); echo "<tr>\n"; echo $this->orderHeader("", $lang['AdrName'],$this->link2); @@ -156,10 +156,15 @@ echo "<tr>\n"; echo " <th>". $lang['AdminDBTable'] ."</th>\n"; + echo " <th>". '' ."</th>\n"; echo " <th>". $lang['AdminDBCount'] ."</th>\n"; + echo " <th>". $lang['AdminDBTable'] ."</th>\n"; + echo " <th>". '' ."</th>\n"; echo " <th>". $lang['AdminDBCount'] ."</th>\n"; + echo " <th>". $lang['AdminDBTable'] ."</th>\n"; + echo " <th>". '' ."</th>\n"; echo " <th>". $lang['AdminDBCount'] ."</th>\n"; echo "</tr>\n"; @@ -170,12 +175,18 @@ if ( $c == 0 ) { echo "<tr>\n"; } + echo ' <td align="right">'; if ( isset($url[$f[name]]) ) { - echo " <td align=\"right\">". $this->dbconn->prefix . makelink($url[$f[name]],$f[name],$f[Desc]) ."</td>"; + echo $this->dbconn->prefix . makelink($url[$f[name]],$f[name],$f[Desc]) ."</td>"; } else { - echo " <td align=\"right\">". $this->dbconn->prefix . $f[name] ."</td>"; + echo $this->dbconn->prefix . $f[name]; } - echo " <td align=\"right\">". $f['count'] ."</td>"; + echo "</td>\n"; +# if (getConfigURL()) { +# } + echo ' <td align="right">'; + echo "</td>\n"; + echo ' <td align="right">'. $f['count'] ."</td>\n"; if ( $c == 2 ) { echo "</tr>\n"; $c = 0; @@ -184,7 +195,7 @@ } } if ($c != 0) { - echo " <td colspan=\"". (3 - $c) * 2 ."\"> </td></tr>\n"; + echo ' <td colspan="'. (3 - $c) * 2 ."\"> </td></tr>\n"; } } /** @@ -203,9 +214,9 @@ # Sessions echo "<tr>\n"; - echo " <th colspan=\"6\">Sessions</th>\n"; + echo " <th colspan=\"9\">Sessions</th>\n"; echo "</tr>\n"; - echo "<tr><td colspan=\"6\">\n"; + echo "<tr><td colspan=\"9\">\n"; echo $this->SubTableStart(); echo "<tr>\n"; echo $this->orderHeader("", $lang['AdrName'],"",1); @@ -280,70 +291,68 @@ global $lang,$tutos; $this->link2 = "admin_show.php"; - if ( ! $this->user->isAdmin() ) { - echo $this->error("Only admins are allowed to see this"); - if ( $tutos[demo] == 1 ) { - echo $this->error("exceptionally enabled for this demo"); - } else { - return; - } - } echo $this->DataTableStart(); echo "<tr>\n"; - echo " <th colspan=\"6\">". $lang['AdminDBInfo'] ." : ". $this->dbconn->db->alias ."</th>\n"; + echo " <th colspan=\"9\">". $lang['AdminDBInfo'] ." : ". $this->dbconn->db->alias ."</th>\n"; echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield($lang['AdminDBName']); - echo $this->showdata($this->dbconn->db->getLink($this->dbconn->db->name),2); + echo $this->showdata($this->dbconn->db->getLink($this->dbconn->db->name),3); echo $this->showfield($lang['AdminDBUser']); - echo $this->showdata($this->dbconn->db->user,2); + echo $this->showdata($this->dbconn->db->user,4); echo "</tr>\n"; echo "<tr>\n"; if ( $this->dbconn->gettype() == "Oracle" ) { echo $this->showfield($lang['AdminDBHome']); - echo $this->showdata($this->dbconn->db->home,5); + echo $this->showdata($this->dbconn->db->home,8); } else { echo $this->showfield($lang['AdminDBHost']); - echo $this->showdata($this->dbconn->db->host,2); + echo $this->showdata($this->dbconn->db->host,3); if ( $this->dbconn->gettype() == "Postgres" ) { echo $this->showfield($lang['AdminDBPort']); - echo $this->showdata($this->dbconn->db->port,2); + echo $this->showdata($this->dbconn->db->port,4); } else { - echo " <td colspan=\"3\"> </td>\n"; + echo " <td colspan=\"5\"> </td>\n"; } } echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield($lang['AdminDBInfo']); - echo $this->showdata($this->dbconn->moreinfo(),6); + echo $this->showdata($this->dbconn->moreinfo(),8); echo "</tr>\n"; # The baseurl for this installation echo "<tr>\n"; - echo " <th colspan=\"6\">Environment</th>\n"; + echo " <th colspan=\"9\">Environment</th>\n"; echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield("BaseURL"); - echo $this->showdata(makelink(getBaseUrl(true),getBaseUrl(true)),6); + echo $this->showdata(makelink(getBaseUrl(true),getBaseUrl(true)),9); echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield("PHP"); - echo $this->showdata('served by '. PHP_OS .' with PHP '. PHP_SAPI .' Version '. PHP_VERSION .' ',6); + echo $this->showdata('served by '. PHP_OS .' with PHP '. PHP_SAPI .' Version '. PHP_VERSION .' ',9); echo "</tr>\n"; echo "<tr>\n"; echo $this->showfield("Apache"); - echo $this->showdata(apache_get_version(),6); + echo $this->showdata(apache_get_version(),9); echo "</tr>\n"; echo "<tr>\n"; - echo " <th colspan=\"6\">TUTOS Information</th>\n"; + echo " <th colspan=\"9\">TUTOS Information</th>\n"; echo "</tr>\n"; $this->table_info(); echo "<tr>\n"; - echo " <th colspan=\"4\">Known Modules</th>\n"; + echo " <th colspan=\"9\">Known Modules</th>\n"; + echo "</tr>\n"; + echo "<tr>\n"; + echo " <th>Module</th>\n"; + echo " <th colspan=\"4\">Description</th>\n"; + echo " <th>File</th>\n"; + echo " <th>Config</th>\n"; echo " <th>". $lang['AdminDBTable'] ."</th>\n"; echo " <th>" .$lang['AdminDBCount'] ."</th>\n"; echo "</tr>\n"; @@ -364,7 +373,8 @@ echo "</strike>\n"; } echo "</td>\n"; - echo " <td valign=\"top\" colspan=\"2\" align=\"left\">". $f[Desc] ."</td>\n"; + + echo " <td valign=\"top\" colspan=\"4\" align=\"left\">". $f[Desc] ."</td>\n"; echo " <td valign=\"top\" align=\"left\"> "; if (isset($f[file])) { @@ -376,6 +386,13 @@ echo "-"; } echo "</td>\n"; + + echo " <td align=\"right\"> "; + if ( isset($f['configurl']) ) { + echo makelink($f['configurl'],"config"); + } + echo "</td>\n"; + echo " <td align=\"right\"> "; $pre = ""; foreach($table as $i2 => $f2) { @@ -400,9 +417,9 @@ } - echo "<tr><td colspan=\"7\"> </td></tr>\n"; + echo "<tr><td colspan=\"9\"> </td></tr>\n"; $this->login_info(); - echo "<tr><td colspan=\"7\"> </td></tr>\n"; + echo "<tr><td colspan=\"9\"> </td></tr>\n"; $this->sessions_info(); echo $this->DataTableEnd(); @@ -453,9 +470,20 @@ * preparation */ Function prepare() { - global $tutos,$lang; + global $msg,$tutos,$lang; $this->name = $lang['AdminShow']; + + if ( ! $this->user->isAdmin() ) { + $msg .= $this->error("Only admins are allowed to see this"); + if ( $tutos[demo] == 1 ) { + $msg .= $this->error("exceptionally enabled for this demo"); + } else { + $this->stop = true; + return; + } + } + $this->q = "SELECT * from ". $this->dbconn->prefix ."people WHERE last_seen is not null"; # sorting $xxx = ""; Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.339 retrieving revision 1.340 diff -u -d -r1.339 -r1.340 --- webelements.p3 12 Dec 2008 13:30:47 -0000 1.339 +++ webelements.p3 14 Dec 2008 15:13:58 -0000 1.340 @@ -1793,4 +1793,49 @@ return false; } +/** + * read all config values with a given tag + */ +function read_config_values_by_tag($dbconn,$tag) { + global $tutos,$table; + + $q = 'SELECT cname,cvalue from '. $dbconn->prefix. $table['tutos_config'][name] .' WHERE ctag = \''. $tag .'\''; + $r = $dbconn->Exec($q); + $n = $r->numrows(); + $x = 0; + while ( $x < $n ) { + $cname = $r->get($x, 'cname'); + $cvalue = $r->get($x, 'cvalue'); +# echo '<br>'.$cname.' = '. $cvalue .' '. gettype($cvalue); + $tutos[$cname] = $cvalue; + $x++; + } + + $r->free(); +} +/** + * write a config value + */ +function write_config_value($dbconn,$name,$tag) { + global $tutos,$table; + + delete_config_value($dbconn,$name); + $q = 'INSERT into '. $dbconn->prefix. $table['tutos_config'][name] .' (cname,cvalue,ctag) values ('; + $q .= "'".$name."',"; + $q .= "'".$tutos[$name]."',"; + $q .= "'".$tag."'"; + $q .= ')'; + $r = $dbconn->Exec($q); + $r->free(); +} +/** + * delete a config value + */ +function delete_config_value($dbconn,$name) { + global $tutos,$table; + + $q = 'DELETE from '. $dbconn->prefix. $table['tutos_config'][name] .' WHERE cname = \''. $name .'\''; + $r = $dbconn->Exec($q); + $r->free(); +} ?> |
From: Gero K. <gok...@us...> - 2008-12-12 14:49:21
|
Update of /cvsroot/tutos/tutos/php/note In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10480/php/note Modified Files: note.pinc Log Message: fix Index: note.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/note/note.pinc,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- note.pinc 14 Nov 2008 14:23:04 -0000 1.68 +++ note.pinc 12 Dec 2008 14:49:13 -0000 1.69 @@ -237,17 +237,6 @@ return $this->ref->getUrl(); } /** - * the url where we when deleting fails - */ - function get_failed_del_Url () { - if ($this->see_ok()) { - return $this->getUrl(); - } - $this->read_reference(); - return $this->ref->getUrl(); - } - - /** * Return a fullname */ function getFullname() { |
From: Gero K. <gok...@us...> - 2008-12-12 14:49:21
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10480/php Modified Files: user_new.php base.pinc Log Message: fix Index: user_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/user_new.php,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- user_new.php 3 Aug 2008 20:18:58 -0000 1.98 +++ user_new.php 12 Dec 2008 14:49:13 -0000 1.99 @@ -455,7 +455,7 @@ # Read address as a user entry $this->obj = $this->obj->read($_GET['id'],$this->obj,0); $this->obj->read_permissions(); - } else if ( isset($_GET['uid']) ) { + } else if ( isset($_GET['uid']) && is_numeric($_GET['uid']) ) { $this->obj = $this->obj->read($_GET['uid'],$this->obj,1); $this->obj->read_permissions(); } else { Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- base.pinc 8 Dec 2008 15:06:14 -0000 1.108 +++ base.pinc 12 Dec 2008 14:49:13 -0000 1.109 @@ -423,7 +423,7 @@ if ($this->see_ok()) { return $this->getUrl(); } - return 'mytutos.php'; + return $this->get_after_del_url(); } /** * Checks if the current user is allowed to modify this object |
From: Gero K. <gok...@us...> - 2008-12-12 14:49:20
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10480 Modified Files: test.sh ToDo Log Message: fix Index: test.sh =================================================================== RCS file: /cvsroot/tutos/tutos/test.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- test.sh 14 Nov 2008 21:14:51 -0000 1.8 +++ test.sh 12 Dec 2008 14:49:13 -0000 1.9 @@ -199,6 +199,8 @@ user_new.php user_new.php?id=$NOID user_new.php?id=$ADR + user_new.php?uid=$NOID + user_new.php?uid=$ADR user_overview.php admin/phpinfo.php admin/customize_show.php Index: ToDo =================================================================== RCS file: /cvsroot/tutos/tutos/ToDo,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- ToDo 19 Aug 2008 09:11:55 -0000 1.54 +++ ToDo 12 Dec 2008 14:49:13 -0000 1.55 @@ -173,7 +173,7 @@ Tags on all objects - +Using PHPUnit or similar for unittest while developing # # # EOF |
From: Gero K. <gok...@us...> - 2008-12-12 14:49:20
|
Update of /cvsroot/tutos/tutos/php/resource In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10480/php/resource Modified Files: resource_new.php Log Message: fix Index: resource_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/resource/resource_new.php,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- resource_new.php 14 Nov 2008 21:14:52 -0000 1.30 +++ resource_new.php 12 Dec 2008 14:49:13 -0000 1.31 @@ -89,8 +89,8 @@ if ( isset($_GET['id']) ) { $this->obj = $this->obj->read($_GET['id'],$this->obj); - if ( !is-object($this->obj) ) { - $msg .= sprintf($lang['Err0040'],$lang[$this->obj->getType()]); + if ( !is_object($this->obj) ) { + $msg .= sprintf($lang['Err0040'],$lang['Resource']); $this->stop = true ; return; } |
From: Gero K. <gok...@us...> - 2008-12-12 14:42:18
|
Update of /cvsroot/tutos/tutos/php/url In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9278/php/url Modified Files: url.pinc Removed Files: url_del.php Log Message: generic del --- url_del.php DELETED --- Index: url.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/url/url.pinc,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- url.pinc 14 Nov 2008 14:23:04 -0000 1.28 +++ url.pinc 12 Dec 2008 14:42:10 -0000 1.29 @@ -65,11 +65,16 @@ return "url/url_new.php?id=".$this->id; } /** - * Return a url to delete this URL + * the url where we go after deleting this object */ - function getDelUrl() { - return "url/url_del.php?id=".$this->id; + function get_after_del_url () { + $ref = getObject($this->dbconn,$this->link_id); + if(is_object($ref)) { + return $ref->getUrl(); + } + return 'mytutos.php'; } + /** * Return a link */ |
From: Gero K. <gok...@us...> - 2008-12-12 14:42:17
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9278/php Modified Files: company.pinc department.pinc task.pinc Removed Files: company_del.php department_del.php task_del.php Log Message: generic del --- task_del.php DELETED --- Index: department.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/department.pinc,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- department.pinc 6 Nov 2008 15:33:10 -0000 1.69 +++ department.pinc 12 Dec 2008 14:42:08 -0000 1.70 @@ -244,10 +244,10 @@ return $url; } /** - * Return a url to delete this department + * the url where we go after deleting this object */ - function getDelURL() { - return "department_del.php?id=". $this->id; + function get_after_del_url () { + return $this->company->getUrl(); } /** * Return a link to this department Index: company.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/company.pinc,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- company.pinc 6 Nov 2008 15:33:10 -0000 1.70 +++ company.pinc 12 Dec 2008 14:42:08 -0000 1.71 @@ -10,6 +10,8 @@ * $Author$ */ +include_once 'product.pinc'; +include_once 'appointment.pinc'; /** * * @package company @@ -289,10 +291,10 @@ return $url; } /** - * Return a url to delete this company + * the url where we go after deleting this object */ - function getDelURL() { - return "company_del.php?id=". $this->id; + function get_after_del_url () { + return "address_select.php" ; } /** * Return a link to this company --- company_del.php DELETED --- Index: task.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/task.pinc,v retrieving revision 1.206 retrieving revision 1.207 diff -u -d -r1.206 -r1.207 --- task.pinc 7 Nov 2008 20:00:39 -0000 1.206 +++ task.pinc 12 Dec 2008 14:42:08 -0000 1.207 @@ -972,10 +972,19 @@ return "task_new.php?id=".$this->id; } /** - * Return a link to delete this task + * the url where we go after deleting this object */ - function getDelURL() { - return "task_del.php?id=".$this->id; + function get_after_del_url () { + return $this->parent->getUrl(); + } + /** + * the url where we when deleting fails + */ + function get_failed_del_Url () { + if ($this->see_ok()) { + return $this->getUrl(); + } + return $this->parent->getUrl(); } /** * Return a link to this task --- department_del.php DELETED --- |
From: Gero K. <gok...@us...> - 2008-12-12 13:30:53
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2383/php Modified Files: db.p3 product_overview.php webelements.p3 Log Message: fix Index: db.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/db.p3,v retrieving revision 1.176 retrieving revision 1.177 diff -u -d -r1.176 -r1.177 --- db.p3 19 Aug 2008 09:11:55 -0000 1.176 +++ db.p3 12 Dec 2008 13:30:47 -0000 1.177 @@ -314,11 +314,14 @@ @unlink($tutos[errlog]); } ini_set('display_errors','On'); + ini_set('xdebug.profiler_enable',1); } else { $tutos['error_reporting'] = 0; $tutos[debugConsole] = 0; ini_set('display_errors','Off'); + ini_set('xdebug.profiler_enable',0); } + error_reporting($tutos['error_reporting']); set_error_handler('PHP_Error'); Index: product_overview.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_overview.php,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- product_overview.php 21 Sep 2008 16:41:30 -0000 1.125 +++ product_overview.php 12 Dec 2008 13:30:47 -0000 1.126 @@ -306,7 +306,7 @@ $b = array($p->cost,$p->currency); echo "<div align=\"right\">". handle('money',$b,number_format($p->cost,2,$lang['DecPoint'],$lang['ThousandPoint']) ." ". myentities($p->currency)) .'</div>'; } else if ( $c == 'creator' ) { - echo ($p->creator != -1 ? $p->creator->getLink($p->creator->getShortname()):$lang['HistoryDeleted']); + echo (is_object($p->creator) ? $p->creator->getLink($p->creator->getShortname()):$lang['HistoryDeleted']); } else if ( $c == 'creation' ) { echo $p->creation->getLinkDate(); } else if ( $c == 'p_start' ) { |
From: Gero K. <gok...@us...> - 2008-12-12 13:30:52
|
Update of /cvsroot/tutos/tutos/php/db In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2383/php/db Modified Files: db.pinc Log Message: fix Index: db.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db.pinc,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- db.pinc 3 Dec 2008 08:38:51 -0000 1.19 +++ db.pinc 12 Dec 2008 13:30:47 -0000 1.20 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2006 by Gero Kohnert + * Copyright 1999 - 2008 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the |
From: Gero K. <gok...@us...> - 2008-12-12 13:30:09
|
Update of /cvsroot/tutos/tutos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2284 Modified Files: Makefile Log Message: use php lint Index: Makefile =================================================================== RCS file: /cvsroot/tutos/tutos/Makefile,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- Makefile 20 Aug 2008 09:07:17 -0000 1.95 +++ Makefile 12 Dec 2008 13:30:01 -0000 1.96 @@ -15,6 +15,9 @@ # # # $Log$ +# Revision 1.96 2008/12/12 13:30:01 gokohnert +# use php lint +# # Revision 1.95 2008/08/20 09:07:17 gokohnert # version 1.4.20080820 # @@ -1016,6 +1019,11 @@ < $< > $@ @${CHMOD} 644 $@ +lint: ${PHP} + @$(foreach d,$(wildcard php/*.php php/*.pinc php/*.p3 php/*/*.php php/*/*.pinc php/*/*.p3), \ + php -l $(d) 2> /dev/null; \ + ) + @${ECHO} "DONE" # /usr/share/sgml/docbook/docbook-dsssl-stylesheets-1.64/html # Creating the books |
From: Gero K. <gok...@us...> - 2008-12-12 11:07:46
|
Update of /cvsroot/tutos/tutos/php In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24374/php Modified Files: webelements.p3 Log Message: speedup Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.337 retrieving revision 1.338 diff -u -d -r1.337 -r1.338 --- webelements.p3 8 Dec 2008 15:06:14 -0000 1.337 +++ webelements.p3 12 Dec 2008 11:07:40 -0000 1.338 @@ -200,12 +200,8 @@ echo "User Object required:".$user->getType() ." ". $user->getFullName() ."<br />\n"; } - if ( isset($_GET['lg']) || isset($_POST['lg']) ) { - if ( isset($_GET['lg']) ) { - $lg = strtolower($_GET['lg']); - } else { - $lg = strtolower($_POST['lg']); - } + if ( isset($_REQUEST['lg']) ) { + $lg = strtolower($_PREQUEST['lg']); } else if ($user->lang != "auto" ) { $lg = $user->lang; } @@ -241,10 +237,8 @@ if ( file_exists(getcwd()."/".$path ."/". $tok .".p3") && is_readable(getcwd()."/".$path ."/". $tok .".p3") ) { if ( "en-us" == $tok ) { include_once $path ."/en.p3"; - include_once $path ."/en-us.p3"; - } else { - include_once $path ."/". $tok. ".p3"; } + include_once $path ."/". $tok. ".p3"; ReadCustomLang($lang,$tok,$path); return ReadLangFinish($lang,$tok); } @@ -354,7 +348,7 @@ ReadCustomLang($lang,"en",$path); } return ReadLangFinish($lang,$tok); -}; +} /** * Read the preffered language */ @@ -813,17 +807,19 @@ Function addSessionKey($href,$http = false) { global $tutos; - if ( strstr($href,'mailto:') ) { - return $href; - } - if ( strstr($href,'file:') ) { - return $href; - } - if ( strstr($href,'ftp:') ) { - return $href; - } - if ( eregi('^javascript:',$href) ) { - return $href; + if ( strpos($href,':') ) { + if ( strstr($href,'mailto:') ) { + return $href; + } + if ( strstr($href,'file:') ) { + return $href; + } + if ( strstr($href,'ftp:') ) { + return $href; + } + if ( eregi('^javascript:',$href) ) { + return $href; + } } if ($http == false) { @@ -843,25 +839,16 @@ } else { $add = ''; } - if ( isset($_GET['lg']) && ($_GET['lg'] != '') ) { - $href .= $pre . 'lg='.$_GET['lg']; - $pre = $pre2; - } else if ( isset($_POST['lg']) && ($_POST['lg'] != '') ) { - $href .= $pre . 'lg='.$_POST['lg']; + if ( isset($_REQUEST['lg']) && ($_REQUEST['lg'] != '') ) { + $href .= $pre . 'lg='.$_REQUEST['lg']; $pre = $pre2; } - if ( isset($_GET['ly']) && ($_GET['ly'] != '') ) { - $href .= $pre . 'ly='.$_GET['ly']; - $pre = $pre2; - } else if ( isset($_POST['ly']) && ($_POST['ly'] != '') ) { - $href .= $pre . 'ly='.$_POST['ly']; + if ( isset($_REQUEST['ly']) && ($_REQUEST['ly'] != '') ) { + $href .= $pre . 'ly='.$_REQUEST['ly']; $pre = $pre2; } - if ( isset($_GET['th']) && ($_GET['th'] != '') ) { - $href .= $pre . 'th='.$_GET['th']; - $pre = $pre2; - } else if ( isset($_POST['th']) && ($_POST['th'] != '') ) { - $href .= $pre . 'th='.$_POST['th']; + if ( isset($_REQUEST['th']) && ($_REQUEST['th'] != '') ) { + $href .= $pre . 'th='.$_REQUEST['th']; $pre = $pre2; } |