tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
| 2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
| 2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
| 2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
| 2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
| 2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
| 2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
| 2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
| 2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
| 2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
| 2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
| 2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
| 2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
| 2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
|
7
|
8
|
9
|
10
(2) |
11
|
12
|
13
(8) |
|
14
(1) |
15
|
16
|
17
|
18
(2) |
19
|
20
|
|
21
|
22
|
23
|
24
|
25
|
26
|
27
(1) |
|
28
|
29
|
30
|
|
|
|
|
|
From: Gero K. <gok...@us...> - 2008-09-27 19:50:44
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9559 Modified Files: mail.pinc Log Message: fix Index: mail.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/mail.pinc,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- mail.pinc 13 Jun 2008 19:54:31 -0000 1.91 +++ mail.pinc 27 Sep 2008 19:50:35 -0000 1.92 @@ -47,12 +47,14 @@ * output the body */ function output(&$writer) { + global $lang; + $cnt = count($this->bodies); if ( $cnt > 1 ) { $writer->writechannel("MIME-Version: 1.0"); $writer->writechannel("Content-Type: multipart/mixed;". $this->eoln ."\tboundary=\"". $this->boundary ."\""); } else { - $writer->writechannel("Content-Type: ". $this->contenttype); + $writer->writechannel("Content-Type: ". $this->contenttype .';charset="'.$lang['content_encoding'].'"'); $writer->writechannel("Content-Description: ". $this->contentdesc); $writer->writechannel("Content-Transfer-Encoding: 8bit"); } @@ -118,7 +120,7 @@ * desc = Description * dispo = Content-Disposition */ - function addBody($content,$type = "text/plain",$desc = "TUTOS Mail Part" , $dispo = "", $charset = "us-ascii") { + function addBody($content,$type = "text/plain",$desc = "TUTOS Mail Part" , $dispo = "", $charset = "UTF-8") { $b = new mail_body(); if ( $type == "text/plain" ) { $b->body = StripSlashes($content); |
|
From: Gero K. <gok...@us...> - 2008-09-18 15:48:15
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12286 Modified Files: config_default.pinc Log Message: added sqlite support (still in development) Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- config_default.pinc 13 Sep 2008 19:29:52 -0000 1.137 +++ config_default.pinc 18 Sep 2008 15:48:19 -0000 1.138 @@ -71,6 +71,7 @@ # 5 = MS SQL (beta) # 7 = Interbase # 8 = Oracle OCI connection +# 11 = SQLITE # $tutos[dbtype][0] = 1; $tutos[dbalias][0] = "Postgres database"; |
|
From: Gero K. <gok...@us...> - 2008-09-18 15:48:15
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12286/db Added Files: db_sqlite.pinc Log Message: added sqlite support (still in development) --- NEW FILE: db_sqlite.pinc --- <?php /** * Copyright 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_sqlite.pinc,v 1.1 2008/09/18 15:48:23 gokohnert Exp $ * $Author: gokohnert $ */ require_once 'db.pinc'; # # Register parse functions for datetime # $tutos['dateformat'][] = 'sqliteformat1'; $tutos['dateformat'][] = 'sqliteformat2'; if (!extension_loaded('sqlite')) { if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN')) { dl('php_sqlite.dll'); } else { dl('sqlite.so'); } } /** * check for string delivered in sqlite format */ function sqliteformat1(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-1][0-9])-([0-9]{2}) ([0-2][0-9]):([0-5][0-9]):([0-5][0-9])$", $str, $regs ) ) { # Init via DB 2000-09-16 19:39:00 $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = (integer)$regs[4]; $d->min = (integer)$regs[5]; $d->sec = (integer)$regs[6]; $d->format = 2; } return; } /** * check for string delivered in sqlite format */ function sqliteformat2(&$d,$str) { $regs = array(); if ( ereg( "^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})$", $str, $regs ) ) { # Init via DB YYYY-MM-DD $d->year = (integer)$regs[1]; $d->month = (integer)$regs[2]; $d->day = (integer)$regs[3]; $d->hour = 0; $d->min = 0; $d->sec = 0; $d->format = 3; } return; } /** * sqlite database connection class * * @package DB * @module db_sqlite */ class db_sqlite extends tutos_db { /* --------------------------------------------------------------------------- */ function db_sqlite(&$db) { global $tutos; parent::init($db); $tutos[use_check_dbacl] = 0; # $this->col['REPEAT'] = 'R_EPEAT'; $this->openfunc = 'sqlite_popen'; $this->errorcode = ''; } /** * open a db connection to a sqlite file */ function open() { global $phperrmsg; $of = $this->openfunc; $c = $of($this->db->name,0666,$this->errorcode); if (!is_resource($c)) { Fatal_Error("Opening the SQLITE database ",$this->error()); } $this->conn = &$c; } /* --------------------------------------------------------------------------- */ function close() { $this->timezone(""); if ( $this->conn != -1 ) { sqlite_close($this->conn); $this->conn = -1; } } /** * restore a backup from a given file * returns true on success */ function restore_from_file($filename,$method = 0) { global $tutos; $cmd = "sqlite "; $cmd .= " -v "; $cmd .= " -u ". $this->db->user; $cmd .= " -p". $this->db->pass; $cmd .= " -h ". $this->db->host; $cmd .= " ". $this->db->name; $cmd .= " < ". $filename; $errout = exec ($cmd . " 2> ". $tutos[sessionpath] ."/restore_from_file",$output,$rt); echo "<br>"; echo htmlentities($cmd)."<br />"; foreach($output as $i) { echo htmlentities($i)."<br />"; } return true; } /** * make a backup to a given file * returns true on success */ function backup2file($filename,$method = 0) { global $tutos; $cmd = "mysqldump "; $cmd .= " -C -e --lock-tables=false"; $cmd .= " -u ". $this->db->user; $cmd .= " -h ". $this->db->host; $cmd .= " -p". $this->db->pass; $cmd .= " -r ". $filename; $cmd .= " ". $this->db->name; $errout = exec ($cmd . " 2> ". $tutos[sessionpath] ."/backup2file",$output,$rt); echo "<br>"; echo htmlentities($cmd)."<br />"; foreach($output as $i) { echo htmlentities($i)."<br />"; } return true; } /** * return more info about server client etcc */ function moreinfo() { return "Client:". sqlite_libversion() . " ClientEncoding:". sqlite_libencoding(); } /* --------------------------------------------------------------------------- */ function notime() { return ("-1"); } /* --------------------------------------------------------------------------- */ function now() { return "now()"; } /* --------------------------------------------------------------------------- */ function exec($query,$showerror = 1) { if ( $this->conn == -1 ) { $msg = "No Connection"; } $r = new result_sqlite($this); #echo $query.'<br>'; $this->errorcode = ''; $result = @sqlite_query($this->conn,$query,SQLITE_BOTH,$this->errorcode); $this->lastquery = $query; if ( ! $result) { if ($showerror == 1) { Fatal_Error("Exec ". $this->conn ."|". $this->error(),$query); } else { $this->lasterror = $this->error(); return -1; } } $this->lasterror = ""; $r->rs = &$result; return $r; } /* --------------------------------------------------------------------------- */ function nextid($name = "id") { $q = "UPDATE ". $this->prefix . $name ." set nextval=(nextval+1)"; $this->exec($q); $q = "SELECT nextval FROM ". $this->prefix . $name ; $r = $this->exec($q); if ( 1 != $r->numrows()) { Fatal_Error("got no id",$q); } $id = $r->get(0,0); $r->free(); return $id; } /* --------------------------------------------------------------------------- */ function setSeqID($id,$name = "id") { $query = "UPDATE ". $this->prefix . $name ." set nextval = ".$id; $this->exec($query); return $id; } /* --------------------------------------------------------------------------- */ function getSeqID($name = "id") { $query = "SELECT nextval from ". $this->prefix . $name; $r = $this->exec($query); if ( ($r == "") || (1 != $r->numrows()) ) { Fatal_Error("got no id",$query); } $id = $r->get(0,0); $r->free(); return $id; } /* --------------------------------------------------------------------------- */ function string($t) { return "'". AddSlashes($t) ."'"; } /** * return 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; } /** * return 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 insensitive string compare */ function like($fld1,$name,$fld2 = "",$fld3 = "") { $fld = $fld1; if ( $fld2 != "" ) { $fld = "CONCAT(". $fld ." ,' '," .$fld2; if ( $fld3 != "" ) { $fld .= ",' ',". $fld3; } $fld .= ")"; } $name = eregi_replace(" ","%",$name); $name = eregi_replace("[\]","\\\\",$name); $name = eregi_replace("'","\'",$name); return (" UPPER(". $fld .") like '%". strtoupper($name) ."%' "); } /** * case sensitive strict string compare */ function like2($fld,$name) { $name = eregi_replace("[\]","\\\\",$name); $name = eregi_replace("'","\'",$name); return (" ". $fld ." = BINARY '". $name ."' "); } /* --------------------------------------------------------------------------- */ function password($pw) { if ( $this->db->crypt == 0 ) { return "'". $pw ."'"; } else if ( $this->db->crypt == 3 ) { return "old_password('".$pw."')"; } else if ( $this->db->crypt == 2 ) { return "password('".$pw."')"; } return "'". crypt($pw,"271166") ."'"; } /* --------------------------------------------------------------------------- */ function begin($t) { return ""; } /* --------------------------------------------------------------------------- */ function commit($t) { return ""; } /* --------------------------------------------------------------------------- */ function abort($t) { return ""; } /* --------------------------------------------------------------------------- */ function lock($t) { return ""; } /* --------------------------------------------------------------------------- */ function timezone($tz) { global $tutos; if ( !empty($tz)) { putenv ("TZ=".$tz); strftime("%H:%M %Z"); } else { putenv ("TZ=". $tutos[defaultTZ]); strftime("%H:%M %Z"); } } /* --------------------------------------------------------------------------- */ function getFullname() { return "SQLITE:". $this->db->name; } /* --------------------------------------------------------------------------- * set persistent mode * 0 = no * 1 = yes */ function setPersistent($mode) { if ( $mode == 1 ) { $this->openfunc = 'sqlite_popen'; } else { $this->openfunc = 'sqlite_open'; } } /* --------------------------------------------------------------------------- */ function error() { $x = sqlite_last_error($this->conn); return "SQLITE DBerror: ". $this->getFullName() ." ". sqlite_error_string($x) .": ". $x.':'.$this->errorcode; } /** * 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 = "DROP TABLE ". $this->prefix . $tbl[name] ; } else { $q = "DROP TABLE ". $this->prefix . $tbl ; } return $this->exec($q,0); } /** * tbl = array with table description */ function createtable(&$tbl) { $q = "CREATE TABLE ". $this->prefix . $tbl[name] ; $pre = " ("; @reset($tbl); foreach ($tbl as $i => $f) { if ( !is_array($f) ) { continue; } $t = $this->getcoltype($f); $c = $f[constraints]; $c = ereg_replace("PK","primary key",$c); $c = ereg_replace("NN","not null",$c); $c = ereg_replace("U","unique",$c); $q .= $pre. $this->colname($i) ." ". $t ." ". $c; $pre = ","; } $q .= ")"; #$q .= " COMMENT='". $tbl[Desc] ."'"; return $this->exec($q,0); } /** * rename a table * oldname = current table description * newname = new table name */ function renametable(&$oldtbl,$newname) { $q = "ALTER TABLE ". $this->prefix . $oldtbl[name] ." RENAME TO " . $this->prefix . $newname; return $this->exec($q,0); } /** * get the sqlite columntype */ function getcoltype(&$col) { $t = ''; if ($col[type] == "ID_TYPE") { $t = "int4"; } else if ($col[type] == "TS_TYPE") { $t = "datetime"; } else if ($col[type] == "TX_TYPE") { $t = "text"; } else if ($col[type] == "VARCHAR") { $t = "varchar(". $col[size] .")"; } else { $t = $col[type]; } return $t; } /** * rename a column in table * tablename = table name * colname = old column name * newname = new column name */ function renamecolumn(&$tbl,$colname,$newname) { $col = $tbl[$newname]; $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." CHANGE ". $this->colname($colname) ." " . $this->colname($newname) ." ". $this->getcoltype($col) ; return $this->exec($q,0); } /** * drop a column in table * tablename = table name * colname = old column name */ function dropcolumn(&$tbl,$colname) { $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." DROP COLUMN ". $this->colname($colname); return $this->exec($q,0); } /** * drop a not null attribte * tablename = table name * colname = column name */ function dropnotnull(&$tbl,$colname) { $q = "ALTER TABLE ". $this->prefix . $tbl[name] ." CHANGE "; $col = $tbl[$colname]; $t = $this->getcoltype($col); $c = $col[constraints]; $c = ereg_replace("PK","primary key",$c); $c = ereg_replace("U","unique",$c); $c = ereg_replace("NN","",$c); $q .= $this->colname($colname) ." ". $this->colname($colname) ." ". $t ." ". $c; # echo $q."<br />"; return $this->exec($q,0); } /** * tbl = array with table description */ function dropindex(&$idx) { $q = "DROP INDEX IF EXISTS ". $this->prefix . $idx[name]; return $this->exec($q,0); } /** * tbl = array with table description */ function createindex(&$idx) { if ( ! isset($idx[type]) ) { # $idx[type] = ""; $idx[type] = " INDEX "; } $q = "CREATE INDEX ". $this->prefix . $idx[name] ." ON ". $this->prefix . $idx[table]; # $q = "ALTER TABLE ". $this->prefix . $idx[table] . " ADD ".$idx[type] ." ". $this->prefix . $idx[name] ." "; $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 ("; $t = $this->getcoltype($col); $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 .= "COMMENT '". $col[Desc] ."'"; $q .= ")"; $x = $this->exec($q,0); # fix sizes if column already exists or some other problem appears if (!is_object($x)) { $q = "ALTER TABLE ". $this->prefix . $tblname ." CHANGE " . $this->colname($colname).' '. $this->colname($colname)." ". $t ." ". $c . " COMMENT '". $col[Desc]."'"; $x = $this->exec($q,0); } return $x; } /** * name = name of sequencer */ function dropsequence(&$seq) { $q = "drop table ". $this->prefix . $seq[name]; return $this->Exec($q,0); } /** * name = name of sequencer */ function createsequence(&$seq) { $q = "create table ". $this->prefix . $seq[name] ." (nextval int autoincrement);"; $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 */ function getRange($q,$start,$cnt) { return $q. " LIMIT ". $start .", ". $cnt; } /** * do we need a count(*) to get the number of possible results in a select */ function needCount() { return true; } /** * handle reserved words in this database type */ function colname($col) { if ($col == "*") return $col; $d = false; if (ereg("^DISTINCT (.*)",$col,$regs)) { $col = $regs[1]; $d = true; } if ( isset($this->col[strtoupper($col)]) ) { $col = $this->col[strtoupper($col)]; } if ($d) { return "DISTINCT `".$col."`"; } return "".$col.""; } /** * 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 = "analyze table ". $this->prefix . $f[name]; $this->Exec($q,0); } $q = "vacuum"; $this->Exec($q,0); $this->db->setLastAnalyze($now); $msg = $this->db->save(); return $msg; } /** */ function gettype() { return "SQLITE"; } } /** * sqlite database result class * * @package DB * @module result_sqlite */ class result_sqlite extends result { function result_sqlite(&$dbconn) { $this->rs = ""; $this->array = array(); parent::result($dbconn); } /* --------------------------------------------------------------------------- */ function get($pos,$fld) { if ( empty($this->rs) ) return -1; if (!isset($this->ar[$pos])) { sqlite_seek($this->rs,$pos); $this->ar[$pos] = sqlite_fetch_array($this->rs); } if (!array_key_exists($fld,$this->ar[$pos])) { print_r("<br><br>MISSING:".$fld); print_r($this->ar[$pos]); } return $this->ar[$pos][$fld]; } /* --------------------------------------------------------------------------- */ function numrows() { if ($this->rowcnt != -1) return $this->rowcnt; if ( empty($this->rs) ) return -1; return sqlite_num_rows($this->rs); } /* --------------------------------------------------------------------------- */ function numfields() { if ( empty($this->rs) ) return -1; return sqlite_num_Fields($this->rs); } /* --------------------------------------------------------------------------- */ function fieldname($nr) { if ( empty($this->rs) ) return -1; return sqlite_field_name($this->rs,$nr); } /* --------------------------------------------------------------------------- */ function fieldtype($nr) { if ( empty($this->rs) ) return -1; return mysql_field_type($this->rs,$nr); } /* --------------------------------------------------------------------------- */ function free() { if ( empty($this->rs) ) return -1; $this->rs = null; $this->ar = null; return ; } } ?> |
|
From: Gero K. <gok...@us...> - 2008-09-14 15:53:25
|
Update of /cvsroot/tutos/tutos/homepage In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30979/homepage Modified Files: address.html Log Message: fix Index: address.html =================================================================== RCS file: /cvsroot/tutos/tutos/homepage/address.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- address.html 15 Aug 2008 13:09:17 -0000 1.8 +++ address.html 14 Sep 2008 15:53:34 -0000 1.9 @@ -11,7 +11,7 @@ TUTOS addressbook entries collect nearly all information about a person you have somewhere in TUTOS. <ul> - <li>multiple locations (office home ...) for the same person</li> + <li>multiple locations (office home ...) for the same person Each location with <ul> <li>function</li> @@ -20,6 +20,7 @@ <li>street,city,country with automated link to external map/weather info</li> <li>country with automated links to external country info</li> </ul> + </li> <li>links to company/department/team entries</li> <li>role related links to <a href="product.html">projects</a></li> <li>ability to attach <a href="file.html">pictures/documents</a></li> |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:31:06
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php Modified Files: app_new.php app_new_r.php base.pinc config_default.pinc custom.pinc department_new.php product_new.php task_new.php timetrack_new.php webelements.p3 Log Message: custom obeject type for referenceong objects Index: config_default.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/config_default.pinc,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- config_default.pinc 20 Aug 2008 09:08:22 -0000 1.136 +++ config_default.pinc 13 Sep 2008 19:29:52 -0000 1.137 @@ -226,8 +226,11 @@ # 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"; +$tutos[bugautoname] = "%Y-%m-&X-&Y"; # # Allow deletion of bugs # 0 = no Index: task_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/task_new.php,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- task_new.php 15 Aug 2007 12:56:13 -0000 1.81 +++ task_new.php 13 Sep 2008 19:29:52 -0000 1.82 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 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 Index: product_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_new.php,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- product_new.php 24 Aug 2007 13:10:22 -0000 1.104 +++ product_new.php 13 Sep 2008 19:29:52 -0000 1.105 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 by Gero Kohnert + * Copyright 1999 - 2008 by Gero Kohnert * cloning option added by Michal Salaban 2003 * * This program is free software; you can redistribute it and/or modify it @@ -130,7 +130,7 @@ echo " </select>\n"; echo " </td>\n"; echo " <td>\n"; - select_from_array_or_input($this->obj,"r1",$this->obj->r1,1,'atcd'); + echo select_from_array_or_input($this->obj,"r1",$this->obj->r1,1,'atcd'); echo " </td>\n"; echo " <td valign=\"top\" colspan=\"2\"><input id=\"r1desc\" name=\"r1desc\" value=\"". myentities($this->r1desc) ."\" size=\"". min(30,$table['product2']['description'][size]) ."\" maxlength=\"".$table['product2']['description'][size]."\" /></td>\n"; @@ -199,7 +199,7 @@ echo " </select>\n"; echo " </td>\n"; echo " <td>\n"; - select_from_array_or_input($this->obj,"r2",$this->obj->r2,1,'p'); + echo select_from_array_or_input($this->obj,"r2",$this->obj->r2,1,'p'); echo " </td>\n"; echo ' <td valign="top" colspan="2"><input id="r2desc" name="r2desc" value="'. myentities($this->r2desc) .'" size="'.min(30,$table['product2']['description'][size]).'" maxlength="'.$table['product2']['description'][size]."\" /></td>\n"; Index: base.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/base.pinc,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- base.pinc 14 Jun 2008 09:04:00 -0000 1.100 +++ base.pinc 13 Sep 2008 19:29:52 -0000 1.101 @@ -98,6 +98,8 @@ if (!is_array($x)) continue; if (!isset($x['custom'])) continue; if (!$x['custom']) continue; + if (!isset($x['ftype'])) $x['ftype'] = ''; + $fld = '_fld_'.$i; if ($x[type] == 'float') { @@ -108,6 +110,8 @@ } else { $this->$fld = new TUTOS_Date_Time(0); } + } else if ($x['ftype'] == 'Object') { + $this->$fld = null; } else { $this->$fld = ''; } @@ -169,9 +173,17 @@ if (!is_array($x)) continue; if (!isset($x['custom'])) continue; if (!$x['custom']) continue; + if (!isset($x['ftype'])) $x['ftype'] = ''; + $fld = '_fld_'.$i; if ($x[type] == 'TS_TYPE') { $this->$fld = $r->getDateTime($pos, $i); + } else if ($x['ftype'] == 'Object') { + $xx = @$r->get($pos,$i); + $m = getObject($this->dbconn,$xx); + if ( is_object($m) ) { + $this->$fld = $m; + } } else { $this->$fld = @$r->get($pos,$i); } @@ -694,6 +706,12 @@ } else if ($x['ftype'] == 'Boolean') { if ($this->$fld == '') $this->$fld = 0; $q->addFV($i,$this->$fld); + } else if ($x['ftype'] == 'Object') { + if (is_object($this->$fld)) { + $q->addFV($i,$this->$fld->id,'INT'); + } else { + $q->addFV($i,null,'INT'); + } } else if ($x[type] == 'ID_TYPE') { if ($this->$fld == '') $this->$fld = null; $q->addFV($i,$this->$fld,'INT'); @@ -823,4 +841,4 @@ } } -?> +?> \ No newline at end of file Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.334 retrieving revision 1.335 diff -u -d -r1.334 -r1.335 --- webelements.p3 23 Jul 2008 08:59:43 -0000 1.334 +++ webelements.p3 13 Sep 2008 19:29:53 -0000 1.335 @@ -1532,8 +1532,9 @@ Function select_from_array_or_input(&$obj,$name,&$sobj,$none,$grp) { global $lang,$tutos; + $r = ''; if ( isset($obj->xl[$name]) && (count($obj->xl[$name]) > 0) ) { - echo '<select id="'. $name .'" name="'. $name ."id\">\n"; + $r .= '<select id="'. $name .'" name="'. $name ."id\">\n"; foreach($obj->xl[$name] as $x => $f) { if (! $f->use_ok()) continue; @@ -1546,26 +1547,27 @@ } else { $fn = $f->getFullname(); } - echo ' <option value="'. $x .'">'. myentities($fn) ."</option>\n"; + $r .= ' <option value="'. $x .'">'. myentities($fn) ."</option>\n"; } if ( $none != 0 ) { - echo " <option value=\"-1\"> ---- </option>\n"; + $r .= " <option value=\"-1\"> ---- </option>\n"; } - echo "</select>\n"; + $r .= "</select>\n"; } else { # AJAX stuff $js = ' '; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { - echo '<input id="'. $name .'" size="20" maxlength="40" name="'. $name .'fn" value="'. myentities($sobj->getFullname()) .'" '.$js.' />'; + $r .= '<input id="'. $name .'" size="20" maxlength="40" name="'. $name .'fn" value="'. myentities($sobj->getFullname()) .'" '.$js.' />'; } else { if ( ! isset($obj->xfn[$name]) ) { $obj->xfn[$name] = ''; } - echo '<input id="'. $name .'" size="20" maxlength="40" name="'. $name .'fn" value="'. myentities($obj->xfn[$name]) .'" '. $js .' />'; + $r .= '<input id="'. $name .'" size="20" maxlength="40" name="'. $name .'fn" value="'. myentities($obj->xfn[$name]) .'" '. $js .' />'; } - echo '<div id="'. $name .'-popup" class="autocomplete"></div>'; + $r .= '<div id="'. $name .'-popup" class="autocomplete"></div>'; } + return $r; } /** * make a help link if possible Index: custom.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/custom.pinc,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- custom.pinc 10 Aug 2008 15:08:20 -0000 1.23 +++ custom.pinc 13 Sep 2008 19:29:52 -0000 1.24 @@ -52,6 +52,14 @@ return $obj->getDate(); } else if ($x['ftype'] == 'DateTime') { return $obj->getDateTime(); + } else if ($x['ftype'] == 'Object') { + if (is_object($obj)) { + return $obj->getLink(); + } elseif ($obj == -1) { + return $lang['HistoryDeleted']; + } else { + return ''; + } } else if ($x['ftype'] == 'Boolean') { return ($obj > 0 ? $lang['yes'] : $lang['no']); } else if ($x['ftype'] == 'SelectOne') { @@ -141,7 +149,7 @@ if (!isset($tx['searchable'])) continue; if (!$tx['searchable']) continue; - $x = ''; + $x = ''; $parsename = $section ."_". $ti; $l = myentities(getLang($tx['lang'])); @@ -219,7 +227,7 @@ if (isset($tx['massupdate']) && ($tx['massupdate'] == false) ) continue; foreach ($lang[$tx['lang'].'_'] as $i => $l) { - if (trim($l) == '') continue; + if (trim($l) == '') continue; $r .= ' <option value="'.$ti .'-'. $i .'">'; $r .= sprintf($lang['SetTo'],$lang[$tx['lang']],$l); $r .= '</option>'."\n"; @@ -294,7 +302,6 @@ if (!isset($table[$section])) return $r; foreach($table[$section] as $i => $x) { -# echo $section .' '.$i .' '.$x.'<br>'; if (!is_array($x)) continue; if (!isset($x['custom'])) continue; if (!$x['custom']) continue; @@ -345,6 +352,12 @@ $xx = &$obj->$fld; $r .= $xx->EnterDateTime($parsename,1); $r .= " </td>\n"; + } else if ($x['ftype'] == 'Object') { + if (!isset($x['otype'])) $x['otype'] = 'a'; + $r .= ' <td colspan="'.($cols-1)."\">\n"; + $xx = &$obj->$fld; + $r .= select_from_array_or_input($obj,$parsename,$xx,($x['required']? 1:0),$x['otype']); + $r .= " </td>\n"; } else if ($x['ftype'] == "Boolean") { $r .= ' <td colspan="'.($cols-1)."\">\n"; $r .= ' <input type="checkbox" id="'.$parsename.'" name="'.$parsename.'" value="1"'. ($obj->$fld == 1 ? ' checked="checked"':'') ." />\n"; @@ -413,6 +426,27 @@ $xx->setDateTimeF($parsename); $gotourl= addUrlParameter($gotourl,$parsename ."=". $xx->getYYYYMMDDHHMM(),true); $obj->setDateTimeField($fld,$xx,$x['lang']); + } else if ($x['ftype'] == "Object") { + # search text in all possible objects + $obj->$fld = null; + if (!isset($x['otype'])) $x['otype'] = 'a'; + if ( isset($_POST[$parsename.'fn']) ) { +# $gotourl= addUrlParameter($gotourl,$parsename ."fn=". $_POST[$parsename.'fn'],true); + $m = check_field(StripSlashes($_POST[$parsename.'fn']),$parsename."fn",$parsename."l",$x['otype']); + if ( is_object($m) ) { + $obj->$fld = $m; + } + } + if ( isset($_POST[$parsename.'id']) ) { + $m = getObject($obj->dbconn,$_POST[$parsename.'id']); + if ( is_object($m) ) { + $obj->$fld = $m; + } + } + if ( is_object($obj->$fld) ) { + $gotourl= addUrlParameter($gotourl,$parsename ."id=". $obj->$fld->id,true); + } +# die($obj->$fld .'|'.$fld .'|'.$_POST[$parsename.'fn'].'|'); } else if ($x['ftype'] == "Boolean") { if (!isset($_POST[$parsename])) $_POST[$parsename] = 0; $gotourl= addUrlParameter($gotourl,$parsename ."=". $_POST[$parsename],true); @@ -466,20 +500,21 @@ if (!is_array($x)) continue; if (!isset($x['custom'])) continue; if (!$x['custom']) continue; + if (!isset($x['ftype'])) $x['ftype'] = ''; - $parsename = $section ."_". $i; - if (!isset($_GET[$parsename])) continue; + $parsename = $section ."_". $i; $fld = "_fld_".$i; - + $xx = null; if ($x[type] == "TS_TYPE") { $xx = &$obj->$fld; $xx->setDateTime($_GET[$parsename]); - } else { + } else if ($x['ftype'] == 'Object') { + preset_from_array_or_input($obj,$fld,$parsename); + } else if (isset($_GET[$parsename])) { $obj->$fld = $_GET[$parsename]; } - } } -?> +?> \ No newline at end of file Index: timetrack_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_new.php,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- timetrack_new.php 29 Jan 2008 20:02:48 -0000 1.77 +++ timetrack_new.php 13 Sep 2008 19:29:53 -0000 1.78 @@ -94,7 +94,7 @@ echo $this->showfieldc($lang['TimetrackWorker'],1,'w'); echo " <td colspan=\"5\">\n"; if ( $this->mode == 0 ) { - select_from_array_or_input($this->obj,'w',$this->obj->worker,0,'at'); + echo select_from_array_or_input($this->obj,'w',$this->obj->worker,0,'at'); } else { echo $this->obj->worker->getLink(); $this->addHidden("wid",$this->obj->worker->id); Index: app_new_r.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_new_r.php,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- app_new_r.php 10 Mar 2007 17:33:24 -0000 1.62 +++ app_new_r.php 13 Sep 2008 19:29:52 -0000 1.63 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 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 @@ -141,14 +141,14 @@ # Customer/Visitor name echo $this->showfieldc($lang['VisitAt'] ."<br />". $lang['VisitFrom'],0,"v"); echo " <td colspan=\"5\">"; - select_from_array_or_input($this->obj,"v",$this->obj->visitor,1,'atcd'); + echo select_from_array_or_input($this->obj,"v",$this->obj->visitor,1,'atcd'); echo " </td>\n"; if ( $this->user->feature_ok(useprojects,PERM_SEE) ) { echo "</tr><tr>\n"; echo $this->showfieldc($lang['ProductP'],0,"p"); echo " <td colspan=\"5\">\n"; - select_from_array_or_input($this->obj,"p",$this->obj->product,1,'p'); + echo select_from_array_or_input($this->obj,"p",$this->obj->product,1,'p'); echo " </td>\n"; } Index: department_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/department_new.php,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- department_new.php 2 Jan 2007 19:59:56 -0000 1.64 +++ department_new.php 13 Sep 2008 19:29:52 -0000 1.65 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 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 Index: app_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/app_new.php,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- app_new.php 10 Mar 2007 17:33:24 -0000 1.73 +++ app_new.php 13 Sep 2008 19:29:51 -0000 1.74 @@ -124,14 +124,14 @@ # Customer/Visitor name echo $this->showfieldc($lang['VisitAt'] ."<br />". $lang['VisitFrom'],0,"v"); echo " <td colspan=\"5\">"; - select_from_array_or_input($this->obj,"v",$this->obj->visitor,1,'atcd'); + echo select_from_array_or_input($this->obj,"v",$this->obj->visitor,1,'atcd'); echo " </td>\n"; if ( $this->user->feature_ok(useprojects,PERM_SEE) ) { echo "</tr><tr>\n"; echo $this->showfieldc($lang['ProductP'],0,"p"); echo " <td colspan=\"5\">\n"; - select_from_array_or_input($this->obj,"p",$this->obj->product,1,'p'); + echo select_from_array_or_input($this->obj,"p",$this->obj->product,1,'p'); echo " </td>\n"; } |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:30:12
|
Update of /cvsroot/tutos/tutos In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248 Modified Files: ChangeLog Log Message: custom obeject type for referenceong objects Index: ChangeLog =================================================================== RCS file: /cvsroot/tutos/tutos/ChangeLog,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- ChangeLog 20 Aug 2008 09:07:17 -0000 1.122 +++ ChangeLog 13 Sep 2008 19:29:51 -0000 1.123 @@ -1,4 +1,6 @@ #$Header$ + * additional replace fields supported in $tutos[bugautoname] + * custom object type allows to refeernce objects 20 August 2008 * Release 1.4 * much bugfixes |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:48
|
Update of /cvsroot/tutos/tutos/php/file In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/file Modified Files: file_massimport.php file_new.php Log Message: custom obeject type for referenceong objects Index: file_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_new.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- file_new.php 3 Aug 2008 20:18:58 -0000 1.28 +++ file_new.php 13 Sep 2008 19:29:54 -0000 1.29 @@ -52,7 +52,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['FileAuthor'],0,"a"); echo " <td colspan=\"3\">\n"; - select_from_array_or_input($this->obj,"a",$this->obj->author,0,'at'); + echo select_from_array_or_input($this->obj,"a",$this->obj->author,0,'at'); echo " </td>\n"; echo "</tr>\n"; Index: file_massimport.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/file/file_massimport.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- file_massimport.php 2 Jan 2007 19:59:57 -0000 1.3 +++ file_massimport.php 13 Sep 2008 19:29:54 -0000 1.4 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2000 - 2007 by Gero Kohnert + * Copyright 2000 - 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 @@ -43,7 +43,7 @@ echo $lang[$this->ref->gettype()] ." ". $this->ref->getLink(); $this->addHidden("pid", $this->ref->id); } else { - select_from_array_or_input($this,"p",$this->ref,0); + echo select_from_array_or_input($this,"p",$this->ref,0); } echo " </td>\n"; echo "</tr>\n"; @@ -51,7 +51,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['FileAuthor'],0,"a"); echo " <td colspan=\"3\">\n"; - select_from_array_or_input($this,"a",$this->author,0); + echo select_from_array_or_input($this,"a",$this->author,0); echo " </td>\n"; echo "</tr>\n"; |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:48
|
Update of /cvsroot/tutos/tutos/php/installation In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/installation Modified Files: installation_new.php Log Message: custom obeject type for referenceong objects Index: installation_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/installation/installation_new.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- installation_new.php 24 Aug 2007 12:01:09 -0000 1.27 +++ installation_new.php 13 Sep 2008 19:29:54 -0000 1.28 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 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 @@ -56,7 +56,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['Customer'],1,"c"); echo " <td colspan=\"3\">\n"; - select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); + echo select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); echo "</td></tr>\n"; echo "<tr>\n"; @@ -87,7 +87,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['InstalledBy'],0,"i"); echo " <td>\n"; - select_from_array_or_input($this->obj,"i",$this->obj->installer,1,'at'); + echo select_from_array_or_input($this->obj,"i",$this->obj->installer,1,'at'); echo " </td>\n"; echo $this->showfieldc($lang['atDateTime'],0); echo " <td>\n"; @@ -97,7 +97,7 @@ echo "<tr>\n"; echo $this->showfieldc($lang['SoldBy'],0,"s"); echo " <td>\n"; - select_from_array_or_input($this->obj,"s",$this->obj->seller,1,'at'); + echo select_from_array_or_input($this->obj,"s",$this->obj->seller,1,'at'); echo " </td>\n"; echo $this->showfieldc($lang['atDateTime'],0); |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:47
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/db Modified Files: table_custom_example.pinc Log Message: custom obeject type for referenceong objects Index: table_custom_example.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/table_custom_example.pinc,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- table_custom_example.pinc 9 Jul 2008 08:26:30 -0000 1.18 +++ table_custom_example.pinc 13 Sep 2008 19:29:54 -0000 1.19 @@ -116,6 +116,14 @@ Desc => "description 3", 'lang' => "DESC3"); +$table['task']['customer'] = array('custom' => true, + 'ftype' => 'Object', + type => "ID_TYPE", + constraints => "", + 'otype' => "c", + Desc => "a customer company", + 'lang' => "Customer"); + # # Some more field in the timetrack table # |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:47
|
Update of /cvsroot/tutos/tutos/php/invoice In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/invoice Modified Files: invoice_new.php Log Message: custom obeject type for referenceong objects Index: invoice_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/invoice/invoice_new.php,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- invoice_new.php 12 Aug 2008 17:59:43 -0000 1.57 +++ invoice_new.php 13 Sep 2008 19:29:55 -0000 1.58 @@ -1,6 +1,6 @@ <?php /** - * Copyright 2002 - 2007 by Gero Kohnert + * Copyright 2002 - 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 @@ -170,12 +170,12 @@ echo $this->showfieldc($lang['InvoiceCustomer'],1,"c"); echo " <td colspan=\"8\">\n"; if ( $this->obj->change_ok() ) { - select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); + echo select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); } else { if (isset($this->obj->cutomer) && is_object($this->obj->customer) ) { echo $this->obj->customer->getLink(); } else { - select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); + echo select_from_array_or_input($this->obj,"c",$this->obj->customer,0,'atcd'); } } echo "</td></tr>\n"; |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:47
|
Update of /cvsroot/tutos/tutos/php/checklist In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/checklist Modified Files: checkfield.pinc checkfield_new.php Log Message: custom obeject type for referenceong objects Index: checkfield.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield.pinc,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- checkfield.pinc 20 Aug 2008 08:30:04 -0000 1.25 +++ checkfield.pinc 13 Sep 2008 19:29:54 -0000 1.26 @@ -64,6 +64,7 @@ $this->value_n = 0; $this->maxvalue = 4; $this->pos = -1; + $this->ref = null; $this->value_t = ""; $this->help_text = ""; $this->modificator = $current_user; Index: checkfield_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/checklist/checkfield_new.php,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- checkfield_new.php 2 Jun 2008 06:58:30 -0000 1.11 +++ checkfield_new.php 13 Sep 2008 19:29:54 -0000 1.12 @@ -125,6 +125,9 @@ if ( $this->obj->id > 0 ) { $this->name = $lang['CheckfieldModify'] ." : ". $this->obj->getFullName(); + } else if ( $this->obj == -1 ) { + $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); + $this->stop = true; } else { $this->name = $lang['CheckfieldCreate']; } @@ -151,7 +154,15 @@ if ( isset($_GET['type']) ) { $this->obj->type = $_GET['type']; } - $this->obj->read_reference(); + + if(!$this->stop) { + $this->obj->read_reference(); + } + + if (!$this->stop && $this->ref == null) { + $msg .= sprintf($lang['Err0012'],$lang['Checklist'],''); + $this->stop = true; + } } } @@ -162,4 +173,4 @@ // CVS Info: $Id$ // $Author$ -?> +?> \ No newline at end of file |
|
From: Gero K. <gok...@us...> - 2008-09-13 19:29:47
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15248/php/bugtracking Modified Files: bug.pinc bug_new.php Log Message: custom obeject type for referenceong objects Index: bug_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug_new.php,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- bug_new.php 2 Jan 2007 19:59:57 -0000 1.28 +++ bug_new.php 13 Sep 2008 19:29:54 -0000 1.29 @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2007 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 @@ -91,7 +91,7 @@ echo $this->showfieldc($lang['BugAssignedTo'],0,"sid"); echo ' <td colspan="1" valign="top">'; if ( $this->obj->id > 0 ) { - select_from_array_or_input($this->obj,"s",$this->obj->solver,1,'at'); + echo select_from_array_or_input($this->obj,"s",$this->obj->solver,1,'at'); } else { $sid = $this->user->id; # initial @@ -124,7 +124,7 @@ } } echo "</select>"; -# select_from_array_or_input($this->obj,"s",$this->obj->solver,1,'at'); +# echo select_from_array_or_input($this->obj,"s",$this->obj->solver,1,'at'); } else if ( $this->obj->parent->getType() == "installation" ) { echo $lang['BugAutoSolver'] ." "; @@ -188,7 +188,7 @@ echo "<tr>\n"; echo $this->showfield($lang['BugReportedFrom'],1); echo ' <td colspan="1" valign="top">'; - select_from_array_or_input($this->obj,"reporter",$this->obj->reporter,1,'a'); + echo select_from_array_or_input($this->obj,"reporter",$this->obj->reporter,1,'a'); echo " </td>\n"; echo $this->showfield($lang['BugMedium'],0,"medium"); echo " <td valign=\"top\">\n"; Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- bug.pinc 21 Jul 2008 04:41:23 -0000 1.57 +++ bug.pinc 13 Sep 2008 19:29:53 -0000 1.58 @@ -581,7 +581,9 @@ global $tutos,$sequence; if ( $value == "auto" ) { $value = strftime($tutos[bugautoname]); - $value = eregi_replace("X","".$this->dbconn->nextid($sequence['bugname'][name]),$value); + $value = eregi_replace("&X","".$this->dbconn->nextid($sequence['bugname'][name]),$value); + $value = eregi_replace("&Y",$this->parent->id,$value); + $value = eregi_replace("&Z",$this->parent->getFullName(),$value); } $this->setStrField("name",$value,"BugID"); } |
|
From: Gero K. <gok...@us...> - 2008-09-10 17:44:32
|
Update of /cvsroot/tutos/tutos/php/db In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23301/php/db Modified Files: db_mysql.pinc Log Message: fix Index: db_mysql.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/db/db_mysql.pinc,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- db_mysql.pinc 23 Jan 2008 10:59:42 -0000 1.40 +++ db_mysql.pinc 10 Sep 2008 17:44:42 -0000 1.41 @@ -531,7 +531,8 @@ */ function createsequence(&$seq) { $q = "create table ". $this->prefix . $seq[name] ." (nextval int not null);"; - if ( -1 == $this->Exec($q,0) ) { + $x = $this->Exec($q,0); + if (!is_object($x)) { return -1; } $q = "insert into ". $this->prefix . $seq[name] ." values (". $seq['start'] .");"; |
|
From: Gero K. <gok...@us...> - 2008-09-10 17:44:32
|
Update of /cvsroot/tutos/tutos/php/auth In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23301/php/auth Modified Files: auth_pam.pinc Log Message: fix Index: auth_pam.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/auth/auth_pam.pinc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- auth_pam.pinc 27 Jan 2005 16:35:44 -0000 1.5 +++ auth_pam.pinc 10 Sep 2008 17:44:42 -0000 1.6 @@ -59,7 +59,7 @@ } $query = - "SELECT p.*, a.* , p.id as u_id FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "SELECT p.*, a.* , p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". "WHERE login = ". $this->dbconn->String($this->getuname()). " AND p.adr_id = a.id"; |