Update of /cvsroot/tutos/tutos/php
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16332
Modified Files:
Date.pinc base.pinc graph_bars.php handler.pinc mail.pinc
modules.pinc webelements.p3
Log Message:
updates
Index: base.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/base.pinc,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- base.pinc 16 Feb 2009 18:44:55 -0000 1.112
+++ base.pinc 25 Feb 2009 19:16:29 -0000 1.113
@@ -131,10 +131,12 @@
if ( ! is_object($obj) ) return -1;
if ( $obj->tablename == 'UNKNOWN' ) return -1;
+# echo $id.' ?<br>';
if ( !isset($tutos['nohash']) && isset($g_hash[$id]) ) {
# Hashed
$g_hash['hits']++;
$obj = &$g_hash[$id];
+# echo $obj.' *<br>';
return $obj;
}
if (!isset($obj->dbconn)) {
@@ -144,6 +146,7 @@
$q = 'SELECT * from '. $obj->tablename .' WHERE id = '. $id;
$r = $obj->dbconn->Exec($q);
$n = $r->numrows();
+# echo $q.'<br>';
if ( 1 != $n) {
$r->free();
return -1;
@@ -201,6 +204,7 @@
$this->acl = array();
acl_read($this);
$g_hash[$this->id] = &$this;
+# echo $this.' #<br>';
return;
}
/**
Index: webelements.p3
===================================================================
RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v
retrieving revision 1.345
retrieving revision 1.346
diff -u -d -r1.345 -r1.346
--- webelements.p3 16 Feb 2009 20:03:56 -0000 1.345
+++ webelements.p3 25 Feb 2009 19:16:29 -0000 1.346
@@ -1485,7 +1485,7 @@
$g_hash[$id] = -1;
}
if (is_object($current_user) && ($current_user->id != $save_cu)) {
- Fatal_Error('user escalation!','OLD:'.$save_cu.' -> '.$current_user);
+ Fatal_Error('user escalation!','OLD:'.$save_cu.' -> '.$current_user);
}
return $ref;
}
@@ -1748,6 +1748,16 @@
$text = eregi_replace("&#([0-9]{3,5});","&#\\1;",$text);
return $text;
}
+ /**
+ * convert text for pdf excel etc...
+ */
+ function myiconv($text) {
+ global $lang;
+ if (isset($lang['target_enc'])) {
+ return iconv($lang['content_encoding'],$lang['target_enc'],$text);
+ }
+ return iconv($lang['content_encoding'],'ISO-8859-1',$text);
+ }
/**
* prepare a search pattern for reg expressions
* i.e. escape everything that might be misinterpreted
Index: Date.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/Date.pinc,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- Date.pinc 14 Feb 2009 19:15:15 -0000 1.128
+++ Date.pinc 25 Feb 2009 19:16:23 -0000 1.129
@@ -10,7 +10,7 @@
* $Author$
*/
-include_once 'adodb-time.inc.php';
+require_once 'adodb-time.inc.php';
/**
* format a floating hour number
Index: handler.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/handler.pinc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- handler.pinc 9 Jan 2009 14:17:01 -0000 1.6
+++ handler.pinc 25 Feb 2009 19:16:29 -0000 1.7
@@ -35,7 +35,7 @@
}
} else {
$msg .= $arg.'<br \> ('. $i .' handler not found)';
- }
+ }
}
return $msg;
}
Index: modules.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/modules.pinc,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- modules.pinc 18 Aug 2008 11:36:39 -0000 1.39
+++ modules.pinc 25 Feb 2009 19:16:29 -0000 1.40
@@ -25,6 +25,10 @@
#
#
+# State transition management
+#
+@include_once("stc/mconfig.pinc");
+#
# The document management module
# allows you to attach documents to objects
# Author: Gero Kohnert
Index: graph_bars.php
===================================================================
RCS file: /cvsroot/tutos/tutos/php/graph_bars.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- graph_bars.php 4 Jan 2009 18:54:04 -0000 1.30
+++ graph_bars.php 25 Feb 2009 19:16:29 -0000 1.31
@@ -1,6 +1,6 @@
<?php
/*
- * Copyright 1999 - 2008 by Gero Kohnert
+ * Copyright 1999 - 2009 by Gero Kohnert
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -12,16 +12,16 @@
*/
- include "webelements.p3";
- include "permission.p3";
+require_once 'webelements.p3';
+require_once 'permission.p3';
- check_user();
- session_write_close();
- $dbconn->Close();
+check_user();
+session_write_close();
+$dbconn->Close();
- define ('GB_WIDTH',800);
- define ('GB_HEIGHT',300);
- define ('GB_BACKGROUND',300);
+define ('GB_WIDTH',800);
+define ('GB_HEIGHT',300);
+define ('GB_BACKGROUND',300);
function basic (&$f,&$t0,&$t1) {
Header("Expires: 0");
@@ -109,7 +109,7 @@
$i++;
}
$graph = new PieGraph(GB_WIDTH,GB_HEIGHT);
- $graph->SetBackGroundGradient('white');
+ $graph->SetBackgroundGradient('white','silver',GRAD_HOR,BGRAD_PLOT);
if( function_exists('imageantialias') ) {
$graph->img->SetAntiAliasing();
}
@@ -133,7 +133,8 @@
global $font;
$graph = new Graph(GB_WIDTH,GB_HEIGHT);
- $graph->SetBackGroundGradient('white');
+ $graph->SetBackgroundGradient('white','silver',GRAD_HOR,BGRAD_PLOT);
+ $graph->SetMarginColor("white");
if( function_exists('imageantialias') ) {
$graph->img->SetAntiAliasing();
Index: mail.pinc
===================================================================
RCS file: /cvsroot/tutos/tutos/php/mail.pinc,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- mail.pinc 15 Feb 2009 19:17:56 -0000 1.94
+++ mail.pinc 25 Feb 2009 19:16:29 -0000 1.95
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright 1999 - 2008 by Gero Kohnert
+ * Copyright 1999 - 2009 by Gero Kohnert
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -12,7 +12,7 @@
* $Author$
*/
-include_once 'i18n.php';
+require_once 'i18n.php';
/**
* a mail body part including a parser
*/
|