You can subscribe to this list here.
2003 |
Jan
|
Feb
(8) |
Mar
(163) |
Apr
(396) |
May
(111) |
Jun
(301) |
Jul
(245) |
Aug
(161) |
Sep
(367) |
Oct
(933) |
Nov
(698) |
Dec
(198) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(45) |
Feb
(160) |
Mar
(76) |
Apr
(654) |
May
(105) |
Jun
(49) |
Jul
(62) |
Aug
(2) |
Sep
(82) |
Oct
(9) |
Nov
(37) |
Dec
(42) |
2005 |
Jan
(29) |
Feb
(23) |
Mar
(21) |
Apr
(30) |
May
(5) |
Jun
(1) |
Jul
(1) |
Aug
(24) |
Sep
(40) |
Oct
|
Nov
(38) |
Dec
(18) |
2006 |
Jan
(35) |
Feb
(24) |
Mar
(6) |
Apr
(49) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2007 |
Jan
(14) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Karsten D. <k-...@us...> - 2006-04-27 11:53:31
|
Update of /cvsroot/moregroupware/mgw/modules/files/inc/mime In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29142/modules/files/inc/mime Modified Files: mime_mapping.php Log Message: Added a few more file types to mime detection Index: mime_mapping.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/files/inc/mime/mime_mapping.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mime_mapping.php 7 Apr 2003 19:45:55 -0000 1.2 --- mime_mapping.php 27 Apr 2006 11:53:22 -0000 1.3 *************** *** 156,159 **** 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', ! 'zip' => 'application/zip' ); --- 156,177 ---- 'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz', ! 'zip' => 'application/zip', ! 'sdc' => 'application/vnd.stardivision.calc', ! 'sda' => 'application/vnd.stardivision.draw', ! 'sdd' => 'application/vnd.stardivision.impress', ! 'sdp' => 'application/vnd.stardivision.impress', ! 'smf' => 'application/vnd.stardivision.math', ! 'sdw' => 'application/vnd.stardivision.writer', ! 'vor' => 'application/vnd.stardivision.writer', ! 'sgl' => 'application/vnd.stardivision.writer-global', ! 'sxc' => 'application/vnd.sun.xml.calc', ! 'stc' => 'application/vnd.sun.xml.calc.template', ! 'sxd' => 'application/vnd.sun.xml.draw', ! 'std' => 'application/vnd.sun.xml.draw.template', ! 'sxi' => 'application/vnd.sun.xml.impress', ! 'sti' => 'application/vnd.sun.xml.impress.template', ! 'sxm' => 'application/vnd.sun.xml.math', ! 'sxw' => 'application/vnd.sun.xml.writer', ! 'sxg' => 'application/vnd.sun.xml.writer.global', ! 'stw' => 'application/vnd.sun.xml.writer.template', ); |
From: Karsten D. <k-...@us...> - 2006-04-27 11:44:21
|
Update of /cvsroot/moregroupware/mgw/modules/tts/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20974/modules/tts/inc Modified Files: ticket.class.php Log Message: Make use of JPGraph lib fitting the PHP version (4 or 5) Index: ticket.class.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/tts/inc/ticket.class.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ticket.class.php 15 Apr 2004 17:01:51 -0000 1.15 --- ticket.class.php 27 Apr 2006 11:44:17 -0000 1.16 *************** *** 118,123 **** // graph library define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (INCLUDEPATH . "jpgraph/jpgraph.php"); ! include (INCLUDEPATH . "jpgraph/jpgraph_gantt.php"); --- 118,123 ---- // graph library define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (JPGRAPHPATH . "jpgraph.php"); ! include (JPGRAPHPATH . "jpgraph_gantt.php"); |
From: Karsten D. <k-...@us...> - 2006-04-27 11:44:21
|
Update of /cvsroot/moregroupware/mgw/modules/calendar2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20974/modules/calendar2 Modified Files: month_gantt.php year_gantt.php Log Message: Make use of JPGraph lib fitting the PHP version (4 or 5) Index: year_gantt.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/calendar2/year_gantt.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** year_gantt.php 5 Apr 2004 11:06:55 -0000 1.10 --- year_gantt.php 27 Apr 2006 11:44:17 -0000 1.11 *************** *** 71,76 **** define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (INCLUDEPATH . "jpgraph/jpgraph.php"); ! include (INCLUDEPATH . "jpgraph/jpgraph_gantt.php"); $graph = @new GanttGraph(0,0,"auto"); --- 71,76 ---- define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (JPGRAPHPATH . "jpgraph.php"); ! include (JPGRAPHPATH . "jpgraph_gantt.php"); $graph = @new GanttGraph(0,0,"auto"); Index: month_gantt.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/calendar2/month_gantt.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** month_gantt.php 5 Apr 2004 11:06:55 -0000 1.11 --- month_gantt.php 27 Apr 2006 11:44:17 -0000 1.12 *************** *** 106,111 **** define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (INCLUDEPATH . "jpgraph/jpgraph.php"); ! include (INCLUDEPATH . "jpgraph/jpgraph_gantt.php"); $graph = @new GanttGraph(734,0,"auto"); --- 106,111 ---- define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (JPGRAPHPATH . "jpgraph.php"); ! include (JPGRAPHPATH . "jpgraph_gantt.php"); $graph = @new GanttGraph(734,0,"auto"); |
From: Karsten D. <k-...@us...> - 2006-04-27 11:44:21
|
Update of /cvsroot/moregroupware/mgw/modules/projects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20974/modules/projects Modified Files: index.php Log Message: Make use of JPGraph lib fitting the PHP version (4 or 5) Index: index.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/projects/index.php,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** index.php 15 Feb 2005 15:16:43 -0000 1.70 --- index.php 27 Apr 2006 11:44:17 -0000 1.71 *************** *** 149,154 **** define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! define("TTF_DIR", INCLUDEPATH . "fonts/"); // Font Directory (where the VERA font is) ! include (INCLUDEPATH . "jpgraph/jpgraph.php"); ! include (INCLUDEPATH . "jpgraph/jpgraph_gantt.php"); // A new graph with automatic size --- 149,154 ---- define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! define("TTF_DIR", INCLUDEPATH . "fonts/"); // Font Directory (where the VERA font is) ! include (JPGRAPHPATH . "jpgraph.php"); ! include (JPGRAPHPATH . "jpgraph_gantt.php"); // A new graph with automatic size |
From: Karsten D. <k-...@us...> - 2006-04-27 11:44:20
|
Update of /cvsroot/moregroupware/mgw/modules/tts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20974/modules/tts Modified Files: mygantt.php Log Message: Make use of JPGraph lib fitting the PHP version (4 or 5) Index: mygantt.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/tts/mygantt.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mygantt.php 27 Oct 2003 16:05:00 -0000 1.10 --- mygantt.php 27 Apr 2006 11:44:17 -0000 1.11 *************** *** 12,17 **** // graph library define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (INCLUDEPATH . "jpgraph/jpgraph.php"); ! include (INCLUDEPATH . "jpgraph/jpgraph_gantt.php"); // A new graph with automatic size --- 12,17 ---- // graph library define('CACHE_DIR',CACHE_FOLDER); // for jpgraph.php itself! ! include (JPGRAPHPATH . "jpgraph.php"); ! include (JPGRAPHPATH . "jpgraph_gantt.php"); // A new graph with automatic size |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:58
|
Update of /cvsroot/moregroupware/mgw/setup/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19654/setup/inc Modified Files: step_2.inc.php Log Message: Trivial changes Index: step_2.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/setup/inc/step_2.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** step_2.inc.php 16 Apr 2006 15:59:48 -0000 1.18 --- step_2.inc.php 27 Apr 2006 11:42:55 -0000 1.19 *************** *** 8,12 **** // just the minimum version needed ! $neededPHPVersion = '4.2.0'; // jpgraph says it needs 4.3.0, but... $neededMemory = 16; //memory in Mb --- 8,12 ---- // just the minimum version needed ! $neededPHPVersion = '4.2.0'; // jpgraph says it needs at least 4.3.1, but... $neededMemory = 16; //memory in Mb |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:58
|
Update of /cvsroot/moregroupware/mgw/setup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19654/setup Modified Files: index.php Log Message: Trivial changes Index: index.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/setup/index.php,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** index.php 24 Dec 2005 10:41:58 -0000 1.52 --- index.php 27 Apr 2006 11:42:55 -0000 1.53 *************** *** 240,244 **** } else { $_SESSION["safe_mode_fatal"] = true; ! setup_die("The setup script found a fatal error and can't continue. Safe mode restriction are 'On' in the PHP configuration. Because the user/group ID of the temporary files directory does not match that of it's parent directory we will not be able to write any files.<br />You can create this directory yourself and give the web server write access to overcome the problem.<br /><br /><a href='".$_SERVER['PHP_SELF']."?nofatal=1'>Continue</a> anyway."); } $GLOBALS['log']->message(MGW_WARNING, "!!!", __LINE__, __FILE__, 1, "setup"); --- 240,244 ---- } else { $_SESSION["safe_mode_fatal"] = true; ! setup_die("The setup script found a fatal error and can't continue. Safe mode restriction are 'On' in the PHP configuration. Because the user/group ID of the temporary files directory ('".$smarty_compile."') does not match that of it's parent directory we will not be able to write any files.<br />You can create this directory yourself and give the web server write access to overcome the problem.<br /><br /><a href='".$_SERVER['PHP_SELF']."?nofatal=1'>Continue</a> anyway."); } $GLOBALS['log']->message(MGW_WARNING, "!!!", __LINE__, __FILE__, 1, "setup"); |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:34
|
Update of /cvsroot/moregroupware/mgw/modules/general/templates/default/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19332/modules/general/templates/default/html Modified Files: _navi.tpl Log Message: Changed the help menu item to point to the online wiki, cleaned up a bit and fixed some other URLs Index: _navi.tpl =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/general/templates/default/html/_navi.tpl,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** _navi.tpl 6 Dec 2004 15:59:56 -0000 1.64 --- _navi.tpl 27 Apr 2006 11:42:28 -0000 1.65 *************** *** 71,75 **** <li id="adxmenu_help"><a class="submenu" href="#">{$help|addslash}</a> <ul> ! <li id="adxmenu_manual"><a href="javascript:openHelpWin('{$rooturl}{$helpurl}');">{$manual|addslash}</a></li> {if $mgw_log_enable eq 1} <li id="adxmenu_log"><a href="javascript:openWin('{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}');">{$log|addslash}</a></li> --- 71,75 ---- <li id="adxmenu_help"><a class="submenu" href="#">{$help|addslash}</a> <ul> ! <li id="adxmenu_manual"><a href="javascript:openHelpWin('{$helpurl}');">{$manual|addslash}</a></li> {if $mgw_log_enable eq 1} <li id="adxmenu_log"><a href="javascript:openWin('{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}');">{$log|addslash}</a></li> *************** *** 77,82 **** <li id="adxmenu_online"><a class="submenu" href="#">{$online|addslash}</a> <ul> ! <li id="adxmenu_project_homepage"><a href="http://www.moregroupware.org" target="_blank">{$project_homepage|addslash}</a></li> ! <li id="adxmenu_download"><a href="http://moregroupware.sourceforge.net/download.php" target="_blank">{$download|addslash}</a></li> </ul> <li id="adxmenu_feedback"><a class="submenu" href="#">{$feedback|addslash}</a> --- 77,82 ---- <li id="adxmenu_online"><a class="submenu" href="#">{$online|addslash}</a> <ul> ! <li id="adxmenu_project_homepage"><a href="http://www.moregroupware.com/" target="_blank">{$project_homepage|addslash}</a></li> ! <li id="adxmenu_download"><a href="http://sourceforge.net/project/showfiles.php?group_id=32034&package_id=24110" target="_blank">{$download|addslash}</a></li> </ul> <li id="adxmenu_feedback"><a class="submenu" href="#">{$feedback|addslash}</a> *************** *** 89,94 **** </ul> </li> ! <li id="adxmenu_about_us"><a href="http://mgw.k-fish.de/developers.html" target="_blank">{$about_us|addslash}</a></li> ! <li id="adxmenu_about"><a href="http://mgw.k-fish.de/about.html" target="_blank">{$about|addslash}</a></li> </ul> </li> --- 89,94 ---- </ul> </li> ! <li id="adxmenu_about_us"><a href="http://www.moregroupware.com/developers.html" target="_blank">{$about_us|addslash}</a></li> ! <li id="adxmenu_about"><a href="http://www.moregroupware.com/about.html" target="_blank">{$about|addslash}</a></li> </ul> </li> *************** *** 178,186 **** <select onchange="execute_link(this.options[this.selectedIndex].value);"> <option>{$help}</option> ! <option value="javascript:openHelpWin('{$rooturl}{$helpurl}')">{$manual}</option> {if $mgw_log_enable eq 1}<option value="javascript:openWin('{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}',600,700)">{$log}</option>{/if} <OPTGROUP LABEL="{$online}"> <option value="http://www.moregroupware.org">{$project_homepage}</option> ! <option value="http://moregroupware.sourceforge.net/download.php">{$download}</option> </OPTGROUP> <OPTGROUP LABEL="{$feedback}"> --- 178,186 ---- <select onchange="execute_link(this.options[this.selectedIndex].value);"> <option>{$help}</option> ! <option value="javascript:openHelpWin('{$helpurl}')">{$manual}</option> {if $mgw_log_enable eq 1}<option value="javascript:openWin('{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}',600,700)">{$log}</option>{/if} <OPTGROUP LABEL="{$online}"> <option value="http://www.moregroupware.org">{$project_homepage}</option> ! <option value="http://sourceforge.net/project/showfiles.php?group_id=32034&package_id=24110">{$download}</option> </OPTGROUP> <OPTGROUP LABEL="{$feedback}"> *************** *** 191,196 **** <option value="http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020">{$submit_patch}</option> </OPTGROUP> ! <option value="http://mgw.k-fish.de/developers.html">{$about_us}</option> ! <option value="http://mgw.k-fish.de/about.html">{$about}</option> </select> --- 191,196 ---- <option value="http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020">{$submit_patch}</option> </OPTGROUP> ! <option value="http://www.moregroupware.com/developers.html">{$about_us}</option> ! <option value="http://www.moregroupware.com/about.html">{$about}</option> </select> *************** *** 211,215 **** </td> {if $sponsor_logo neq ""}<td align="center"><a href="{$sponsor_link}" target="_blank"><img src="{$sponsor_logo}" border="0" vspace="6"></a></td>{/if} ! <td height="30" align="right"><a href="http://www.moregroupware.org/" target="_blank"><img src="{$imgpathgeneral}/mgw_logo.gif" border="0" vspace="3"></a></td> </tr> --- 211,215 ---- </td> {if $sponsor_logo neq ""}<td align="center"><a href="{$sponsor_link}" target="_blank"><img src="{$sponsor_logo}" border="0" vspace="6"></a></td>{/if} ! <td height="30" align="right"><a href="http://www.moregroupware.com/" target="_blank"><img src="{$imgpathgeneral}/mgw_logo.gif" border="0" vspace="3"></a></td> </tr> *************** *** 269,279 **** {/if} ['<img class="seq2" src="{$imgpathgeneral}/modules/help2.gif" align="absmiddle"><img class="seq1" align="absmiddle" src="{$imgpathgeneral}/modules/help1.gif"> ', '{$help|addslash}', null, null, null, ! ['<img class="seq2" src="{$imgpathgeneral}/modules/manual.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/manual_mini.png"></div>', '{$manual|addslash}', 'javascript:openHelpWin(\'{$rooturl}{$helpurl}\')', null, null], {if $mgw_log_enable eq 1}[null, '{$log|addslash}', 'javascript:openWin(\'{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}\',600,700)', null, null],{/if} ['<img class="seq2" src="{$imgpathgeneral}/modules/online.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/online_mini.png"></div>', '{$online|addslash}', null, null, null, ! ['<img class="seq2" src="{$imgpathgeneral}/modules/homepage.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/homepage_mini.png"></div>', '{$project_homepage|addslash}', 'http://www.moregroupware.org', '_blank', null], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/download.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/download_mini.png"></div>', '{$download|addslash}', 'http://moregroupware.sourceforge.net/download.php', '_blank', null], ], ['<img class="seq2" src="{$imgpathgeneral}/modules/feedback.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/feedback_mini.png"></div>', '{$feedback|addslash}', null, null, null, --- 269,279 ---- {/if} ['<img class="seq2" src="{$imgpathgeneral}/modules/help2.gif" align="absmiddle"><img class="seq1" align="absmiddle" src="{$imgpathgeneral}/modules/help1.gif"> ', '{$help|addslash}', null, null, null, ! ['<img class="seq2" src="{$imgpathgeneral}/modules/manual.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/manual_mini.png"></div>', '{$manual|addslash}', 'javascript:openHelpWin(\'{$helpurl}\')', null, null], {if $mgw_log_enable eq 1}[null, '{$log|addslash}', 'javascript:openWin(\'{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}\',600,700)', null, null],{/if} ['<img class="seq2" src="{$imgpathgeneral}/modules/online.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/online_mini.png"></div>', '{$online|addslash}', null, null, null, ! ['<img class="seq2" src="{$imgpathgeneral}/modules/homepage.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/homepage_mini.png"></div>', '{$project_homepage|addslash}', 'http://www.moregroupware.com/', '_blank', null], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/download.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/download_mini.png"></div>', '{$download|addslash}', 'http://sourceforge.net/project/showfiles.php?group_id=32034&package_id=24110', '_blank', null], ], ['<img class="seq2" src="{$imgpathgeneral}/modules/feedback.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/feedback_mini.png"></div>', '{$feedback|addslash}', null, null, null, *************** *** 284,289 **** ['<img class="seq2" src="{$imgpathgeneral}/modules/patch.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/patch_mini.png"></div>', '{$submit_patch|addslash}', 'http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020', '_blank', null], ], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/about_us.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/about_us_mini.png"></div>', '{$about_us|addslash}', 'http://mgw.k-fish.de/developers.html', '_blank', null], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/about.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/about_mini.png"></div>', '{$about|addslash}', 'http://mgw.k-fish.de/about.html', '_blank', null], ], ['<img class="seq2" src="{$imgpathgeneral}/modules/logout2.gif" align="absmiddle"><img class="seq1" align="absmiddle" src="{$imgpathgeneral}/modules/logout1.gif"> ', '{$username|addslash}', '', null, null, --- 284,289 ---- ['<img class="seq2" src="{$imgpathgeneral}/modules/patch.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/patch_mini.png"></div>', '{$submit_patch|addslash}', 'http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020', '_blank', null], ], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/about_us.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/about_us_mini.png"></div>', '{$about_us|addslash}', 'http://www.moregroupware.com/developers.html', '_blank', null], ! ['<img class="seq2" src="{$imgpathgeneral}/modules/about.png"><div class="seq1" align="center"><img src="{$imgpathgeneral}/modules/about_mini.png"></div>', '{$about|addslash}', 'http://www.moregroupware.com/about.html', '_blank', null], ], ['<img class="seq2" src="{$imgpathgeneral}/modules/logout2.gif" align="absmiddle"><img class="seq1" align="absmiddle" src="{$imgpathgeneral}/modules/logout1.gif"> ', '{$username|addslash}', '', null, null, *************** *** 329,338 **** {/if} [null, '{$help|addslash}', null, null, null, ! [null, '{$manual|addslash}', 'javascript:openHelpWin(\'{$rooturl}{$helpurl}\')', null, null], {if $mgw_log_enable eq 1}[null, '{$manual|addslash}', 'javascript:openWin(\'{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}\',600,700)', null, null],{/if} [null, '{$online|addslash}', null, null, null, ! [null, '{$project_homepage|addslash}', 'http://www.moregroupware.org', '_blank', null], [null, '{$download|addslash}', 'http://moregroupware.sourceforge.net/download.php', '_blank', null], ], --- 329,338 ---- {/if} [null, '{$help|addslash}', null, null, null, ! [null, '{$manual|addslash}', 'javascript:openHelpWin(\'{$helpurl}\')', null, null], {if $mgw_log_enable eq 1}[null, '{$manual|addslash}', 'javascript:openWin(\'{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}\',600,700)', null, null],{/if} [null, '{$online|addslash}', null, null, null, ! [null, '{$project_homepage|addslash}', 'http://www.moregroupware.com/', '_blank', null], [null, '{$download|addslash}', 'http://moregroupware.sourceforge.net/download.php', '_blank', null], ], *************** *** 344,349 **** [null, '{$submit_patch|addslash}', 'http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020', '_blank', null], ], ! [null, '{$about_us|addslash}', 'http://mgw.k-fish.de/developers.html', '_blank', null], ! [null, '{$about|addslash}', 'http://mgw.k-fish.de/about.html', '_blank', null], ], [null, '{$username|addslash}', '', null, null, --- 344,349 ---- [null, '{$submit_patch|addslash}', 'http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020', '_blank', null], ], ! [null, '{$about_us|addslash}', 'http://www.moregroupware.com/developers.html', '_blank', null], ! [null, '{$about|addslash}', 'http://www.moregroupware.com/about.html', '_blank', null], ], [null, '{$username|addslash}', '', null, null, |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:34
|
Update of /cvsroot/moregroupware/mgw/modules/help/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19332/modules/help/inc Modified Files: smenu.helpfeedback.php smenu.helponline.php smenu.php Log Message: Changed the help menu item to point to the online wiki, cleaned up a bit and fixed some other URLs Index: smenu.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/help/inc/smenu.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smenu.php 22 Nov 2003 17:01:47 -0000 1.2 --- smenu.php 27 Apr 2006 11:42:28 -0000 1.3 *************** *** 4,11 **** $smenu[$o]["name"] = Lang::getLanguageString("manual"); ! $smenu[$o]["link"] = "javascript:openHelpWin('".ROOTURL.$smarty->get_template_vars('helpurl')."')"; ! //$smenu[$o]["pic"] = ""; ! //$smenu[$o]["target"] = ""; ! //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; --- 4,8 ---- $smenu[$o]["name"] = Lang::getLanguageString("manual"); ! $smenu[$o]["link"] = "javascript:openHelpWin('".$smarty->get_template_vars('helpurl')."')"; $o++; *************** *** 16,22 **** $smenu[$o]["name"] = Lang::getLanguageString("log"); $smenu[$o]["link"] = "javascript:openWin('{$rooturl}log.php?logid={$mgw_log_id}&mode=0&{$SESSION}',600,700)"; - //$smenu[$o]["pic"] = ""; - //$smenu[$o]["target"] = ""; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; --- 13,16 ---- *************** *** 27,40 **** $smenu[$o]["name"] = Lang::getLanguageString("online"); $smenu[$o]["link"] = ROOTURL."modules/help/helponline.php?helpmodule=$helpmodule&".SID; - //$smenu[$o]["pic"] = ""; - //$smenu[$o]["target"] = ""; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("feedback"); $smenu[$o]["link"] = ROOTURL."modules/help/helpfeedback.php?helpmodule=$helpmodule&".SID; - //$smenu[$o]["pic"] = ""; - //$smenu[$o]["target"] = ""; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; --- 21,28 ---- *************** *** 43,57 **** $smenu[$o]["name"] = Lang::getLanguageString("about_us"); ! $smenu[$o]["link"] = "http://moregroupware.sourceforge.net/developers.php"; ! //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("about"); ! $smenu[$o]["link"] = "http://moregroupware.sourceforge.net/project.php"; ! //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; --- 31,41 ---- $smenu[$o]["name"] = Lang::getLanguageString("about_us"); ! $smenu[$o]["link"] = "http://www.moregroupware.com/developers.php"; $smenu[$o]["target"] = "_blank"; $o++; $smenu[$o]["name"] = Lang::getLanguageString("about"); ! $smenu[$o]["link"] = "http://www.moregroupware.com/project.php"; $smenu[$o]["target"] = "_blank"; $o++; Index: smenu.helponline.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/help/inc/smenu.helponline.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** smenu.helponline.php 22 Nov 2003 14:50:07 -0000 1.1 --- smenu.helponline.php 27 Apr 2006 11:42:28 -0000 1.2 *************** *** 4,18 **** $smenu[$o]["name"] = Lang::getLanguageString("project_homepage"); ! $smenu[$o]["link"] = "http://www.moregroupware.org"; ! //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("download"); ! $smenu[$o]["link"] = "http://moregroupware.sourceforge.net/download.php"; ! //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; createSubmenu($smenu); --- 4,14 ---- $smenu[$o]["name"] = Lang::getLanguageString("project_homepage"); ! $smenu[$o]["link"] = "http://www.moregroupware.com/"; $smenu[$o]["target"] = "_blank"; $o++; $smenu[$o]["name"] = Lang::getLanguageString("download"); ! $smenu[$o]["link"] = "http://sourceforge.net/project/showfiles.php?group_id=32034&package_id=24110"; $smenu[$o]["target"] = "_blank"; createSubmenu($smenu); Index: smenu.helpfeedback.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/help/inc/smenu.helpfeedback.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** smenu.helpfeedback.php 22 Nov 2003 14:50:06 -0000 1.1 --- smenu.helpfeedback.php 27 Apr 2006 11:42:28 -0000 1.2 *************** *** 5,39 **** $smenu[$o]["name"] = Lang::getLanguageString("diagnostics"); $smenu[$o]["link"] = ROOTURL."modules/general/diagnostics.php?".SID; - //$smenu[$o]["pic"] = ""; - //$smenu[$o]["target"] = ""; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("submit_bug"); $smenu[$o]["link"] = "http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404018"; - //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("submit_feature"); $smenu[$o]["link"] = "http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404021"; - //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("submit_support"); $smenu[$o]["link"] = "http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404019"; - //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; $o++; $smenu[$o]["name"] = Lang::getLanguageString("submit_patch"); $smenu[$o]["link"] = "http://sourceforge.net/tracker/?func=add&group_id=32034&atid=404020"; - //$smenu[$o]["pic"] = ""; $smenu[$o]["target"] = "_blank"; - //$smenu[$o]["static_menu"]["show_only_pic"] = false; --- 5,28 ---- |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:32
|
Update of /cvsroot/moregroupware/mgw/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19332/include Modified Files: container.inc.php Log Message: Changed the help menu item to point to the online wiki, cleaned up a bit and fixed some other URLs Index: container.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/container.inc.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** container.inc.php 17 Sep 2005 15:16:22 -0000 1.24 --- container.inc.php 27 Apr 2006 11:42:28 -0000 1.25 *************** *** 25,30 **** include(INCLUDEPATH . 'mgw.class.php'); // tar functions ! require(INCLUDEPATH."/tar/tar.class.php"); // functions for translation --- 25,36 ---- include(INCLUDEPATH . 'mgw.class.php'); + // define path to JPGraph + if(PHP_VERSION >= 5) + define('JPGRAPHPATH', INCLUDEPATH . 'jpgraph2/'); + else + define('JPGRAPHPATH', INCLUDEPATH . 'jpgraph1/'); + // tar functions ! require(INCLUDEPATH . 'tar/tar.class.php'); // functions for translation *************** *** 62,69 **** // help system ! if(file_exists(ROOTPATH."/docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html")) $smarty->assign("helpurl", "docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/en/modules_".$myEnv["module"].".html")) $smarty->assign("helpurl", "docs/html/en/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html")) $smarty->assign("helpurl","docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html"); ! else $smarty->assign("helpurl","docs/html/nohelp.en.html"); // include module autoexecution of several things like translation, authentication, and more --- 68,82 ---- // help system ! /* ! if(file_exists(ROOTPATH."/docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/en/modules_".$myEnv["module"].".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/en/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html"); ! else ! $smarty->assign("helpurl", ROOTURL."docs/html/nohelp.en.html"); ! */ ! $smarty->assign("helpurl","http://www.moregroupware.com/wiki/"); // include module autoexecution of several things like translation, authentication, and more |
From: Karsten D. <k-...@us...> - 2006-04-27 11:42:31
|
Update of /cvsroot/moregroupware/mgw/modules/help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19332/modules/help Modified Files: help.php Log Message: Changed the help menu item to point to the online wiki, cleaned up a bit and fixed some other URLs Index: help.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/modules/help/help.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** help.php 22 Nov 2003 14:51:31 -0000 1.1 --- help.php 27 Apr 2006 11:42:28 -0000 1.2 *************** *** 20,27 **** //---------------- from container.inc.php ------------// // help system ! if(file_exists(ROOTPATH."/docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html")) $smarty->assign("helpurl", "docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/en/modules_".$myEnv["module"].".html")) $smarty->assign("helpurl", "docs/html/en/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html")) $smarty->assign("helpurl","docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html"); ! else $smarty->assign("helpurl","docs/html/nohelp.en.html"); //----------------------------------------------------// $myEnv["module"] = $real_module; --- 20,35 ---- //---------------- from container.inc.php ------------// // help system ! /* ! if(file_exists(ROOTPATH."/docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/".$_SESSION["MGW"]->spkz."/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/en/modules_".$myEnv["module"].".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/en/modules_".$myEnv["module"].".html"); ! elseif(file_exists(ROOTPATH."/docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html")) ! $smarty->assign("helpurl", ROOTURL."docs/html/nohelp.".$_SESSION["MGW"]->spkz.".html"); ! else ! $smarty->assign("helpurl", ROOTURL."docs/html/nohelp.en.html"); ! */ ! $smarty->assign("helpurl","http://www.moregroupware.com/wiki/"); ! //----------------------------------------------------// $myEnv["module"] = $real_module; |
Update of /cvsroot/moregroupware/mgw/include/jpgraph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13513/jpgraph Removed Files: QPL.txt imgdata_balls.inc imgdata_bevels.inc imgdata_diamonds.inc imgdata_pushpins.inc imgdata_squares.inc imgdata_stars.inc jpg-config.inc jpgraph.php jpgraph_bar.php jpgraph_canvas.php jpgraph_canvtools.php jpgraph_error.php jpgraph_gantt.php jpgraph_gb2312.php jpgraph_gradient.php jpgraph_iconplot.php jpgraph_imgtrans.php jpgraph_line.php jpgraph_log.php jpgraph_pie.php jpgraph_pie3d.php jpgraph_plotband.php jpgraph_plotmark.inc jpgraph_polar.php jpgraph_radar.php jpgraph_regstat.php jpgraph_scatter.php jpgraph_stock.php Log Message: Removing old JPGraph 1.x library --- jpgraph_polar.php DELETED --- --- jpgraph_radar.php DELETED --- --- imgdata_diamonds.inc DELETED --- --- imgdata_bevels.inc DELETED --- --- jpgraph_canvas.php DELETED --- --- jpgraph_gb2312.php DELETED --- --- imgdata_balls.inc DELETED --- --- jpgraph_bar.php DELETED --- --- jpgraph_regstat.php DELETED --- --- jpgraph.php DELETED --- --- jpgraph_iconplot.php DELETED --- --- jpgraph_stock.php DELETED --- --- jpgraph_log.php DELETED --- --- jpgraph_canvtools.php DELETED --- --- jpgraph_plotmark.inc DELETED --- --- jpgraph_error.php DELETED --- --- jpgraph_imgtrans.php DELETED --- --- jpgraph_pie.php DELETED --- --- jpgraph_scatter.php DELETED --- --- jpg-config.inc DELETED --- --- jpgraph_line.php DELETED --- --- imgdata_stars.inc DELETED --- --- imgdata_pushpins.inc DELETED --- --- jpgraph_pie3d.php DELETED --- --- QPL.txt DELETED --- --- jpgraph_gantt.php DELETED --- --- jpgraph_plotband.php DELETED --- --- imgdata_squares.inc DELETED --- --- jpgraph_gradient.php DELETED --- |
Update of /cvsroot/moregroupware/mgw/include/jpgraph1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10567/jpgraph1 Added Files: QPL.txt VERSION imgdata_balls.inc imgdata_bevels.inc imgdata_diamonds.inc imgdata_pushpins.inc imgdata_squares.inc imgdata_stars.inc jpg-config.inc jpgraph.php jpgraph_antispam-digits.php jpgraph_antispam.php jpgraph_bar.php jpgraph_canvas.php jpgraph_canvtools.php jpgraph_date.php jpgraph_error.php jpgraph_gantt.php jpgraph_gb2312.php jpgraph_gradient.php jpgraph_iconplot.php jpgraph_imgtrans.php jpgraph_line.php jpgraph_log.php jpgraph_pie.php jpgraph_pie3d.php jpgraph_plotband.php jpgraph_plotmark.inc jpgraph_polar.php jpgraph_radar.php jpgraph_regstat.php jpgraph_scatter.php jpgraph_stock.php jpgraph_utils.inc Log Message: Added seperate JPGraph 1.x and 2.x libraries --- NEW FILE: jpgraph_polar.php --- <?php /*======================================================================= // File: JPGRAPH_POLAR.PHP // Description: Polar plot extension for JpGraph // Created: 2003-02-02 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_polar.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ require_once ('jpgraph_plotmark.inc'); require_once "jpgraph_log.php"; DEFINE('POLAR_360',1); DEFINE('POLAR_180',2); // // Note. Don't attempt to make sense of this code. // In order not to have to be able to inherit the scaling code // from the main graph package we have had to make some "tricks" since // the original scaling and axis was not designed to do what is // required here. // There were two option. 1: Re-implement everything and get a clean design // and 2: do some "small" trickery and be able to inherit most of // the functionlity from the main graph package. // We choose 2: here in order to save some time. // //-------------------------------------------------------------------------- // class PolarPlot //-------------------------------------------------------------------------- class PolarPlot { var $numpoints=0; var $iColor='navy',$iFillColor=''; var $iLineWeight=1; var $coord=null; var $legendcsimtarget=''; var $legendcsimalt=''; var $legend=""; var $csimtargets=array(); // Array of targets for CSIM var $csimareas=""; // Resultant CSIM area tags var $csimalts=null; // ALT:s for corresponding target var $line_style='solid',$mark; function PolarPlot($aData) { $n = count($aData); if( $n & 1 ) { JpGraphError::RaiseL(17001); //('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).'); } $this->numpoints = $n/2; $this->coord = $aData; $this->mark = new PlotMark(); } function SetWeight($aWeight) { $this->iLineWeight = $aWeight; } function SetColor($aColor){ $this->iColor = $aColor; } function SetFillColor($aColor){ $this->iFillColor = $aColor; } function Max() { $m = $this->coord[1]; $i=1; while( $i < $this->numpoints ) { $m = max($m,$this->coord[2*$i+1]); ++$i; } return $m; } // Set href targets for CSIM function SetCSIMTargets($aTargets,$aAlts=null) { $this->csimtargets=$aTargets; $this->csimalts=$aAlts; } // Get all created areas function GetCSIMareas() { return $this->csimareas; } function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") { $this->legend = $aLegend; $this->legendcsimtarget = $aCSIM; $this->legendcsimalt = $aCSIMAlt; } // Private methods function Legend(&$aGraph) { $color = $this->iColor ; if( $this->legend != "" ) { if( $this->iFillColor!='' ) { $color = $this->iFillColor; $aGraph->legend->Add($this->legend,$color,$this->mark,0, $this->legendcsimtarget,$this->legendcsimalt); } else { $aGraph->legend->Add($this->legend,$color,$this->mark,$this->line_style, $this->legendcsimtarget,$this->legendcsimalt); } } } function Stroke(&$img,$scale) { $i=0; $p=array(); $this->csimareas=''; while($i < $this->numpoints) { list($x1,$y1) = $scale->PTranslate($this->coord[2*$i],$this->coord[2*$i+1]); $p[2*$i] = $x1; $p[2*$i+1] = $y1; if( isset($this->csimtargets[$i]) ) { $this->mark->SetCSIMTarget($this->csimtargets[$i]); $this->mark->SetCSIMAlt($this->csimalts[$i]); $this->mark->SetCSIMAltVal($this->coord[2*$i], $this->coord[2*$i+1]); $this->mark->Stroke($img,$x1,$y1); $this->csimareas .= $this->mark->GetCSIMAreas(); } else $this->mark->Stroke($img,$x1,$y1); ++$i; } if( $this->iFillColor != '' ) { $img->SetColor($this->iFillColor); $img->FilledPolygon($p); } $img->SetLineWeight($this->iLineWeight); $img->SetColor($this->iColor); $img->Polygon($p,$this->iFillColor!=''); } } //-------------------------------------------------------------------------- // class PolarAxis //-------------------------------------------------------------------------- class PolarAxis extends Axis { var $angle_step=15,$angle_color='lightgray',$angle_label_color='black'; var $angle_fontfam=FF_FONT1,$angle_fontstyle=FS_NORMAL,$angle_fontsize=10; var $angle_fontcolor = 'navy'; var $gridminor_color='lightgray',$gridmajor_color='lightgray'; var $show_minor_grid = false, $show_major_grid = true ; var $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true; var $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black'; var $show_angle_tick=true; var $radius_tick_color='black'; function PolarAxis(&$img,&$aScale) { parent::Axis($img,$aScale); } function ShowAngleDegreeMark($aFlg=true) { $this->show_angle_mark = $aFlg; } function SetAngleStep($aStep) { $this->angle_step=$aStep; } function HideTicks($aFlg=true,$aAngleFlg=true) { parent::HideTicks($aFlg,$aFlg); $this->show_angle_tick = !$aAngleFlg; } function ShowAngleLabel($aFlg=true) { $this->show_angle_label = $aFlg; } function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) { $this->show_minor_grid = $aMinor; $this->show_major_grid = $aMajor; $this->show_angle_grid = $aAngle ; } function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=10) { $this->angle_fontfam = $aFontFam; $this->angle_fontstyle = $aFontStyle; $this->angle_fontsize = $aFontSize; } function SetColor($aColor,$aRadColor='',$aAngleColor='') { if( $aAngleColor == '' ) $aAngleColor=$aColor; parent::SetColor($aColor,$aRadColor); $this->angle_fontcolor = $aAngleColor; } function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') { if( $aMinorColor == '' ) $aMinorColor = $aMajorColor; if( $aAngleColor == '' ) $aAngleColor = $aMajorColor; $this->gridminor_color = $aMinorColor; $this->gridmajor_color = $aMajorColor; $this->angle_color = $aAngleColor; } function SetTickColors($aRadColor,$aAngleColor='') { $this->radius_tick_color = $aRadColor; $this->angle_tick_color = $aAngleColor; } // Private methods function StrokeGrid($pos) { $x = round($this->img->left_margin + $this->img->plotwidth/2); $this->scale->ticks->Stroke($this->img,$this->scale,$pos); // Stroke the minor arcs $pmin = array(); $p = $this->scale->ticks->ticks_pos; $n = count($p); $i = 0; $this->img->SetColor($this->gridminor_color); while( $i < $n ) { $r = $p[$i]-$x+1; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; while( $r < $limit ) { $off = $r; $i=1; $r = $off + round($p[$i]-$x+1); while( $r < $limit && $i < $n ) { $r = $off+$p[$i]-$x; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } } // Stroke the major arcs if( $this->show_major_grid ) { // First determine how many minor step on // every major step. We have recorded the minor radius // in pmin and use these values. This is done in order // to avoid rounding errors if we were to recalculate the // different major radius. $pmaj = $this->scale->ticks->maj_ticks_pos; $p = $this->scale->ticks->ticks_pos; if( $this->scale->name == 'lin' ) { $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0])); } else { $step=9; } $n = round(count($pmin)/$step); $i = 0; $this->img->SetColor($this->gridmajor_color); $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; $off = $r; $i=0; $r = $pmin[$i*$step]; while( $r < $limit && $i < $n ) { $r = $pmin[$i*$step]; $this->img->Circle($x,$pos,$r); $i++; } } // Draw angles if( $this->show_angle_grid ) { $this->img->SetColor($this->angle_color); $d = max($this->img->plotheight,$this->img->plotwidth)*1.4 ; $a = 0; $p = $this->scale->ticks->ticks_pos; $start_radius = $p[1]-$x; while( $a < 360 ) { if( $a == 90 || $a == 270 ) { // Make sure there are no rounding problem with // exactly vertical lines $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, $pos-$start_radius*sin($a/180*M_PI), $x+$start_radius*cos($a/180*M_PI)+1, $pos-$d*sin($a/180*M_PI)); } else { $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, $pos-$start_radius*sin($a/180*M_PI), $x+$d*cos($a/180*M_PI), $pos-$d*sin($a/180*M_PI)); } $a += $this->angle_step; } } } function StrokeAngleLabels($pos,$type) { if( !$this->show_angle_label ) return; $x0 = round($this->img->left_margin+$this->img->plotwidth/2)+1; $d = max($this->img->plotwidth,$this->img->plotheight)*1.42; $a = $this->angle_step; $t = new Text(); $t->SetColor($this->angle_fontcolor); $t->SetFont($this->angle_fontfam,$this->angle_fontstyle,$this->angle_fontsize); $xright = $this->img->width - $this->img->right_margin; $ytop = $this->img->top_margin; $xleft = $this->img->left_margin; $ybottom = $this->img->height - $this->img->bottom_margin; $ha = 'left'; $va = 'center'; $w = $this->img->plotwidth/2; $h = $this->img->plotheight/2; $xt = $x0; $yt = $pos; $margin=5; $tl = $this->angle_tick_len ; // Outer len $tl2 = $this->angle_tick_len2 ; // Interior len $this->img->SetColor($this->angle_tick_color); $rot90 = $this->img->a == 90 ; if( $type == POLAR_360 ) { $ca1 = atan($h/$w)/M_PI*180; $ca2 = 180-$ca1; $ca3 = $ca1+180; $ca4 = 360-$ca1; $end = 360; while( $a < $end ) { $ca = cos($a/180*M_PI); $sa = sin($a/180*M_PI); $x = $d*$ca; $y = $d*$sa; $xt=1000;$yt=1000; if( $a <= $ca1 || $a >= $ca4 ) { $yt = $pos - $w * $y/$x; $xt = $xright + $margin; if( $rot90 ) { $ha = 'center'; $va = 'top'; } else { $ha = 'left'; $va = 'center'; } $x1=$xright-$tl2; $x2=$xright+$tl; $y1=$y2=$yt; } elseif( $a > $ca1 && $a < $ca2 ) { $xt = $x0 + $h * $x/$y; $yt = $ytop - $margin; if( $rot90 ) { $ha = 'left'; $va = 'center'; } else { $ha = 'center'; $va = 'bottom'; } $y1=$ytop+$tl2;$y2=$ytop-$tl; $x1=$x2=$xt; } elseif( $a >= $ca2 && $a <= $ca3 ) { $yt = $pos + $w * $y/$x; $xt = $xleft - $margin; if( $rot90 ) { $ha = 'center'; $va = 'bottom'; } else { $ha = 'right'; $va = 'center'; } $x1=$xleft+$tl2;$x2=$xleft-$tl; $y1=$y2=$yt; } else { $xt = $x0 - $h * $x/$y; $yt = $ybottom + $margin; if( $rot90 ) { $ha = 'right'; $va = 'center'; } else { $ha = 'center'; $va = 'top'; } $y1=$ybottom-$tl2;$y2=$ybottom+$tl; $x1=$x2=$xt; } if( $a != 0 && $a != 180 ) { $t->Align($ha,$va); if( $this->show_angle_mark ) $a .= '°'; $t->Set($a); $t->Stroke($this->img,$xt,$yt); if( $this->show_angle_tick ) $this->img->Line($x1,$y1,$x2,$y2); } $a += $this->angle_step; } } else { // POLAR_HALF $ca1 = atan($h/$w*2)/M_PI*180; $ca2 = 180-$ca1; $end = 180; while( $a < $end ) { $ca = cos($a/180*M_PI); $sa = sin($a/180*M_PI); $x = $d*$ca; $y = $d*$sa; if( $a <= $ca1 ) { $yt = $pos - $w * $y/$x; $xt = $xright + $margin; if( $rot90 ) { $ha = 'center'; $va = 'top'; } else { $ha = 'left'; $va = 'center'; } $x1=$xright-$tl2; $x2=$xright+$tl; $y1=$y2=$yt; } elseif( $a > $ca1 && $a < $ca2 ) { $xt = $x0 + 2*$h * $x/$y; $yt = $ytop - $margin; if( $rot90 ) { $ha = 'left'; $va = 'center'; } else { $ha = 'center'; $va = 'bottom'; } $y1=$ytop+$tl2;$y2=$ytop-$tl; $x1=$x2=$xt; } elseif( $a >= $ca2 ) { $yt = $pos + $w * $y/$x; $xt = $xleft - $margin; if( $rot90 ) { $ha = 'center'; $va = 'bottom'; } else { $ha = 'right'; $va = 'center'; } $x1=$xleft+$tl2;$x2=$xleft-$tl; $y1=$y2=$yt; } $t->Align($ha,$va); if( $this->show_angle_mark ) $a .= '°'; $t->Set($a); $t->Stroke($this->img,$xt,$yt); if( $this->show_angle_tick ) $this->img->Line($x1,$y1,$x2,$y2); $a += $this->angle_step; } } } function Stroke($pos) { $this->img->SetLineWeight($this->weight); $this->img->SetColor($this->color); $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); if( !$this->hide_line ) $this->img->FilledRectangle($this->img->left_margin,$pos, $this->img->width-$this->img->right_margin,$pos+$this->weight-1); $y=$pos+$this->img->GetFontHeight()+$this->title_margin+$this->title->margin; if( $this->title_adjust=="high" ) $this->title->Pos($this->img->width-$this->img->right_margin,$y,"right","top"); elseif( $this->title_adjust=="middle" || $this->title_adjust=="center" ) $this->title->Pos(($this->img->width-$this->img->left_margin- $this->img->right_margin)/2+$this->img->left_margin, $y,"center","top"); elseif($this->title_adjust=="low") $this->title->Pos($this->img->left_margin,$y,"left","top"); else { JpGraphError::RaiseL(17002,$this->title_adjust); //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); } if (!$this->hide_labels) { $this->StrokeLabels($pos,false); } $this->img->SetColor($this->radius_tick_color); $this->scale->ticks->Stroke($this->img,$this->scale,$pos); // // Mirror the positions for the left side of the scale // $mid = 2*($this->img->left_margin+$this->img->plotwidth/2); $n = count($this->scale->ticks->ticks_pos); $i=0; while( $i < $n ) { $this->scale->ticks->ticks_pos[$i] = $mid-$this->scale->ticks->ticks_pos[$i] ; ++$i; } $n = count($this->scale->ticks->maj_ticks_pos); $i=0; while( $i < $n ) { $this->scale->ticks->maj_ticks_pos[$i] = $mid-$this->scale->ticks->maj_ticks_pos[$i] ; ++$i; } $n = count($this->scale->ticks->maj_ticklabels_pos); $i=1; while( $i < $n ) { $this->scale->ticks->maj_ticklabels_pos[$i] = $mid-$this->scale->ticks->maj_ticklabels_pos[$i] ; ++$i; } // Draw the left side of the scale $n = count($this->scale->ticks->ticks_pos); $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMinTickAbsSize(); // Minor ticks if( ! $this->scale->ticks->supress_minor_tickmarks ) { $i=1; while( $i < $n/2 ) { $x = round($this->scale->ticks->ticks_pos[$i]) ; $this->img->Line($x,$pos,$x,$yu); ++$i; } } $n = count($this->scale->ticks->maj_ticks_pos); $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMajTickAbsSize(); // Major ticks if( ! $this->scale->ticks->supress_tickmarks ) { $i=1; while( $i < $n/2 ) { $x = round($this->scale->ticks->maj_ticks_pos[$i]) ; $this->img->Line($x,$pos,$x,$yu); ++$i; } } if (!$this->hide_labels) { $this->StrokeLabels($pos,false); } $this->title->Stroke($this->img); } } class PolarScale extends LinearScale { var $graph; function PolarScale($aMax=0,&$graph) { parent::LinearScale(0,$aMax,'x'); $this->graph = &$graph; } function _Translate($v) { return parent::Translate($v); } function PTranslate($aAngle,$aRad) { $m = $this->scale[1]; $w = $this->graph->img->plotwidth/2; $aRad = $aRad/$m*$w; $x = cos( $aAngle/180 * M_PI ) * $aRad; $y = sin( $aAngle/180 * M_PI ) * $aRad; $x += $this->_Translate(0); if( $this->graph->iType == POLAR_360 ) { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; } else { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; } return array($x,$y); } } class PolarLogScale extends LogScale { var $graph; function PolarLogScale($aMax=1,&$graph) { parent::LogScale(0,$aMax,'x'); $this->graph = &$graph; $this->ticks->SetLabelLogType(LOGLABELS_MAGNITUDE); } function PTranslate($aAngle,$aRad) { if( $aRad == 0 ) $aRad = 1; $aRad = log10($aRad); $m = $this->scale[1]; $w = $this->graph->img->plotwidth/2; $aRad = $aRad/$m*$w; $x = cos( $aAngle/180 * M_PI ) * $aRad; $y = sin( $aAngle/180 * M_PI ) * $aRad; $x += $w+$this->graph->img->left_margin;//$this->_Translate(0); if( $this->graph->iType == POLAR_360 ) { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; } else { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; } return array($x,$y); } } class PolarGraph extends Graph { var $scale; var $iType=POLAR_360; var $axis; function PolarGraph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { parent::Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) ; $this->SetDensity(TICKD_DENSE); $this->SetBox(); $this->SetMarginColor('white'); } function SetDensity($aDense) { $this->SetTickDensity(TICKD_NORMAL,$aDense); } function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { $adj = ($this->img->height - $this->img->width)/2; $this->SetAngle(90); $this->img->SetMargin($lm-$adj,$rm-$adj,$tm+$adj,$bm+$adj); $this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2)); $this->axis->SetLabelAlign('right','center'); //JpGraphError::Raise('Set90AndMargin() is not supported for polar graphs.'); } function SetScale($aScale,$rmax=0) { if( $aScale == 'lin' ) $this->scale = new PolarScale($rmax,$this); elseif( $aScale == 'log' ) { $this->scale = new PolarLogScale($rmax,$this); } else { JpGraphError::RaiseL(17004);//('Unknown scale type for polar graph. Must be "lin" or "log"'); } $this->axis = new PolarAxis($this->img,$this->scale); $this->SetMargin(40,40,50,40); } function SetType($aType) { $this->iType = $aType; } function SetPlotSize($w,$h) { $this->SetMargin(($this->img->width-$w)/2,($this->img->width-$w)/2, ($this->img->height-$h)/2,($this->img->height-$h)/2); } // Private methods function GetPlotsMax() { $n = count($this->plots); $m = $this->plots[0]->Max(); $i=1; while($i < $n) { $m = max($this->plots[$i]->Max(),$m); ++$i; } return $m; } function Stroke($aStrokeFileName="") { // Start by adjusting the margin so that potential titles will fit. $this->AdjustMarginsForTitles(); // If the filename is the predefined value = '_csim_special_' // we assume that the call to stroke only needs to do enough // to correctly generate the CSIM maps. // We use this variable to skip things we don't strictly need // to do to generate the image map to improve performance // a best we can. Therefor you will see a lot of tests !$_csim in the // code below. $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); // We need to know if we have stroked the plot in the // GetCSIMareas. Otherwise the CSIM hasn't been generated // and in the case of GetCSIM called before stroke to generate // CSIM without storing an image to disk GetCSIM must call Stroke. $this->iHasStroked = true; //Check if we should autoscale axis if( !$this->scale->IsSpecified() && count($this->plots)>0 ) { $max = $this->GetPlotsMax(); $t1 = $this->img->plotwidth; $this->img->plotwidth /= 2; $t2 = $this->img->left_margin; $this->img->left_margin += $this->img->plotwidth+1; $this->scale->AutoScale($this->img,0,$max, $this->img->plotwidth/$this->xtick_factor/2); $this->img->plotwidth = $t1; $this->img->left_margin = $t2; } else { // The tick calculation will use the user suplied min/max values to determine // the ticks. If auto_ticks is false the exact user specifed min and max // values will be used for the scale. // If auto_ticks is true then the scale might be slightly adjusted // so that the min and max values falls on an even major step. //$min = 0; $max = $this->scale->scale[1]; $t1 = $this->img->plotwidth; $this->img->plotwidth /= 2; $t2 = $this->img->left_margin; $this->img->left_margin += $this->img->plotwidth+1; $this->scale->AutoScale($this->img,0,$max, $this->img->plotwidth/$this->xtick_factor/2); $this->img->plotwidth = $t1; $this->img->left_margin = $t2; } if( $this->iType == POLAR_180 ) $pos = $this->img->height - $this->img->bottom_margin; else $pos = $this->img->plotheight/2 + $this->img->top_margin; if( !$_csim ) { $this->StrokePlotArea(); } $this->iDoClipping = true; if( $this->iDoClipping ) { $oldimage = $this->img->CloneCanvasH(); } if( !$_csim ) { $this->axis->StrokeGrid($pos); } // Stroke all plots for Y1 axis for($i=0; $i < count($this->plots); ++$i) { $this->plots[$i]->Stroke($this->img,$this->scale); } if( $this->iDoClipping ) { // Clipping only supports graphs at 0 and 90 degrees if( $this->img->a == 0 ) { $this->img->CopyCanvasH($oldimage,$this->img->img, $this->img->left_margin,$this->img->top_margin, $this->img->left_margin,$this->img->top_margin, $this->img->plotwidth+1,$this->img->plotheight+1); } elseif( $this->img->a == 90 ) { $adj = round(($this->img->height - $this->img->width)/2); $this->img->CopyCanvasH($oldimage,$this->img->img, $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, $this->img->plotheight,$this->img->plotwidth); } $this->img->Destroy(); $this->img->SetCanvasH($oldimage); } if( !$_csim ) { $this->axis->Stroke($pos); $this->axis->StrokeAngleLabels($pos,$this->iType); } if( !$_csim ) { $this->StrokePlotBox(); $this->footer->Stroke($this->img); // The titles and legends never gets rotated so make sure // that the angle is 0 before stroking them $aa = $this->img->SetAngle(0); $this->StrokeTitles(); } for($i=0; $i < count($this->plots) ; ++$i ) { $this->plots[$i]->Legend($this); } $this->legend->Stroke($this->img); if( !$_csim ) { $this->StrokeTexts(); $this->img->SetAngle($aa); // Draw an outline around the image map if(_JPG_DEBUG) $this->DisplayClientSideaImageMapAreas(); // Adjust the appearance of the image $this->AdjustSaturationBrightnessContrast(); // If the filename is given as the special "__handle" // then the image handler is returned and the image is NOT // streamed back if( $aStrokeFileName == _IMG_HANDLER ) { return $this->img->img; } else { // Finally stream the generated picture $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, $aStrokeFileName); } } } } ?> --- NEW FILE: jpgraph_antispam-digits.php --- <?php //======================================================================= // File: JPGRAPH_ANTISPAM.PHP // Description: Genarate anti-spam challenge // Created: 2004-10-07 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_antispam-digits.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== class HandDigits { var $digits_thumb30x30 = array(); var $iHeight=30, $iWidth=30; function HandDigits() { //========================================================== // d6-small.jpg //========================================================== $this->digits['6'][0]= 645 ; $this->digits['6'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; //========================================================== // d2-small.jpg //========================================================== $this->digits['2'][0]= 606 ; $this->digits['2'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. 'DLZ6f//Z' ; //========================================================== // d9-small.jpg //========================================================== $this->digits['9'][0]= 680 ; $this->digits['9'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. '1V1//9k=' ; //========================================================== // d5-small.jpg //========================================================== $this->digits['5'][0]= 632 ; $this->digits['5'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; //========================================================== // d1-small.jpg //========================================================== $this->digits['1'][0]= 646 ; $this->digits['1'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; //========================================================== // d8-small.jpg //========================================================== $this->digits['8'][0]= 694 ; $this->digits['8'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. 'EylmLHQltptPZKQOBo1FzH//2Q==' ; //========================================================== // d4-small.jpg //========================================================== $this->digits['4'][0]= 643 ; $this->digits['4'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; //========================================================== // d7-small.jpg //========================================================== $this->digits['7'][0]= 658 ; $this->digits['7'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; //========================================================== // d3-small.jpg //========================================================== $this->digits['3'][0]= 662 ; $this->digits['3'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; } } class AntiSpam { var $iNumber=''; function AntiSpam($aNumber='') { $this->iNumber = $aNumber; } function Rand($aLen) { $d=''; for($i=0; $i < $aLen; ++$i) { $d .= rand(1,9); } $this->iNumber = $d; return $d; } function Stroke() { $n=strlen($this->iNumber); for($i=0; $i < $n; ++$i ) { if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) { return false; } } $dd = new HandDigits(); $n = strlen($this->iNumber); $img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight); if( $img < 1 ) { return false; } $start=0; for($i=0; $i < $n; ++$i ) { $size = $dd->digits[$this->iNumber[$i]][0]; $dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1])); imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight); $start += imagesx($dimg); } $resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4); if( $resimg < 1 ) { return false; } imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight); header("Content-type: image/jpeg"); imagejpeg($resimg); return true; } } ?> --- NEW FILE: jpgraph_radar.php --- <?php /*======================================================================= // File: JPGRAPH_RADAR.PHP // Description: Radar plot extension for JpGraph // Created: 2001-02-04 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_radar.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ require_once('jpgraph_plotmark.inc'); class RadarLogTicks extends Ticks { //--------------- // CONSTRUCTOR function RadarLogTicks() { } //--------------- // PUBLIC METHODS // TODO: Add Argument grid function Stroke(&$aImg,&$grid,$aPos,$aAxisAngle,&$aScale,&$aMajPos,&$aMajLabel) { $start = $aScale->GetMinVal(); $limit = $aScale->GetMaxVal(); $nextMajor = 10*$start; $step = $nextMajor / 10.0; $count=1; $ticklen_maj=5; $dx_maj=round(sin($aAxisAngle)*$ticklen_maj); $dy_maj=round(cos($aAxisAngle)*$ticklen_maj); $ticklen_min=3; $dx_min=round(sin($aAxisAngle)*$ticklen_min); $dy_min=round(cos($aAxisAngle)*$ticklen_min); $aMajPos=array(); $aMajLabel=array(); if( $this->supress_first ) $aMajLabel[]=""; else $aMajLabel[]=$start; $yr=$aScale->RelTranslate($start); $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($yr*sin($aAxisAngle)); $aMajPos[]=$xt+2*$dx_maj; $aMajPos[]=$yt-$aImg->GetFontheight()/2; $grid[]=$xt; $grid[]=$yt; $aImg->SetLineWeight($this->weight); for($y=$start; $y<=$limit; $y+=$step,++$count ) { $yr=$aScale->RelTranslate($y); $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($yr*sin($aAxisAngle)); if( $count % 10 == 0 ) { $grid[]=$xt; $grid[]=$yt; $aMajPos[]=$xt+2*$dx_maj; $aMajPos[]=$yt-$aImg->GetFontheight()/2; if( !$this->supress_tickmarks ) { if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); $aImg->Line($xt+$dx_maj,$yt+$dy_maj,$xt-$dx_maj,$yt-$dy_maj); if( $this->majcolor!="" ) $aImg->PopColor(); } if( $this->label_formfunc != "" ) { $f=$this->label_formfunc; $l = call_user_func($f,$nextMajor); } else $l = $nextMajor; $aMajLabel[]=$l; $nextMajor *= 10; $step *= 10; $count=1; } else if( !$this->supress_minor_tickmarks ) { if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); $aImg->Line($xt+$dx_min,$yt+$dy_min,$xt-$dx_min,$yt-$dy_min); if( $this->mincolor!="" ) $aImg->PopColor(); } } } } class RadarLinearTicks extends LinearTicks { //--------------- // CONSTRUCTOR function RadarLinearTicks() { // Empty } //--------------- // PUBLIC METHODS // TODO: Add argument grid function Stroke(&$aImg,&$grid,$aPos,$aAxisAngle,&$aScale,&$aMajPos,&$aMajLabel) { // Prepare to draw linear ticks $maj_step_abs = abs($aScale->scale_factor*$this->major_step); $min_step_abs = abs($aScale->scale_factor*$this->minor_step); $nbrmaj = floor(($aScale->world_abs_size)/$maj_step_abs); $nbrmin = floor(($aScale->world_abs_size)/$min_step_abs); $skip = round($nbrmin/$nbrmaj); // Don't draw minor ontop of major // Draw major ticks $ticklen2=$this->major_abs_size; $dx=round(sin($aAxisAngle)*$ticklen2); $dy=round(cos($aAxisAngle)*$ticklen2); $label=$aScale->scale[0]+$this->major_step; $aImg->SetLineWeight($this->weight); for($i=1; $i<=$nbrmaj; ++$i) { $xt=round($i*$maj_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($i*$maj_step_abs*sin($aAxisAngle)); if( $this->label_formfunc != "" ) { $f=$this->label_formfunc; $l = call_user_func($f,$label); } else $l = $label; $aMajLabel[]=$l; $label += $this->major_step; $grid[]=$xt; $grid[]=$yt; $aMajPos[($i-1)*2]=$xt+2*$dx; $aMajPos[($i-1)*2+1]=$yt-$aImg->GetFontheight()/2; if( !$this->supress_tickmarks ) { if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); if( $this->majcolor!="" ) $aImg->PopColor(); } } // Draw minor ticks $ticklen2=$this->minor_abs_size; $dx=round(sin($aAxisAngle)*$ticklen2); $dy=round(cos($aAxisAngle)*$ticklen2); if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); for($i=1; $i<=$nbrmin; ++$i) { if( ($i % $skip) == 0 ) continue; $xt=round($i*$min_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($i*$min_step_abs*sin($aAxisAngle)); $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); } if( $this->mincolor!="" ) $aImg->PopColor(); } } } //=================================================== // CLASS RadarAxis // Description: Implements axis for the radar graph //=================================================== class RadarAxis extends Axis { var $title_color="navy"; var $title=null; //--------------- // CONSTRUCTOR function RadarAxis(&$img,&$aScale,$color=array(0,0,0)) { parent::Axis($img,$aScale,$color); $this->len=$img->plotheight; $this->title = new Text(); $this->title->SetFont(FF_FONT1,FS_BOLD); $this->color = array(0,0,0); } //--------------- // PUBLIC METHODS function SetTickLabels($l) { $this->ticks_label = $l; } // Stroke the axis // $pos = Vertical position of axis // $aAxisAngle = Axis angle // $grid = Returns an array with positions used to draw the grid // $lf = Label flag, TRUE if the axis should have labels function Stroke($pos,$aAxisAngle,&$grid,$title,$lf) { $this->img->SetColor($this->color); // Determine end points for the axis $x=round($this->scale->world_abs_size*cos($aAxisAngle)+$this->scale->scale_abs[0]); $y=round($pos-$this->scale->world_abs_size*sin($aAxisAngle)); // Draw axis $this->img->SetColor($this->color); $this->img->SetLineWeight($this->weight); if( !$this->hide ) $this->img->Line($this->scale->scale_abs[0],$pos,$x,$y); $this->scale->ticks->Stroke($this->img,$grid,$pos,$aAxisAngle,$this->scale,$majpos,$majlabel); // Draw labels if( $lf && !$this->hide ) { $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); $this->img->SetTextAlign("left","top"); $this->img->SetColor($this->label_color); // majpos contains (x,y) coordinates for labels if( ! $this->hide_labels ) { $n = floor(count($majpos)/2); for($i=0; $i < $n; ++$i) { if( $this->ticks_label != null && isset($this->ticks_label[$i]) ) $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$this->ticks_label[$i]); else $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$majlabel[$i]); } } } $this->_StrokeAxisTitle($pos,$aAxisAngle,$title); } //--------------- // PRIVATE METHODS function _StrokeAxisTitle($pos,$aAxisAngle,$title) { $this->title->Set($title); $marg=6+$this->title->margin; $xt=round(($this->scale->world_abs_size+$marg)*cos($aAxisAngle)+$this->scale->scale_abs[0]); $yt=round($pos-($this->scale->world_abs_size+$marg)*sin($aAxisAngle)); // Position the axis title. // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text // that intersects with the extension of the corresponding axis. The code looks a little // bit messy but this is really the only way of having a reasonable position of the // axis titles. if( $this->title->iWordwrap > 0 ) { $title = wordwrap($title,$this->title->iWordwrap,"\n"); } $h=$this->img->GetTextHeight($title)*1.2; $w=$this->img->GetTextWidth($title)*1.2; while( $aAxisAngle > 2*M_PI ) $aAxisAngle -= 2*M_PI; if( $aAxisAngle>=7*M_PI/4 || $aAxisAngle <= M_PI/4 ) $dx=0; if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dx=($aAxisAngle-M_PI/4)*2/M_PI; if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dx=1; if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dx=(1-($aAxisAngle-M_PI*5/4)*2/M_PI); if( $aAxisAngle>=7*M_PI/4 ) $dy=(($aAxisAngle-M_PI)-3*M_PI/4)*2/M_PI; if( $aAxisAngle<=M_PI/4 ) $dy=(1-$aAxisAngle*2/M_PI); if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dy=1; if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dy=(1-($aAxisAngle-3*M_PI/4)*2/M_PI); if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dy=0; if( !$this->hide ) { $this->title->Stroke($this->img,$xt-$dx*$w,$yt-$dy*$h,$title); } } } // Class //=================================================== // CLASS RadarGrid // Description: Draws grid for the radar graph //=================================================== class RadarGrid extends Grid { //------------ // CONSTRUCTOR function RadarGrid() { } //---------------- // PRIVATE METHODS function Stroke(&$img,&$grid) { if( !$this->show ) return; $nbrticks = count($grid[0])/2; $nbrpnts = count($grid); $img->SetColor($this->grid_color); $img->SetLineWeight($this->weight); for($i=0; $i<$nbrticks; ++$i) { for($j=0; $j<$nbrpnts; ++$j) { $pnts[$j*2]=$grid[$j][$i*2]; $pnts[$j*2+1]=$grid[$j][$i*2+1]; } for($k=0; $k<$nbrpnts; ++$k ){ $l=($k+1)%$nbrpnts; if( $this->type == "solid" ) $img->Line($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1]); elseif( $this->type == "dotted" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],1,6); elseif( $this->type == "dashed" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],2,4); elseif( $this->type == "longdashed" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],8,6); } $pnts=array(); } } } // Class //=================================================== // CLASS RadarPlot // Description: Plot a radarplot //=================================================== class RadarPlot { var $data=array(); var $fill=false, $fill_color=array(200,170,180); var $color=array(0,0,0); var $legend=""; var $weight=1; var $linestyle='solid'; var $mark=null; //--------------- // CONSTRUCTOR function RadarPlot($data) { $this->data = $data; $this->mark = new PlotMark(); } //--------------- // PUBLIC METHODS function Min() { return Min($this->data); } function Max() { return Max($this->data); } function SetLegend($legend) { $this->legend=$legend; } function SetLineStyle($aStyle) { $this->linestyle=$aStyle; } function SetLineWeight($w) { $this->weight=$w; } function SetFillColor($aColor) { $this->fill_color = $aColor; $this->fill = true; } function SetFill($f=true) { $this->fill = $f; } function SetColor($aColor,$aFillColor=false) { $this->color = $aColor; if( $aFillColor ) { $this->SetFillColor($aFillColor); $this->fill = true; } } function GetCSIMareas() { JpGraphError::RaiseL(18001); //("Client side image maps not supported for RadarPlots."); } function Stroke(&$img, $pos, &$scale, $startangle) { $nbrpnts = count($this->data); $astep=2*M_PI/$nbrpnts; $a=$startangle; // Rotate each point to the correct axis-angle // TODO: Update for LogScale for($i=0; $i<$nbrpnts; ++$i) { //$c=$this->data[$i]; $cs=$scale->RelTranslate($this->data[$i]); $x=round($cs*cos($a)+$scale->scale_abs[0]); $y=round($pos-$cs*sin($a)); /* $c=log10($c); $x=round(($c-$scale->scale[0])*$scale->scale_factor*cos($a)+$scale->scale_abs[0]); $y=round($pos-($c-$scale->scale[0])*$scale->scale_factor*sin($a)); */ $pnts[$i*2]=$x; $pnts[$i*2+1]=$y; $a += $astep; } if( $this->fill ) { $img->SetColor($this->fill_color); $img->FilledPolygon($pnts); } $img->SetLineWeight($this->weight); $img->SetColor($this->color); $img->SetLineStyle($this->linestyle); $pnts[]=$pnts[0]; $pnts[]=$pnts[1]; $img->Polygon($pnts); $img->SetLineStyle('solid'); // Reset line style to default // Add plotmarks on top if( $this->mark->show ) { for($i=0; $i < $nbrpnts; ++$i) { $this->mark->Stroke($img,$pnts[$i*2],$pnts[$i*2+1]); } } } //--------------- // PRIVATE METHODS function GetCount() { return count($this->data); } function Legend(&$graph) { if( $this->legend=="" ) return; if( $this->fill ) $graph->legend->Add($this->legend,$this->fill_color,$this->mark); else $graph->legend->Add($this->legend,$this->color,$this->mark); } } // Class //=================================================== // CLASS RadarGraph // Description: Main container for a radar graph //=================================================== class RadarGraph extends Graph { var $posx; var $posy; var $len; var $plots=null, $axis_title=null; var $grid,$axis=null; //--------------- // CONSTRUCTOR function RadarGraph($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { $this->Graph($width,$height,$cachedName,$timeout,$inline); $this->posx=$width/2; $this->posy=$height/2; $this->len=min($width,$height)*0.35; $this->SetColor(array(255,255,255)); $this->SetTickDensity(TICKD_NORMAL); $this->SetScale("lin"); $this->SetGridDepth(DEPTH_FRONT); } //--------------- // PUBLIC METHODS function SupressTickMarks($f=true) { if( ERR_DEPRECATED ) JpGraphError::RaiseL(18002); //('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.'); $this->axis->scale->ticks->SupressTickMarks($f); } function HideTickMarks($aFlag=true) { $this->axis->scale->ticks->SupressTickMarks($aFlag); } function ShowMinorTickmarks($aFlag=true) { $this->yscale->ticks->SupressMinorTickMarks(!$aFlag); } function SetScale($axtype,$ymin=1,$ymax=1) { if( $axtype != "lin" && $axtype != "log" ) { JpGraphError::RaiseL(18003,$axtype); //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); } if( $axtype=="lin" ) { $this->yscale = & new LinearScale($ymin,$ymax); $this->yscale->ticks = & new RadarLinearTicks(); $this->yscale->ticks->SupressMinorTickMarks(); } elseif( $axtype=="log" ) { $this->yscale = & new LogScale($ymin,$ymax); $this->yscale->ticks = & new RadarLogTicks(); } $this->axis = & new RadarAxis($this->img,$this->yscale); $this->grid = & new RadarGrid(); } function SetSize($aSize) { if( $aSize < 0.1 || $aSize>1 ) JpGraphError::RaiseL(18004,$aSize); //("Radar Plot size must be between 0.1 and 1. (Your value=$s)"); $this->len=min($this->img->width,$this->img->height)*$aSize/2; } function SetPlotSize($aSize) { $this->SetSize($aSize); } function SetTickDensity($densy=TICKD_NORMAL) { $this->ytick_factor=25; switch( $densy ) { case TICKD_DENSE: $this->ytick_factor=12; break; case TICKD_NORMAL: $this->ytick_factor=25; break; case TICKD_SPARSE: $this->ytick_factor=40; break; case TICKD_VERYSPARSE: $this->ytick_factor=70; break; default: JpGraphError::RaiseL(18005,$densy); //("RadarPlot Unsupported Tick density: $densy"); } } function SetPos($px,$py=0.5) { $this->SetCenter($px,$py); } function SetCenter($px,$py=0.5) { assert($px > 0 && $py > 0 ); $this->posx=$this->img->width*$px; $this->posy=$this->img->height*$py; } function SetColor($c) { $this->SetMarginColor($c); } function SetTitles($title) { $this->axis_title = $title; } function Add(&$splot) { $this->plots[]=$splot; } function GetPlotsYMinMax() { $min=$this->plots[0]->Min(); $max=$this->plots[0]->Max(); foreach( $this->plots as $p ) { $max=max($max,$p->Max()); $min=min($min,$p->Min()); } if( $min < 0 ) JpGraphError::RaiseL(18006,$min); //("Minimum data $min (Radar plots should only be used when all data points > 0)"); return array($min,$max); } // Stroke the Radar graph function Stroke($aStrokeFileName="") { $n = count($this->plots); // Set Y-scale if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) { list($min,$max) = $this->GetPlotsYMinMax(); $this->yscale->AutoScale($this->img,0,$max,$this->len/$this->ytick_factor); } // Set start position end length of scale (in absolute pixels) $this->yscale->SetConstants($this->posx,$this->len); // We need as many axis as there are data points $nbrpnts=$this->plots[0]->GetCount(); // If we have no titles just number the axis 1,2,3,... if( $this->axis_title==null ) { for($i=0; $i < $nbrpnts; ++$i ) $this->axis_title[$i] = $i+1; } elseif(count($this->axis_title)<$nbrpnts) JpGraphError::RaiseL(18007); //("Number of titles does not match number of points in plot."); for($i=0; $i < $n; ++$i ) if( $nbrpnts != $this->plots[$i]->GetCount() ) JpGraphError::RaiseL(18008); //("Each radar plot must have the same number of data points."); if( $this->background_image != "" ) { $this->StrokeFrameBackground(); } else { $this->StrokeFrame(); } $astep=2*M_PI/$nbrpnts; // Prepare legends for($i=0; $i < $n; ++$i) $this->plots[$i]->Legend($this); $this->legend->Stroke($this->img); $this->footer->Stroke($this->img); if( $this->grid_depth == DEPTH_BACK ) { // Draw axis and grid for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); } } // Plot points $a=M_PI/2; for($i=0; $i < $n; ++$i ) $this->plots[$i]->Stroke($this->img, $this->posy, $this->yscale, $a); if( $this->grid_depth != DEPTH_BACK ) { // Draw axis and grid for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); } } $this->grid->Stroke($this->img,$grid); $this->StrokeTitles(); // Stroke texts if( $this->texts != null ) { foreach( $this->texts as $t) $t->Stroke($this->img); } // Should we do any final image transformation if( $this->iImgTrans ) { if( !class_exists('ImgTrans') ) { require_once('jpgraph_imgtrans.php'); } $tform = new ImgTrans($this->img->img); $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, $this->iImgTransDirection,$this->iImgTransHighQ, $this->iImgTransMinSize,$this->iImgTransFillColor, $this->iImgTransBorder); } // If the filename is given as the special "__handle" // then the image handler is returned and the image is NOT // streamed back if( $aStrokeFileName == _IMG_HANDLER ) { return $this->img->img; } else { // Finally stream the generated picture $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, $aStrokeFileName); } } } // Class /* EOF */ ?> --- NEW FILE: imgdata_diamonds.inc --- <?php //======================================================================= // File: IMGDATA_DIAMONDS.INC // Description: Base64 encoded images for diamonds // Created: 2003-03-20 // Author: Johan Persson (jo...@ad...) // Ver: $Id: imgdata_diamonds.inc,v 1.1 2006/04/27 11:33:02 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== class ImgData_Diamonds extends ImgData { var $name = 'Diamonds'; var $an = array(MARK_IMG_DIAMOND =>'imgdata'); var $colors = array('lightblue','darkblue','gray', 'blue','pink','purple','red','yellow'); var $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6, 'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3); var $maxidx = 7 ; var $imgdata ; function ImgData_Diamonds() { //========================================================== // File: diam_red.png //========================================================== $this->imgdata[0][0]= 668 ; $this->imgdata[0][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. 'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'. 'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'. 'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'. 'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'. 'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'. 'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'. 'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'. 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. 'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'. '1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'. 'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'. '/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'. 'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'. '+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'. 'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'. 'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'. 'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ; //========================================================== // File: diam_pink.png //========================================================== $this->imgdata[1][0]= 262 ; $this->imgdata[1][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. 'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'. 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. 'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. '==' ; //========================================================== // File: diam_blue.png //========================================================== $this->imgdata[2][0]= 662 ; $this->imgdata[2][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'. 'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'. 'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'. 'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'. 'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'. '/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'. 'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'. '9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'. 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. 'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'. 'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'. 'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'. 'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'. 'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'. '6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'. 'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'. '5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'. 'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ; //========================================================== // File: diam_yellow.png //========================================================== $this->imgdata[3][0]= 262 ; $this->imgdata[3][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. 'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'. 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. 'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. '==' ; //========================================================== // File: diam_lightblue.png //========================================================== $this->imgdata[4][0]= 671 ; $this->imgdata[4][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'. 'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'. '//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'. '8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'. '//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'. '8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'. '1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'. '+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'. 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. 'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'. 'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'. 'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'. 'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'. 'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'. 'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'. 'oVR374mRqUELZYosf... [truncated message content] |
Update of /cvsroot/moregroupware/mgw/include/jpgraph2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10567/jpgraph2 Added Files: QPL.txt VERSION imgdata_balls.inc imgdata_bevels.inc imgdata_diamonds.inc imgdata_pushpins.inc imgdata_squares.inc imgdata_stars.inc jpg-config.inc.php jpgraph.php jpgraph_antispam-digits.php jpgraph_antispam.php jpgraph_bar.php jpgraph_canvas.php jpgraph_canvtools.php jpgraph_date.php jpgraph_error.php jpgraph_gantt.php jpgraph_gb2312.php jpgraph_gradient.php jpgraph_iconplot.php jpgraph_imgtrans.php jpgraph_line.php jpgraph_log.php jpgraph_pie.php jpgraph_pie3d.php jpgraph_plotband.php jpgraph_plotmark.inc.php jpgraph_polar.php jpgraph_radar.php jpgraph_regstat.php jpgraph_scatter.php jpgraph_stock.php jpgraph_utils.inc.php Log Message: Added seperate JPGraph 1.x and 2.x libraries --- NEW FILE: jpgraph_polar.php --- <?php /*======================================================================= // File: JPGRAPH_POLAR.PHP // Description: Polar plot extension for JpGraph // Created: 2003-02-02 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_polar.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ require_once ('jpgraph_plotmark.inc.php'); require_once "jpgraph_log.php"; DEFINE('POLAR_360',1); DEFINE('POLAR_180',2); // // Note. Don't attempt to make sense of this code. // In order not to have to be able to inherit the scaling code // from the main graph package we have had to make some "tricks" since // the original scaling and axis was not designed to do what is // required here. // There were two option. 1: Re-implement everything and get a clean design // and 2: do some "small" trickery and be able to inherit most of // the functionlity from the main graph package. // We choose 2: here in order to save some time. // //-------------------------------------------------------------------------- // class PolarPlot //-------------------------------------------------------------------------- class PolarPlot { public $line_style='solid',$mark; public $legendcsimtarget=''; public $legendcsimalt=''; public $legend=""; public $csimtargets=array(); // Array of targets for CSIM public $csimareas=""; // Resultant CSIM area tags public $csimalts=null; // ALT:s for corresponding target public $scale=null; private $numpoints=0; private $iColor='navy',$iFillColor=''; private $iLineWeight=1; private $coord=null; function PolarPlot($aData) { $n = count($aData); if( $n & 1 ) { JpGraphError::RaiseL(17001); //('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).'); } $this->numpoints = $n/2; $this->coord = $aData; $this->mark = new PlotMark(); } function SetWeight($aWeight) { $this->iLineWeight = $aWeight; } function SetColor($aColor){ $this->iColor = $aColor; } function SetFillColor($aColor){ $this->iFillColor = $aColor; } function Max() { $m = $this->coord[1]; $i=1; while( $i < $this->numpoints ) { $m = max($m,$this->coord[2*$i+1]); ++$i; } return $m; } // Set href targets for CSIM function SetCSIMTargets($aTargets,$aAlts=null) { $this->csimtargets=$aTargets; $this->csimalts=$aAlts; } // Get all created areas function GetCSIMareas() { return $this->csimareas; } function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") { $this->legend = $aLegend; $this->legendcsimtarget = $aCSIM; $this->legendcsimalt = $aCSIMAlt; } // Private methods function Legend($aGraph) { $color = $this->iColor ; if( $this->legend != "" ) { if( $this->iFillColor!='' ) { $color = $this->iFillColor; $aGraph->legend->Add($this->legend,$color,$this->mark,0, $this->legendcsimtarget,$this->legendcsimalt); } else { $aGraph->legend->Add($this->legend,$color,$this->mark,$this->line_style, $this->legendcsimtarget,$this->legendcsimalt); } } } function Stroke($img,$scale) { $i=0; $p=array(); $this->csimareas=''; while($i < $this->numpoints) { list($x1,$y1) = $scale->PTranslate($this->coord[2*$i],$this->coord[2*$i+1]); $p[2*$i] = $x1; $p[2*$i+1] = $y1; if( isset($this->csimtargets[$i]) ) { $this->mark->SetCSIMTarget($this->csimtargets[$i]); $this->mark->SetCSIMAlt($this->csimalts[$i]); $this->mark->SetCSIMAltVal($this->coord[2*$i], $this->coord[2*$i+1]); $this->mark->Stroke($img,$x1,$y1); $this->csimareas .= $this->mark->GetCSIMAreas(); } else $this->mark->Stroke($img,$x1,$y1); ++$i; } if( $this->iFillColor != '' ) { $img->SetColor($this->iFillColor); $img->FilledPolygon($p); } $img->SetLineWeight($this->iLineWeight); $img->SetColor($this->iColor); $img->Polygon($p,$this->iFillColor!=''); } } //-------------------------------------------------------------------------- // class PolarAxis //-------------------------------------------------------------------------- class PolarAxis extends Axis { private $angle_step=15,$angle_color='lightgray',$angle_label_color='black'; private $angle_fontfam=FF_FONT1,$angle_fontstyle=FS_NORMAL,$angle_fontsize=10; private $angle_fontcolor = 'navy'; private $gridminor_color='lightgray',$gridmajor_color='lightgray'; private $show_minor_grid = false, $show_major_grid = true ; private $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true; private $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black'; private $show_angle_tick=true; private $radius_tick_color='black'; function PolarAxis($img,$aScale) { parent::Axis($img,$aScale); } function ShowAngleDegreeMark($aFlg=true) { $this->show_angle_mark = $aFlg; } function SetAngleStep($aStep) { $this->angle_step=$aStep; } function HideTicks($aFlg=true,$aAngleFlg=true) { parent::HideTicks($aFlg,$aFlg); $this->show_angle_tick = !$aAngleFlg; } function ShowAngleLabel($aFlg=true) { $this->show_angle_label = $aFlg; } function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) { $this->show_minor_grid = $aMinor; $this->show_major_grid = $aMajor; $this->show_angle_grid = $aAngle ; } function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=10) { $this->angle_fontfam = $aFontFam; $this->angle_fontstyle = $aFontStyle; $this->angle_fontsize = $aFontSize; } function SetColor($aColor,$aRadColor='',$aAngleColor='') { if( $aAngleColor == '' ) $aAngleColor=$aColor; parent::SetColor($aColor,$aRadColor); $this->angle_fontcolor = $aAngleColor; } function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') { if( $aMinorColor == '' ) $aMinorColor = $aMajorColor; if( $aAngleColor == '' ) $aAngleColor = $aMajorColor; $this->gridminor_color = $aMinorColor; $this->gridmajor_color = $aMajorColor; $this->angle_color = $aAngleColor; } function SetTickColors($aRadColor,$aAngleColor='') { $this->radius_tick_color = $aRadColor; $this->angle_tick_color = $aAngleColor; } // Private methods function StrokeGrid($pos) { $x = round($this->img->left_margin + $this->img->plotwidth/2); $this->scale->ticks->Stroke($this->img,$this->scale,$pos); // Stroke the minor arcs $pmin = array(); $p = $this->scale->ticks->ticks_pos; $n = count($p); $i = 0; $this->img->SetColor($this->gridminor_color); while( $i < $n ) { $r = $p[$i]-$x+1; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; while( $r < $limit ) { $off = $r; $i=1; $r = $off + round($p[$i]-$x+1); while( $r < $limit && $i < $n ) { $r = $off+$p[$i]-$x; $pmin[]=$r; if( $this->show_minor_grid ) { $this->img->Circle($x,$pos,$r); } $i++; } } // Stroke the major arcs if( $this->show_major_grid ) { // First determine how many minor step on // every major step. We have recorded the minor radius // in pmin and use these values. This is done in order // to avoid rounding errors if we were to recalculate the // different major radius. $pmaj = $this->scale->ticks->maj_ticks_pos; $p = $this->scale->ticks->ticks_pos; if( $this->scale->name == 'lin' ) { $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0])); } else { $step=9; } $n = round(count($pmin)/$step); $i = 0; $this->img->SetColor($this->gridmajor_color); $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; $off = $r; $i=0; $r = $pmin[$i*$step]; while( $r < $limit && $i < $n ) { $r = $pmin[$i*$step]; $this->img->Circle($x,$pos,$r); $i++; } } // Draw angles if( $this->show_angle_grid ) { $this->img->SetColor($this->angle_color); $d = max($this->img->plotheight,$this->img->plotwidth)*1.4 ; $a = 0; $p = $this->scale->ticks->ticks_pos; $start_radius = $p[1]-$x; while( $a < 360 ) { if( $a == 90 || $a == 270 ) { // Make sure there are no rounding problem with // exactly vertical lines $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, $pos-$start_radius*sin($a/180*M_PI), $x+$start_radius*cos($a/180*M_PI)+1, $pos-$d*sin($a/180*M_PI)); } else { $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, $pos-$start_radius*sin($a/180*M_PI), $x+$d*cos($a/180*M_PI), $pos-$d*sin($a/180*M_PI)); } $a += $this->angle_step; } } } function StrokeAngleLabels($pos,$type) { if( !$this->show_angle_label ) return; $x0 = round($this->img->left_margin+$this->img->plotwidth/2)+1; $d = max($this->img->plotwidth,$this->img->plotheight)*1.42; $a = $this->angle_step; $t = new Text(); $t->SetColor($this->angle_fontcolor); $t->SetFont($this->angle_fontfam,$this->angle_fontstyle,$this->angle_fontsize); $xright = $this->img->width - $this->img->right_margin; $ytop = $this->img->top_margin; $xleft = $this->img->left_margin; $ybottom = $this->img->height - $this->img->bottom_margin; $ha = 'left'; $va = 'center'; $w = $this->img->plotwidth/2; $h = $this->img->plotheight/2; $xt = $x0; $yt = $pos; $margin=5; $tl = $this->angle_tick_len ; // Outer len $tl2 = $this->angle_tick_len2 ; // Interior len $this->img->SetColor($this->angle_tick_color); $rot90 = $this->img->a == 90 ; if( $type == POLAR_360 ) { $ca1 = atan($h/$w)/M_PI*180; $ca2 = 180-$ca1; $ca3 = $ca1+180; $ca4 = 360-$ca1; $end = 360; while( $a < $end ) { $ca = cos($a/180*M_PI); $sa = sin($a/180*M_PI); $x = $d*$ca; $y = $d*$sa; $xt=1000;$yt=1000; if( $a <= $ca1 || $a >= $ca4 ) { $yt = $pos - $w * $y/$x; $xt = $xright + $margin; if( $rot90 ) { $ha = 'center'; $va = 'top'; } else { $ha = 'left'; $va = 'center'; } $x1=$xright-$tl2; $x2=$xright+$tl; $y1=$y2=$yt; } elseif( $a > $ca1 && $a < $ca2 ) { $xt = $x0 + $h * $x/$y; $yt = $ytop - $margin; if( $rot90 ) { $ha = 'left'; $va = 'center'; } else { $ha = 'center'; $va = 'bottom'; } $y1=$ytop+$tl2;$y2=$ytop-$tl; $x1=$x2=$xt; } elseif( $a >= $ca2 && $a <= $ca3 ) { $yt = $pos + $w * $y/$x; $xt = $xleft - $margin; if( $rot90 ) { $ha = 'center'; $va = 'bottom'; } else { $ha = 'right'; $va = 'center'; } $x1=$xleft+$tl2;$x2=$xleft-$tl; $y1=$y2=$yt; } else { $xt = $x0 - $h * $x/$y; $yt = $ybottom + $margin; if( $rot90 ) { $ha = 'right'; $va = 'center'; } else { $ha = 'center'; $va = 'top'; } $y1=$ybottom-$tl2;$y2=$ybottom+$tl; $x1=$x2=$xt; } if( $a != 0 && $a != 180 ) { $t->Align($ha,$va); if( $this->show_angle_mark ) $a .= '°'; $t->Set($a); $t->Stroke($this->img,$xt,$yt); if( $this->show_angle_tick ) $this->img->Line($x1,$y1,$x2,$y2); } $a += $this->angle_step; } } else { // POLAR_HALF $ca1 = atan($h/$w*2)/M_PI*180; $ca2 = 180-$ca1; $end = 180; while( $a < $end ) { $ca = cos($a/180*M_PI); $sa = sin($a/180*M_PI); $x = $d*$ca; $y = $d*$sa; if( $a <= $ca1 ) { $yt = $pos - $w * $y/$x; $xt = $xright + $margin; if( $rot90 ) { $ha = 'center'; $va = 'top'; } else { $ha = 'left'; $va = 'center'; } $x1=$xright-$tl2; $x2=$xright+$tl; $y1=$y2=$yt; } elseif( $a > $ca1 && $a < $ca2 ) { $xt = $x0 + 2*$h * $x/$y; $yt = $ytop - $margin; if( $rot90 ) { $ha = 'left'; $va = 'center'; } else { $ha = 'center'; $va = 'bottom'; } $y1=$ytop+$tl2;$y2=$ytop-$tl; $x1=$x2=$xt; } elseif( $a >= $ca2 ) { $yt = $pos + $w * $y/$x; $xt = $xleft - $margin; if( $rot90 ) { $ha = 'center'; $va = 'bottom'; } else { $ha = 'right'; $va = 'center'; } $x1=$xleft+$tl2;$x2=$xleft-$tl; $y1=$y2=$yt; } $t->Align($ha,$va); if( $this->show_angle_mark ) $a .= '°'; $t->Set($a); $t->Stroke($this->img,$xt,$yt); if( $this->show_angle_tick ) $this->img->Line($x1,$y1,$x2,$y2); $a += $this->angle_step; } } } function Stroke($pos,$dummy=true) { $this->img->SetLineWeight($this->weight); $this->img->SetColor($this->color); $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); if( !$this->hide_line ) $this->img->FilledRectangle($this->img->left_margin,$pos, $this->img->width-$this->img->right_margin,$pos+$this->weight-1); $y=$pos+$this->img->GetFontHeight()+$this->title_margin+$this->title->margin; if( $this->title_adjust=="high" ) $this->title->SetPos($this->img->width-$this->img->right_margin,$y,"right","top"); elseif( $this->title_adjust=="middle" || $this->title_adjust=="center" ) $this->title->SetPos(($this->img->width-$this->img->left_margin- $this->img->right_margin)/2+$this->img->left_margin, $y,"center","top"); elseif($this->title_adjust=="low") $this->title->SetPos($this->img->left_margin,$y,"left","top"); else { JpGraphError::RaiseL(17002,$this->title_adjust); //('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); } if (!$this->hide_labels) { $this->StrokeLabels($pos,false); } $this->img->SetColor($this->radius_tick_color); $this->scale->ticks->Stroke($this->img,$this->scale,$pos); // // Mirror the positions for the left side of the scale // $mid = 2*($this->img->left_margin+$this->img->plotwidth/2); $n = count($this->scale->ticks->ticks_pos); $i=0; while( $i < $n ) { $this->scale->ticks->ticks_pos[$i] = $mid-$this->scale->ticks->ticks_pos[$i] ; ++$i; } $n = count($this->scale->ticks->maj_ticks_pos); $i=0; while( $i < $n ) { $this->scale->ticks->maj_ticks_pos[$i] = $mid-$this->scale->ticks->maj_ticks_pos[$i] ; ++$i; } $n = count($this->scale->ticks->maj_ticklabels_pos); $i=1; while( $i < $n ) { $this->scale->ticks->maj_ticklabels_pos[$i] = $mid-$this->scale->ticks->maj_ticklabels_pos[$i] ; ++$i; } // Draw the left side of the scale $n = count($this->scale->ticks->ticks_pos); $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMinTickAbsSize(); // Minor ticks if( ! $this->scale->ticks->supress_minor_tickmarks ) { $i=1; while( $i < $n/2 ) { $x = round($this->scale->ticks->ticks_pos[$i]) ; $this->img->Line($x,$pos,$x,$yu); ++$i; } } $n = count($this->scale->ticks->maj_ticks_pos); $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMajTickAbsSize(); // Major ticks if( ! $this->scale->ticks->supress_tickmarks ) { $i=1; while( $i < $n/2 ) { $x = round($this->scale->ticks->maj_ticks_pos[$i]) ; $this->img->Line($x,$pos,$x,$yu); ++$i; } } if (!$this->hide_labels) { $this->StrokeLabels($pos,false); } $this->title->Stroke($this->img); } } class PolarScale extends LinearScale { private $graph; function PolarScale($aMax=0,$graph) { parent::LinearScale(0,$aMax,'x'); $this->graph = $graph; } function _Translate($v) { return parent::Translate($v); } function PTranslate($aAngle,$aRad) { $m = $this->scale[1]; $w = $this->graph->img->plotwidth/2; $aRad = $aRad/$m*$w; $x = cos( $aAngle/180 * M_PI ) * $aRad; $y = sin( $aAngle/180 * M_PI ) * $aRad; $x += $this->_Translate(0); if( $this->graph->iType == POLAR_360 ) { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; } else { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; } return array($x,$y); } } class PolarLogScale extends LogScale { private $graph; function PolarLogScale($aMax=1,$graph) { parent::LogScale(0,$aMax,'x'); $this->graph = $graph; $this->ticks->SetLabelLogType(LOGLABELS_MAGNITUDE); } function PTranslate($aAngle,$aRad) { if( $aRad == 0 ) $aRad = 1; $aRad = log10($aRad); $m = $this->scale[1]; $w = $this->graph->img->plotwidth/2; $aRad = $aRad/$m*$w; $x = cos( $aAngle/180 * M_PI ) * $aRad; $y = sin( $aAngle/180 * M_PI ) * $aRad; $x += $w+$this->graph->img->left_margin;//$this->_Translate(0); if( $this->graph->iType == POLAR_360 ) { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; } else { $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; } return array($x,$y); } } class PolarGraph extends Graph { public $scale; public $axis; public $iType=POLAR_360; function PolarGraph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { parent::Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) ; $this->SetDensity(TICKD_DENSE); $this->SetBox(); $this->SetMarginColor('white'); } function SetDensity($aDense) { $this->SetTickDensity(TICKD_NORMAL,$aDense); } function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { $adj = ($this->img->height - $this->img->width)/2; $this->SetAngle(90); $this->img->SetMargin($lm-$adj,$rm-$adj,$tm+$adj,$bm+$adj); $this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2)); $this->axis->SetLabelAlign('right','center'); //JpGraphError::Raise('Set90AndMargin() is not supported for polar graphs.'); } function SetScale($aScale,$rmax=0,$dummy1=1,$dummy2=1,$dummy3=1) { if( $aScale == 'lin' ) $this->scale = new PolarScale($rmax,$this); elseif( $aScale == 'log' ) { $this->scale = new PolarLogScale($rmax,$this); } else { JpGraphError::RaiseL(17004);//('Unknown scale type for polar graph. Must be "lin" or "log"'); } $this->axis = new PolarAxis($this->img,$this->scale); $this->SetMargin(40,40,50,40); } function SetType($aType) { $this->iType = $aType; } function SetPlotSize($w,$h) { $this->SetMargin(($this->img->width-$w)/2,($this->img->width-$w)/2, ($this->img->height-$h)/2,($this->img->height-$h)/2); } // Private methods function GetPlotsMax() { $n = count($this->plots); $m = $this->plots[0]->Max(); $i=1; while($i < $n) { $m = max($this->plots[$i]->Max(),$m); ++$i; } return $m; } function Stroke($aStrokeFileName="") { // Start by adjusting the margin so that potential titles will fit. $this->AdjustMarginsForTitles(); // If the filename is the predefined value = '_csim_special_' // we assume that the call to stroke only needs to do enough // to correctly generate the CSIM maps. // We use this variable to skip things we don't strictly need // to do to generate the image map to improve performance // a best we can. Therefor you will see a lot of tests !$_csim in the // code below. $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); // We need to know if we have stroked the plot in the // GetCSIMareas. Otherwise the CSIM hasn't been generated // and in the case of GetCSIM called before stroke to generate // CSIM without storing an image to disk GetCSIM must call Stroke. $this->iHasStroked = true; //Check if we should autoscale axis if( !$this->scale->IsSpecified() && count($this->plots)>0 ) { $max = $this->GetPlotsMax(); $t1 = $this->img->plotwidth; $this->img->plotwidth /= 2; $t2 = $this->img->left_margin; $this->img->left_margin += $this->img->plotwidth+1; $this->scale->AutoScale($this->img,0,$max, $this->img->plotwidth/$this->xtick_factor/2); $this->img->plotwidth = $t1; $this->img->left_margin = $t2; } else { // The tick calculation will use the user suplied min/max values to determine // the ticks. If auto_ticks is false the exact user specifed min and max // values will be used for the scale. // If auto_ticks is true then the scale might be slightly adjusted // so that the min and max values falls on an even major step. //$min = 0; $max = $this->scale->scale[1]; $t1 = $this->img->plotwidth; $this->img->plotwidth /= 2; $t2 = $this->img->left_margin; $this->img->left_margin += $this->img->plotwidth+1; $this->scale->AutoScale($this->img,0,$max, $this->img->plotwidth/$this->xtick_factor/2); $this->img->plotwidth = $t1; $this->img->left_margin = $t2; } if( $this->iType == POLAR_180 ) $pos = $this->img->height - $this->img->bottom_margin; else $pos = $this->img->plotheight/2 + $this->img->top_margin; if( !$_csim ) { $this->StrokePlotArea(); } $this->iDoClipping = true; if( $this->iDoClipping ) { $oldimage = $this->img->CloneCanvasH(); } if( !$_csim ) { $this->axis->StrokeGrid($pos); } // Stroke all plots for Y1 axis for($i=0; $i < count($this->plots); ++$i) { $this->plots[$i]->Stroke($this->img,$this->scale); } if( $this->iDoClipping ) { // Clipping only supports graphs at 0 and 90 degrees if( $this->img->a == 0 ) { $this->img->CopyCanvasH($oldimage,$this->img->img, $this->img->left_margin,$this->img->top_margin, $this->img->left_margin,$this->img->top_margin, $this->img->plotwidth+1,$this->img->plotheight+1); } elseif( $this->img->a == 90 ) { $adj = round(($this->img->height - $this->img->width)/2); $this->img->CopyCanvasH($oldimage,$this->img->img, $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, $this->img->plotheight,$this->img->plotwidth); } $this->img->Destroy(); $this->img->SetCanvasH($oldimage); } if( !$_csim ) { $this->axis->Stroke($pos); $this->axis->StrokeAngleLabels($pos,$this->iType); } if( !$_csim ) { $this->StrokePlotBox(); $this->footer->Stroke($this->img); // The titles and legends never gets rotated so make sure // that the angle is 0 before stroking them $aa = $this->img->SetAngle(0); $this->StrokeTitles(); } for($i=0; $i < count($this->plots) ; ++$i ) { $this->plots[$i]->Legend($this); } $this->legend->Stroke($this->img); if( !$_csim ) { $this->StrokeTexts(); $this->img->SetAngle($aa); // Draw an outline around the image map if(_JPG_DEBUG) $this->DisplayClientSideaImageMapAreas(); // Adjust the appearance of the image $this->AdjustSaturationBrightnessContrast(); // If the filename is given as the special "__handle" // then the image handler is returned and the image is NOT // streamed back if( $aStrokeFileName == _IMG_HANDLER ) { return $this->img->img; } else { // Finally stream the generated picture $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, $aStrokeFileName); } } } } ?> --- NEW FILE: jpgraph_antispam-digits.php --- <?php //======================================================================= // File: JPGRAPH_ANTISPAM.PHP // Description: Genarate anti-spam challenge // Created: 2004-10-07 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_antispam-digits.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== class HandDigits { var $digits_thumb30x30 = array(); var $iHeight=30, $iWidth=30; function HandDigits() { //========================================================== // d6-small.jpg //========================================================== $this->digits['6'][0]= 645 ; $this->digits['6'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; //========================================================== // d2-small.jpg //========================================================== $this->digits['2'][0]= 606 ; $this->digits['2'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. 'DLZ6f//Z' ; //========================================================== // d9-small.jpg //========================================================== $this->digits['9'][0]= 680 ; $this->digits['9'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. '1V1//9k=' ; //========================================================== // d5-small.jpg //========================================================== $this->digits['5'][0]= 632 ; $this->digits['5'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; //========================================================== // d1-small.jpg //========================================================== $this->digits['1'][0]= 646 ; $this->digits['1'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; //========================================================== // d8-small.jpg //========================================================== $this->digits['8'][0]= 694 ; $this->digits['8'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. 'EylmLHQltptPZKQOBo1FzH//2Q==' ; //========================================================== // d4-small.jpg //========================================================== $this->digits['4'][0]= 643 ; $this->digits['4'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; //========================================================== // d7-small.jpg //========================================================== $this->digits['7'][0]= 658 ; $this->digits['7'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; //========================================================== // d3-small.jpg //========================================================== $this->digits['3'][0]= 662 ; $this->digits['3'][1]= '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; } } class AntiSpam { var $iNumber=''; function AntiSpam($aNumber='') { $this->iNumber = $aNumber; } function Rand($aLen) { $d=''; for($i=0; $i < $aLen; ++$i) { $d .= rand(1,9); } $this->iNumber = $d; return $d; } function Stroke() { $n=strlen($this->iNumber); for($i=0; $i < $n; ++$i ) { if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) { return false; } } $dd = new HandDigits(); $n = strlen($this->iNumber); $img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight); if( $img < 1 ) { return false; } $start=0; for($i=0; $i < $n; ++$i ) { $size = $dd->digits[$this->iNumber[$i]][0]; $dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1])); imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight); $start += imagesx($dimg); } $resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4); if( $resimg < 1 ) { return false; } imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight); header("Content-type: image/jpeg"); imagejpeg($resimg); return true; } } ?> --- NEW FILE: jpgraph_radar.php --- <?php /*======================================================================= // File: JPGRAPH_RADAR.PHP // Description: Radar plot extension for JpGraph // Created: 2001-02-04 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_radar.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ require_once('jpgraph_plotmark.inc.php'); class RadarLogTicks extends Ticks { //--------------- // CONSTRUCTOR function RadarLogTicks() { } //--------------- // PUBLIC METHODS // TODO: Add Argument grid function Stroke($aImg,&$grid,$aPos,$aAxisAngle,$aScale,&$aMajPos,&$aMajLabel) { $start = $aScale->GetMinVal(); $limit = $aScale->GetMaxVal(); $nextMajor = 10*$start; $step = $nextMajor / 10.0; $count=1; $ticklen_maj=5; $dx_maj=round(sin($aAxisAngle)*$ticklen_maj); $dy_maj=round(cos($aAxisAngle)*$ticklen_maj); $ticklen_min=3; $dx_min=round(sin($aAxisAngle)*$ticklen_min); $dy_min=round(cos($aAxisAngle)*$ticklen_min); $aMajPos=array(); $aMajLabel=array(); if( $this->supress_first ) $aMajLabel[]=""; else $aMajLabel[]=$start; $yr=$aScale->RelTranslate($start); $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($yr*sin($aAxisAngle)); $aMajPos[]=$xt+2*$dx_maj; $aMajPos[]=$yt-$aImg->GetFontheight()/2; $grid[]=$xt; $grid[]=$yt; $aImg->SetLineWeight($this->weight); for($y=$start; $y<=$limit; $y+=$step,++$count ) { $yr=$aScale->RelTranslate($y); $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($yr*sin($aAxisAngle)); if( $count % 10 == 0 ) { $grid[]=$xt; $grid[]=$yt; $aMajPos[]=$xt+2*$dx_maj; $aMajPos[]=$yt-$aImg->GetFontheight()/2; if( !$this->supress_tickmarks ) { if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); $aImg->Line($xt+$dx_maj,$yt+$dy_maj,$xt-$dx_maj,$yt-$dy_maj); if( $this->majcolor!="" ) $aImg->PopColor(); } if( $this->label_formfunc != "" ) { $f=$this->label_formfunc; $l = call_user_func($f,$nextMajor); } else $l = $nextMajor; $aMajLabel[]=$l; $nextMajor *= 10; $step *= 10; $count=1; } else if( !$this->supress_minor_tickmarks ) { if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); $aImg->Line($xt+$dx_min,$yt+$dy_min,$xt-$dx_min,$yt-$dy_min); if( $this->mincolor!="" ) $aImg->PopColor(); } } } } class RadarLinearTicks extends Ticks { // extends LinearTicks { private $minor_step=1, $major_step=2; private $xlabel_offset=0,$xtick_offset=0; private $maj_ticks_pos=array(); //--------------- // CONSTRUCTOR function RadarLinearTicks() { // Empty } //--------------- // PUBLIC METHODS // Return major step size in world coordinates function GetMajor() { return $this->major_step; } // Return minor step size in world coordinates function GetMinor() { return $this->minor_step; } // Set Minor and Major ticks (in world coordinates) function Set($aMajStep,$aMinStep=false) { if( $aMinStep==false ) $aMinStep=$aMajStep; if( $aMajStep <= 0 || $aMinStep <= 0 ) { JpGraphError::Raise(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code.<p> If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); } $this->major_step=$aMajStep; $this->minor_step=$aMinStep; $this->is_set = true; } function Stroke($aImg,&$grid,$aPos,$aAxisAngle,$aScale,&$aMajPos,&$aMajLabel) { // Prepare to draw linear ticks $maj_step_abs = abs($aScale->scale_factor*$this->major_step); $min_step_abs = abs($aScale->scale_factor*$this->minor_step); $nbrmaj = floor(($aScale->world_abs_size)/$maj_step_abs); $nbrmin = floor(($aScale->world_abs_size)/$min_step_abs); $skip = round($nbrmin/$nbrmaj); // Don't draw minor ontop of major // Draw major ticks $ticklen2=$this->major_abs_size; $dx=round(sin($aAxisAngle)*$ticklen2); $dy=round(cos($aAxisAngle)*$ticklen2); $label=$aScale->scale[0]+$this->major_step; $aImg->SetLineWeight($this->weight); // NEW $aMajPos = array(); $aMajLabel = array(); for($i=1; $i<=$nbrmaj; ++$i) { $xt=round($i*$maj_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($i*$maj_step_abs*sin($aAxisAngle)); if( $this->label_formfunc != "" ) { $f=$this->label_formfunc; $l = call_user_func($f,$label); } else $l = $label; $aMajLabel[]=$l; $label += $this->major_step; $grid[]=$xt; $grid[]=$yt; $aMajPos[($i-1)*2]=$xt+2*$dx; $aMajPos[($i-1)*2+1]=$yt-$aImg->GetFontheight()/2; if( !$this->supress_tickmarks ) { if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); if( $this->majcolor!="" ) $aImg->PopColor(); } } // Draw minor ticks $ticklen2=$this->minor_abs_size; $dx=round(sin($aAxisAngle)*$ticklen2); $dy=round(cos($aAxisAngle)*$ticklen2); if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); for($i=1; $i<=$nbrmin; ++$i) { if( ($i % $skip) == 0 ) continue; $xt=round($i*$min_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; $yt=$aPos-round($i*$min_step_abs*sin($aAxisAngle)); $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); } if( $this->mincolor!="" ) $aImg->PopColor(); } } } //=================================================== // CLASS RadarAxis // Description: Implements axis for the radar graph //=================================================== class RadarAxis extends AxisPrototype { private $title_color="navy"; public $title=null; //--------------- // CONSTRUCTOR function RadarAxis($img,$aScale,$color=array(0,0,0)) { parent::Axis($img,$aScale,$color); $this->len=$img->plotheight; $this->title = new Text(); $this->title->SetFont(FF_FONT1,FS_BOLD); $this->color = array(0,0,0); } //--------------- // PUBLIC METHODS function SetTickLabels($aLabelArray,$aLabelColorArray=null) { $this->ticks_label = $aLabelArray; $this->ticks_label_colors = $aLabelColorArray; } // Stroke the axis // $pos = Vertical position of axis // $aAxisAngle = Axis angle // $grid = Returns an array with positions used to draw the grid // $lf = Label flag, TRUE if the axis should have labels function Stroke($pos,$aAxisAngle,&$grid,$title,$lf) { $this->img->SetColor($this->color); // Determine end points for the axis $x=round($this->scale->world_abs_size*cos($aAxisAngle)+$this->scale->scale_abs[0]); $y=round($pos-$this->scale->world_abs_size*sin($aAxisAngle)); // Draw axis $this->img->SetColor($this->color); $this->img->SetLineWeight($this->weight); if( !$this->hide ) $this->img->Line($this->scale->scale_abs[0],$pos,$x,$y); $this->scale->ticks->Stroke($this->img,$grid,$pos,$aAxisAngle,$this->scale,$majpos,$majlabel); $ncolor=0; if( isset($this->ticks_label_colors) ) $ncolor=count($this->ticks_label_colors); // Draw labels if( $lf && !$this->hide ) { $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); $this->img->SetTextAlign("left","top"); $this->img->SetColor($this->label_color); // majpos contains (x,y) coordinates for labels if( ! $this->hide_labels ) { $n = floor(count($majpos)/2); for($i=0; $i < $n; ++$i) { // Set specific label color if specified if( $ncolor > 0 ) $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); if( $this->ticks_label != null && isset($this->ticks_label[$i]) ) $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$this->ticks_label[$i]); else $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$majlabel[$i]); } } } $this->_StrokeAxisTitle($pos,$aAxisAngle,$title); } //--------------- // PRIVATE METHODS function _StrokeAxisTitle($pos,$aAxisAngle,$title) { $this->title->Set($title); $marg=6+$this->title->margin; $xt=round(($this->scale->world_abs_size+$marg)*cos($aAxisAngle)+$this->scale->scale_abs[0]); $yt=round($pos-($this->scale->world_abs_size+$marg)*sin($aAxisAngle)); // Position the axis title. // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text // that intersects with the extension of the corresponding axis. The code looks a little // bit messy but this is really the only way of having a reasonable position of the // axis titles. if( $this->title->iWordwrap > 0 ) { $title = wordwrap($title,$this->title->iWordwrap,"\n"); } $h=$this->img->GetTextHeight($title)*1.2; $w=$this->img->GetTextWidth($title)*1.2; while( $aAxisAngle > 2*M_PI ) $aAxisAngle -= 2*M_PI; if( $aAxisAngle>=7*M_PI/4 || $aAxisAngle <= M_PI/4 ) $dx=0; if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dx=($aAxisAngle-M_PI/4)*2/M_PI; if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dx=1; if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dx=(1-($aAxisAngle-M_PI*5/4)*2/M_PI); if( $aAxisAngle>=7*M_PI/4 ) $dy=(($aAxisAngle-M_PI)-3*M_PI/4)*2/M_PI; if( $aAxisAngle<=M_PI/4 ) $dy=(1-$aAxisAngle*2/M_PI); if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dy=1; if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dy=(1-($aAxisAngle-3*M_PI/4)*2/M_PI); if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dy=0; if( !$this->hide ) { $this->title->Stroke($this->img,$xt-$dx*$w,$yt-$dy*$h,$title); } } } // Class //=================================================== // CLASS RadarGrid // Description: Draws grid for the radar graph //=================================================== class RadarGrid { //extends Grid { private $type='solid'; private $grid_color='#DDDDDD'; private $show=false, $weight=1; //------------ // CONSTRUCTOR function RadarGrid() { } // PUBLIC METHODS function SetColor($aMajColor) { $this->grid_color = $aMajColor; } function SetWeight($aWeight) { $this->weight=$aWeight; } // Specify if grid should be dashed, dotted or solid function SetLineStyle($aType) { $this->type = $aType; } // Decide if both major and minor grid should be displayed function Show($aShowMajor=true) { $this->show=$aShowMajor; } //---------------- // PRIVATE METHODS function Stroke($img,$grid) { if( !$this->show ) return; $nbrticks = count($grid[0])/2; $nbrpnts = count($grid); $img->SetColor($this->grid_color); $img->SetLineWeight($this->weight); for($i=0; $i<$nbrticks; ++$i) { for($j=0; $j<$nbrpnts; ++$j) { $pnts[$j*2]=$grid[$j][$i*2]; $pnts[$j*2+1]=$grid[$j][$i*2+1]; } for($k=0; $k<$nbrpnts; ++$k ){ $l=($k+1)%$nbrpnts; if( $this->type == "solid" ) $img->Line($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1]); elseif( $this->type == "dotted" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],1,6); elseif( $this->type == "dashed" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],2,4); elseif( $this->type == "longdashed" ) $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],8,6); } $pnts=array(); } } } // Class //=================================================== // CLASS RadarPlot // Description: Plot a radarplot //=================================================== class RadarPlot { public $mark=null; public $legend=""; private $data=array(); private $fill=false, $fill_color=array(200,170,180); private $color=array(0,0,0); private $weight=1; private $linestyle='solid'; //--------------- // CONSTRUCTOR function RadarPlot($data) { $this->data = $data; $this->mark = new PlotMark(); } //--------------- // PUBLIC METHODS function Min() { return Min($this->data); } function Max() { return Max($this->data); } function SetLegend($legend) { $this->legend=$legend; } function SetLineStyle($aStyle) { $this->linestyle=$aStyle; } function SetLineWeight($w) { $this->weight=$w; } function SetFillColor($aColor) { $this->fill_color = $aColor; $this->fill = true; } function SetFill($f=true) { $this->fill = $f; } function SetColor($aColor,$aFillColor=false) { $this->color = $aColor; if( $aFillColor ) { $this->SetFillColor($aFillColor); $this->fill = true; } } function GetCSIMareas() { JpGraphError::RaiseL(18001); //("Client side image maps not supported for RadarPlots."); } function Stroke($img, $pos, $scale, $startangle) { $nbrpnts = count($this->data); $astep=2*M_PI/$nbrpnts; $a=$startangle; // Rotate each point to the correct axis-angle // TODO: Update for LogScale for($i=0; $i<$nbrpnts; ++$i) { //$c=$this->data[$i]; $cs=$scale->RelTranslate($this->data[$i]); $x=round($cs*cos($a)+$scale->scale_abs[0]); $y=round($pos-$cs*sin($a)); /* $c=log10($c); $x=round(($c-$scale->scale[0])*$scale->scale_factor*cos($a)+$scale->scale_abs[0]); $y=round($pos-($c-$scale->scale[0])*$scale->scale_factor*sin($a)); */ $pnts[$i*2]=$x; $pnts[$i*2+1]=$y; $a += $astep; } if( $this->fill ) { $img->SetColor($this->fill_color); $img->FilledPolygon($pnts); } $img->SetLineWeight($this->weight); $img->SetColor($this->color); $img->SetLineStyle($this->linestyle); $pnts[]=$pnts[0]; $pnts[]=$pnts[1]; $img->Polygon($pnts); $img->SetLineStyle('solid'); // Reset line style to default // Add plotmarks on top if( $this->mark->show ) { for($i=0; $i < $nbrpnts; ++$i) { $this->mark->Stroke($img,$pnts[$i*2],$pnts[$i*2+1]); } } } //--------------- // PRIVATE METHODS function GetCount() { return count($this->data); } function Legend($graph) { if( $this->legend=="" ) return; if( $this->fill ) $graph->legend->Add($this->legend,$this->fill_color,$this->mark); else $graph->legend->Add($this->legend,$this->color,$this->mark); } } // Class //=================================================== // CLASS RadarGraph // Description: Main container for a radar graph //=================================================== class RadarGraph extends Graph { public $grid,$axis=null; private $posx,$posy; private $len; private $axis_title=null; //--------------- // CONSTRUCTOR function RadarGraph($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { $this->Graph($width,$height,$cachedName,$timeout,$inline); $this->posx=$width/2; $this->posy=$height/2; $this->len=min($width,$height)*0.35; $this->SetColor(array(255,255,255)); $this->SetTickDensity(TICKD_NORMAL); $this->SetScale("lin"); $this->SetGridDepth(DEPTH_FRONT); } //--------------- // PUBLIC METHODS function SupressTickMarks($f=true) { if( ERR_DEPRECATED ) JpGraphError::RaiseL(18002); //('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.'); $this->axis->scale->ticks->SupressTickMarks($f); } function HideTickMarks($aFlag=true) { $this->axis->scale->ticks->SupressTickMarks($aFlag); } function ShowMinorTickmarks($aFlag=true) { $this->yscale->ticks->SupressMinorTickMarks(!$aFlag); } function SetScale($axtype,$ymin=1,$ymax=1,$dummy1=null,$dumy2=null) { if( $axtype != "lin" && $axtype != "log" ) { JpGraphError::RaiseL(18003,$axtype); //("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); } if( $axtype=="lin" ) { $this->yscale = new LinearScale($ymin,$ymax); $this->yscale->ticks = new RadarLinearTicks(); $this->yscale->ticks->SupressMinorTickMarks(); } elseif( $axtype=="log" ) { $this->yscale = new LogScale($ymin,$ymax); $this->yscale->ticks = new RadarLogTicks(); } $this->axis = new RadarAxis($this->img,$this->yscale); $this->grid = new RadarGrid(); } function SetSize($aSize) { if( $aSize < 0.1 || $aSize>1 ) JpGraphError::RaiseL(18004,$aSize); //("Radar Plot size must be between 0.1 and 1. (Your value=$s)"); $this->len=min($this->img->width,$this->img->height)*$aSize/2; } function SetPlotSize($aSize) { $this->SetSize($aSize); } function SetTickDensity($densy=TICKD_NORMAL,$dummy1=null) { $this->ytick_factor=25; switch( $densy ) { case TICKD_DENSE: $this->ytick_factor=12; break; case TICKD_NORMAL: $this->ytick_factor=25; break; case TICKD_SPARSE: $this->ytick_factor=40; break; case TICKD_VERYSPARSE: $this->ytick_factor=70; break; default: JpGraphError::RaiseL(18005,$densy); //("RadarPlot Unsupported Tick density: $densy"); } } function SetPos($px,$py=0.5) { $this->SetCenter($px,$py); } function SetCenter($px,$py=0.5) { assert($px > 0 && $py > 0 ); $this->posx=$this->img->width*$px; $this->posy=$this->img->height*$py; } function SetColor($c) { $this->SetMarginColor($c); } function SetTitles($title) { $this->axis_title = $title; } function Add($splot) { $this->plots[]=$splot; } function GetPlotsYMinMax($aPlots) { $min=$aPlots[0]->Min(); $max=$aPlots[0]->Max(); foreach( $this->plots as $p ) { $max=max($max,$p->Max()); $min=min($min,$p->Min()); } if( $min < 0 ) JpGraphError::RaiseL(18006,$min); //("Minimum data $min (Radar plots should only be used when all data points > 0)"); return array($min,$max); } // Stroke the Radar graph function Stroke($aStrokeFileName="") { $n = count($this->plots); // Set Y-scale if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) { list($min,$max) = $this->GetPlotsYMinMax($this->plots); $this->yscale->AutoScale($this->img,0,$max,$this->len/$this->ytick_factor); } // Set start position end length of scale (in absolute pixels) $this->yscale->SetConstants($this->posx,$this->len); // We need as many axis as there are data points $nbrpnts=$this->plots[0]->GetCount(); // If we have no titles just number the axis 1,2,3,... if( $this->axis_title==null ) { for($i=0; $i < $nbrpnts; ++$i ) $this->axis_title[$i] = $i+1; } elseif(count($this->axis_title)<$nbrpnts) JpGraphError::RaiseL(18007); //("Number of titles does not match number of points in plot."); for($i=0; $i < $n; ++$i ) if( $nbrpnts != $this->plots[$i]->GetCount() ) JpGraphError::RaiseL(18008); //("Each radar plot must have the same number of data points."); if( $this->background_image != "" ) { $this->StrokeFrameBackground(); } else { $this->StrokeFrame(); } $astep=2*M_PI/$nbrpnts; // Prepare legends for($i=0; $i < $n; ++$i) $this->plots[$i]->Legend($this); $this->legend->Stroke($this->img); $this->footer->Stroke($this->img); if( $this->grid_depth == DEPTH_BACK ) { // Draw axis and grid for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); } } // Plot points $a=M_PI/2; for($i=0; $i < $n; ++$i ) $this->plots[$i]->Stroke($this->img, $this->posy, $this->yscale, $a); if( $this->grid_depth != DEPTH_BACK ) { // Draw axis and grid for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); } } $this->grid->Stroke($this->img,$grid); $this->StrokeTitles(); // Stroke texts if( $this->texts != null ) { foreach( $this->texts as $t) $t->Stroke($this->img); } // Should we do any final image transformation if( $this->iImgTrans ) { if( !class_exists('ImgTrans',false) ) { require_once('jpgraph_imgtrans.php'); } $tform = new ImgTrans($this->img->img); $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, $this->iImgTransDirection,$this->iImgTransHighQ, $this->iImgTransMinSize,$this->iImgTransFillColor, $this->iImgTransBorder); } // If the filename is given as the special "__handle" // then the image handler is returned and the image is NOT // streamed back if( $aStrokeFileName == _IMG_HANDLER ) { return $this->img->img; } else { // Finally stream the generated picture $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, $aStrokeFileName); } } } // Class /* EOF */ ?> --- NEW FILE: imgdata_diamonds.inc --- <?php //======================================================================= // File: IMGDATA_DIAMONDS.INC // Description: Base64 encoded images for diamonds // Created: 2003-03-20 // Author: Johan Persson (jo...@ad...) // Ver: $Id: imgdata_diamonds.inc,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== class ImgData_Diamonds extends ImgData { protected $name = 'Diamonds'; protected $an = array(MARK_IMG_DIAMOND =>'imgdata'); protected $colors = array('lightblue','darkblue','gray', 'blue','pink','purple','red','yellow'); protected $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6, 'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3); protected $maxidx = 7 ; protected $imgdata ; function ImgData_Diamonds() { //========================================================== // File: diam_red.png //========================================================== $this->imgdata[0][0]= 668 ; $this->imgdata[0][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. 'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'. 'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'. 'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'. 'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'. 'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'. 'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'. 'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'. 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. 'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'. '1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'. 'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'. '/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'. 'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'. '+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'. 'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'. 'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'. 'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ; //========================================================== // File: diam_pink.png //========================================================== $this->imgdata[1][0]= 262 ; $this->imgdata[1][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. 'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'. 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. 'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. '==' ; //========================================================== // File: diam_blue.png //========================================================== $this->imgdata[2][0]= 662 ; $this->imgdata[2][1]= 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'. 'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'. 'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'. 'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'. 'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'. '/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'. 'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'. '9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'. 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. 'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'. 'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'. '... [truncated message content] |
From: Karsten D. <k-...@us...> - 2006-04-27 11:33:10
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph1/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10567/jpgraph1/lang Added Files: en.inc.php Log Message: Added seperate JPGraph 1.x and 2.x libraries --- NEW FILE: en.inc.php --- <?php /*======================================================================= // File: ERRMSG_EN.INC.PHP // Description: English language file for error messages // Created: 2006-01-25 // Author: Johan Persson (jo...@ad...) // Ver: $Id: en.inc.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ // Note: Format of each error message is array(<error message>,<number of arguments>) $_jpg_messages = array( /* ** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text */ 10 => array('<table border=1><tr><td><font color=darkred size=4><b>JpGraph Error:</b> HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at line <b>%d</b>.</font></td></tr><tr><td><b>Explanation:</b><br>HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).<p>Most likely you have some text in your script before the call to <i>Graph::Stroke()</i>. If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser. <p>For example it is a common mistake to leave a blank line before the opening "<b><?php</b>".</td></tr></table>',2), /* ** Setup errors */ 11 => array('No path specified for CACHE_DIR. Please specify CACHE_DIR manually in jpg-config.inc',0), 12 => array('No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in jpg-config.inc).',0), /* ** jpgraph_bar */ 2001 => array('Number of colors is not the same as the number of patterns in BarPlot::SetPattern()',0), 2002 => array('Unknown pattern specified in call to BarPlot::SetPattern()',0), 2003 => array('Number of X and Y points are not equal. Number of X-points: %d Number of Y-points: %d',2), 2004 => array('All values for a barplot must be numeric. You have specified value nr [%d] == %s',2), 2005 => array('You have specified an empty array for shadow colors in the bar plot.',0), 2006 => array('Unknown position for values on bars : %s',1), 2007 => array('Cannot create GroupBarPlot from empty plot array.',0), 2008 => array('Group bar plot element nbr %d is undefined or empty.',0), 2009 => array('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the GroupBar plot from an array of BarPlot or AccBarPlot objects. (Class = %s)',1), 2010 => array('Cannot create AccBarPlot from empty plot array.',0), 2011 => array('Acc bar plot element nbr %d is undefined or empty.',1), 2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)',1), 2013 => array('You have specified an empty array for shadow colors in the bar plot.',0), 2014 => array('Number of datapoints for each data set in accbarplot must be the same',0), /* ** jpgraph_date */ 3001 => array('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both',0), /* ** jpgraph_error */ 4002 => array('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3',0), /* ** jpgraph_flags */ 5001 => array('Unknown flag size (%d).',1), 5002 => array('Flag index %s does not exist.',1), 5003 => array('Invalid ordinal number (%d) specified for flag index.',1), 5004 => array('The (partial) country name %s does not have a corresponding flag image. The flag may still exist but under another name, e.g. instead of "usa" try "united states".',1), /* ** jpgraph_gantt */ 6001 => array('Internal error. Height for ActivityTitles is < 0',0), 6002 => array('You can\'t specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.',0), 6003 => array('Invalid format for Constrain parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)',1), 6004 => array('Invalid format for Progress parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)',1), 6005 => array('SetScale() is not meaningful with Gantt charts.',0), 6006 => array('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]',0), 6007 => array('Sanity check for automatic Gantt chart size failed. Either the width (=%d) or height (=%d) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.',2), 6008 => array('You have specified a constrain from row=%d to row=%d which does not have any activity',2), 6009 => array('Unknown constrain type specified from row=%d to row=%d',2), 6010 => array('Illegal icon index for Gantt builtin icon [%d]',1), 6011 => array('Argument to IconImage must be string or integer',0), 6012 => array('Unknown type in Gantt object title specification',0), 6015 => array('Illegal vertical position %d',1), 6016 => array('Date string (%s) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30',1), 6017 => array('Unknown date format in GanttScale (%s).',1), 6018 => array('Interval for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an interval of %d minutes.',1), 6019 => array('The available width (%d) for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.',1), 6020 => array('Interval for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an interval of %d',1), 6021 => array('Unknown formatting style for week.',0), 6022 => array('Gantt scale has not been specified.',0), 6023 => array('If you display both hour and minutes the hour interval must be 1 (Otherwise it doesn\'t make sense to display minutes).',0), 6024 => array('CSIM Target must be specified as a string. Start of target is: %d',1), 6025 => array('CSIM Alt text must be specified as a string. Start of alt text is: %d',1), 6027 => array('Progress value must in range [0, 1]',0), 6028 => array('Specified height (%d) for gantt bar is out of range.',1), 6029 => array('Offset for vertical line must be in range [0,1]',0), 6030 => array('Unknown arrow direction for link.',0), 6031 => array('Unknown arrow type for link.',0), 6032 => array('Internal error: Unknown path type (=%d) specified for link.',1), /* ** jpgraph_gradient */ 7001 => array('Unknown gradient style (=%d).',1), /* ** jpgraph_iconplot */ 8001 => array('Mix value for icon must be between 0 and 100.',0), 8002 => array('Anchor position for icons must be one of "top", "bottom", "left", "right" or "center"',0), 8003 => array('It is not possible to specify both an image file and a country flag for the same icon.',0), 8004 => array('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.',0), /* ** jpgraph_imgtrans */ 9001 => array('Value for image transformation out of bounds. Vanishing point on horizon must be specified as a value between 0 and 1.',0), /* ** jpgraph_lineplot */ 10001 => array('LinePlot::SetFilled() is deprecated. Use SetFillColor()',0), 10002 => array('Plot too complicated for fast line Stroke. Use standard Stroke()',0), /* ** jpgraph_log */ 11001 => array('Your data contains non-numeric values.',0), 11002 => array('Negative data values can not be used in a log scale.',0), 11003 => array('Your data contains non-numeric values.',0), 11004 => array('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.',0), 11005 => array('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.',0), /* ** jpgraph_mgraph */ 12001 => array("You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.",0), 12002 => array('Incorrect file name for MGraph::SetBackgroundImage() : %s Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), 12003 => array('Unknown file extension (%s) in MGraph::SetBackgroundImage() for filename: %s',2), 12004 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), 12005 => array('Can\'t read background image: %s',1), 12006 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), 12007 => array('Argument to MGraph::Add() is not a valid GD image handle.',0), 12008 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats.',0), 12009 => array('Your PHP installation does not support the chosen graphic format: %s',1), 12010 => array('Can\'t create or stream image to file %s Check that PHP has enough permission to write a file to the current directory.',1), 12011 => array('Can\'t create truecolor image. Check that you really have GD2 library installed.',0), 12012 => array('Can\'t create image. Check that you really have GD2 library installed.',0), /* ** jpgraph_pie3d */ 14001 => array('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.',0), 14002 => array('PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.',0), 14003 => array('Internal assertion failed. Pie3D::Pie3DSlice',0), 14004 => array('Slice start angle must be between 0 and 360 degrees.',0), 14005 => array('Pie3D Internal error: Trying to wrap twice when looking for start index',0,), 14006 => array('Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking.',0), 14007 => array('Width for 3D Pie is 0. Specify a size > 0',0), /* ** jpgraph_pie */ 15001 => array('PiePLot::SetTheme() Unknown theme: %s',1), 15002 => array('Argument to PiePlot::ExplodeSlice() must be an integer',0), 15003 => array('Argument to PiePlot::Explode() must be an array with integer distances.',0), 15004 => array('Slice start angle must be between 0 and 360 degrees.',0), 15005 => array('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.',0), 15006 => array('PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]',0), 15007 => array('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.',0), 15008 => array('PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not %d).',1), 15009 => array('Illegal pie plot. Sum of all data is zero for Pie Plot',0), 15010 => array('Sum of all data is 0 for Pie.',0), 15011 => array('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.',0), /* ** jpgraph_plotband */ 16001 => array('Density for pattern must be between 1 and 100. (You tried %f)',1), 16002 => array('No positions specified for pattern.',0), 16003 => array('Unknown pattern specification (%d)',0), 16004 => array('Min value for plotband is larger than specified max value. Please correct.',0), /* ** jpgraph_polar */ 17001 => array('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).',0), 17002 => array('Unknown alignment specified for X-axis title. (%s)',1), //17003 => array('Set90AndMargin() is not supported for polar graphs.',0), 17004 => array('Unknown scale type for polar graph. Must be "lin" or "log"',0), /* ** jpgraph_radar */ 18001 => array('Client side image maps not supported for RadarPlots.',0), 18002 => array('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.',0), 18003 => array('Illegal scale for radarplot (%s). Must be \'lin\' or \'log\'',1), 18004 => array('Radar Plot size must be between 0.1 and 1. (Your value=%f)',1), 18005 => array('RadarPlot Unsupported Tick density: %d',1), 18006 => array('Minimum data %f (Radar plots should only be used when all data points > 0)',1), 18007 => array('Number of titles does not match number of points in plot.',0), 18008 => array('Each radar plot must have the same number of data points.',0), /* ** jpgraph_regstat */ 19001 => array('Spline: Number of X and Y coordinates must be the same',0), 19002 => array('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.',0), 19003 => array('Bezier: Number of X and Y coordinates must be the same',0), /* ** jpgraph_scatter */ 20001 => array('Fieldplots must have equal number of X and Y points.',0), 20002 => array('Fieldplots must have an angle specified for each X and Y points.',0), 20003 => array('Scatterplot must have equal number of X and Y points.',0), /* ** jpgraph_stock */ 21001 => array('Data values for Stock charts must contain an even multiple of %d data points.',1), /* ** jpgraph_plotmark */ 23001 => array('This marker "%s" does not exist in color with index: %d',2), 23002 => array('Mark color index too large for marker "%s"',1), 23003 => array('A filename must be specified if you set the mark type to MARK_IMG.',0), /* ** jpgraph_utils */ 24001 => array('FuncGenerator : No function specified. ',0), 24002 => array('FuncGenerator : Syntax error in function specification ',0), /* ** jpgraph */ 25001 => array('This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)',0), 25002 => array('Your PHP installation does not seem to have the required GD library. Please see the PHP documentation on how to install and enable the GD library.',0), 25003 => array('General PHP error : At %s:%d : %s',3), 25004 => array('General PHP error : %s ',1), 25005 => array('Can\'t access PHP_SELF, PHP global variable. You can\'t run PHP from command line if you want to use the \'auto\' naming of cache or image files.',0), 25006 => array('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).',0), 25007 => array('You are trying to use the locale (%s) which your PHP installation does not support. Hint: Use \'\' to indicate the default locale for this geographic region.',1), 25008 => array('Image width/height argument in Graph::Graph() must be numeric',0), 25009 => array('You must specify what scale to use with a call to Graph::SetScale()',0), 25010 => array('Graph::Add() You tried to add a null plot to the graph.',0), 25011 => array('Graph::AddY2() You tried to add a null plot to the graph.',0), 25012 => array('Graph::AddYN() You tried to add a null plot to the graph.',0), 25013 => array('You can only add standard plots to multiple Y-axis',0), 25014 => array('Graph::AddText() You tried to add a null text to the graph.',0), 25015 => array('Graph::AddLine() You tried to add a null line to the graph.',0), 25016 => array('Graph::AddBand() You tried to add a null band to the graph.',0), 25017 => array('You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.',0), 25018 => array('Incorrect file name for Graph::SetBackgroundImage() : "%s" Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), 25019 => array('Unknown file extension (%s) in Graph::SetBackgroundImage() for filename: "%s"',2), 25020 => array('Graph::SetScale(): Specified Max value must be larger than the specified Min value.',0), 25021 => array('Unknown scale specification for Y-scale. (%s)',1), 25022 => array('Unknown scale specification for X-scale. (%s)',1), 25023 => array('Unsupported Y2 axis type: "%s" Must be one of (lin,log,int)',1), 25024 => array('Unsupported Y axis type: "%s" Must be one of (lin,log,int)',1), 25025 => array('Unsupported Tick density: %d',1), 25026 => array('Can\'t draw unspecified Y-scale. You have either: 1. Specified an Y axis for auto scaling but have not supplied any plots. 2. Specified a scale manually but have forgot to specify the tick steps',0), 25027 => array('Can\'t open cached CSIM "%s" for reading.',1), 25028 => array('Apache/PHP does not have permission to write to the CSIM cache directory (%s). Check permissions.',1), 25029 => array('Can\'t write CSIM "%s" for writing. Check free space and permissions.',1), 25030 => array('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().',0), 25031 => array('You must specify what scale to use with a call to Graph::SetScale().',0), 25032 => array('No plots for Y-axis nbr:%d',1), 25033 => array('',0), 25034 => array('Can\'t draw unspecified X-scale. No plots specified.',0), 25035 => array('You have enabled clipping. Clipping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (=%d degrees) or disable clipping.',1), 25036 => array('Unknown AxisStyle() : %s',1), 25037 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), 25038 => array('Background image seems to be of different type (has different file extension) than specified imagetype. Specified: %s File: %s',2), 25039 => array('Can\'t read background image: "%s"',1), 25040 => array('It is not possible to specify both a background image and a background country flag.',0), 25041 => array('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.',0), 25042 => array('Unknown background image layout',0), 25043 => array('Unknown title background style.',0), 25044 => array('Cannot use auto scaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).',0), 25045 => array('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/',0), 25046 => array('Specified TTF font family (id=%d) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/',1), 25047 => array('Style %s is not available for font family %s',2), 25048 => array('Unknown font style specification [%s].',1), 25049 => array('Font file "%s" is not readable or does not exist.',1), 25050 => array('First argument to Text::Text() must be a string.',0), 25051 => array('Invalid direction specified for text.',0), 25052 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text',0), 25053 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text',0), 25054 => array('Internal error: Unknown grid axis %s',1), 25055 => array('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead',0), 25056 => array('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.',0), 25057 => array('SetTextTicks() is deprecated. Use SetTextTickInterval() instead.',0), 25058 => array('Text label interval must be specified >= 1.',0), 25059 => array('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.',0), 25060 => array('Unknown alignment specified for X-axis title. (%s)',1), 25061 => array('Unknown alignment specified for Y-axis title. (%s)',1), 25062 => array('Labels at an angle are not supported on Y-axis',0), 25063 => array('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead',0), 25064 => array('Minor or major step size is 0. Check that you haven\'t got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem',0), 25065 => array('Tick positions must be specified as an array()',0), 25066 => array('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.',0), 25067 => array('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tick marks.',0), 25068 => array('A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only \'-\' or \'x\')',0), 25069 => array('Grace must be larger then 0',0), 25070 => array('Your data contains non-numeric values.',0), 25071 => array('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.',0), 25072 => array('You have specified a max value with SetAutoMax() which is smaller than the minimum value used for the scale. This is not possible.',0), 25073 => array('Internal error. Integer scale algorithm comparison out of bound (r=%f)',1), 25074 => array('Internal error. The scale range is negative (%f) [for %s scale] This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the auto scaling to fail.',2), 25075 => array('Can\'t automatically determine ticks since min==max.',0), 25077 => array('Adjustment factor for color must be > 0',0), 25078 => array('Unknown color: %s',1), 25079 => array('Unknown color specification: %s, size=%d',2), 25080 => array('Alpha parameter for color must be between 0.0 and 1.0',0), 25081 => array('Selected graphic format is either not supported or unknown [%s]',1), 25082 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), 25083 => array('Illegal image size when copying image. Size for copied to image is 1 pixel or less.',0), 25084 => array('Failed to create temporary GD canvas. Possible Out of memory problem.',0), 25085 => array('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.',0), 25086 => array('You only seem to have GD 1.x installed. To enable Alphablending requires GD 2.x or higher. Please install GD or make sure the constant USE_GD2 is specified correctly to reflect your installation. By default it tries to auto detect what version of GD you have installed. On some very rare occasions it may falsely detect GD2 where only GD1 is installed. You must then set USE_GD2 to false.',0), 25087 => array('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.',0), 25088 => array('You have a misconfigured GD font support. The call to imagefontwidth() fails.',0), 25089 => array('You have a misconfigured GD font support. The call to imagefontheight() fails.',0), 25090 => array('Unknown direction specified in call to StrokeBoxedText() [%s]',1), 25091 => array('Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.',0), 25092 => array('There is either a configuration problem with TrueType or a problem reading font file "%s" Make sure file exists and is in a readable place for the HTTP process. (If \'basedir\' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.',1), 25093 => array('Can not read font file "%s" in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.',1), 25094 => array('Direction for text most be given as an angle between 0 and 90.',0), 25095 => array('Unknown font font family specification. ',0), 25096 => array('Can\'t allocate any more colors in palette image. Image has already allocated maximum of %d colors and the palette is now full. Change to a truecolor image instead',0), 25097 => array('Color specified as empty string in PushColor().',0), 25098 => array('Negative Color stack index. Unmatched call to PopColor()',0), 25099 => array('Parameters for brightness and Contrast out of range [-1,1]',0), 25100 => array('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.',0), 25101 => array('Illegal numeric argument to SetLineStyle(): (%d)',1), 25102 => array('Illegal string argument to SetLineStyle(): %s',1), 25103 => array('Illegal argument to SetLineStyle %s',1), 25104 => array('Unknown line style: %s',1), 25105 => array('NULL data specified for a filled polygon. Check that your data is not NULL.',0), 25106 => array('Image::FillToBorder : Can not allocate more colors',0), 25107 => array('Can\'t write to file "%s". Check that the process running PHP has enough permission.',1), 25108 => array('Can\'t stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.',0), 25109 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.',0), 25110 => array('Your PHP installation does not support the chosen graphic format: %s',1), 25111 => array('Can\'t delete cached image %s. Permission problem?',1), 25112 => array('Cached imagefile (%s) has file date in the future.',1), 25113 => array('Can\'t delete cached image "%s". Permission problem?',1), 25114 => array('PHP has not enough permissions to write to the cache file "%s". Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.',1), 25115 => array('Can\'t set permission for cached image "%s". Permission problem?',1), 25116 => array('Cant open file from cache "%s"',1), 25117 => array('Can\'t open cached image "%s" for reading.',1), 25118 => array('Can\'t create directory "%s". Make sure PHP has write permission to this directory.',1), 25119 => array('Can\'t set permissions for "%s". Permission problems?',1), 25120 => array('Position for legend must be given as percentage in range 0-1',0), 25121 => array('Empty input data array specified for plot. Must have at least one data point.',0), 25122 => array('Stroke() must be implemented by concrete subclass to class Plot',0), 25123 => array('You can\'t use a text X-scale with specified X-coords. Use a "int" or "lin" scale instead.',0), 25124 => array('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)',0), 25125 => array('Illegal direction for static line',0), 25126 => array('Can\'t create truecolor image. Check that the GD2 library is properly setup with PHP.',0), /* **--------------------------------------------------------------------------------------------- ** Pro-version strings **--------------------------------------------------------------------------------------------- */ /* ** jpgraph_table */ 24001 => array('GTextTable: Invalid argument to Set(). Array argument must be 2 dimensional',0), 24002 => array('GTextTable: Invalid argument to Set()',0), 24003 => array('GTextTable: Wrong number of arguments to GTextTable::SetColor()',0), 24004 => array('GTextTable: Specified cell range to be merged is not valid.',0), 24005 => array('GTextTable: Cannot merge already merged cells in the range: (%d,%d) to (%d,%d)',4), 24006 => array('GTextTable: Column argument = %d is outside specified table size.',1), 24007 => array('GTextTable: Row argument = %d is outside specified table size.',1), 24008 => array('GTextTable: Column and row size arrays must match the dimensions of the table',0), 24009 => array('GTextTable: Number of table columns or rows are 0. Make sure Init() or Set() is called.',0), 24010 => array('GTextTable: No alignment specified in call to SetAlign()',0), 24011 => array('GTextTable: Unknown alignment specified in SetAlign(). Horizontal=%s, Vertical=%s',2), 24012 => array('GTextTable: Internal error. Invalid alignment specified =%s',1), 24013 => array('GTextTable: Argument to FormatNumber() must be a string.',0), 24014 => array('GTextTable: Table is not initilaized with either a call to Set() or Init()',0), 24015 => array('GTextTable: Cell image constrain type must be TIMG_WIDTH or TIMG_HEIGHT',0), /* ** jpgraph_windrose */ 22001 => array('Total percentage for all windrose legs in a windrose plot can not exceed 100% !\n(Current max is: %d)',1), 22002 => array('Graph is too small to have a scale. Please make the graph larger.',0), 22004 => array('Label specification for windrose directions must have 16 values (one for each compass direction).',0), 22005 => array('Line style for radial lines must be on of ("solid","dotted","dashed","longdashed") ',0), 22006 => array('Illegal windrose type specified.',0), 22007 => array('To few values for the range legend.',0), 22008 => array('Internal error: Trying to plot free Windrose even though type is not a free windrose',0), 22009 => array('You have specified the same direction twice, once with an angle and once with a compass direction (%f degrees)',0), 22010 => array('Direction must either be a numeric value or one of the 16 compass directions',0), 22011 => array('Windrose index must be numeric or direction label. You have specified index=%d',1), 22012 => array('Windrose radial axis specification contains a direction which is not enabled.',0), 22013 => array('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index=%d)',1), 22014 => array('Index for compass direction must be between 0 and 15.',0), 22015 => array('You have specified an undefined Windrose plot type.',0), 22016 => array('Windrose leg index must be numeric or direction label.',0), 22017 => array('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.',0), 22018 => array('You have specified data for the same compass direction twice, once with text and once with index (Index=%d)',1), 22019 => array('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.',0), 22020 => array('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.',0), /* ** jpgraph_odometer */ 13001 => array('Unknown needle style (%d).',1), 13002 => array('Value for odometer (%f) is outside specified scale [%f,%f]',3), /* ** jpgraph_barcode */ 1001 => array('Unknown encoder specification: %s',1), 1002 => array('Data validation failed. Can\'t encode [%s] using encoding "%s"',2), 1003 => array('Internal encoding error. Trying to encode %s is not possible in Code 128',1), 1004 => array('Internal barcode error. Unknown UPC-E encoding type: %s',1), 1005 => array('Internal error. Can\'t encode character tuple (%s, %s) in Code-128 charset C',2), 1006 => array('Internal encoding error for CODE 128. Trying to encode control character in CHARSET != A',0), 1007 => array('Internal encoding error for CODE 128. Trying to encode DEL in CHARSET != B',0), 1008 => array('Internal encoding error for CODE 128. Trying to encode small letters in CHARSET != B',0), 1009 => array('Encoding using CODE 93 is not yet supported.',0), 1010 => array('Encoding using POSTNET is not yet supported.',0), 1011 => array('Non supported barcode backend for type %s',1), /* ** PDF417 */ 26001 => array('PDF417: Number of Columns must be >= 1 and <= 30',0), 26002 => array('PDF417: Error level must be between 0 and 8',0), 26003 => array('PDF417: Invalid format for input data to encode with PDF417',0), 26004 => array('PDF417: Can\'t encode given data with error level %d and %d columns since it results in too many symbols or more than 90 rows.',2), 26005 => array('PDF417: Can\'t open file "%s" for writing',1), 26006 => array('PDF417: Internal error. Data files for PDF417 cluster %d is corrupted.',1), 26007 => array('PDF417: Internal error. GetPattern: Illegal Code Value = %d (row=%d)',2), 26008 => array('PDF417: Internal error. Mode not found in mode list!! mode=%d',1), 26009 => array('PDF417: Encode error: Illegal character. Can\'t encode character with ASCII code=%d',1), 26010 => array('PDF417: Internal error: No input data in decode.',0), 26011 => array('PDF417: Encoding error. Can\'t use numeric encoding on non-numeric data.',0), 26012 => array('PDF417: Internal error. No input data to decode for Binary compressor.',0), 26013 => array('PDF417: Internal error. Checksum error. Coefficient tables corrupted.',0), 26014 => array('PDF417: Internal error. No data to calculate codewords on.',0), 26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)',1), 26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.',0), ); ?> |
From: Karsten D. <k-...@us...> - 2006-04-27 11:33:10
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph2/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10567/jpgraph2/lang Added Files: en.inc.php Log Message: Added seperate JPGraph 1.x and 2.x libraries --- NEW FILE: en.inc.php --- <?php /*======================================================================= // File: ERRMSG_EN.INC.PHP // Description: English language file for error messages // Created: 2006-01-25 // Author: Johan Persson (jo...@ad...) // Ver: $Id: en.inc.php,v 1.1 2006/04/27 11:33:03 k-fish Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ // Note: Format of each error message is array(<error message>,<number of arguments>) $_jpg_messages = array( /* ** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text */ 10 => array('<table border=1><tr><td><font color=darkred size=4><b>JpGraph Error:</b> HTTP headers have already been sent.<br>Caused by output from file <b>%s</b> at line <b>%d</b>.</font></td></tr><tr><td><b>Explanation:</b><br>HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).<p>Most likely you have some text in your script before the call to <i>Graph::Stroke()</i>. If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser. <p>For example it is a common mistake to leave a blank line before the opening "<b><?php</b>".</td></tr></table>',2), /* ** Setup errors */ 11 => array('No path specified for CACHE_DIR. Please specify CACHE_DIR manually in jpg-config.inc',0), 12 => array('No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in jpg-config.inc).',0), /* ** jpgraph_bar */ 2001 => array('Number of colors is not the same as the number of patterns in BarPlot::SetPattern()',0), 2002 => array('Unknown pattern specified in call to BarPlot::SetPattern()',0), 2003 => array('Number of X and Y points are not equal. Number of X-points: %d Number of Y-points: %d',2), 2004 => array('All values for a barplot must be numeric. You have specified value nr [%d] == %s',2), 2005 => array('You have specified an empty array for shadow colors in the bar plot.',0), 2006 => array('Unknown position for values on bars : %s',1), 2007 => array('Cannot create GroupBarPlot from empty plot array.',0), 2008 => array('Group bar plot element nbr %d is undefined or empty.',0), 2009 => array('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the GroupBar plot from an array of BarPlot or AccBarPlot objects. (Class = %s)',1), 2010 => array('Cannot create AccBarPlot from empty plot array.',0), 2011 => array('Acc bar plot element nbr %d is undefined or empty.',1), 2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)',1), 2013 => array('You have specified an empty array for shadow colors in the bar plot.',0), 2014 => array('Number of datapoints for each data set in accbarplot must be the same',0), /* ** jpgraph_date */ 3001 => array('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both',0), /* ** jpgraph_error */ 4002 => array('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3',0), /* ** jpgraph_flags */ 5001 => array('Unknown flag size (%d).',1), 5002 => array('Flag index %s does not exist.',1), 5003 => array('Invalid ordinal number (%d) specified for flag index.',1), 5004 => array('The (partial) country name %s does not have a corresponding flag image. The flag may still exist but under another name, e.g. instead of "usa" try "united states".',1), /* ** jpgraph_gantt */ 6001 => array('Internal error. Height for ActivityTitles is < 0',0), 6002 => array('You can\'t specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.',0), 6003 => array('Invalid format for Constrain parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)',1), 6004 => array('Invalid format for Progress parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)',1), 6005 => array('SetScale() is not meaningful with Gantt charts.',0), 6006 => array('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]',0), 6007 => array('Sanity check for automatic Gantt chart size failed. Either the width (=%d) or height (=%d) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.',2), 6008 => array('You have specified a constrain from row=%d to row=%d which does not have any activity',2), 6009 => array('Unknown constrain type specified from row=%d to row=%d',2), 6010 => array('Illegal icon index for Gantt builtin icon [%d]',1), 6011 => array('Argument to IconImage must be string or integer',0), 6012 => array('Unknown type in Gantt object title specification',0), 6015 => array('Illegal vertical position %d',1), 6016 => array('Date string (%s) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30',1), 6017 => array('Unknown date format in GanttScale (%s).',1), 6018 => array('Interval for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an interval of %d minutes.',1), 6019 => array('The available width (%d) for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.',1), 6020 => array('Interval for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an interval of %d',1), 6021 => array('Unknown formatting style for week.',0), 6022 => array('Gantt scale has not been specified.',0), 6023 => array('If you display both hour and minutes the hour interval must be 1 (Otherwise it doesn\'t make sense to display minutes).',0), 6024 => array('CSIM Target must be specified as a string. Start of target is: %d',1), 6025 => array('CSIM Alt text must be specified as a string. Start of alt text is: %d',1), 6027 => array('Progress value must in range [0, 1]',0), 6028 => array('Specified height (%d) for gantt bar is out of range.',1), 6029 => array('Offset for vertical line must be in range [0,1]',0), 6030 => array('Unknown arrow direction for link.',0), 6031 => array('Unknown arrow type for link.',0), 6032 => array('Internal error: Unknown path type (=%d) specified for link.',1), /* ** jpgraph_gradient */ 7001 => array('Unknown gradient style (=%d).',1), /* ** jpgraph_iconplot */ 8001 => array('Mix value for icon must be between 0 and 100.',0), 8002 => array('Anchor position for icons must be one of "top", "bottom", "left", "right" or "center"',0), 8003 => array('It is not possible to specify both an image file and a country flag for the same icon.',0), 8004 => array('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.',0), /* ** jpgraph_imgtrans */ 9001 => array('Value for image transformation out of bounds. Vanishing point on horizon must be specified as a value between 0 and 1.',0), /* ** jpgraph_lineplot */ 10001 => array('LinePlot::SetFilled() is deprecated. Use SetFillColor()',0), 10002 => array('Plot too complicated for fast line Stroke. Use standard Stroke()',0), /* ** jpgraph_log */ 11001 => array('Your data contains non-numeric values.',0), 11002 => array('Negative data values can not be used in a log scale.',0), 11003 => array('Your data contains non-numeric values.',0), 11004 => array('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.',0), 11005 => array('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.',0), /* ** jpgraph_mgraph */ 12001 => array("You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.",0), 12002 => array('Incorrect file name for MGraph::SetBackgroundImage() : %s Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), 12003 => array('Unknown file extension (%s) in MGraph::SetBackgroundImage() for filename: %s',2), 12004 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), 12005 => array('Can\'t read background image: %s',1), 12006 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), 12007 => array('Argument to MGraph::Add() is not a valid GD image handle.',0), 12008 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats.',0), 12009 => array('Your PHP installation does not support the chosen graphic format: %s',1), 12010 => array('Can\'t create or stream image to file %s Check that PHP has enough permission to write a file to the current directory.',1), 12011 => array('Can\'t create truecolor image. Check that you really have GD2 library installed.',0), 12012 => array('Can\'t create image. Check that you really have GD2 library installed.',0), /* ** jpgraph_pie3d */ 14001 => array('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.',0), 14002 => array('PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.',0), 14003 => array('Internal assertion failed. Pie3D::Pie3DSlice',0), 14004 => array('Slice start angle must be between 0 and 360 degrees.',0), 14005 => array('Pie3D Internal error: Trying to wrap twice when looking for start index',0,), 14006 => array('Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking.',0), 14007 => array('Width for 3D Pie is 0. Specify a size > 0',0), /* ** jpgraph_pie */ 15001 => array('PiePLot::SetTheme() Unknown theme: %s',1), 15002 => array('Argument to PiePlot::ExplodeSlice() must be an integer',0), 15003 => array('Argument to PiePlot::Explode() must be an array with integer distances.',0), 15004 => array('Slice start angle must be between 0 and 360 degrees.',0), 15005 => array('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.',0), 15006 => array('PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]',0), 15007 => array('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.',0), 15008 => array('PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not %d).',1), 15009 => array('Illegal pie plot. Sum of all data is zero for Pie Plot',0), 15010 => array('Sum of all data is 0 for Pie.',0), 15011 => array('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.',0), /* ** jpgraph_plotband */ 16001 => array('Density for pattern must be between 1 and 100. (You tried %f)',1), 16002 => array('No positions specified for pattern.',0), 16003 => array('Unknown pattern specification (%d)',0), 16004 => array('Min value for plotband is larger than specified max value. Please correct.',0), /* ** jpgraph_polar */ 17001 => array('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).',0), 17002 => array('Unknown alignment specified for X-axis title. (%s)',1), //17003 => array('Set90AndMargin() is not supported for polar graphs.',0), 17004 => array('Unknown scale type for polar graph. Must be "lin" or "log"',0), /* ** jpgraph_radar */ 18001 => array('Client side image maps not supported for RadarPlots.',0), 18002 => array('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.',0), 18003 => array('Illegal scale for radarplot (%s). Must be \'lin\' or \'log\'',1), 18004 => array('Radar Plot size must be between 0.1 and 1. (Your value=%f)',1), 18005 => array('RadarPlot Unsupported Tick density: %d',1), 18006 => array('Minimum data %f (Radar plots should only be used when all data points > 0)',1), 18007 => array('Number of titles does not match number of points in plot.',0), 18008 => array('Each radar plot must have the same number of data points.',0), /* ** jpgraph_regstat */ 19001 => array('Spline: Number of X and Y coordinates must be the same',0), 19002 => array('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.',0), 19003 => array('Bezier: Number of X and Y coordinates must be the same',0), /* ** jpgraph_scatter */ 20001 => array('Fieldplots must have equal number of X and Y points.',0), 20002 => array('Fieldplots must have an angle specified for each X and Y points.',0), 20003 => array('Scatterplot must have equal number of X and Y points.',0), /* ** jpgraph_stock */ 21001 => array('Data values for Stock charts must contain an even multiple of %d data points.',1), /* ** jpgraph_plotmark */ 23001 => array('This marker "%s" does not exist in color with index: %d',2), 23002 => array('Mark color index too large for marker "%s"',1), 23003 => array('A filename must be specified if you set the mark type to MARK_IMG.',0), /* ** jpgraph_utils */ 24001 => array('FuncGenerator : No function specified. ',0), 24002 => array('FuncGenerator : Syntax error in function specification ',0), /* ** jpgraph */ 25001 => array('This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)',0), 25002 => array('Your PHP installation does not seem to have the required GD library. Please see the PHP documentation on how to install and enable the GD library.',0), 25003 => array('General PHP error : At %s:%d : %s',3), 25004 => array('General PHP error : %s ',1), 25005 => array('Can\'t access PHP_SELF, PHP global variable. You can\'t run PHP from command line if you want to use the \'auto\' naming of cache or image files.',0), 25006 => array('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).',0), 25007 => array('You are trying to use the locale (%s) which your PHP installation does not support. Hint: Use \'\' to indicate the default locale for this geographic region.',1), 25008 => array('Image width/height argument in Graph::Graph() must be numeric',0), 25009 => array('You must specify what scale to use with a call to Graph::SetScale()',0), 25010 => array('Graph::Add() You tried to add a null plot to the graph.',0), 25011 => array('Graph::AddY2() You tried to add a null plot to the graph.',0), 25012 => array('Graph::AddYN() You tried to add a null plot to the graph.',0), 25013 => array('You can only add standard plots to multiple Y-axis',0), 25014 => array('Graph::AddText() You tried to add a null text to the graph.',0), 25015 => array('Graph::AddLine() You tried to add a null line to the graph.',0), 25016 => array('Graph::AddBand() You tried to add a null band to the graph.',0), 25017 => array('You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.',0), 25018 => array('Incorrect file name for Graph::SetBackgroundImage() : "%s" Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), 25019 => array('Unknown file extension (%s) in Graph::SetBackgroundImage() for filename: "%s"',2), 25020 => array('Graph::SetScale(): Specified Max value must be larger than the specified Min value.',0), 25021 => array('Unknown scale specification for Y-scale. (%s)',1), 25022 => array('Unknown scale specification for X-scale. (%s)',1), 25023 => array('Unsupported Y2 axis type: "%s" Must be one of (lin,log,int)',1), 25024 => array('Unsupported Y axis type: "%s" Must be one of (lin,log,int)',1), 25025 => array('Unsupported Tick density: %d',1), 25026 => array('Can\'t draw unspecified Y-scale. You have either: 1. Specified an Y axis for auto scaling but have not supplied any plots. 2. Specified a scale manually but have forgot to specify the tick steps',0), 25027 => array('Can\'t open cached CSIM "%s" for reading.',1), 25028 => array('Apache/PHP does not have permission to write to the CSIM cache directory (%s). Check permissions.',1), 25029 => array('Can\'t write CSIM "%s" for writing. Check free space and permissions.',1), 25030 => array('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().',0), 25031 => array('You must specify what scale to use with a call to Graph::SetScale().',0), 25032 => array('No plots for Y-axis nbr:%d',1), 25033 => array('',0), 25034 => array('Can\'t draw unspecified X-scale. No plots specified.',0), 25035 => array('You have enabled clipping. Clipping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (=%d degrees) or disable clipping.',1), 25036 => array('Unknown AxisStyle() : %s',1), 25037 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), 25038 => array('Background image seems to be of different type (has different file extension) than specified imagetype. Specified: %s File: %s',2), 25039 => array('Can\'t read background image: "%s"',1), 25040 => array('It is not possible to specify both a background image and a background country flag.',0), 25041 => array('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.',0), 25042 => array('Unknown background image layout',0), 25043 => array('Unknown title background style.',0), 25044 => array('Cannot use auto scaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).',0), 25045 => array('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/',0), 25046 => array('Specified TTF font family (id=%d) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/',1), 25047 => array('Style %s is not available for font family %s',2), 25048 => array('Unknown font style specification [%s].',1), 25049 => array('Font file "%s" is not readable or does not exist.',1), 25050 => array('First argument to Text::Text() must be a string.',0), 25051 => array('Invalid direction specified for text.',0), 25052 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text',0), 25053 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text',0), 25054 => array('Internal error: Unknown grid axis %s',1), 25055 => array('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead',0), 25056 => array('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.',0), 25057 => array('SetTextTicks() is deprecated. Use SetTextTickInterval() instead.',0), 25058 => array('Text label interval must be specified >= 1.',0), 25059 => array('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.',0), 25060 => array('Unknown alignment specified for X-axis title. (%s)',1), 25061 => array('Unknown alignment specified for Y-axis title. (%s)',1), 25062 => array('Labels at an angle are not supported on Y-axis',0), 25063 => array('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead',0), 25064 => array('Minor or major step size is 0. Check that you haven\'t got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem',0), 25065 => array('Tick positions must be specified as an array()',0), 25066 => array('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.',0), 25067 => array('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tick marks.',0), 25068 => array('A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only \'-\' or \'x\')',0), 25069 => array('Grace must be larger then 0',0), 25070 => array('Your data contains non-numeric values.',0), 25071 => array('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.',0), 25072 => array('You have specified a max value with SetAutoMax() which is smaller than the minimum value used for the scale. This is not possible.',0), 25073 => array('Internal error. Integer scale algorithm comparison out of bound (r=%f)',1), 25074 => array('Internal error. The scale range is negative (%f) [for %s scale] This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the auto scaling to fail.',2), 25075 => array('Can\'t automatically determine ticks since min==max.',0), 25077 => array('Adjustment factor for color must be > 0',0), 25078 => array('Unknown color: %s',1), 25079 => array('Unknown color specification: %s, size=%d',2), 25080 => array('Alpha parameter for color must be between 0.0 and 1.0',0), 25081 => array('Selected graphic format is either not supported or unknown [%s]',1), 25082 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), 25083 => array('Illegal image size when copying image. Size for copied to image is 1 pixel or less.',0), 25084 => array('Failed to create temporary GD canvas. Possible Out of memory problem.',0), 25085 => array('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.',0), 25086 => array('You only seem to have GD 1.x installed. To enable Alphablending requires GD 2.x or higher. Please install GD or make sure the constant USE_GD2 is specified correctly to reflect your installation. By default it tries to auto detect what version of GD you have installed. On some very rare occasions it may falsely detect GD2 where only GD1 is installed. You must then set USE_GD2 to false.',0), 25087 => array('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.',0), 25088 => array('You have a misconfigured GD font support. The call to imagefontwidth() fails.',0), 25089 => array('You have a misconfigured GD font support. The call to imagefontheight() fails.',0), 25090 => array('Unknown direction specified in call to StrokeBoxedText() [%s]',1), 25091 => array('Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.',0), 25092 => array('There is either a configuration problem with TrueType or a problem reading font file "%s" Make sure file exists and is in a readable place for the HTTP process. (If \'basedir\' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.',1), 25093 => array('Can not read font file "%s" in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.',1), 25094 => array('Direction for text most be given as an angle between 0 and 90.',0), 25095 => array('Unknown font font family specification. ',0), 25096 => array('Can\'t allocate any more colors in palette image. Image has already allocated maximum of %d colors and the palette is now full. Change to a truecolor image instead',0), 25097 => array('Color specified as empty string in PushColor().',0), 25098 => array('Negative Color stack index. Unmatched call to PopColor()',0), 25099 => array('Parameters for brightness and Contrast out of range [-1,1]',0), 25100 => array('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.',0), 25101 => array('Illegal numeric argument to SetLineStyle(): (%d)',1), 25102 => array('Illegal string argument to SetLineStyle(): %s',1), 25103 => array('Illegal argument to SetLineStyle %s',1), 25104 => array('Unknown line style: %s',1), 25105 => array('NULL data specified for a filled polygon. Check that your data is not NULL.',0), 25106 => array('Image::FillToBorder : Can not allocate more colors',0), 25107 => array('Can\'t write to file "%s". Check that the process running PHP has enough permission.',1), 25108 => array('Can\'t stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.',0), 25109 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.',0), 25110 => array('Your PHP installation does not support the chosen graphic format: %s',1), 25111 => array('Can\'t delete cached image %s. Permission problem?',1), 25112 => array('Cached imagefile (%s) has file date in the future.',1), 25113 => array('Can\'t delete cached image "%s". Permission problem?',1), 25114 => array('PHP has not enough permissions to write to the cache file "%s". Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.',1), 25115 => array('Can\'t set permission for cached image "%s". Permission problem?',1), 25116 => array('Cant open file from cache "%s"',1), 25117 => array('Can\'t open cached image "%s" for reading.',1), 25118 => array('Can\'t create directory "%s". Make sure PHP has write permission to this directory.',1), 25119 => array('Can\'t set permissions for "%s". Permission problems?',1), 25120 => array('Position for legend must be given as percentage in range 0-1',0), 25121 => array('Empty input data array specified for plot. Must have at least one data point.',0), 25122 => array('Stroke() must be implemented by concrete subclass to class Plot',0), 25123 => array('You can\'t use a text X-scale with specified X-coords. Use a "int" or "lin" scale instead.',0), 25124 => array('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)',0), 25125 => array('Illegal direction for static line',0), 25126 => array('Can\'t create truecolor image. Check that the GD2 library is properly setup with PHP.',0), /* **--------------------------------------------------------------------------------------------- ** Pro-version strings **--------------------------------------------------------------------------------------------- */ /* ** jpgraph_table */ 24001 => array('GTextTable: Invalid argument to Set(). Array argument must be 2 dimensional',0), 24002 => array('GTextTable: Invalid argument to Set()',0), 24003 => array('GTextTable: Wrong number of arguments to GTextTable::SetColor()',0), 24004 => array('GTextTable: Specified cell range to be merged is not valid.',0), 24005 => array('GTextTable: Cannot merge already merged cells in the range: (%d,%d) to (%d,%d)',4), 24006 => array('GTextTable: Column argument = %d is outside specified table size.',1), 24007 => array('GTextTable: Row argument = %d is outside specified table size.',1), 24008 => array('GTextTable: Column and row size arrays must match the dimensions of the table',0), 24009 => array('GTextTable: Number of table columns or rows are 0. Make sure Init() or Set() is called.',0), 24010 => array('GTextTable: No alignment specified in call to SetAlign()',0), 24011 => array('GTextTable: Unknown alignment specified in SetAlign(). Horizontal=%s, Vertical=%s',2), 24012 => array('GTextTable: Internal error. Invalid alignment specified =%s',1), 24013 => array('GTextTable: Argument to FormatNumber() must be a string.',0), 24014 => array('GTextTable: Table is not initilaized with either a call to Set() or Init()',0), 24015 => array('GTextTable: Cell image constrain type must be TIMG_WIDTH or TIMG_HEIGHT',0), /* ** jpgraph_windrose */ 22001 => array('Total percentage for all windrose legs in a windrose plot can not exceed 100% !\n(Current max is: %d)',1), 22002 => array('Graph is too small to have a scale. Please make the graph larger.',0), 22004 => array('Label specification for windrose directions must have 16 values (one for each compass direction).',0), 22005 => array('Line style for radial lines must be on of ("solid","dotted","dashed","longdashed") ',0), 22006 => array('Illegal windrose type specified.',0), 22007 => array('To few values for the range legend.',0), 22008 => array('Internal error: Trying to plot free Windrose even though type is not a free windrose',0), 22009 => array('You have specified the same direction twice, once with an angle and once with a compass direction (%f degrees)',0), 22010 => array('Direction must either be a numeric value or one of the 16 compass directions',0), 22011 => array('Windrose index must be numeric or direction label. You have specified index=%d',1), 22012 => array('Windrose radial axis specification contains a direction which is not enabled.',0), 22013 => array('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index=%d)',1), 22014 => array('Index for compass direction must be between 0 and 15.',0), 22015 => array('You have specified an undefined Windrose plot type.',0), 22016 => array('Windrose leg index must be numeric or direction label.',0), 22017 => array('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.',0), 22018 => array('You have specified data for the same compass direction twice, once with text and once with index (Index=%d)',1), 22019 => array('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.',0), 22020 => array('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.',0), /* ** jpgraph_odometer */ 13001 => array('Unknown needle style (%d).',1), 13002 => array('Value for odometer (%f) is outside specified scale [%f,%f]',3), /* ** jpgraph_barcode */ 1001 => array('Unknown encoder specification: %s',1), 1002 => array('Data validation failed. Can\'t encode [%s] using encoding "%s"',2), 1003 => array('Internal encoding error. Trying to encode %s is not possible in Code 128',1), 1004 => array('Internal barcode error. Unknown UPC-E encoding type: %s',1), 1005 => array('Internal error. Can\'t encode character tuple (%s, %s) in Code-128 charset C',2), 1006 => array('Internal encoding error for CODE 128. Trying to encode control character in CHARSET != A',0), 1007 => array('Internal encoding error for CODE 128. Trying to encode DEL in CHARSET != B',0), 1008 => array('Internal encoding error for CODE 128. Trying to encode small letters in CHARSET != B',0), 1009 => array('Encoding using CODE 93 is not yet supported.',0), 1010 => array('Encoding using POSTNET is not yet supported.',0), 1011 => array('Non supported barcode backend for type %s',1), /* ** PDF417 */ 26001 => array('PDF417: Number of Columns must be >= 1 and <= 30',0), 26002 => array('PDF417: Error level must be between 0 and 8',0), 26003 => array('PDF417: Invalid format for input data to encode with PDF417',0), 26004 => array('PDF417: Can\'t encode given data with error level %d and %d columns since it results in too many symbols or more than 90 rows.',2), 26005 => array('PDF417: Can\'t open file "%s" for writing',1), 26006 => array('PDF417: Internal error. Data files for PDF417 cluster %d is corrupted.',1), 26007 => array('PDF417: Internal error. GetPattern: Illegal Code Value = %d (row=%d)',2), 26008 => array('PDF417: Internal error. Mode not found in mode list!! mode=%d',1), 26009 => array('PDF417: Encode error: Illegal character. Can\'t encode character with ASCII code=%d',1), 26010 => array('PDF417: Internal error: No input data in decode.',0), 26011 => array('PDF417: Encoding error. Can\'t use numeric encoding on non-numeric data.',0), 26012 => array('PDF417: Internal error. No input data to decode for Binary compressor.',0), 26013 => array('PDF417: Internal error. Checksum error. Coefficient tables corrupted.',0), 26014 => array('PDF417: Internal error. No data to calculate codewords on.',0), 26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)',1), 26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.',0), ); ?> |
From: Karsten D. <k-...@us...> - 2006-04-27 11:31:45
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph2/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9859/lang Log Message: Directory /cvsroot/moregroupware/mgw/include/jpgraph2/lang added to the repository |
From: Karsten D. <k-...@us...> - 2006-04-27 11:31:35
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9753/jpgraph2 Log Message: Directory /cvsroot/moregroupware/mgw/include/jpgraph2 added to the repository |
From: Karsten D. <k-...@us...> - 2006-04-27 11:30:34
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph1/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8769/lang Log Message: Directory /cvsroot/moregroupware/mgw/include/jpgraph1/lang added to the repository |
From: Karsten D. <k-...@us...> - 2006-04-27 11:28:42
|
Update of /cvsroot/moregroupware/mgw/include/adodb/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7094/include/adodb/xsl Added Files: convert-0.1-0.3.xsl convert-0.2-0.3.xsl remove-0.3.xsl Log Message: Update to 4.80 --- NEW FILE: convert-0.2-0.3.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/> <!-- Schema --> <xsl:template match="/"> <xsl:comment> ADODB XMLSchema http://adodb-xmlschema.sourceforge.net </xsl:comment> <xsl:element name="schema"> <xsl:attribute name="version">0.3</xsl:attribute> <xsl:apply-templates select="schema/table|schema/sql"/> </xsl:element> </xsl:template> <!-- Table --> <xsl:template match="table"> <xsl:element name="table"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@version) > 0"> <xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:choose> <xsl:when test="count(DROP) > 0"> <xsl:element name="DROP"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="field"/> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="constraint"/> <xsl:apply-templates select="opt"/> <xsl:apply-templates select="index"/> <xsl:apply-templates select="data"/> </xsl:element> </xsl:template> <!-- Field --> <xsl:template match="field"> <xsl:element name="field"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute> <xsl:if test="string-length(@size) > 0"> <xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="string-length(@opts) = 0"> <xsl:if test="count(UNSIGNED) > 0"> <xsl:element name="UNSIGNED"/> </xsl:if> </xsl:when> <xsl:when test="@opts = 'UNSIGNED'"> <xsl:element name="UNSIGNED"/> </xsl:when> <xsl:when test="contains(@opts,'UNSIGNED')"> <xsl:attribute name="opts"> <xsl:value-of select="concat(substring-before(@opts,'UNSIGNED'),substring-after(@opts,'UNSIGNED'))"/> </xsl:attribute> <xsl:element name="UNSIGNED"/> </xsl:when> <xsl:otherwise> <xsl:attribute name="opts"><xsl:value-of select="@opts"/></xsl:attribute> <xsl:if test="count(UNSIGNED) > 0"> <xsl:element name="UNSIGNED"/> </xsl:if> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="descr[1]"/> <xsl:choose> <xsl:when test="count(PRIMARY) > 0"> <xsl:element name="PRIMARY"/> </xsl:when> <xsl:when test="count(KEY) > 0"> <xsl:element name="KEY"/> </xsl:when> <xsl:when test="count(NOTNULL) > 0"> <xsl:element name="NOTNULL"/> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="count(AUTO) > 0"> <xsl:element name="AUTO"/> </xsl:when> <xsl:when test="count(AUTOINCREMENT) > 0"> <xsl:element name="AUTOINCREMENT"/> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="count(DEFAULT) > 0"> <xsl:element name="DEFAULT"> <xsl:attribute name="value"> <xsl:value-of select="DEFAULT[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> <xsl:when test="count(DEFDATE) > 0"> <xsl:element name="DEFDATE"> <xsl:attribute name="value"> <xsl:value-of select="DEFDATE[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> <xsl:when test="count(DEFTIMESTAMP) > 0"> <xsl:element name="DEFTIMESTAMP"> <xsl:attribute name="value"> <xsl:value-of select="DEFTIMESTAMP[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> </xsl:choose> <xsl:if test="count(NOQUOTE) > 0"> <xsl:element name="NOQUOTE"/> </xsl:if> <xsl:apply-templates select="constraint"/> <xsl:apply-templates select="opt"/> </xsl:element> </xsl:template> <!-- Constraint --> <xsl:template match="constraint"> <xsl:element name="constraint"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Opt --> <xsl:template match="opt"> <xsl:element name="opt"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Index --> <xsl:template match="index"> <xsl:element name="index"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:apply-templates select="descr[1]"/> <xsl:if test="count(CLUSTERED) > 0"> <xsl:element name="CLUSTERED"/> </xsl:if> <xsl:if test="count(BITMAP) > 0"> <xsl:element name="BITMAP"/> </xsl:if> <xsl:if test="count(UNIQUE) > 0"> <xsl:element name="UNIQUE"/> </xsl:if> <xsl:if test="count(FULLTEXT) > 0"> <xsl:element name="FULLTEXT"/> </xsl:if> <xsl:if test="count(HASH) > 0"> <xsl:element name="HASH"/> </xsl:if> <xsl:choose> <xsl:when test="count(DROP) > 0"> <xsl:element name="DROP"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="col"/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> <!-- Index Column --> <xsl:template match="col"> <xsl:element name="col"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- SQL QuerySet --> <xsl:template match="sql"> <xsl:element name="sql"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@key) > 0"> <xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@prefixmethod) > 0"> <xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:apply-templates select="query"/> </xsl:element> </xsl:template> <!-- Query --> <xsl:template match="query"> <xsl:element name="query"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Description --> <xsl:template match="descr"> <xsl:element name="descr"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Data --> <xsl:template match="data"> <xsl:element name="data"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:apply-templates select="row"/> </xsl:element> </xsl:template> <!-- Data Row --> <xsl:template match="row"> <xsl:element name="row"> <xsl:apply-templates select="f"/> </xsl:element> </xsl:template> <!-- Data Field --> <xsl:template match="f"> <xsl:element name="f"> <xsl:if test="string-length(@name) > 0"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> </xsl:if> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> </xsl:stylesheet> --- NEW FILE: remove-0.3.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/> <!-- Schema --> <xsl:template match="/"> <xsl:comment> ADODB XMLSchema http://adodb-xmlschema.sourceforge.net </xsl:comment> <xsl:comment> Uninstallation Schema </xsl:comment> <xsl:element name="schema"> <xsl:attribute name="version">0.3</xsl:attribute> <xsl:apply-templates select="schema/table"> <xsl:sort select="position()" data-type="number" order="descending"/> </xsl:apply-templates> </xsl:element> </xsl:template> <!-- Table --> <xsl:template match="table"> <xsl:if test="count(DROP) = 0"> <xsl:element name="table"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@version) > 0"> <xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:element name="DROP"/> </xsl:element> </xsl:if> </xsl:template> <!-- Description --> <xsl:template match="descr"> <xsl:element name="descr"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> </xsl:stylesheet> --- NEW FILE: convert-0.1-0.3.xsl --- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" omit-xml-declaration="no" encoding="UTF-8"/> <!-- Schema --> <xsl:template match="/"> <xsl:comment> ADODB XMLSchema http://adodb-xmlschema.sourceforge.net </xsl:comment> <xsl:element name="schema"> <xsl:attribute name="version">0.3</xsl:attribute> <xsl:apply-templates select="schema/table|schema/sql"/> </xsl:element> </xsl:template> <!-- Table --> <xsl:template match="table"> <xsl:variable name="table_name" select="@name"/> <xsl:element name="table"> <xsl:attribute name="name"><xsl:value-of select="$table_name"/></xsl:attribute> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@version) > 0"> <xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:choose> <xsl:when test="count(DROP) > 0"> <xsl:element name="DROP"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="field"/> </xsl:otherwise> </xsl:choose> <xsl:apply-templates select="constraint"/> <xsl:apply-templates select="../index[@table=$table_name]"/> </xsl:element> </xsl:template> <!-- Field --> <xsl:template match="field"> <xsl:element name="field"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute> <xsl:if test="string-length(@size) > 0"> <xsl:attribute name="size"><xsl:value-of select="@size"/></xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="string-length(@opts) = 0"/> <xsl:when test="@opts = 'UNSIGNED'"> <xsl:element name="UNSIGNED"/> </xsl:when> <xsl:when test="contains(@opts,'UNSIGNED')"> <xsl:attribute name="opts"> <xsl:value-of select="concat(substring-before(@opts,'UNSIGNED'),substring-after(@opts,'UNSIGNED'))"/> </xsl:attribute> <xsl:element name="UNSIGNED"/> </xsl:when> <xsl:otherwise> <xsl:attribute name="opts"><xsl:value-of select="@opts"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:choose> <xsl:when test="count(PRIMARY) > 0"> <xsl:element name="PRIMARY"/> </xsl:when> <xsl:when test="count(KEY) > 0"> <xsl:element name="KEY"/> </xsl:when> <xsl:when test="count(NOTNULL) > 0"> <xsl:element name="NOTNULL"/> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="count(AUTO) > 0"> <xsl:element name="AUTO"/> </xsl:when> <xsl:when test="count(AUTOINCREMENT) > 0"> <xsl:element name="AUTOINCREMENT"/> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="count(DEFAULT) > 0"> <xsl:element name="DEFAULT"> <xsl:attribute name="value"> <xsl:value-of select="DEFAULT[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> <xsl:when test="count(DEFDATE) > 0"> <xsl:element name="DEFDATE"> <xsl:attribute name="value"> <xsl:value-of select="DEFDATE[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> <xsl:when test="count(DEFTIMESTAMP) > 0"> <xsl:element name="DEFTIMESTAMP"> <xsl:attribute name="value"> <xsl:value-of select="DEFTIMESTAMP[1]/@value"/> </xsl:attribute> </xsl:element> </xsl:when> </xsl:choose> <xsl:if test="count(NOQUOTE) > 0"> <xsl:element name="NOQUOTE"/> </xsl:if> <xsl:apply-templates select="constraint"/> </xsl:element> </xsl:template> <!-- Constraint --> <xsl:template match="constraint"> <xsl:element name="constraint"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Index --> <xsl:template match="index"> <xsl:element name="index"> <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> <xsl:apply-templates select="descr[1]"/> <xsl:if test="count(CLUSTERED) > 0"> <xsl:element name="CLUSTERED"/> </xsl:if> <xsl:if test="count(BITMAP) > 0"> <xsl:element name="BITMAP"/> </xsl:if> <xsl:if test="count(UNIQUE) > 0"> <xsl:element name="UNIQUE"/> </xsl:if> <xsl:if test="count(FULLTEXT) > 0"> <xsl:element name="FULLTEXT"/> </xsl:if> <xsl:if test="count(HASH) > 0"> <xsl:element name="HASH"/> </xsl:if> <xsl:choose> <xsl:when test="count(DROP) > 0"> <xsl:element name="DROP"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="col"/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> <!-- Index Column --> <xsl:template match="col"> <xsl:element name="col"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- SQL QuerySet --> <xsl:template match="sql"> <xsl:element name="sql"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@key) > 0"> <xsl:attribute name="key"><xsl:value-of select="@key"/></xsl:attribute> </xsl:if> <xsl:if test="string-length(@prefixmethod) > 0"> <xsl:attribute name="prefixmethod"><xsl:value-of select="@prefixmethod"/></xsl:attribute> </xsl:if> <xsl:apply-templates select="descr[1]"/> <xsl:apply-templates select="query"/> </xsl:element> </xsl:template> <!-- Query --> <xsl:template match="query"> <xsl:element name="query"> <xsl:if test="string-length(@platform) > 0"> <xsl:attribute name="platform"><xsl:value-of select="@platform"/></xsl:attribute> </xsl:if> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> <!-- Description --> <xsl:template match="descr"> <xsl:element name="descr"> <xsl:value-of select="normalize-space(text())"/> </xsl:element> </xsl:template> </xsl:stylesheet> |
From: Karsten D. <k-...@us...> - 2006-04-27 11:28:42
|
Update of /cvsroot/moregroupware/mgw/include/adodb/drivers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7094/include/adodb/drivers Added Files: adodb-odbc_db2.inc.php Log Message: Update to 4.80 --- NEW FILE: adodb-odbc_db2.inc.php --- <?php /* V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, the BSD license will take precedence. Set tabs to 4 for best viewing. Latest version is available at http://adodb.sourceforge.net DB2 data driver. Requires ODBC. From phpdb list: Hi Andrew, thanks a lot for your help. Today we discovered what our real problem was: After "playing" a little bit with the php-scripts that try to connect to the IBM DB2, we set the optional parameter Cursortype when calling odbc_pconnect(....). And the exciting thing: When we set the cursor type to SQL_CUR_USE_ODBC Cursor Type, then the whole query speed up from 1 till 10 seconds to 0.2 till 0.3 seconds for 100 records. Amazing!!! Therfore, PHP is just almost fast as calling the DB2 from Servlets using JDBC (don't take too much care about the speed at whole: the database was on a completely other location, so the whole connection was made over a slow network connection). I hope this helps when other encounter the same problem when trying to connect to DB2 from PHP. Kind regards, Christian Szardenings 2 Oct 2001 Mark Newnham has discovered that the SQL_CUR_USE_ODBC is not supported by IBM's DB2 ODBC driver, so this must be a 3rd party ODBC driver. From the IBM CLI Reference: SQL_ATTR_ODBC_CURSORS (DB2 CLI v5) This connection attribute is defined by ODBC, but is not supported by DB2 CLI. Any attempt to set or get this attribute will result in an SQLSTATE of HYC00 (Driver not capable). A 32-bit option specifying how the Driver Manager uses the ODBC cursor library. So I guess this means the message [above] was related to using a 3rd party odbc driver. Setting SQL_CUR_USE_ODBC ======================== To set SQL_CUR_USE_ODBC for drivers that require it, do this: $db = NewADOConnection('db2'); $db->curMode = SQL_CUR_USE_ODBC; $db->Connect($dsn, $userid, $pwd); USING CLI INTERFACE =================== I have had reports that the $host and $database params have to be reversed in Connect() when using the CLI interface. From Halmai Csongor csongor.halmai#nexum.hu: > The symptom is that if I change the database engine from postgres or any other to DB2 then the following > connection command becomes wrong despite being described this version to be correct in the docs. > > $connection_object->Connect( $DATABASE_HOST, $DATABASE_AUTH_USER_NAME, $DATABASE_AUTH_PASSWORD, $DATABASE_NAME ) > > In case of DB2 I had to swap the first and last arguments in order to connect properly. */ // security - hide paths if (!defined('ADODB_DIR')) die(); if (!defined('_ADODB_ODBC_LAYER')) { include(ADODB_DIR."/drivers/adodb-odbc.inc.php"); } if (!defined('ADODB_DB2')){ define('ADODB_DB2',1); class ADODB_DB2 extends ADODB_odbc { var $databaseType = "db2"; var $concat_operator = '||'; var $sysDate = 'CURRENT_DATE'; var $sysTimeStamp = 'CURRENT TIMESTAMP'; // The complete string representation of a timestamp has the form // yyyy-mm-dd-hh.mm.ss.nnnnnn. var $fmtTimeStamp = "'Y-m-d-H.i.s'"; var $ansiOuter = true; var $identitySQL = 'values IDENTITY_VAL_LOCAL()'; var $_bindInputArray = true; var $hasInsertID = true; function ADODB_DB2() { if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC; $this->ADODB_odbc(); } function IfNull( $field, $ifNull ) { return " COALESCE($field, $ifNull) "; // if DB2 UDB } function ServerInfo() { //odbc_setoption($this->_connectionID,1,101 /*SQL_ATTR_ACCESS_MODE*/, 1 /*SQL_MODE_READ_ONLY*/); $vers = $this->GetOne('select versionnumber from sysibm.sysversions'); //odbc_setoption($this->_connectionID,1,101, 0 /*SQL_MODE_READ_WRITE*/); return array('description'=>'DB2 ODBC driver', 'version'=>$vers); } function _insertid() { return $this->GetOne($this->identitySQL); } function RowLock($tables,$where,$flds='1 as ignore') { if ($this->_autocommit) $this->BeginTrans(); return $this->GetOne("select $flds from $tables where $where for update"); } function &MetaTables($ttype=false,$showSchema=false, $qtable="%", $qschema="%") { global $ADODB_FETCH_MODE; $savem = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; $qid = odbc_tables($this->_connectionID, "", $qschema, $qtable, ""); $rs = new ADORecordSet_odbc($qid); $ADODB_FETCH_MODE = $savem; if (!$rs) { $false = false; return $false; } $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change; $arr =& $rs->GetArray(); //print_r($arr); $rs->Close(); $arr2 = array(); if ($ttype) { $isview = strncmp($ttype,'V',1) === 0; } for ($i=0; $i < sizeof($arr); $i++) { if (!$arr[$i][2]) continue; if (strncmp($arr[$i][1],'SYS',3) === 0) continue; $type = $arr[$i][3]; if ($showSchema) $arr[$i][2] = $arr[$i][1].'.'.$arr[$i][2]; if ($ttype) { if ($isview) { if (strncmp($type,'V',1) === 0) $arr2[] = $arr[$i][2]; } else if (strncmp($type,'T',1) === 0) $arr2[] = $arr[$i][2]; } else if (strncmp($type,'S',1) !== 0) $arr2[] = $arr[$i][2]; } return $arr2; } function &MetaIndexes ($table, $primary = FALSE, $owner=false) { // save old fetch mode global $ADODB_FETCH_MODE; $save = $ADODB_FETCH_MODE; $ADODB_FETCH_MODE = ADODB_FETCH_NUM; if ($this->fetchMode !== FALSE) { $savem = $this->SetFetchMode(FALSE); } $false = false; // get index details $table = strtoupper($table); $SQL="SELECT NAME, UNIQUERULE, COLNAMES FROM SYSIBM.SYSINDEXES WHERE TBNAME='$table'"; if ($primary) $SQL.= " AND UNIQUERULE='P'"; $rs = $this->Execute($SQL); if (!is_object($rs)) { if (isset($savem)) $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; return $false; } $indexes = array (); // parse index data into array while ($row = $rs->FetchRow()) { $indexes[$row[0]] = array( 'unique' => ($row[1] == 'U' || $row[1] == 'P'), 'columns' => array() ); $cols = ltrim($row[2],'+'); $indexes[$row[0]]['columns'] = explode('+', $cols); } if (isset($savem)) { $this->SetFetchMode($savem); $ADODB_FETCH_MODE = $save; } return $indexes; } // Format date column in sql string given an input format that understands Y M D function SQLDate($fmt, $col=false) { // use right() and replace() ? if (!$col) $col = $this->sysDate; $s = ''; $len = strlen($fmt); for ($i=0; $i < $len; $i++) { if ($s) $s .= '||'; $ch = $fmt[$i]; switch($ch) { case 'Y': case 'y': $s .= "char(year($col))"; break; case 'M': $s .= "substr(monthname($col),1,3)"; break; case 'm': $s .= "right(digits(month($col)),2)"; break; case 'D': case 'd': $s .= "right(digits(day($col)),2)"; break; case 'H': case 'h': if ($col != $this->sysDate) $s .= "right(digits(hour($col)),2)"; else $s .= "''"; break; case 'i': case 'I': if ($col != $this->sysDate) $s .= "right(digits(minute($col)),2)"; else $s .= "''"; break; case 'S': case 's': if ($col != $this->sysDate) $s .= "right(digits(second($col)),2)"; else $s .= "''"; break; default: if ($ch == '\\') { $i++; $ch = substr($fmt,$i,1); } $s .= $this->qstr($ch); } } return $s; } function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false) { $nrows = (integer) $nrows; if ($offset <= 0) { // could also use " OPTIMIZE FOR $nrows ROWS " if ($nrows >= 0) $sql .= " FETCH FIRST $nrows ROWS ONLY "; $rs =& $this->Execute($sql,$inputArr); } else { if ($offset > 0 && $nrows < 0); else { $nrows += $offset; $sql .= " FETCH FIRST $nrows ROWS ONLY "; } $rs =& ADOConnection::SelectLimit($sql,-1,$offset,$inputArr); } return $rs; } }; class ADORecordSet_db2 extends ADORecordSet_odbc { var $databaseType = "db2"; function ADORecordSet_db2($id,$mode=false) { $this->ADORecordSet_odbc($id,$mode); } function MetaType($t,$len=-1,$fieldobj=false) { if (is_object($t)) { $fieldobj = $t; $t = $fieldobj->type; $len = $fieldobj->max_length; } switch (strtoupper($t)) { case 'VARCHAR': case 'CHAR': case 'CHARACTER': case 'C': if ($len <= $this->blobSize) return 'C'; case 'LONGCHAR': case 'TEXT': case 'CLOB': case 'DBCLOB': // double-byte case 'X': return 'X'; case 'BLOB': case 'GRAPHIC': case 'VARGRAPHIC': return 'B'; case 'DATE': case 'D': return 'D'; case 'TIME': case 'TIMESTAMP': case 'T': return 'T'; //case 'BOOLEAN': //case 'BIT': // return 'L'; //case 'COUNTER': // return 'R'; case 'INT': case 'INTEGER': case 'BIGINT': case 'SMALLINT': case 'I': return 'I'; default: return 'N'; } } } } //define ?> |
From: Karsten D. <k-...@us...> - 2006-04-27 11:27:36
|
Update of /cvsroot/moregroupware/mgw/include/jpgraph1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6099/jpgraph1 Log Message: Directory /cvsroot/moregroupware/mgw/include/jpgraph1 added to the repository |
From: Karsten D. <k-...@us...> - 2006-04-27 09:07:48
|
Update of /cvsroot/moregroupware/mgw/include/smarty/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12692/smarty/plugins Modified Files: function.math.php modifier.regex_replace.php Log Message: Update to 2.6.13 Index: function.math.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/smarty/plugins/function.math.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** function.math.php 24 Dec 2005 00:40:05 -0000 1.6 --- function.math.php 27 Apr 2006 09:07:44 -0000 1.7 *************** *** 59,63 **** return; } ! $equation = preg_replace("/\b$key\b/",$val, $equation); } } --- 59,63 ---- return; } ! $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation); } } Index: modifier.regex_replace.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/smarty/plugins/modifier.regex_replace.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** modifier.regex_replace.php 24 Dec 2005 00:40:05 -0000 1.3 --- modifier.regex_replace.php 27 Apr 2006 09:07:44 -0000 1.4 *************** *** 12,16 **** * Type: modifier<br> * Name: regex_replace<br> ! * Purpose: regular epxression search/replace * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php * regex_replace (Smarty online manual) --- 12,16 ---- * Type: modifier<br> * Name: regex_replace<br> ! * Purpose: regular expression search/replace * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php * regex_replace (Smarty online manual) *************** *** 23,30 **** function smarty_modifier_regex_replace($string, $search, $replace) { ! if (preg_match('!\W(\w+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { /* remove eval-modifier from $search */ ! $search = substr($search, 0, -strlen($match[1])) . str_replace('e', '', $match[1]); } return preg_replace($search, $replace, $string); } --- 23,31 ---- function smarty_modifier_regex_replace($string, $search, $replace) { ! if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { /* remove eval-modifier from $search */ ! $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); } + return preg_replace($search, $replace, $string); } |
From: Karsten D. <k-...@us...> - 2006-04-27 09:07:48
|
Update of /cvsroot/moregroupware/mgw/include/smarty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12692/smarty Modified Files: Config_File.class.php Smarty.class.php Smarty_Compiler.class.php Log Message: Update to 2.6.13 Index: Smarty_Compiler.class.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/smarty/Smarty_Compiler.class.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Smarty_Compiler.class.php 24 Dec 2005 00:40:05 -0000 1.20 --- Smarty_Compiler.class.php 27 Apr 2006 09:07:44 -0000 1.21 *************** *** 22,26 **** * @author Monte Ohrt <monte at ohrt dot com> * @author Andrei Zmievski <an...@ph...> ! * @version 2.6.11 * @copyright 2001-2005 New Digital Group, Inc. * @package Smarty --- 22,26 ---- * @author Monte Ohrt <monte at ohrt dot com> * @author Andrei Zmievski <an...@ph...> ! * @version 2.6.13 * @copyright 2001-2005 New Digital Group, Inc. * @package Smarty *************** *** 727,741 **** $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command); $attrs = $this->_parse_attrs($tag_args); ! $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs=''); $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); '; ! $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);'; $output .= 'while ($_block_repeat) { ob_start(); ?>'; } else { $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); '; ! $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false)'; if ($tag_modifier != '') { $this->_parse_modifiers($_out_tag_text, $tag_modifier); } ! $output .= 'echo '.$_out_tag_text.'; } '; $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>'; } --- 727,742 ---- $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command); $attrs = $this->_parse_attrs($tag_args); ! $_cache_attrs=''; ! $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs); $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); '; ! $output .= '$_block_repeat=true;' . $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);'; $output .= 'while ($_block_repeat) { ob_start(); ?>'; } else { $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); '; ! $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat)'; if ($tag_modifier != '') { $this->_parse_modifiers($_out_tag_text, $tag_modifier); } ! $output .= '$_block_repeat=false;echo ' . $_out_tag_text . '; } '; $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>'; } *************** *** 802,806 **** $_cacheable_state = $this->_push_cacheable_state('function', $tag_command); $attrs = $this->_parse_attrs($tag_args); ! $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs=''); $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)"; --- 803,808 ---- $_cacheable_state = $this->_push_cacheable_state('function', $tag_command); $attrs = $this->_parse_attrs($tag_args); ! $_cache_attrs = ''; ! $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs); $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)"; *************** *** 875,879 **** if ($start_tag) { $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); "; ! $prefix .= "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat=true); "; $prefix .= "while (\$_block_repeat) { ob_start();"; $return = null; --- 877,881 ---- if ($start_tag) { $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); "; ! $prefix .= "\$_block_repeat=true; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat); "; $prefix .= "while (\$_block_repeat) { ob_start();"; $return = null; *************** *** 881,885 **** } else { $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); "; ! $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat=false)"; $postfix = "} array_pop(\$this->_tag_stack);"; } --- 883,887 ---- } else { $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); "; ! $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; $postfix = "} array_pop(\$this->_tag_stack);"; } *************** *** 1252,1256 **** if(empty($tokens)) { ! $_error_msg .= $elseif ? "'elseif'" : "'if'"; $_error_msg .= ' statement requires arguments'; $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__); --- 1254,1258 ---- if(empty($tokens)) { ! $_error_msg = $elseif ? "'elseif'" : "'if'"; $_error_msg .= ' statement requires arguments'; $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__); *************** *** 1380,1384 **** $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); } ! } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') { // variable function call $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); --- 1382,1386 ---- $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); } ! } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && (strpos('+-*/^%&|', substr($token, -1)) === false) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') { // variable function call $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); Index: Config_File.class.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/smarty/Config_File.class.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Config_File.class.php 24 Dec 2005 00:40:05 -0000 1.22 --- Config_File.class.php 27 Apr 2006 09:07:44 -0000 1.23 *************** *** 19,23 **** * * @link http://smarty.php.net/ ! * @version 2.6.11 * @copyright Copyright: 2001-2005 New Digital Group, Inc. * @author Andrei Zmievski <an...@ph...> --- 19,23 ---- * * @link http://smarty.php.net/ ! * @version 2.6.13 * @copyright Copyright: 2001-2005 New Digital Group, Inc. * @author Andrei Zmievski <an...@ph...> Index: Smarty.class.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/smarty/Smarty.class.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Smarty.class.php 24 Dec 2005 00:40:05 -0000 1.23 --- Smarty.class.php 27 Apr 2006 09:07:44 -0000 1.24 *************** *** 28,32 **** * @author Andrei Zmievski <an...@ph...> * @package Smarty ! * @version 2.6.11 */ --- 28,32 ---- * @author Andrei Zmievski <an...@ph...> * @package Smarty ! * @version 2.6.13 */ *************** *** 465,469 **** * @var string */ ! var $_version = '2.6.11'; /** --- 465,469 ---- * @var string */ ! var $_version = '2.6.13'; /** *************** *** 1716,1720 **** { if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) { ! $contents = ($size = filesize($filename)) ? fread($fd, $size) : ''; fclose($fd); return $contents; --- 1716,1723 ---- { if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) { ! $contents = ''; ! while (!feof($fd)) { ! $contents .= fread($fd, 8192); ! } fclose($fd); return $contents; |
From: Karsten D. <k-...@us...> - 2006-04-27 09:07:23
|
Update of /cvsroot/moregroupware/mgw/include/adodb/datadict In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11972/adodb/datadict Modified Files: datadict-access.inc.php datadict-db2.inc.php datadict-firebird.inc.php datadict-generic.inc.php datadict-ibase.inc.php datadict-informix.inc.php datadict-mssql.inc.php datadict-mysql.inc.php datadict-oci8.inc.php datadict-postgres.inc.php datadict-sapdb.inc.php datadict-sybase.inc.php Log Message: Update to 4.80 Index: datadict-oci8.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-oci8.inc.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** datadict-oci8.inc.php 24 Dec 2005 00:46:18 -0000 1.21 --- datadict-oci8.inc.php 27 Apr 2006 09:07:16 -0000 1.22 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-ibase.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-ibase.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** datadict-ibase.inc.php 24 Dec 2005 00:46:18 -0000 1.18 --- datadict-ibase.inc.php 27 Apr 2006 09:07:16 -0000 1.19 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-db2.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-db2.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** datadict-db2.inc.php 24 Dec 2005 00:46:18 -0000 1.18 --- datadict-db2.inc.php 27 Apr 2006 09:07:16 -0000 1.19 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-informix.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-informix.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** datadict-informix.inc.php 24 Dec 2005 00:46:18 -0000 1.18 --- datadict-informix.inc.php 27 Apr 2006 09:07:16 -0000 1.19 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-mysql.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-mysql.inc.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** datadict-mysql.inc.php 24 Dec 2005 00:46:18 -0000 1.24 --- datadict-mysql.inc.php 27 Apr 2006 09:07:16 -0000 1.25 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-mssql.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-mssql.inc.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** datadict-mssql.inc.php 24 Dec 2005 00:46:18 -0000 1.21 --- datadict-mssql.inc.php 27 Apr 2006 09:07:16 -0000 1.22 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 11,14 **** --- 11,42 ---- */ + /* + In ADOdb, named quotes for MS SQL Server use ". From the MSSQL Docs: + + Note Delimiters are for identifiers only. Delimiters cannot be used for keywords, + whether or not they are marked as reserved in SQL Server. + + Quoted identifiers are delimited by double quotation marks ("): + SELECT * FROM "Blanks in Table Name" + + Bracketed identifiers are delimited by brackets ([ ]): + SELECT * FROM [Blanks In Table Name] + + Quoted identifiers are valid only when the QUOTED_IDENTIFIER option is set to ON. By default, + the Microsoft OLE DB Provider for SQL Server and SQL Server ODBC driver set QUOTED_IDENTIFIER ON + when they connect. + + In Transact-SQL, the option can be set at various levels using SET QUOTED_IDENTIFIER, + the quoted identifier option of sp_dboption, or the user options option of sp_configure. + + When SET ANSI_DEFAULTS is ON, SET QUOTED_IDENTIFIER is enabled. + + Syntax + + SET QUOTED_IDENTIFIER { ON | OFF } + + + */ + // security - hide paths if (!defined('ADODB_DIR')) die(); Index: datadict-firebird.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-firebird.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** datadict-firebird.inc.php 24 Dec 2005 00:46:18 -0000 1.3 --- datadict-firebird.inc.php 27 Apr 2006 09:07:16 -0000 1.4 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-access.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-access.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** datadict-access.inc.php 24 Dec 2005 00:46:18 -0000 1.18 --- datadict-access.inc.php 27 Apr 2006 09:07:16 -0000 1.19 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-generic.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-generic.inc.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** datadict-generic.inc.php 24 Dec 2005 00:46:18 -0000 1.18 --- datadict-generic.inc.php 27 Apr 2006 09:07:16 -0000 1.19 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-sybase.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-sybase.inc.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** datadict-sybase.inc.php 24 Dec 2005 00:46:18 -0000 1.12 --- datadict-sybase.inc.php 27 Apr 2006 09:07:16 -0000 1.13 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-sapdb.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-sapdb.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datadict-sapdb.inc.php 24 Dec 2005 00:46:18 -0000 1.2 --- datadict-sapdb.inc.php 27 Apr 2006 09:07:16 -0000 1.3 *************** *** 2,6 **** /** ! V4.50 6 July 2004 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.50 6 July 2004 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, Index: datadict-postgres.inc.php =================================================================== RCS file: /cvsroot/moregroupware/mgw/include/adodb/datadict/datadict-postgres.inc.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** datadict-postgres.inc.php 24 Dec 2005 00:46:18 -0000 1.23 --- datadict-postgres.inc.php 27 Apr 2006 09:07:16 -0000 1.24 *************** *** 2,6 **** /** ! V4.68 25 Nov 2005 (c) 2000-2005 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, --- 2,6 ---- /** ! V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jl...@na...). All rights reserved. Released under both BSD license and Lesser GPL library license. Whenever there is any discrepancy between the two licenses, *************** *** 358,361 **** --- 358,371 ---- return $sql; } + + function _GetSize($ftype, $ty, $fsize, $fprec) + { + if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty != 'I' && strpos($ftype,'(') === false) { + $ftype .= "(".$fsize; + if (strlen($fprec)) $ftype .= ",".$fprec; + $ftype .= ')'; + } + return $ftype; + } } ?> \ No newline at end of file |