netoffice-cvs-2x Mailing List for PXell
PXell - Online project management.
Brought to you by:
trilexcom
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(57) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Scott M. <ma...@us...> - 2005-06-24 21:35:02
|
Update of /cvsroot/netoffice/netoffice-2.x/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/installation Modified Files: setup_settings.php upgrade_settings.php Log Message: bug fixes Index: upgrade_settings.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/installation/upgrade_settings.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** upgrade_settings.php 22 Dec 2004 17:13:45 -0000 1.5 --- upgrade_settings.php 24 Jun 2005 21:34:39 -0000 1.6 *************** *** 140,144 **** # htaccess parameters \$htaccessAuth = '$htaccessAuth'; - \$fullPath = '$fullPath'; // no slash at the end # file management parameters --- 140,143 ---- Index: setup_settings.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/installation/setup_settings.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** setup_settings.php 22 Dec 2004 17:13:44 -0000 1.6 --- setup_settings.php 24 Jun 2005 21:34:39 -0000 1.7 *************** *** 100,104 **** # htaccess parameters \$htaccessAuth = 'false'; - \$fullPath = '/var/www/html/netoffice/files'; //no slash at the end # file management parameters --- 100,103 ---- |
From: Scott M. <ma...@us...> - 2005-06-24 21:35:02
|
Update of /cvsroot/netoffice/netoffice-2.x/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/includes Modified Files: library.php Log Message: bug fixes Index: library.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/library.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** library.php 12 Jun 2005 15:45:37 -0000 1.18 --- library.php 24 Jun 2005 21:34:39 -0000 1.19 *************** *** 101,113 **** // Session Settings ! ini_set('session.use_trans_sid', 0); // Stop adding SID to URLs ! ini_set('session.save_handler', 'user'); // User-defined save handler (files|user) ! ini_set('session.serialize_handler', 'php');// How to store data ! ini_set('session.use_cookies', 1); // Cookies store the session ID ! ini_set('session.cookie_path', $base_uri); // session cookie save path // if the phpversion is >= 4.3.0 then set the 'use_only_cookies' to true if (version_compare(phpversion(), '4.3.0', '>=')) { ! ini_set('session.use_only_cookies', 1); } --- 101,113 ---- // Session Settings ! @ini_set('session.use_trans_sid', 0); // Stop adding SID to URLs ! @ini_set('session.save_handler', 'user'); // User-defined save handler (files|user) ! @ini_set('session.serialize_handler', 'php');// How to store data ! @ini_set('session.use_cookies', 1); // Cookies store the session ID ! @ini_set('session.cookie_path', $base_uri); // session cookie save path // if the phpversion is >= 4.3.0 then set the 'use_only_cookies' to true if (version_compare(phpversion(), '4.3.0', '>=')) { ! @ini_set('session.use_only_cookies', 1); } *************** *** 118,126 **** // more session settings ! ini_set('session.name', 'netOfficeSID'); // Name of the cookie ! ini_set('session.gc_probability', 1); // Garbage Collection ! ini_set('session.gc_maxlifetime', 3600); // max session time ! ini_set('session.cookie_lifetime', 0); // cookie last browser session ! ini_set('session.auto_start', 0); // don't auto start sessions // how long a session can be inactive --- 118,126 ---- // more session settings ! @ini_set('session.name', 'netOfficeSID'); // Name of the cookie ! @ini_set('session.gc_probability', 1); // Garbage Collection ! @ini_set('session.gc_maxlifetime', 3600); // max session time ! @ini_set('session.cookie_lifetime', 0); // cookie last browser session ! @ini_set('session.auto_start', 0); // don't auto start sessions // how long a session can be inactive |
From: Scott M. <ma...@us...> - 2005-06-24 21:35:01
|
Update of /cvsroot/netoffice/netoffice-2.x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/docs Modified Files: changes.txt Log Message: bug fixes Index: changes.txt =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/docs/changes.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** changes.txt 11 Jun 2005 22:32:05 -0000 1.34 --- changes.txt 24 Jun 2005 21:34:38 -0000 1.35 *************** *** 1,4 **** --- 1,9 ---- CHANGES + 2005-06-24 + + Fixed bug #15 (madbear) + + Fixed bug #10 (madbear) + + Fixed bug #5 (madbear) + 2005-06-11 - NetOffice 2.6.0 beta2 + Minor fixes and touch ups for a new beta release (madbear) |
From: Scott M. <ma...@us...> - 2005-06-24 21:35:01
|
Update of /cvsroot/netoffice/netoffice-2.x/includes/phpmailer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/includes/phpmailer Modified Files: class.phpmailer.php Log Message: bug fixes Index: class.phpmailer.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/phpmailer/class.phpmailer.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** class.phpmailer.php 3 Dec 2004 19:34:35 -0000 1.2 --- class.phpmailer.php 24 Jun 2005 21:34:39 -0000 1.3 *************** *** 430,434 **** { $old_from = ini_get("sendmail_from"); ! ini_set("sendmail_from", $this->Sender); $params = sprintf("-oi -f %s", $this->Sender); $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, --- 430,434 ---- { $old_from = ini_get("sendmail_from"); ! @ini_set("sendmail_from", $this->Sender); $params = sprintf("-oi -f %s", $this->Sender); $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, *************** *** 439,443 **** if (isset($old_from)) ! ini_set("sendmail_from", $old_from); if(!$rt) --- 439,443 ---- if (isset($old_from)) ! @ini_set("sendmail_from", $old_from); if(!$rt) |
From: Scott M. <ma...@us...> - 2005-06-24 21:34:57
|
Update of /cvsroot/netoffice/netoffice-2.x/projects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/projects Modified Files: editproject.php Log Message: bug fixes Index: editproject.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/projects/editproject.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** editproject.php 15 Dec 2004 19:43:35 -0000 1.8 --- editproject.php 24 Jun 2005 21:34:39 -0000 1.9 *************** *** 93,97 **** AuthType Basic Require valid-user ! AuthUserFile $fullPath/files/$projectNew/.htpasswd STAMP; $fp = @fopen('../files/' . $projectNew . '/.htaccess', 'wb+'); --- 93,97 ---- AuthType Basic Require valid-user ! AuthUserFile $basedir/files/$projectNew/.htpasswd STAMP; $fp = @fopen('../files/' . $projectNew . '/.htaccess', 'wb+'); *************** *** 345,349 **** AuthType Basic Require valid-user ! AuthUserFile $fullPath/files/$num/.htpasswd STAMP; $fp = @fopen('../files/' . $num . '/.htaccess', 'wb+'); --- 345,349 ---- AuthType Basic Require valid-user ! AuthUserFile $basedir/files/$num/.htpasswd STAMP; $fp = @fopen('../files/' . $num . '/.htaccess', 'wb+'); |
From: Scott M. <ma...@us...> - 2005-06-24 21:34:56
|
Update of /cvsroot/netoffice/netoffice-2.x/tasks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/tasks Modified Files: listtasks.php Log Message: bug fixes Index: listtasks.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/tasks/listtasks.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** listtasks.php 11 Jun 2005 05:23:56 -0000 1.15 --- listtasks.php 24 Jun 2005 21:34:40 -0000 1.16 *************** *** 86,90 **** if ($projectDetail->pro_phase_set[0] != '0') { $flag_phases = true; ! $tmpquery = "WHERE pha.project_id = '$project'"; $listPhases = new request(); $listPhases->openPhases($tmpquery); --- 86,90 ---- if ($projectDetail->pro_phase_set[0] != '0') { $flag_phases = true; ! $tmpquery = "WHERE pha.project_id = '$project' ORDER BY pha.order_num ASC"; $listPhases = new request(); $listPhases->openPhases($tmpquery); *************** *** 625,629 **** $block3->closeResults(); ! $block3->bornesFooter('1', $blockPage->bornesNumber, '../tasks/listtasks.php?project=' . $project, 'id=' . $project); } else { $block3->noresults(); --- 625,629 ---- $block3->closeResults(); ! $block3->bornesFooter('1', $blockPage->bornesNumber, '../tasks/listtasks.php?project=' . $project, 'project=' . $project); } else { $block3->noresults(); |
From: Scott M. <ma...@us...> - 2005-06-24 21:34:48
|
Update of /cvsroot/netoffice/netoffice-2.x/administration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10030/administration Modified Files: updatesettings.php Log Message: bug fixes Index: updatesettings.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/administration/updatesettings.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** updatesettings.php 11 Jun 2005 18:36:37 -0000 1.14 --- updatesettings.php 24 Jun 2005 21:34:38 -0000 1.15 *************** *** 139,143 **** # htaccess parameters \$htaccessAuth = '$htaccessAuth'; - \$fullPath = '$fullPath'; // no slash at the end # file management parameters --- 139,142 ---- |
From: Scott M. <ma...@us...> - 2005-06-12 15:45:48
|
Update of /cvsroot/netoffice/netoffice-2.x/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7318/includes Modified Files: library.php Log Message: Index: library.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/library.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** library.php 12 Jun 2005 15:43:00 -0000 1.17 --- library.php 12 Jun 2005 15:45:37 -0000 1.18 *************** *** 27,31 **** */ error_reporting(E_ALL & ~E_NOTICE); - require_once(dirname(__FILE__) . '/error_handler.php'); --- 27,30 ---- *************** *** 76,79 **** --- 75,81 ---- $base_dir = str_replace('\\', '/', dirname(dirname(__FILE__)) . '/'); + // load the custom error handler + require_once($base_dir . 'includes/error_handler.php'); + // load configuration settings require_once($base_dir . 'includes/settings.php'); |
From: Scott M. <ma...@us...> - 2005-06-12 15:43:09
|
Update of /cvsroot/netoffice/netoffice-2.x/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6429/includes Modified Files: library.php Log Message: Index: library.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/library.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** library.php 11 Jun 2005 19:30:41 -0000 1.16 --- library.php 12 Jun 2005 15:43:00 -0000 1.17 *************** *** 27,31 **** */ error_reporting(E_ALL & ~E_NOTICE); ! require_once('../includes/error_handler.php'); --- 27,31 ---- */ error_reporting(E_ALL & ~E_NOTICE); ! require_once(dirname(__FILE__) . '/error_handler.php'); |
From: Scott M. <ma...@us...> - 2005-06-11 22:32:17
|
Update of /cvsroot/netoffice/netoffice-2.x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21249/docs Modified Files: changes.txt Log Message: Index: changes.txt =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/docs/changes.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** changes.txt 10 Jun 2005 02:32:10 -0000 1.33 --- changes.txt 11 Jun 2005 22:32:05 -0000 1.34 *************** *** 1,4 **** --- 1,7 ---- CHANGES + 2005-06-11 - NetOffice 2.6.0 beta2 + + Minor fixes and touch ups for a new beta release (madbear) + 2005-06-09 + Update JpGraph to latest stable version 1.18 (madbear) |
From: Scott M. <ma...@us...> - 2005-06-11 20:32:25
|
Update of /cvsroot/netoffice/netoffice-2.x/calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21566/calendar Modified Files: exportcalendar.php Log Message: Index: exportcalendar.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/calendar/exportcalendar.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** exportcalendar.php 13 Dec 2004 00:18:21 -0000 1.2 --- exportcalendar.php 11 Jun 2005 20:32:09 -0000 1.3 *************** *** 32,36 **** } echo "BEGIN:VCALENDAR ! PRODID:PhpCollab $version VERSION:2.0 METHOD:PUBLISH --- 32,36 ---- } echo "BEGIN:VCALENDAR ! PRODID:NetOffice $version VERSION:2.0 METHOD:PUBLISH |
From: Scott M. <ma...@us...> - 2005-06-11 20:32:25
|
Update of /cvsroot/netoffice/netoffice-2.x/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21566/includes Modified Files: request.class.php Log Message: Index: request.class.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/request.class.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** request.class.php 29 May 2005 22:23:51 -0000 1.13 --- request.class.php 11 Jun 2005 20:32:09 -0000 1.14 *************** *** 124,138 **** $this->cal_id[] = ($row[0]); $this->cal_owner[] = ($row[1]); ! $this->cal_project[] = ($row[2]); ! $this->cal_subject[] = ($row[3]); ! $this->cal_description[] = ($row[4]); ! $this->cal_shortname[] = ($row[5]); ! $this->cal_date_start[] = ($row[6]); ! $this->cal_date_end[] = ($row[7]); ! $this->cal_time_start[] = ($row[8]); ! $this->cal_time_end[] = ($row[9]); ! $this->cal_reminder[] = ($row[10]); ! $this->cal_recurring[] = ($row[11]); ! $this->cal_recur_day[] = ($row[12]); $this->cal_mem_email_work[] = ($row[13]); } --- 124,138 ---- $this->cal_id[] = ($row[0]); $this->cal_owner[] = ($row[1]); ! $this->cal_subject[] = ($row[2]); ! $this->cal_description[] = ($row[3]); ! $this->cal_shortname[] = ($row[4]); ! $this->cal_date_start[] = ($row[5]); ! $this->cal_date_end[] = ($row[6]); ! $this->cal_time_start[] = ($row[7]); ! $this->cal_time_end[] = ($row[8]); ! $this->cal_reminder[] = ($row[9]); ! $this->cal_recurring[] = ($row[10]); ! $this->cal_recur_day[] = ($row[11]); ! $this->cal_project[] = ($row[12]); $this->cal_mem_email_work[] = ($row[13]); } |
From: Scott M. <ma...@us...> - 2005-06-11 20:32:19
|
Update of /cvsroot/netoffice/netoffice-2.x/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21566/installation Modified Files: setup_db.php upgrade_db.php Log Message: Index: setup_db.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/installation/setup_db.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** setup_db.php 11 Jun 2005 18:35:10 -0000 1.13 --- setup_db.php 11 Jun 2005 20:32:10 -0000 1.14 *************** *** 51,55 **** id $db_mediumint_auto[$databaseType], owner $db_mediumint[$databaseType], - project $db_mediumint[$databaseType], subject $db_varchar155[$databaseType], description $db_text[$databaseType], --- 51,54 ---- *************** *** 62,65 **** --- 61,65 ---- recurring $db_char1[$databaseType], recur_day $db_char1[$databaseType], + project $db_mediumint[$databaseType], PRIMARY KEY (id) ) Index: upgrade_db.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/installation/upgrade_db.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** upgrade_db.php 11 Jun 2005 18:35:10 -0000 1.11 --- upgrade_db.php 11 Jun 2005 20:32:10 -0000 1.12 *************** *** 151,155 **** $SQL[] = <<<STAMP ALTER TABLE `{$tablePrefix}calendar` ADD ( ! project $db_mediumint[$databaseType] AFTER `owner` ) STAMP; --- 151,155 ---- $SQL[] = <<<STAMP ALTER TABLE `{$tablePrefix}calendar` ADD ( ! project $db_mediumint[$databaseType] ) STAMP; |
From: Scott M. <ma...@us...> - 2005-06-10 02:32:18
|
Update of /cvsroot/netoffice/netoffice-2.x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5453/docs Modified Files: changes.txt Log Message: updated changelog Index: changes.txt =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/docs/changes.txt,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** changes.txt 1 Jun 2005 00:46:43 -0000 1.32 --- changes.txt 10 Jun 2005 02:32:10 -0000 1.33 *************** *** 1,4 **** --- 1,7 ---- CHANGES + 2005-06-09 + + Update JpGraph to latest stable version 1.18 (madbear) + 2005-05-31 + Fixed reports/resultsreport.php display, reported by alpha. (madbear) |
Update of /cvsroot/netoffice/netoffice-2.x/includes/jpgraph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25457/includes/jpgraph Modified Files: 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_error.php jpgraph_flags.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 Added Files: jpgraph_date.php Removed Files: jpg-config.bak.inc Log Message: Update JpGraph to latest stable version 1.18 to be part of 2.6.0 beta 2 Index: jpgraph_polar.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_polar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_polar.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_polar.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2003 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ Index: jpgraph_antispam-digits.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_antispam-digits.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** jpgraph_antispam-digits.php 23 Jan 2005 22:33:09 -0000 1.3 --- jpgraph_antispam-digits.php 10 Jun 2005 01:07:35 -0000 1.4 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2004 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_radar.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_radar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_radar.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_radar.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ *************** *** 195,203 **** // majpos contsins (x,y) coordinates for labels ! for($i=0; $i<count($majpos)/2; ++$i) { ! if( $this->ticks_label != null ) ! $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]); } } --- 194,204 ---- // majpos contsins (x,y) coordinates for labels ! if( ! $this->hide_labels ) { ! for($i=0; $i<count($majpos)/2; ++$i) { ! if( $this->ticks_label != null ) ! $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]); ! } } } Index: imgdata_diamonds.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/imgdata_diamonds.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** imgdata_diamonds.inc 23 Jan 2005 22:33:08 -0000 1.4 --- imgdata_diamonds.inc 10 Jun 2005 01:07:34 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_pie.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_pie.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_pie.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_pie.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002,2003 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ *************** *** 52,56 **** var $legendcsimalts = array(); var $adjusted_data = array(); ! //--------------- // CONSTRUCTOR --- 51,57 ---- var $legendcsimalts = array(); var $adjusted_data = array(); ! var $guideline = null,$guidelinemargin=10; ! var $iShowGuideLineForSingle = false; ! var $iGuideLineCurve = false,$iGuideVFactor=1.4,$iGuideLineRFactor=0.8; //--------------- // CONSTRUCTOR *************** *** 62,65 **** --- 63,67 ---- $this->value->Show(); $this->value->SetFormat('%.1f%%'); + $this->guideline = new LineProperty(); } *************** *** 71,74 **** --- 73,89 ---- } + // Enable guideline and set drwaing policy + function SetGuideLines($aFlg=true,$aCurved=true,$aAlways=false) { + $this->guideline->Show($aFlg); + $this->iShowGuideLineForSingle = $aAlways; + $this->iGuideLineCurve = $aCurved; + } + + // Adjuste the distance between labels and labels and pie + function SetGuideLinesAdjust($aVFactor,$aRFactor=0.8) { + $this->iGuideVFactor=$aVFactor; + $this->iGuideLineRFactor=$aRFactor; + } + function SetColor($aColor) { $this->color = $aColor; *************** *** 95,98 **** --- 110,114 ---- function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) { + //Slice number, ellipse centre (x,y), height, width, start angle, end angle while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI; *************** *** 109,116 **** $yp = floor($yc-$radius*sin($ea)); $coords.= ", $xp, $yp"; - //add coordinates every 0.2 radians $a=$ea+0.2; ! while ($a<$sa) { $xp = floor($radius*cos($a)+$xc); $yp = floor($yc-$radius*sin($a)); --- 125,144 ---- $yp = floor($yc-$radius*sin($ea)); $coords.= ", $xp, $yp"; //add coordinates every 0.2 radians $a=$ea+0.2; ! ! // If we cross the 260-limit with a slice we need to handle ! // the fact that end angle is smaller than start ! if( $sa < $ea ) { ! while ($a <= 2*M_PI) { ! $xp = floor($radius*cos($a)+$xc); ! $yp = floor($yc-$radius*sin($a)); ! $coords.= ", $xp, $yp"; ! $a += 0.2; ! } ! $a -= 2*M_PI; ! } ! ! while ($a < $sa) { $xp = floor($radius*cos($a)+$xc); $yp = floor($yc-$radius*sin($a)); *************** *** 208,211 **** --- 236,240 ---- } + // Deprecated. function SetValueType($aType) { $this->SetLabelType($aType); *************** *** 218,222 **** } ! // Setup the legends function Legend(&$graph) { $colors = array_keys($graph->img->rgb->rgb_table); --- 247,251 ---- } ! // Setup the legends (Framework method) function Legend(&$graph) { $colors = array_keys($graph->img->rgb->rgb_table); *************** *** 357,373 **** } else { ! // We need to create an array of colors as long as the data ! // since we need to reverse it to get the colors in the right order $numcolors=count($this->setslicecolors); ! if( $n > $numcolors ) { ! $i = 2*$numcolors; ! while( $n > $i ) { ! $this->setslicecolors = array_merge($this->setslicecolors,$this->setslicecolors); ! $i += $n; ! } ! $tt = array_slice($this->setslicecolors,0,$n % $numcolors); ! $this->setslicecolors = array_merge($this->setslicecolors,$tt); ! $this->setslicecolors = array_reverse($this->setslicecolors); ! } } --- 386,395 ---- } else { ! $this->setslicecolors = array_reverse(array_slice($this->setslicecolors,0,$n)); $numcolors=count($this->setslicecolors); ! $tt = array_slice($this->setslicecolors,$n % $numcolors); ! $tt2 = array_slice($this->setslicecolors,0,$n % $numcolors); ! $tt2 = array_merge($tt, $tt2); ! $this->setslicecolors = $tt + $tt2; } *************** *** 507,525 **** // PRIVATE METHODS ! function StrokeAllLabels($img,$xc,$yc,$radius) { $n = count($this->labels); for($i=0; $i < $n; ++$i) { ! $this->StrokeLabel($this->labels[$i],$img,$xc,$yc, ! $this->la[$i], ! $radius + $this->explode_radius[$n-$i-1]); } } // Position the labels of each slice ! function StrokeLabel($label,$img,$xc,$yc,$a,$r) { // Default value if( $this->ilabelposadj === 'auto' ) $this->ilabelposadj = 0.65; // We position the values diferently depending on if they are inside --- 529,843 ---- // PRIVATE METHODS ! function NormAngle($a) { ! while( $a < 0 ) $a += 2*M_PI; ! while( $a > 2*M_PI ) $a -= 2*M_PI; ! return $a; ! } ! ! function Quadrant($a) { ! $a=$this->NormAngle($a); ! if( $a > 0 && $a <= M_PI/2 ) ! return 0; ! if( $a > M_PI/2 && $a <= M_PI ) ! return 1; ! if( $a > M_PI && $a <= 1.5*M_PI ) ! return 2; ! if( $a > 1.5*M_PI ) ! return 3; ! } ! ! function StrokeGuideLabels($img,$xc,$yc,$radius) { $n = count($this->labels); + + //----------------------------------------------------------------------- + // Step 1 of the algorithm is to construct a number of clusters + // a cluster is defined as all slices within the same quadrant (almost) + // that has an angualr distance less than the treshold + //----------------------------------------------------------------------- + $tresh_hold=25 * M_PI/180; // 25 degrees difference to be in a cluster + $incluster=false; // flag if we are currently in a cluster or not + $clusters = array(); // array of clusters + $cidx=-1; // running cluster index + + // Go through all the labels and construct a number of clusters + for($i=0; $i < $n-1; ++$i) { + // Calc the angle distance between two consecutive slices + $a1=$this->la[$i]; + $a2=$this->la[$i+1]; + $q1 = $this->Quadrant($a1); + $q2 = $this->Quadrant($a2); + $diff = abs($a1-$a2); + if( $diff < $tresh_hold ) { + if( $incluster ) { + $clusters[$cidx][1]++; + // Each cluster can only cover one quadrant + // Do we cross a quadrant ( and must break the cluster) + if( $q1 != $q2 ) { + // If we cross a quadrant boundary we normally start a + // new cluster. However we need to take the 12'a clock + // and 6'a clock positions into a special consideration. + // Case 1: WE go from q=1 to q=2 if the last slice on + // the cluster for q=1 is close to 12'a clock and the + // first slice in q=0 is small we extend the previous + // cluster + if( $q1 == 1 && $q2 == 0 && $a2 > (90-15)*M_PI/180 ) { + if( $i < $n-2 ) { + $a3 = $this->la[$i+2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if( abs($a3-$a2) >= $tresh_hold ) { + $clusters[$cidx][1]++; + $i++; + } + } + } + elseif( $q1 == 3 && $q2 == 2 && $a2 > (270-15)*M_PI/180 ) { + if( $i < $n-2 ) { + $a3 = $this->la[$i+2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if( abs($a3-$a2) >= $tresh_hold ) { + $clusters[$cidx][1]++; + $i++; + } + } + } + + if( $q1==2 && $q2==1 && $a2 > (180-15)*M_PI/180 ) { + $clusters[$cidx][1]++; + $i++; + } + + $incluster = false; + } + } + elseif( $q1 == $q2) { + $incluster = true; + // Now we have a special case for quadrant 0. If we previously + // have a cluster of one in quadrant 0 we just extend that + // cluster. If we don't do this then we risk that the label + // for the cluster of one will cross the guide-line + if( $q1 == 0 && $cidx > -1 && + $clusters[$cidx][1] == 1 && + $this->Quadrant($this->la[$clusters[$cidx][0]]) == 0 ) { + $clusters[$cidx][1]++; + } + else { + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + else { + // Create a "cluster" of one since we are just crossing + // a quadrant + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + else { + if( $incluster ) { + // Add the last slice + $clusters[$cidx][1]++; + $incluster = false; + } + else { // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + } + // Handle the very last slice + if( $incluster ) { + $clusters[$cidx][1]++; + } + else { // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + + /* + if( true ) { + // Debug printout in labels + for( $i=0; $i <= $cidx; ++$i ) { + for( $j=0; $j < $clusters[$i][1]; ++$j ) { + $a = $this->la[$clusters[$i][0]+$j]; + $aa = round($a*180/M_PI); + $q = $this->Quadrant($a); + $this->labels[$clusters[$i][0]+$j]="[$q:$aa] $i:$j"; + } + } + } + */ + + //----------------------------------------------------------------------- + // Step 2 of the algorithm is use the clusters and draw the labels + // and guidelines + //----------------------------------------------------------------------- + + // We use the font height as the base factor for how far we need to + // spread the labels in the Y-direction. + $img->SetFont($this->value->ff,$this->value->fs,$this->value->fsize); + $fh = $img->GetFontHeight(); + $origvstep=$fh*$this->iGuideVFactor; + $this->value->SetMargin(0); + + // Number of clusters found + $nc = count($clusters); + + // Walk through all the clusters + for($i=0; $i < $nc; ++$i) { + + // Start angle and number of slices in this cluster + $csize = $clusters[$i][1]; + $a = $this->la[$clusters[$i][0]]; + $q = $this->Quadrant($a); + + // Now set up the start and end conditions to make sure that + // in each cluster we walk through the all the slices starting with the slice + // closest to the equator. Since all slices are numbered clockwise from "3'a clock" + // we have different conditions depending on in which quadrant the slice lies within. + if( $q == 0 ) { + $start = $csize-1; $idx = $start; $step = -1; $vstep = -$origvstep; + } + elseif( $q == 1 ) { + $start = 0; $idx = $start; $step = 1; $vstep = -$origvstep; + } + elseif( $q == 2 ) { + $start = $csize-1; $idx = $start; $step = -1; $vstep = $origvstep; + } + elseif( $q == 3 ) { + $start = 0; $idx = $start; $step = 1; $vstep = $origvstep; + } + + // Walk through all slices within this cluster + for($j=0; $j < $csize; ++$j) { + // Now adjust the position of the labels in each cluster starting + // with the slice that is closest to the equator of the pie + $a = $this->la[$clusters[$i][0]+$idx]; + + // Guide line start in the center of the arc of the slice + $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; + $x = round($r*cos($a)+$xc); + $y = round($yc-$r*sin($a)); + + // The distance from the arc depends on chosen font and the "R-Factor" + $r += $fh*$this->iGuideLineRFactor; + + // Should the labels be placed curved along the pie or in straight columns + // outside the pie? + if( $this->iGuideLineCurve ) + $xt=round($r*cos($a)+$xc); + + // If this is the first slice in the cluster we need some first time + // proessing + if( $idx == $start ) { + if( ! $this->iGuideLineCurve ) + $xt=round($r*cos($a)+$xc); + $yt=round($yc-$r*sin($a)); + + // Some special consideration in case this cluster starts + // in quadrant 1 or 3 very close to the "equator" (< 20 degrees) + // and the previous clusters last slice is within the tolerance. + // In that case we add a font height to this labels Y-position + // so it doesn't collide with + // the slice in the previous cluster + $prevcluster = ($i + ($nc-1) ) % $nc; + $previdx=$clusters[$prevcluster][0]+$clusters[$prevcluster][1]-1; + if( $q == 1 && $a > 160*M_PI/180 ) { + // Get the angle for the previous clusters last slice + $diff = abs($a-$this->la[$previdx]); + if( $diff < $tresh_hold ) { + $yt -= $fh; + } + } + elseif( $q == 3 && $a > 340*M_PI/180 ) { + // We need to subtract 360 to compare angle distance between + // q=0 and q=3 + $diff = abs($a-$this->la[$previdx]-360*M_PI/180); + if( $diff < $tresh_hold ) { + $yt += $fh; + } + } + + } + else { + // The step is at minimum $vstep but if the slices are relatively large + // we make sure that we add at least a step that corresponds to the vertical + // distance between the centers at the arc on the slice + $prev_a = $this->la[$clusters[$i][0]+($idx-$step)]; + $dy = abs($radius*(sin($a)-sin($prev_a))*1.2); + if( $vstep > 0 ) + $yt += max($vstep,$dy); + else + $yt += min($vstep,-$dy); + } + + $label = $this->labels[$clusters[$i][0]+$idx]; + + if( $csize == 1 ) { + // A "meta" cluster with only one slice + $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; + $rr = $r+$img->GetFontHeight()/2; + $xt=round($rr*cos($a)+$xc); + $yt=round($yc-$rr*sin($a)); + $this->StrokeLabel($label,$img,$xc,$yc,$a,$r); + if( $this->iShowGuideLineForSingle ) + $this->guideline->Stroke($img,$x,$y,$xt,$yt); + } + else { + $this->guideline->Stroke($img,$x,$y,$xt,$yt); + if( $q==1 || $q==2 ) { + // Left side of Pie + $this->guideline->Stroke($img,$xt,$yt,$xt-$this->guidelinemargin,$yt); + $lbladj = -$this->guidelinemargin-5; + $this->value->halign = "right"; + $this->value->valign = "center"; + } + else { + // Right side of pie + $this->guideline->Stroke($img,$xt,$yt,$xt+$this->guidelinemargin,$yt); + $lbladj = $this->guidelinemargin+5; + $this->value->halign = "left"; + $this->value->valign = "center"; + } + $this->value->Stroke($img,$label,$xt+$lbladj,$yt); + } + + // Udate idx to point to next slice in the cluster to process + $idx += $step; + } + } + } + + function StrokeAllLabels($img,$xc,$yc,$radius) { + // First normalize all angles for labels + $n = count($this->la); for($i=0; $i < $n; ++$i) { ! $this->la[$i] = $this->NormAngle($this->la[$i]); ! } ! if( $this->guideline->iShow ) { ! $this->StrokeGuideLabels($img,$xc,$yc,$radius); ! } ! else { ! $n = count($this->labels); ! for($i=0; $i < $n; ++$i) { ! $this->StrokeLabel($this->labels[$i],$img,$xc,$yc, ! $this->la[$i], ! $radius + $this->explode_radius[$n-1-$i]); ! } } } // Position the labels of each slice ! function StrokeLabel($label,$img,$xc,$yc,$a,$radius) { // Default value if( $this->ilabelposadj === 'auto' ) $this->ilabelposadj = 0.65; + $r = $radius; // We position the values diferently depending on if they are inside *************** *** 539,543 **** $this->value->halign = "left"; $this->value->valign = "top"; ! // Position the axis title. // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text --- 857,862 ---- $this->value->halign = "left"; $this->value->valign = "top"; ! $this->value->margin = 0; ! // Position the axis title. // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text *************** *** 557,572 **** else $w=$img->GetTextWidth($label); - if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) { $r *= $this->ilabelposadj; } - $r += $img->GetFontHeight()/1.5 + $this->value->margin ; $xt=round($r*cos($a)+$xc); $yt=round($yc-$r*sin($a)); while( $a < 0 ) $a += 2*M_PI; while( $a > 2*M_PI ) $a -= 2*M_PI; ! if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; --- 876,892 ---- else $w=$img->GetTextWidth($label); if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) { $r *= $this->ilabelposadj; } + + $r += $img->GetFontHeight()/1.5; $xt=round($r*cos($a)+$xc); $yt=round($yc-$r*sin($a)); + // Normalize angle while( $a < 0 ) $a += 2*M_PI; while( $a > 2*M_PI ) $a -= 2*M_PI; ! if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; *************** *** 580,587 **** if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0; - $oldmargin = $this->value->margin ; - $this->value->margin = 0; $this->value->Stroke($img,$label,$xt-$dx*$w,$yt-$dy*$h); - $this->value->margin = $oldmargin ; } } --- 900,904 ---- *************** *** 644,647 **** --- 961,977 ---- //add coordinates every 0.25 radians $a=$ea+0.25; + + // If we cross the 260-limit with a slice we need to handle + // the fact that end angle is smaller than start + if( $sa < $ea ) { + while ($a <= 2*M_PI) { + $xp = floor($radius*cos($a)+$xc); + $yp = floor($yc-$radius*sin($a)); + $coords.= ", $xp, $yp"; + $a += 0.25; + } + $a -= 2*M_PI; + } + while ($a < $sa) { $xp = floor(($this->imidsize*$radius*cos($a)+$xc)); *************** *** 780,786 **** if( is_array($aObj) && count($aObj) > 0 ) ! $cl = strtolower(get_class($aObj[0])); else ! $cl = strtolower(get_class($aObj)); if( $cl == 'text' ) --- 1110,1116 ---- if( is_array($aObj) && count($aObj) > 0 ) ! $cl = get_class($aObj[0]); else ! $cl = get_class($aObj); if( $cl == 'text' ) *************** *** 792,796 **** $n = count($aObj); for($i=0; $i < $n; ++$i ) { ! $this->plots[] = &$aObj[$i]; } } --- 1122,1126 ---- $n = count($aObj); for($i=0; $i < $n; ++$i ) { ! $this->plots[] = $aObj[$i]; } } *************** *** 855,858 **** --- 1185,1190 ---- $this->iHasStroked = true; + + $n = count($this->plots); *************** *** 868,871 **** --- 1200,1204 ---- } + $w = $this->img->width; $h = $this->img->height; *************** *** 936,950 **** $this->legend->Stroke($this->img); $this->footer->Stroke($this->img); - $this->StrokeTitles(); - - // Stroke texts - if( $this->texts != null ) { - $n = count($this->texts); - for($i=0; $i < $n; ++$i ) { - $this->texts[$i]->Stroke($this->img); - } - } if( !$_csim ) { if( _JPG_DEBUG ) { --- 1269,1283 ---- $this->legend->Stroke($this->img); $this->footer->Stroke($this->img); if( !$_csim ) { + $this->StrokeTitles(); + + // Stroke texts + if( $this->texts != null ) { + $n = count($this->texts); + for($i=0; $i < $n; ++$i ) { + $this->texts[$i]->Stroke($this->img); + } + } if( _JPG_DEBUG ) { --- jpg-config.bak.inc DELETED --- Index: jpgraph_scatter.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_scatter.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_scatter.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_scatter.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ *************** *** 36,41 **** function Stroke($aImg,$x,$y,$a) { $old_origin = $aImg->SetCenter($x,$y); ! $old_a = $aImg->SetAngle(-$a); $dx = round($this->iSize/2); --- 35,44 ---- function Stroke($aImg,$x,$y,$a) { + // First rotate the center coordinates + list($x,$y) = $aImg->Rotate($x,$y); + $old_origin = $aImg->SetCenter($x,$y); ! $old_a = $aImg->a; ! $aImg->SetAngle(-$a+$old_a); $dx = round($this->iSize/2); Index: jpg-config.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpg-config.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jpg-config.inc 23 Jan 2005 22:33:08 -0000 1.2 --- jpg-config.inc 10 Jun 2005 01:07:34 -0000 1.3 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2004 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== *************** *** 133,136 **** --- 132,142 ---- DEFINE("INSTALL_PHP_ERR_HANDLER",false); + // Should the library examin the global php_errmsg string and convert + // any error in it to a graphical representation. This is handy for the + // occasions when, for example, header files cannot be found and this results + // in the graph not being created and just a "red-cross" image would be seen. + // This should be turned off for a production site. + DEFINE("CATCH_PHPERRMSG",true); + // If the color palette is full should JpGraph try to allocate // the closest match? If you plan on using background images or Index: jpgraph_line.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_line.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_line.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_line.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ Index: imgdata_bevels.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/imgdata_bevels.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** imgdata_bevels.inc 23 Jan 2005 22:33:08 -0000 1.4 --- imgdata_bevels.inc 10 Jun 2005 01:07:34 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: imgdata_stars.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/imgdata_stars.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** imgdata_stars.inc 23 Jan 2005 22:33:08 -0000 1.4 --- imgdata_stars.inc 10 Jun 2005 01:07:34 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_canvas.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_canvas.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_canvas.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_canvas.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ --- NEW FILE: jpgraph_date.php --- <?php /*======================================================================= // File: JPGRAPH_DATE.PHP // Description: Classes to handle Date scaling // Created: 2005-05-02 // Author: Johan Persson (jo...@ad...) // Ver: $Id: jpgraph_date.php,v 1.1 2005/06/10 01:07:35 madbear Exp $ // // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ DEFINE('HOURADJ_1',0+30); DEFINE('HOURADJ_2',1+30); DEFINE('HOURADJ_3',2+30); DEFINE('HOURADJ_4',3+30); DEFINE('HOURADJ_6',4+30); DEFINE('HOURADJ_12',5+30); DEFINE('MINADJ_1',0+20); DEFINE('MINADJ_5',1+20); DEFINE('MINADJ_10',2+20); DEFINE('MINADJ_15',3+20); DEFINE('MINADJ_30',4+20); DEFINE('SECADJ_1',0); DEFINE('SECADJ_5',1); DEFINE('SECADJ_10',2); DEFINE('SECADJ_15',3); DEFINE('SECADJ_30',4); DEFINE('YEARADJ_1',0+30); DEFINE('YEARADJ_2',1+30); DEFINE('YEARADJ_5',2+30); DEFINE('MONTHADJ_1',0+20); DEFINE('MONTHADJ_6',1+20); DEFINE('DAYADJ_1',0); DEFINE('DAYADJ_WEEK',1); DEFINE('DAYADJ_7',1); DEFINE('SECPERYEAR',31536000); DEFINE('SECPERDAY',86400); DEFINE('SECPERHOUR',3600); DEFINE('SECPERMIN',60); class DateScale extends LinearScale { var $date_format = ''; var $iStartAlign = false, $iEndAlign = false; var $iStartTimeAlign = false, $iEndTimeAlign = false; //--------------- // CONSTRUCTOR function DateScale($aMin=0,$aMax=0,$aType='x') { assert($aType=="x"); assert($aMin<=$aMax); $this->type=$aType; $this->scale=array($aMin,$aMax); $this->world_size=$aMax-$aMin; $this->ticks = new LinearTicks(); $this->intscale=true; } //------------------------------------------------------------------------------------------ // Utility Function AdjDate() // Description: Will round a given time stamp to an even year, month or day // argument. //------------------------------------------------------------------------------------------ function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) { $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); $h=0;$i=0;$s=0; if( $aYearType !== false ) { $yearAdj = array(0=>1, 1=>2, 2=>5); if( $aRound == 0 ) { $y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; } else { ++$y; $y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; } $m=1;$d=1; } elseif( $aMonthType !== false ) { $monthAdj = array(0=>1, 1=>6); if( $aRound == 0 ) { $m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; $d=1; } else { ++$m; $m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; $d=1; } } elseif( $aDayType !== false ) { if( $aDayType == 0 ) { if( $aRound == 1 ) { //++$d; $h=23;$i=59;$s=59; } } else { // Adjust to an even week boundary. $w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat if( true ) { // Adjust to start on Mon if( $w==0 ) $w=6; else --$w; } if( $aRound == 0 ) { $d -= $w; } else { $d += (7-$w); $h=23;$i=59;$s=59; } } } return mktime($h,$i,$s,$m,$d,$y); } //------------------------------------------------------------------------------------------ // Wrapper for AdjDate that will round a timestamp to an even date rounding // it downwards. //------------------------------------------------------------------------------------------ function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType); } //------------------------------------------------------------------------------------------ // Wrapper for AdjDate that will round a timestamp to an even date rounding // it upwards //------------------------------------------------------------------------------------------ function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType); } //------------------------------------------------------------------------------------------ // Utility Function AdjTime() // Description: Will round a given time stamp to an even time according to // argument. //------------------------------------------------------------------------------------------ function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) { $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime); if( $aHourType !== false ) { $aHourType %= 6; $hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12); if( $aRound == 0 ) $h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; else { if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) { $h++; } $h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; if( $h >= 24 ) { $aTime += 86400; $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); $h -= 24; } } $i=0;$s=0; } elseif( $aMinType !== false ) { $aMinType %= 5; $minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); if( $aRound == 0 ) { $i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType]; } else { if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) { $i++; } $i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType]; if( $i >= 60) { $aTime += 3600; $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); $h = (int)date('H',$aTime); $i = 0; } } $s=0; } elseif( $aSecType !== false ) { $aSecType %= 5; $secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); if( $aRound == 0 ) { $s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType]; } else { $s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType]; if( $s >= 60) { $s=0; $aTime += 60; $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); } } } return mktime($h,$i,$s,$m,$d,$y); } //------------------------------------------------------------------------------------------ // Wrapper for AdjTime that will round a timestamp to an even time rounding // it downwards. // Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20 //------------------------------------------------------------------------------------------ function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType); } //------------------------------------------------------------------------------------------ // Wrapper for AdjTime that will round a timestamp to an even time rounding // it upwards // Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30 //------------------------------------------------------------------------------------------ function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType); } //------------------------------------------------------------------------------------------ // DateAutoScale // Autoscale a date axis given start and end time // Returns an array ($start,$end,$major,$minor,$format) //------------------------------------------------------------------------------------------ function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) { $scalePoints = array( /* Intervall larger than 10 years */ SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2),array(SECPERYEAR), array(0,YEARADJ_1, 0,YEARADJ_1) ), /* Intervall larger than 2 years */ SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR), array(0,YEARADJ_1) ), /* Intervall larger than 90 days (approx 3 month) */ SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY),array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY), array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)), /* Intervall larger than 30 days (approx 1 month) */ SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY),array(SECPERDAY,SECPERDAY.SECPERDAY,SECPERDAY), array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)), /* Intervall larger than 7 days */ SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2),array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR), array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)), /* Intervall larger than 1 day */ SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR),array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR), array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)), /* Intervall larger than 12 hours */ SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600),array(1800,1800,900,300,300), array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), /* Intervall larger than 2 hours */ SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300),array(1800,900,300,120,60), array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), /* Intervall larger than 1 hours */ SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60), array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), /* Intervall larger than 30 min */ SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN),array(300,300,60,10), array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)), /* Intervall larger than 1 min */ SECPERMIN,array(array(SECPERMIN,15,10,5),array(15,5,2,1), array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)), /* Intervall larger than 10 sec */ 10,array(array(5,2),array(1,1),array(1,SECADJ_5, 1,SECADJ_1)), /* Intervall larger than 1 sec */ 1,array(array(1),array(1),array(1,SECADJ_1)), ); $ns = count($scalePoints); // Establish major and minor scale units for the date scale $diff = $aEndTime - $aStartTime; if( $diff < 1 ) return false; $done=false; $i=0; while( ! $done ) { if( $diff > $scalePoints[2*$i] ) { // Get major and minor scale for this intervall $scaleSteps = $scalePoints[2*$i+1]; $major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)]; // Try to find out which minor step looks best $minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)]; if( $aAdjust ) { // Find out how we should align the start and end timestamps $idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1); if( $scaleSteps[2][$idx] === 0 ) { // Use date adjustment $adj = $scaleSteps[2][$idx+1]; if( $adj >= 30 ) { $start = $this->AdjStartDate($aStartTime,$adj-30); $end = $this->AdjEndDate($aEndTime,$adj-30); } elseif( $adj >= 20 ) { $start = $this->AdjStartDate($aStartTime,false,$adj-20); $end = $this->AdjEndDate($aEndTime,false,$adj-20); } else { $start = $this->AdjStartDate($aStartTime,false,false,$adj); $end = $this->AdjEndDate($aEndTime,false,false,$adj); // We add 1 second for date adjustment to make sure we end on 00:00 the following day // This makes the final major tick be srawn when we step day-by-day instead of ending // on xx:59:59 which would not draw the final major tick $end++; } } else { // Use time adjustment $adj = $scaleSteps[2][$idx+1]; if( $adj >= 30 ) { $start = $this->AdjStartTime($aStartTime,$adj-30); $end = $this->AdjEndTime($aEndTime,$adj-30); } elseif( $adj >= 20 ) { $start = $this->AdjStartTime($aStartTime,false,$adj-20); $end = $this->AdjEndTime($aEndTime,false,$adj-20); } else { $start = $this->AdjStartTime($aStartTime,false,false,$adj); $end = $this->AdjEndTime($aEndTime,false,false,$adj); } } } // If the overall date span is larger than 1 day ten we show date $format = ''; if( ($end-$start) > SECPERDAY ) { $format = 'Y-m-d '; } // If the major step is less than 1 day we need to whow hours + min if( $major < SECPERDAY ) { $format .= 'H:i'; } // If the major step is less than 1 min we need to show sec if( $major < 60 ) { $format .= ':s'; } $done=true; } ++$i; } return array($start,$end,$major,$minor,$format); } // Overrides the automatic determined date format. Must be a valid date() format string function SetDateFormat($aFormat) { $this->date_format = $aFormat; } function SetDateAlign($aStartAlign,$aEndAlign=false) { if( $aEndAlign === false ) { $aEndAlign=$aStartAlign; } $this->iStartAlign = $aStartAlign; $this->iEndAlign = $aEndAlign; } function SetTimeAlign($aStartAlign,$aEndAlign=false) { if( $aEndAlign === false ) { $aEndAlign=$aStartAlign; } $this->iStartTimeAlign = $aStartAlign; $this->iEndTimeAlign = $aEndAlign; } function AutoScale(&$img,$aStartTime,$aEndTime,$aNumSteps) { assert($aStartTime < $aEndTime); $done=false; $i=0; while( ! $done && $i < 5) { list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i); $n = floor(($adjend-$adjstart)/$maj); if( $n * 1.7 > $aNumSteps ) { $done=true; } $i++; } /* if( 0 ) { // DEBUG echo " Start =".date("Y-m-d H:i:s",$aStartTime)."<br>"; echo " End =".date("Y-m-d H:i:s",$aEndTime)."<br>"; echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."<br>"; echo "Adj End =".date("Y-m-d H:i:s",$adjend)."<p>"; echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day<br>"; echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day<br>"; echo "Format=$format<p>"; } */ if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) { JpGraphError::Raise('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both'); } if( $this->iStartTimeAlign !== false ) { if( $this->iStartTimeAlign >= 30 ) { $adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30); } elseif( $this->iStartTimeAlign >= 20 ) { $adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20); } else { $adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign); } } if( $this->iEndTimeAlign !== false ) { if( $this->iEndTimeAlign >= 30 ) { $adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30); } elseif( $this->iEndTimeAlign >= 20 ) { $adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20); } else { $adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign); } } if( $this->iStartAlign !== false ) { if( $this->iStartAlign >= 30 ) { $adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30); } elseif( $this->iStartAlign >= 20 ) { $adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20); } else { $adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign); } } if( $this->iEndAlign !== false ) { if( $this->iEndAlign >= 30 ) { $adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30); } elseif( $this->iEndAlign >= 20 ) { $adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20); } else { $adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign); } } $this->Update($img,$adjstart,$adjend); if( ! $this->ticks->IsSpecified() ) $this->ticks->Set($maj,$min); if( $this->date_format == '' ) $this->ticks->SetLabelDateFormat($format); else $this->ticks->SetLabelDateFormat($this->date_format); } } ?> Index: jpgraph_flags.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_flags.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_flags.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_flags.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== *************** *** 64,67 **** --- 63,67 ---- 'Republic of Chad' => 'chad', 'Republic of Chile' => 'chil', + 'Peoples Republic of China' => 'chin', 'Territory of Christmas Island' => 'chms', 'Commonwealth of Independent States' => 'cins', *************** *** 223,226 **** --- 223,227 ---- 'Kingdom of Swaziland' => 'szld', 'Republic of China' => 'taiw', + 'Taiwan' => 'taiw', 'Republic of Tajikistan' => 'tajk', 'United Republic of Tanzania' => 'tanz', *************** *** 337,348 **** $nlen = strlen($aName); reset($this->iCountryNameMap); ! // Match partial full country name or exact idx name while( list($key,$val) = each($this->iCountryNameMap) ) { ! if( strpos(strtolower($key), $aName) !== false || ! ($nlen == strlen($val) && $val == $aName) ) { $found=true; break; } } if( $found ) { $outFullName = $key; --- 338,358 ---- $nlen = strlen($aName); reset($this->iCountryNameMap); ! // Start by trying to match exact index name while( list($key,$val) = each($this->iCountryNameMap) ) { ! if( $nlen == strlen($val) && $val == $aName ) { $found=true; break; } } + if( !$found ) { + reset($this->iCountryNameMap); + // If the exact index doesn't work try a (partial) full name + while( list($key,$val) = each($this->iCountryNameMap) ) { + if( strpos(strtolower($key), $aName) !== false ) { + $found=true; + break; + } + } + } if( $found ) { $outFullName = $key; Index: imgdata_pushpins.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/imgdata_pushpins.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** imgdata_pushpins.inc 23 Jan 2005 22:33:08 -0000 1.4 --- imgdata_pushpins.inc 10 Jun 2005 01:07:34 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_gb2312.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_gb2312.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_gb2312.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_gb2312.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2001,2002,2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_pie3d.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_pie3d.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_pie3d.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_pie3d.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ Index: imgdata_balls.inc =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/imgdata_balls.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** imgdata_balls.inc 23 Jan 2005 22:33:08 -0000 1.4 --- imgdata_balls.inc 10 Jun 2005 01:07:34 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2003 Johan Persson //======================================================================== --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== Index: jpgraph_bar.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_bar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_bar.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_bar.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2001,2002,2003 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ *************** *** 83,86 **** --- 82,101 ---- $this->legendcsimtarget,$this->legendcsimalt); } + elseif( $this->legend!="" && ($this->iPattern > -1 || is_array($this->iPattern)) ) { + if( is_array($this->iPattern) ) { + $p1 = $this->iPattern[0]; + $p2 = $this->iPatternColor[0]; + $p3 = $this->iPatternDensity[0]; + } + else { + $p1 = $this->iPattern; + $p2 = $this->iPatternColor; + $p3 = $this->iPatternDensity; + } + $color = array($p1,$p2,$p3,$this->fill_color); + // A kludge: Too mark that we add a pattern we use a type value of < 100 + $graph->legend->Add($this->legend,$color,"",-101, + $this->legendcsimtarget,$this->legendcsimalt); + } elseif( $this->fill_color && $this->legend!="" ) { if( is_array($this->fill_color) ) { *************** *** 243,251 **** case PATTERN_STRIPE1: $aPatternValue= 5; ! $aDensity = 90; break; case PATTERN_STRIPE2: $aPatternValue= 5; ! $aDensity = 75; break; default: --- 258,266 ---- case PATTERN_STRIPE1: $aPatternValue= 5; ! $aDensity = 95; break; case PATTERN_STRIPE2: $aPatternValue= 5; ! $aDensity = 85; break; default: Index: jpgraph_regstat.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph_regstat.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jpgraph_regstat.php 23 Jan 2005 22:33:09 -0000 1.4 --- jpgraph_regstat.php 10 Jun 2005 01:07:35 -0000 1.5 *************** *** 7,12 **** // Ver: $Id$ // ! // License: This code is released under QPL ! // Copyright (C) 2002 Johan Persson //======================================================================== */ --- 7,11 ---- // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== */ Index: jpgraph.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/includes/jpgraph/jpgraph.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** jpgraph.php 23 Jan 2005 22:33:08 -0000 1.5 --- jpgraph.php 10 Jun 2005 01:07:34 -0000 1.6 *************** *** 2,12 **** //======================================================================= // File: JPGRAPH.PHP ! // Description: PHP4 Graph Plotting library. Base module. // Created: 2001-01-08 // Author: Johan Persson (jo...@ad...) // Ver: $Id$ // ! // License: This code is released under QPL 1.0 ! // Copyright (C) 2001,2002,2003,2004 Johan Persson Aditus Consulting //======================================================================== --- 2,11 ---- //======================================================================= // File: JPGRAPH.PHP ! // Description: PHP Graph Plotting library. Base module. // Created: 2001-01-08 // Author: Johan Persson (jo...@ad...) // Ver: $Id$ // ! // Copyright (c) Aditus Consulting. All rights reserved. //======================================================================== *************** *** 14,18 **** // Version info ! DEFINE('JPG_VERSION','1.17beta2'); // For internal use only --- 13,17 ---- // Version info ! DEFINE('JPG_VERSION','1.18'); // For internal use only *************** *** 226,229 **** --- 225,229 ---- // in all methods. // + GLOBAL $__jpg_err; class JpGraphError { function Install($aErrObject) { *************** *** 463,467 **** //user // ! if( isset($GLOBALS['php_errormsg']) ) { JpGraphError::Raise("General PHP error : ".$GLOBALS['php_errormsg']); } --- 463,467 ---- //user // ! if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG ) { JpGraphError::Raise("General PHP error : ".$GLOBALS['php_errormsg']); } *************** *** 529,532 **** --- 529,533 ---- // Translate iso encoding to unicode function iso2uni ($isoline){ + $uniline=''; for ($i=0; $i < strlen($isoline); $i++){ $thischar=substr($isoline,$i,1); *************** *** 746,766 **** var $plots=array(); // Array of all plot object in the graph (for Y 1 axis) var $y2plots=array();// Array of all plot object in the graph (for Y 2 axis) var $xscale=null; // X Scale object (could be instance of LinearScale or LogScale ! var $yscale=null,$y2scale=null; var $iIcons = array(); // Array of Icons to add to var $cache_name; // File name to be used for the current graph in the cache directory var $xgrid=null; // X Grid object (linear or logarithmic) ! var $ygrid=null,$y2grid=null; //dito for Y var $doframe=true,$frame_color=array(0,0,0), $frame_weight=1; // Frame around graph var $boxed=false, $box_color=array(0,0,0), $box_weight=1; // Box around plot area var $doshadow=false,$shadow_width=4,$shadow_color=array(102,102,102); // Shadow for graph var $xaxis=null; // X-axis (instane of Axis class) ! var $yaxis=null, $y2axis=null; // Y axis (instance of Axis class) var $margin_color=array(200,200,200); // Margin color of graph var $plotarea_color=array(255,255,255); // Plot area color var $title,$subtitle,$subsubtitle; // Title and subtitle(s) text object ! var $axtype="linlin"; // Type of axis ! var $xtick_factor; // Factot to determine the maximum number of ticks depending on the plot with ! var $texts=null, $y2texts=null; // Text object to ge shown in the graph var $lines=null, $y2lines=null; var $bands=null, $y2bands=null; --- 747,768 ---- var $plots=array(); // Array of all plot object in the graph (for Y 1 axis) var $y2plots=array();// Array of all plot object in the graph (for Y 2 axis) + var $ynplots=array(); var $xscale=null; // X Scale object (could be instance of LinearScale or LogScale ! var $yscale=null,$y2scale=null, $ynscale=array(); var $iIcons = array(); // Array of Icons to add to var $cache_name; // File name to be used for the current graph in the cache directory var $xgrid=null; // X Grid object (linear or logarithmic) ! var $ygrid=null,$y2grid=null, $yngrid=array(); //dito for Y var $doframe=true,$frame_color=array(0,0,0), $frame_weight=1; // Frame around graph var $boxed=false, $box_color=array(0,0,0), $box_weight=1; // Box around plot area var $doshadow=false,$shadow_width=4,$shadow_color=array(102,102,102); // Shadow for graph var $xaxis=null; // X-axis (instane of Axis class) ! var $yaxis=null, $y2axis=null, $ynaxis=array(); // Y axis (instance of Axis class) var $margin_color=array(200,200,200); // Margin color of graph var $plotarea_color=array(255,255,255); // Plot area color var $title,$subtitle,$subsubtitle; // Title and subtitle(s) text object ! var $axtype="linlin"; // Type of axis ! var $xtick_factor; // Factot to determine the maximum number of ticks depending on the plot with ! var $texts=null, $y2texts=null; // Text object to ge shown in the graph var $lines=null, $y2lines=null; var $bands=null, $y2bands=null; *************** *** 802,805 **** --- 804,809 ---- $iImgTransFillColor='white',$iImgTransHighQ=false, $iImgTransBorder=false,$iImgTransHorizonPos=0.5; + var $iYAxisDeltaPos=50; + var $iIconDepth=DEPTH_BACK; //--------------- *************** *** 857,860 **** --- 861,867 ---- $this->footer = new Footer(); + // Window doesn't like '?' in the file name so replace it with an '_' + $aCachedName = str_replace("?","_",$aCachedName); + // If the cached version exist just read it directly from the // cache, stream it back to browser and exit *************** *** 871,875 **** //--------------- // PUBLIC METHODS - // Enable final image perspective transformation function Set3DPerspective($aDir=1,$aHorizon=100,$aSkewDist=120,$aQuality=false,$aFillColor='#FFFFFF',$aBorder=false,$aMinSize=true,$aHorizonPos=0.5) { --- 878,881 ---- *************** *** 891,894 **** --- 897,904 ---- $this->grid_depth=$aDepth; } + + function SetIconDepth($aDepth) { + $this->iIconDepth=$aDepth; + } // Specify graph angle 0-360 degrees. *************** *** 983,987 **** $this->y2plots[] = &$aPlot; } ! // Add text object to the graph function AddText(&$aTxt,$aToY2=false) { --- 993,1014 ---- $this->y2plots... [truncated message content] |
From: Juha-Mikko A. <jua...@us...> - 2005-06-08 06:50:02
|
Update of /cvsroot/netoffice/netoffice-2.x/reports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15827/reports Modified Files: hours.php overdue.php phasestatus.php snapshot.php Log Message: Most problems with recursive report lists have been fixed. Index: hours.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/reports/hours.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hours.php 23 May 2005 06:31:21 -0000 1.7 --- hours.php 8 Jun 2005 06:49:52 -0000 1.8 *************** *** 170,174 **** $block1->cellRow(""); $block1->cellRow(""); ! $block1->cellRow("Total:"); $block1->cellRow($totalMemHours); $block1->closeRow(); --- 170,175 ---- $block1->cellRow(""); $block1->cellRow(""); ! $block1->cellRow(""); ! $block1->cellRow("$strings[total]:"); $block1->cellRow($totalMemHours); $block1->closeRow(); Index: overdue.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/reports/overdue.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** overdue.php 23 May 2005 06:31:21 -0000 1.7 --- overdue.php 8 Jun 2005 06:49:52 -0000 1.8 *************** *** 116,119 **** --- 116,120 ---- // close block1 $block1->closeFormResults(); + $block1->block_close(); Index: snapshot.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/reports/snapshot.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** snapshot.php 15 Dec 2004 12:25:20 -0000 1.6 --- snapshot.php 8 Jun 2005 06:49:52 -0000 1.7 *************** *** 56,59 **** --- 56,60 ---- $block0->closeContent(); + $block0->block_close(); if ($comptListProjects != "0") { *************** *** 81,89 **** $queryTask = " WHERE tas.project = '$projectId'"; $tmpqueryTask = "$queryTask ORDER BY tas.due_date"; $listTasks = new request(); $listTasks->openTasks($tmpqueryTask); $comptListTasks = count($listTasks->tas_id); ! ! $blockProject->openResults($checkbox = "false"); $blockProject->labels($labels = array(0 => $strings["task"], 1 => $strings["priority"], 2 => $strings["status"], 3 => $strings["due_date"], 4 => $strings["completed"], 5 => $strings["assigned_to"], 6 => $strings["published"]), "true"); --- 82,94 ---- $queryTask = " WHERE tas.project = '$projectId'"; $tmpqueryTask = "$queryTask ORDER BY tas.due_date"; + + $blockProject->closeContent(); + $blockProject->heading_close(); + $listTasks = new request(); $listTasks->openTasks($tmpqueryTask); $comptListTasks = count($listTasks->tas_id); ! ! $blockProject->openResults("false"); $blockProject->labels($labels = array(0 => $strings["task"], 1 => $strings["priority"], 2 => $strings["status"], 3 => $strings["due_date"], 4 => $strings["completed"], 5 => $strings["assigned_to"], 6 => $strings["published"]), "true"); *************** *** 129,135 **** $blockProject->closeResults(); } ! $blockProject->closeContent(); ! $blockProject->headingForm_close(); } else { // $block1->noresults(); --- 134,141 ---- $blockProject->closeResults(); + $blockProject->block_close(); + $blockProject->block_close(); } ! // $blockProject->closeContent(); } else { // $block1->noresults(); Index: phasestatus.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/reports/phasestatus.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** phasestatus.php 15 Dec 2004 12:25:20 -0000 1.5 --- phasestatus.php 8 Jun 2005 06:49:52 -0000 1.6 *************** *** 65,70 **** $blockProject = new block(); - $blockProject->openContent(); $blockProject->headingForm(buildLink("../projects/viewproject.php?id=" . $projectId, $projectTitle, LINK_INSIDE)); $queryPhase = "WHERE pha.project_id = '$projectId' "; --- 65,70 ---- $blockProject = new block(); $blockProject->headingForm(buildLink("../projects/viewproject.php?id=" . $projectId, $projectTitle, LINK_INSIDE)); + // $blockProject->openContent(); $queryPhase = "WHERE pha.project_id = '$projectId' "; *************** *** 168,175 **** $blockProject->closeResults(); print "<p><br></p>"; } ! $blockProject->closeContent(); ! $blockProject->headingForm_close(); } else { // $block1->noresults(); --- 168,176 ---- $blockProject->closeResults(); + $blockProject->heading_close(); print "<p><br></p>"; } ! // $blockProject->closeContent(); ! $blockProject->block_close(); } else { // $block1->noresults(); |
From: Juha-Mikko A. <jua...@us...> - 2005-06-08 06:50:01
|
Update of /cvsroot/netoffice/netoffice-2.x/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15827/languages Modified Files: lang_en.php Log Message: Most problems with recursive report lists have been fixed. Index: lang_en.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/languages/lang_en.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** lang_en.php 30 May 2005 16:12:38 -0000 1.12 --- lang_en.php 8 Jun 2005 06:49:51 -0000 1.13 *************** *** 797,799 **** $strings['ical_url'] = 'iCal url'; ! ?> \ No newline at end of file --- 797,808 ---- $strings['ical_url'] = 'iCal url'; ! // 2.6 ! $strings['reporthours'] = 'Hours Logged'; ! $strings['reportscompleted'] = 'Completed Tasks'; ! $strings['reportsoverdue'] = 'Overdue Tasks'; ! $strings['reportsusage'] = 'Resource Usage Detail'; ! $strings['reports_from'] = 'from'; ! $strings['reports_to'] = 'to'; ! $strings['total'] = 'Total'; ! ! ?> |
From: Scott M. <ma...@us...> - 2005-06-01 00:47:06
|
Update of /cvsroot/netoffice/netoffice-2.x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27727/docs Modified Files: changes.txt Log Message: fixed report result table display, thanks to alpha for reporting it Index: changes.txt =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/docs/changes.txt,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** changes.txt 30 May 2005 16:12:37 -0000 1.31 --- changes.txt 1 Jun 2005 00:46:43 -0000 1.32 *************** *** 1,4 **** --- 1,7 ---- CHANGES + 2005-05-31 + + Fixed reports/resultsreport.php display, reported by alpha. (madbear) + 2005-05-30 + Added links on appropriate pages to the iCalendar script (madbear) |
From: Scott M. <ma...@us...> - 2005-06-01 00:47:06
|
Update of /cvsroot/netoffice/netoffice-2.x/reports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27727/reports Modified Files: resultsreport.php Log Message: fixed report result table display, thanks to alpha for reporting it Index: resultsreport.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/reports/resultsreport.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** resultsreport.php 23 Dec 2004 16:39:19 -0000 1.8 --- resultsreport.php 1 Jun 2005 00:46:44 -0000 1.9 *************** *** 244,254 **** if ($comptListTasks == "0") { $block1->contentRow("", "0 " . $strings["matches"] . "<br>" . $strings["no_results_report"]); ! } if ($comptListTasks == "1") { $block1->contentRow("", "1 " . $strings["match"]); ! } if ($comptListTasks > "1") { $block1->contentRow("", $comptListTasks . " " . $strings["matches"]); ! } $block0->closeContent(); --- 244,256 ---- if ($comptListTasks == "0") { $block1->contentRow("", "0 " . $strings["matches"] . "<br>" . $strings["no_results_report"]); ! } ! if ($comptListTasks == "1") { $block1->contentRow("", "1 " . $strings["match"]); ! } ! if ($comptListTasks > "1") { $block1->contentRow("", $comptListTasks . " " . $strings["matches"]); ! } $block0->closeContent(); *************** *** 258,262 **** $block1->heading($strings["report_results"]); - $block1->heading_close(); if ($comptListTasks != "0") { --- 260,263 ---- |
From: Scott M. <ma...@us...> - 2005-05-30 16:18:09
|
Update of /cvsroot/netoffice/netoffice-2.x/calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9418/calendar Modified Files: icalendar.php Log Message: changed ical meetings to be TENTATIVE instead of CONFIRMED Index: icalendar.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/calendar/icalendar.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** icalendar.php 30 May 2005 16:12:40 -0000 1.1 --- icalendar.php 30 May 2005 16:17:58 -0000 1.2 *************** *** 197,201 **** '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm ! 1, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) --- 197,201 ---- '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm ! 0, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) *************** *** 304,308 **** '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm ! 1, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) --- 304,308 ---- '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm ! 0, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) |
From: Scott M. <ma...@us...> - 2005-05-30 16:13:17
|
Update of /cvsroot/netoffice/netoffice-2.x/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6812/docs Modified Files: changes.txt Log Message: + combined the icaltasks.php and icalmeetings.php into calendar/icalendar.php + added new language string 'ical_url' + added links on appropriate pages to the icalendar.php script Index: changes.txt =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/docs/changes.txt,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** changes.txt 29 May 2005 22:34:36 -0000 1.30 --- changes.txt 30 May 2005 16:12:37 -0000 1.31 *************** *** 1,7 **** CHANGES 2005-05-29 ! + Added basic iCal support for Task, Milestones: tasks/icaltasks.php (madbear) ! + Added basic iCal support for Meetings: meetings/icalmeetings.php (madbear) 2005-05-27 --- 1,10 ---- CHANGES + 2005-05-30 + + Added links on appropriate pages to the iCalendar script (madbear) + 2005-05-29 ! + Added basic iCalendar (iCal) support for Task, Milestones, and ! Meetings: calendar/icalendar.php (madbear) 2005-05-27 |
From: Scott M. <ma...@us...> - 2005-05-30 16:12:50
|
Update of /cvsroot/netoffice/netoffice-2.x/calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6812/calendar Added Files: icalendar.php Log Message: + combined the icaltasks.php and icalmeetings.php into calendar/icalendar.php + added new language string 'ical_url' + added links on appropriate pages to the icalendar.php script --- NEW FILE: icalendar.php --- <?php /* vim: set expandtab ts=4 sw=4 sts=4: */ /** * $Id: icalendar.php,v 1.1 2005/05/30 16:12:40 madbear Exp $ * * Copyright (c) 2003 by the NetOffice developers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * iCal RFC: http://www.ietf.org/rfc/rfc2445.txt * * Basic iCal support for NetOffice Tasks and Milestones */ $checkSession = false; require_once('../includes/library.php'); require_once('../includes/settings.php'); if ($_SESSION['icalAuth'] !== true) { $_SESSION['icalAuth'] = false; } if (!$_SERVER['PHP_AUTH_USER'] && $_SESSION['icalAuth'] === false) { authenticate(); exit; } if ($_SESSION['icalAuth'] === false) { $tmpquery = "WHERE mem.login = '" . mysql_escape_string($_SERVER['PHP_AUTH_USER']) . "' AND mem.login != 'demo' AND mem.profil != '4'"; $listMember = new request(); $listMember->openMembers($tmpquery); $comptListMember = count($listMember->mem_id); if ($comptListMember != 1){ authenticate(); exit; } if (!is_password_match(mysql_escape_string($_SERVER['PHP_AUTH_USER']), mysql_escape_string($_SERVER['PHP_AUTH_PW']), $listMember->mem_password[0])){ authenticate(); exit; } $_SESSION['idSession'] = $listMember->mem_id[0]; $_SESSION['icalAuth'] = true; } // load the base iCal class require_once('../includes/ical/class.iCal.inc.php'); $iCal = new iCal('-//netoffice.sourceforge.net//NetOffice v' . $version . '//' . strtoupper($langDefault), 0, ''); // now get the open task(s) for user_name $tmpquery = "WHERE tas.assigned_to = '" . $_SESSION['idSession'] . "' AND tas.status IN(0,2,3) AND pro.status IN(0,2,3)"; $listTasks = new request(); $listTasks->openTasks($tmpquery); $comptListTasks = count($listTasks->tas_id); // iCal VTODO: Open Task(s) // iCal VEVENT: Milestones for open projects if ($comptListTasks >= 1) { for ($i = 0; $i < $comptListTasks; $i++) { $title = (string) $listTasks->tas_name[$i]; $description = (string) $listTasks->tas_description[$i]; if (empty($listTasks->tas_start_date[$i]) || $listTasks->tas_start_date[$i] == '--') { $start_date = ''; continue; } else { $start_date = (int) strtotime($listTasks->tas_start_date[$i]); } if (empty($listTasks->tas_due_date[$i]) || $listTasks->tas_due_date[$i] == '--') { $due_date = ''; } else { $due_date = (int) strtotime($listTasks->tas_due_date[$i]); } $percent_done = (int) $listTasks->tas_completion[$i] . '0'; $priority = (int) $listTasks->tas_priority[$i]; $status = (int) $listTasks->tas_status[$i]; if (isset($start_date) && $start_date > 1 && isset($due_date) && $due_date > $start_date) { $task_duration = (int) (($due_date - $start_date) / 60); } else { $task_duration = 0; } // set the VTODO status switch ($status) { case 1: $ical_status = 4; // COMPLETED break; case 3: $ical_status = 5; // IN-PROCESS break; default: $ical_status = 3; // NEEDS-ACTION } // if the task is overdue then make status "NEEDS-ACTION" if (time() > $due_date) { $ical_status = 3; } // map the NetOffice priority number to one that fits the iCal standard switch ($priority) { case 1: $ical_priority = 9; // very low break; case 2: $ical_priority = 7; // low break; case 3: $ical_priority = 5; // medium break; case 4: $ical_priority = 3; // high break; case 5: $ical_priority = 1; // very high break; default: $ical_priority = 0; // none } $organizer = array($listTasks->tas_mem2_name[0], $listTasks->tas_mem2_email_work[0]); $attendee = array($listTasks->tas_mem_name[0] => $listTasks->tas_mem_email_work[0], 1); $categorie = array('Work','NetOffice'); if (empty($listTasks->tas_modified[$i])) { $last_modified = ''; } else { $last_modified = (int) strtotime($listTasks->tas_modified[$i]); } $task_url = (string) $root . '/general/login.php?url=tasks/viewtask.php?id=' . $listTasks->tas_id[$i]; $end_date = ''; if (empty($listTasks->tas_complete_date[$i]) || $listTasks->tas_complete_date[$i] == '--') { $end_date = ''; } else { $end_date = (int) strtotime($listTasks->tas_complete_date[$i]); } if ($listTasks->tas_milestone[$i] == 1) { $iCal->addToDo( $title, // Title $description, // Description '', // Location $start_date, // Start time $task_duration, // Duration in minutes $end_date, // End time $percent_done, // Percentage complete $ical_priority, // Priority = 0-9 $ical_status, // Status of the VTODO (3 = NEEDS-ACTION, 4 = COMPLETED, 5 = IN-PROCESS, 6 = CANCELLED) 0, // Class (0 = PRIVATE | 1 = PUBLIC | 2 = CONFIDENTIAL) $organizer, // Organizer $attendee, // Array (key = attendee name, value = e-mail, second value = role of the attendee [0 = CHAIR | 1 = REQ | 2 = OPT | 3 =NON]) $categorie, // categorie(s) - Array with Strings $last_modified, // Last Modification '', // Sets the time in minutes an alarm appears before an event in the program. no alarm if empty string or 0 '', // 5 - frequency: 0 = once, secoundly - yearly = 1-7 '', // 10 - recurrency end: ('' = forever | integer = number of times | timestring = explicit date) '', // 1 - Interval for frequency (every 2,3,4 weeks...) '', // array(2,3) - Array with the number of the days the event accures (example: array(0,1,5) = Sunday, Monday, Friday 0, // Startday of the Week ( 0 = Sunday - 6 = Saturday) '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event $task_url, // optional URL for that event $langDefault, // Language of the Strings '' // Optional UID for this ToDo ); } else { $iCal->addEvent( $organizer, // The organizer - use array('Name', 'na...@do...') $start_date, // Start time for the event (timestamp; if you want an allday event the startdate has to start at 00:00:00) $start_date + 86400, // End time for the event (timestamp or write 'allday' for an allday event) '', // Location 0, // Transparancy (0 = OPAQUE | 1 = TRANSPARENT) $categorie, // categorie(s) - Array with Strings (example: array('Freetime','Party')) $description, // Description $title, // Title for the event 0, // Class (0 = PRIVATE | 1 = PUBLIC | 2 = CONFIDENTIAL) $attendee, // attendees - Array (key = attendee name, value = e-mail, second value = role of the attendee [0 = CHAIR | 1 = REQ | 2 = OPT | 3 =NON]) $ical_priority, // Priority = 0-9 0, // frequency: 0 = once, secoundly yearly = 17 1, // Recurrency end: ('' = forever | integer = number of times | timestring = explicit date) 0, // Interval for frequency (every 2,3,4 weeks ) '', // Array with the number of the days the event accures (example: array(0,1,5) = Sunday, Monday, Friday 0, // Startday of the Week ( 0 = Sunday - 6 = Saturday) '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm 1, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) '' // Optional UID for this EVENT ); } } } // now get open meetings for this login $tmpquery = " INNER JOIN {$tableCollab['attendants']} att ON att.meeting = mee.id " . "WHERE att.member = '{$_SESSION['idSession']}' " . "AND mee.status IN(0,2,3) ORDER BY mee.date ASC"; $listMeetings = new request(); $listMeetings->openMeetings($tmpquery); $comptListMeetings = count($listMeetings->mee_id); // add iCal VEVENT for each open meeting, if any if ($comptListMeetings >= 1) { for ($i = 0; $i < $comptListMeetings; $i++) { $organizer = array($listMeetings->mee_chairman_name[$i], $listMeetings->mee_chairman_email[$i]); if (empty($listMeetings->mee_date[$i]) || $listMeetings->mee_date[$i] == '--') { continue; } else { $start_time = (int) strtotime($listMeetings->mee_date[$i] . ' ' . $listMeetings->mee_start_time[$i]);; $end_time = (int) strtotime($listMeetings->mee_date[$i] . ' ' . $listMeetings->mee_end_time[$i]); } $location = (string) $listMeetings->mee_location[$i]; $categorie = array('Work', 'NetOffice'); $description = (string) $listMeetings->mee_agenda[$i]; $title = (string) $listMeetings->mee_name[$i]; // get attendants of this meeting $tmpquery = "WHERE att.meeting = '{$listMeetings->mee_id[$i]}'"; $attendantDetail = new request(); $attendantDetail->openAttendants($tmpquery); $comptAttendantDetail = count($attendantDetail->att_id); if ($comptAttendantDetail >= 1) { for ($j = 0; $j < $comptAttendantDetail; $j++) { // role of the attendee [0 = CHAIR | 1 = REQ | 2 = OPT | 3 =NON] $role = 1; // default to REQ if ($attendantDetail->att_mem_name[$j] == $listMeetings->mee_chairman_name[$i]) { $role = 0; // this person is the CHAIR } $att_name = $attendantDetail->att_mem_name[$j]; $att_email = $attendantDetail->att_mem_email_work[$j]; if (empty($att_email)) { $att_email = 'un...@so...'; } // array of attendants $attendees[$att_name] = "$att_email,$role"; } } else { $attendees = ''; } $priority = (int) $listMeetings->mee_priority[$i]; $task_url = (string) $root . '/general/login.php?url=meetings/viewmeeting.php?id=' . $listMeetings->mee_id[$i]; // map the NetOffice priority number to one that fits the iCal standard switch ($priority) { case 1: $ical_priority = 9; // very low break; case 2: $ical_priority = 7; // low break; case 3: $ical_priority = 5; // medium break; case 4: $ical_priority = 3; // high break; case 5: $ical_priority = 1; // very high break; default: $ical_priority = 0; // none } $iCal->addEvent( $organizer, // The organizer - use array('Name', 'na...@do...') $start_time, // Start time for the event (timestamp; if you want an allday event the startdate has to start at 00:00:00) $end_time, // End time for the event (timestamp or write 'allday' for an allday event) $location, // Location 0, // Transparancy (0 = OPAQUE | 1 = TRANSPARENT) $categorie, // categorie(s) - Array with Strings (example: array('Freetime','Party')) $description, // Description $title, // Title for the event 0, // Class (0 = PRIVATE | 1 = PUBLIC | 2 = CONFIDENTIAL) $attendees, // attendees - Array (key = attendee name, value = e-mail, second value = role of the attendee [0 = CHAIR | 1 = REQ | 2 = OPT | 3 =NON]) $ical_priority, // Priority = 0-9 0, // frequency: 0 = once, secoundly yearly = 17 1, // Recurrency end: ('' = forever | integer = number of times | timestring = explicit date) 0, // Interval for frequency (every 2,3,4 weeks ) '', // Array with the number of the days the event accures (example: array(0,1,5) = Sunday, Monday, Friday 0, // Startday of the Week ( 0 = Sunday - 6 = Saturday) '', // exeption dates: Array with timestamps of dates that should not be includes in the recurring event '', // Array with all the alarm information, "''" for no alarm 1, // Status of the event (0 = TENTATIVE, 1 = CONFIRMED, 2 = CANCELLED) $task_url, // optional URL for this event $langDefault, // Language of the strings used in the event (iso code) '' // Optional UID for this EVENT ); } } // output the ics file $iCal->outputFile('ics'); //---------------------- //--- functions -------- //---------------------- function authenticate() { header('WWW-Authenticate: Basic realm="My NetOffice iCalendar"'); header('HTTP/1.0 401 Unauthorized'); die('Invalid Credentials!'); } ?> |
From: Scott M. <ma...@us...> - 2005-05-30 16:12:49
|
Update of /cvsroot/netoffice/netoffice-2.x/tasks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6812/tasks Modified Files: viewtask.php Removed Files: icaltasks.php Log Message: + combined the icaltasks.php and icalmeetings.php into calendar/icalendar.php + added new language string 'ical_url' + added links on appropriate pages to the icalendar.php script --- icaltasks.php DELETED --- Index: viewtask.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/tasks/viewtask.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** viewtask.php 4 Jan 2005 06:40:43 -0000 1.14 --- viewtask.php 30 May 2005 16:12:39 -0000 1.15 *************** *** 162,165 **** --- 162,166 ---- $block1->contentRow($strings["description"], nl2br($taskDetail->tas_description[0])); + $block1->contentRow($strings['ical_url'], buildLink("$root/calendar/icalendar.php", "$root/calendar/icalendar.php", LINK_OUT)); if ($taskDetail->tas_milestone[0] != "0") { |
From: Scott M. <ma...@us...> - 2005-05-30 16:12:48
|
Update of /cvsroot/netoffice/netoffice-2.x/projects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6812/projects Modified Files: viewproject.php Log Message: + combined the icaltasks.php and icalmeetings.php into calendar/icalendar.php + added new language string 'ical_url' + added links on appropriate pages to the icalendar.php script Index: viewproject.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/projects/viewproject.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** viewproject.php 24 May 2005 22:18:50 -0000 1.26 --- viewproject.php 30 May 2005 16:12:39 -0000 1.27 *************** *** 346,349 **** --- 346,350 ---- $block1->contentRow($strings['description'], nl2br($projectDetail->pro_description[0])); + $block1->contentRow($strings['ical_url'], buildLink("$root/calendar/icalendar.php", "$root/calendar/icalendar.php", LINK_OUT)); $block1->contentRow($strings['url_dev'], buildLink($projectDetail->pro_url_dev[0], $projectDetail->pro_url_dev[0], LINK_OUT)); $block1->contentRow($strings['url_prod'], buildLink($projectDetail->pro_url_prod[0], $projectDetail->pro_url_prod[0], LINK_OUT)); |
From: Scott M. <ma...@us...> - 2005-05-30 16:12:47
|
Update of /cvsroot/netoffice/netoffice-2.x/phases In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6812/phases Modified Files: viewphase.php Log Message: + combined the icaltasks.php and icalmeetings.php into calendar/icalendar.php + added new language string 'ical_url' + added links on appropriate pages to the icalendar.php script Index: viewphase.php =================================================================== RCS file: /cvsroot/netoffice/netoffice-2.x/phases/viewphase.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** viewphase.php 25 May 2005 01:25:59 -0000 1.10 --- viewphase.php 30 May 2005 16:12:39 -0000 1.11 *************** *** 145,148 **** --- 145,149 ---- $block1->contentRow($strings["uncomplete_tasks"], $comptUncompleteTasks); $block1->contentRow($strings["milestone"], $comptlistMilestones); + $block1->contentRow($strings['ical_url'], buildLink("$root/calendar/icalendar.php", "$root/calendar/icalendar.php", LINK_OUT)); $block1->contentRow($strings["date_start"], $phaseDetail->pha_date_start[0]); $block1->contentRow($strings["date_end"], $phaseDetail->pha_date_end[0]); |