You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Benjamin C. <bc...@us...> - 2004-05-15 14:49:37
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32747 Modified Files: Tag: htmltemplates UPGRADING Log Message: Getting ready for 1.0 Index: UPGRADING =================================================================== RCS file: /cvsroot/phpbt/phpbt/UPGRADING,v retrieving revision 1.12 retrieving revision 1.12.6.1 diff -u -r1.12 -r1.12.6.1 --- UPGRADING 19 Oct 2002 18:44:53 -0000 1.12 +++ UPGRADING 15 May 2004 14:49:28 -0000 1.12.6.1 @@ -1,11 +1,14 @@ -Upgrading from 0.8.x to 0.9.x ------------------------------ +Upgrading from 0.9.1 to 1.0 +--------------------------- + +First, backup your database! This upgrade should go smoothly, but +if it doesn't, it's better to be safe than sorry. Following the steps below will upgrade your installation of phpBT. Using the directory where you unpacked the new set of files... 1. Edit config-dist.php, changing the database settings to match those from - your old config.php (DB_*, SMARTY_PATH and TBL_PREFIX constants). Save + your old config.php (DB_* and TBL_PREFIX constants). Save config-dist.php as config.php. 2. Load upgrade.php with your web browser. 3. After running that script your installation has been upgraded. |
|
From: Benjamin C. <bc...@us...> - 2004-05-07 13:34:22
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32160 Modified Files: Tag: htmltemplates config-dist.php Log Message: Getting ready for 1.0 Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.26.2.2 retrieving revision 1.26.2.3 diff -u -r1.26.2.2 -r1.26.2.3 --- config-dist.php 3 May 2004 13:34:38 -0000 1.26.2.2 +++ config-dist.php 7 May 2004 13:34:13 -0000 1.26.2.3 @@ -65,7 +65,7 @@ define ('TBL_SITE', TBL_PREFIX.'site'); define ('ONEDAY', 86400); -define ('PHPBT_VERSION', '0.9.0'); +define ('PHPBT_VERSION', '1.0'); require_once ('./inc/auth.php'); |
|
From: Benjamin C. <bc...@us...> - 2004-05-07 13:05:08
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26029 Modified Files: Tag: htmltemplates upgrade.php Log Message: Getting ready for 1.0. I don't have the resources to test oracle support, so notify users that oracle support is going away. Index: upgrade.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v retrieving revision 1.35 retrieving revision 1.35.2.1 diff -u -r1.35 -r1.35.2.1 --- upgrade.php 24 Jul 2003 04:47:13 -0000 1.35 +++ upgrade.php 7 May 2004 13:04:58 -0000 1.35.2.1 @@ -2,7 +2,7 @@ // upgrade.php -- Upgrade from the previous version // ------------------------------------------------------------------------ -// Copyright (c) 2001, 2002 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // @@ -32,14 +32,27 @@ $thisvers = $db->getOne('select varvalue from '.TBL_CONFIGURATION.' where varname = \'DB_VERSION\''); if ($thisvers == DB_VERSION) $upgraded = 1; if (!$upgraded or DB::isError($thisvers)) { - if (!@is_writeable('c_templates')) { - include('templates/default/base/templatesperm.html'); - exit; - } switch(DB_TYPE) { case 'pgsql' : $db->query("create table ".TBL_PROJECT_PERM." ( project_id INT4 NOT NULL DEFAULT '0', user_id INT4 NOT NULL DEFAULT '0' )"); - //! TBL_AUTH_GROUP + if ($thisvers < 2) { + $db->query("alter table ".TBL_AUTH_GROUP." ADD assignable INT2"); + $db->query("alter table ".TBL_AUTH_GROUP." alter assignable set DEFAULT 0"); + $db->query("update ".TBL_AUTH_GROUP." set assignable = 0"); + $db->query("alter table ".TBL_AUTH_GROUP." alter assignable set NOT NULL"); + } + if ($thisvers < 3) { + $db->query("ALTER TABLE ".TBL_USER_PREF." ADD def_results INT4"); + $db->query("ALTER TABLE ".TBL_USER_PREF." alter def_results set DEFAULT 20"); + $db->query("update ".TBL_USER_PREF." set def_results = 20"); + $db->query("ALTER TABLE ".TBL_USER_PREF." alter def_results set NOT NULL"); + } + if ($thisvers < 4) { + $db->query('ALTER TABLE '.TBL_STATUS.' ADD bug_open INT2'); + $db->query("ALTER TABLE ".TBL_STATUS." alter bug_open set DEFAULT 1"); + $db->query("update ".TBL_STATUS." set bug_open = 1"); + $db->query("ALTER TABLE ".TBL_STATUS." alter bug_open set NOT NULL"); + } break; case 'mysql' : $db->query("create table if not exists ".TBL_PROJECT_PERM." ( project_id int(11) NOT NULL default '0', user_id int(11) NOT NULL default '0' )"); @@ -53,9 +66,9 @@ $db->query('ALTER TABLE '.TBL_STATUS.' ADD bug_open TINYINT DEFAULT \'1\' NOT NULL'); } break; - case 'pgsql' : - //! Missing Alter/Create's case 'oci8' : + echo "Oracle is not supported in version 1.0" + exit; $db->query("create table ".TBL_PROJECT_PERM." ( project_id number(10) default '0' NOT NULL, user_id number(10) default '0' NOT NULL )"); //! TBL_AUTH_GROUP //! TBL_USER_PERM.def_results (see mysql) @@ -74,6 +87,7 @@ if ($thisvers < 4) { $db->query('DELETE FROM '.TBL_CONFIGURATION.' WHERE varname = \'BUG_CLOSED\''); echo 'You must set your Statuses to either open or closed. Default settings should be modified so that "resolved", "closed", and "verified" are shown as being closed, and all other statuses are set to open.'; + $db->query("INSERT INTO ".TBL_AUTH_PERM." (perm_id, perm_name) VALUES (3, 'EditAssignment')"); } /* update to current DB_VERSION */ |
|
From: Benjamin C. <bc...@us...> - 2004-05-07 13:02:36
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25622 Modified Files: Tag: htmltemplates CHANGELOG Log Message: Getting ready for 1.0 Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.67 retrieving revision 1.67.2.1 diff -u -r1.67 -r1.67.2.1 --- CHANGELOG 23 Jul 2003 01:22:12 -0000 1.67 +++ CHANGELOG 7 May 2004 13:02:26 -0000 1.67.2.1 @@ -3,7 +3,6 @@ : Added display of the bug ids a bug blocks. : Allow users to suppress the update email when changing a bug. : Use localized strings in bug history. -: Added Japanese, Danish, Norwegian, and Spanish translations. : Allow users to override saved queries by saving a new query with the same name as an old one. : Added client-side validation to admin pages. @@ -12,6 +11,9 @@ : Fixed a bug with not being able to change the name of the 'Developer' group. : Added tracking of changes in priority to the bug history. : You can now search on "additional comments" and "description". +: Added the ability to download to Excel +: Fixed publicly-reported bugs +: Changed the localization from string arrays to gettext -- 0.9.1 -- 4 Jan 2003 : Fixed bugs with PostgreSQL |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:37:28
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25701/inc Modified Files: Tag: htmltemplates auth.php functions.php Log Message: Updating copyright year Index: auth.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v retrieving revision 1.18.4.2 retrieving revision 1.18.4.3 diff -u -r1.18.4.2 -r1.18.4.3 --- auth.php 17 Nov 2003 12:43:04 -0000 1.18.4.2 +++ auth.php 3 May 2004 13:37:19 -0000 1.18.4.3 @@ -2,7 +2,7 @@ // auth.php - Authentication and permission objects // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.44.2.3 retrieving revision 1.44.2.4 diff -u -r1.44.2.3 -r1.44.2.4 --- functions.php 3 May 2004 13:06:44 -0000 1.44.2.3 +++ functions.php 3 May 2004 13:37:19 -0000 1.44.2.4 @@ -2,7 +2,7 @@ // functions.php - Set up global functions // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:35:33
|
Update of /cvsroot/phpbt/phpbt/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25249 Modified Files: Tag: htmltemplates configure.php database.php group.php os.php project.php resolution.php severity.php status.php user.php Log Message: Updating copyright year Index: configure.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v retrieving revision 1.12.4.1 retrieving revision 1.12.4.2 diff -u -r1.12.4.1 -r1.12.4.2 --- configure.php 30 Aug 2003 21:59:16 -0000 1.12.4.1 +++ configure.php 3 May 2004 13:35:22 -0000 1.12.4.2 @@ -2,7 +2,7 @@ // configure.php - Interface for configuration options // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: database.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/database.php,v retrieving revision 1.3.6.1 retrieving revision 1.3.6.2 diff -u -r1.3.6.1 -r1.3.6.2 --- database.php 30 Aug 2003 21:59:16 -0000 1.3.6.1 +++ database.php 3 May 2004 13:35:22 -0000 1.3.6.2 @@ -2,7 +2,7 @@ // database.php - Interface to the database table // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: group.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/group.php,v retrieving revision 1.12.4.1 retrieving revision 1.12.4.2 diff -u -r1.12.4.1 -r1.12.4.2 --- group.php 30 Aug 2003 21:59:16 -0000 1.12.4.1 +++ group.php 3 May 2004 13:35:22 -0000 1.12.4.2 @@ -2,7 +2,7 @@ // group.php - Administer the user groups // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: os.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v retrieving revision 1.28.6.1 retrieving revision 1.28.6.2 diff -u -r1.28.6.1 -r1.28.6.2 --- os.php 30 Aug 2003 21:59:16 -0000 1.28.6.1 +++ os.php 3 May 2004 13:35:22 -0000 1.28.6.2 @@ -2,7 +2,7 @@ // os.php - Interface to the OS table // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: project.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v retrieving revision 1.46.4.1 retrieving revision 1.46.4.2 diff -u -r1.46.4.1 -r1.46.4.2 --- project.php 30 Aug 2003 21:59:16 -0000 1.46.4.1 +++ project.php 3 May 2004 13:35:22 -0000 1.46.4.2 @@ -2,7 +2,7 @@ // project.php - Create and update projects // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: resolution.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v retrieving revision 1.30.6.1 retrieving revision 1.30.6.2 diff -u -r1.30.6.1 -r1.30.6.2 --- resolution.php 30 Aug 2003 21:59:16 -0000 1.30.6.1 +++ resolution.php 3 May 2004 13:35:22 -0000 1.30.6.2 @@ -2,7 +2,7 @@ // resolution.php - Interface to the Resolution table // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: severity.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v retrieving revision 1.25.6.1 retrieving revision 1.25.6.2 diff -u -r1.25.6.1 -r1.25.6.2 --- severity.php 30 Aug 2003 21:59:16 -0000 1.25.6.1 +++ severity.php 3 May 2004 13:35:22 -0000 1.25.6.2 @@ -2,7 +2,7 @@ // severity.php - Interface to the severity table // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: status.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v retrieving revision 1.30.2.1 retrieving revision 1.30.2.2 diff -u -r1.30.2.1 -r1.30.2.2 --- status.php 30 Aug 2003 21:59:16 -0000 1.30.2.1 +++ status.php 3 May 2004 13:35:22 -0000 1.30.2.2 @@ -2,7 +2,7 @@ // status.php - Interface to the Status table // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: user.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v retrieving revision 1.49.6.1 retrieving revision 1.49.6.2 diff -u -r1.49.6.1 -r1.49.6.2 --- user.php 30 Aug 2003 21:59:16 -0000 1.49.6.1 +++ user.php 3 May 2004 13:35:22 -0000 1.49.6.2 @@ -2,7 +2,7 @@ // user.php - Create and update users // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:34:54
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25062 Modified Files: Tag: htmltemplates attachment.php bug.php config-dist.php include.php index.php install.php logout.php newaccount.php query.php report.php Log Message: Updating copyright year Index: attachment.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/attachment.php,v retrieving revision 1.21.4.2 retrieving revision 1.21.4.3 diff -u -r1.21.4.2 -r1.21.4.3 --- attachment.php 31 Aug 2003 04:44:09 -0000 1.21.4.2 +++ attachment.php 3 May 2004 13:34:37 -0000 1.21.4.3 @@ -2,7 +2,7 @@ // attachment.php - Adding, deleting, and displaying attachments // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.134.2.3 retrieving revision 1.134.2.4 diff -u -r1.134.2.3 -r1.134.2.4 --- bug.php 3 May 2004 12:59:59 -0000 1.134.2.3 +++ bug.php 3 May 2004 13:34:37 -0000 1.134.2.4 @@ -2,7 +2,7 @@ // bug.php - All the interactions with a bug // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.26.2.1 retrieving revision 1.26.2.2 diff -u -r1.26.2.1 -r1.26.2.2 --- config-dist.php 5 Sep 2003 12:12:10 -0000 1.26.2.1 +++ config-dist.php 3 May 2004 13:34:38 -0000 1.26.2.2 @@ -1,7 +1,7 @@ <?php // config.php - Set up configuration options // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.126.4.3 retrieving revision 1.126.4.4 diff -u -r1.126.4.3 -r1.126.4.4 --- include.php 3 May 2004 13:02:24 -0000 1.126.4.3 +++ include.php 3 May 2004 13:34:38 -0000 1.126.4.4 @@ -2,7 +2,7 @@ // include.php - Set up global variables // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: index.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/index.php,v retrieving revision 1.39.2.3 retrieving revision 1.39.2.4 diff -u -r1.39.2.3 -r1.39.2.4 --- index.php 3 May 2004 13:03:03 -0000 1.39.2.3 +++ index.php 3 May 2004 13:34:38 -0000 1.39.2.4 @@ -2,7 +2,7 @@ // index.php - Front page // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.39.2.4 retrieving revision 1.39.2.5 diff -u -r1.39.2.4 -r1.39.2.5 --- install.php 2 May 2004 16:50:38 -0000 1.39.2.4 +++ install.php 3 May 2004 13:34:38 -0000 1.39.2.5 @@ -3,7 +3,7 @@ // install.php -- Web-based installation script // Thanks to the phpBB crew for an example on how this can be done. // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: logout.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/logout.php,v retrieving revision 1.8.6.1 retrieving revision 1.8.6.2 diff -u -r1.8.6.1 -r1.8.6.2 --- logout.php 5 Sep 2003 12:14:36 -0000 1.8.6.1 +++ logout.php 3 May 2004 13:34:38 -0000 1.8.6.2 @@ -2,7 +2,7 @@ // logout.php - Clear the authentication of a user // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: newaccount.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v retrieving revision 1.32.6.2 retrieving revision 1.32.6.3 diff -u -r1.32.6.2 -r1.32.6.3 --- newaccount.php 14 Sep 2003 22:27:26 -0000 1.32.6.2 +++ newaccount.php 3 May 2004 13:34:38 -0000 1.32.6.3 @@ -2,7 +2,7 @@ // newaccount.php - Set up new user accounts // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.98.2.6 retrieving revision 1.98.2.7 diff -u -r1.98.2.6 -r1.98.2.7 --- query.php 3 May 2004 13:31:22 -0000 1.98.2.6 +++ query.php 3 May 2004 13:34:38 -0000 1.98.2.7 @@ -2,7 +2,7 @@ // query.php - Query the bug database // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // Index: report.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/report.php,v retrieving revision 1.26.6.2 retrieving revision 1.26.6.3 diff -u -r1.26.6.2 -r1.26.6.3 --- report.php 17 Nov 2003 12:44:59 -0000 1.26.6.2 +++ report.php 3 May 2004 13:34:38 -0000 1.26.6.3 @@ -2,7 +2,7 @@ // report.php - Generate reports on various bug activities // ------------------------------------------------------------------------ -// Copyright (c) 2001 - 2003 The phpBugTracker Group +// Copyright (c) 2001 - 2004 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:31:32
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24443/templates/default Modified Files: Tag: htmltemplates queryform.html Log Message: Added date range search based on closed date Index: queryform.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform.html,v retrieving revision 1.20.4.2 retrieving revision 1.20.4.3 diff -u -r1.20.4.2 -r1.20.4.3 --- queryform.html 29 Feb 2004 02:17:27 -0000 1.20.4.2 +++ queryform.html 3 May 2004 13:31:23 -0000 1.20.4.3 @@ -164,6 +164,15 @@ <?php echo translate("to"); ?> <input type="text" name="end_date" size="11"> </td> + </tr><tr> + <td align="right"> + <?php echo translate("Closed Date Range"); ?>: + </td> + <td colspan="2"> + <input type="text" name="closed_start_date" size="11"> + <?php echo translate("to"); ?> + <input type="text" name="closed_end_date" size="11"> + </td> </tr> </table> <hr align="left" width="100%"> |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:31:31
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24443 Modified Files: Tag: htmltemplates query.php Log Message: Added date range search based on closed date Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.98.2.5 retrieving revision 1.98.2.6 diff -u -r1.98.2.5 -r1.98.2.6 --- query.php 3 May 2004 13:00:36 -0000 1.98.2.5 +++ query.php 3 May 2004 13:31:22 -0000 1.98.2.6 @@ -115,6 +115,12 @@ if (!empty($end_date)) { $query[] = 'b.created_date < '.strtotime($end_date); } + if (!empty($closed_start_date)) { + $query[] = 'b.close_date > '.strtotime($closed_start_date); + } + if (!empty($closed_end_date)) { + $query[] = 'b.close_date < '.strtotime($closed_end_date); + } // Email field(s) if (!empty($email1)) { |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:06:59
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18535/inc Modified Files: Tag: htmltemplates functions.php Log Message: Added function for taint checking. Cleaned up database error reporting. Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.44.2.2 retrieving revision 1.44.2.3 diff -u -r1.44.2.2 -r1.44.2.3 --- functions.php 16 Sep 2003 11:39:34 -0000 1.44.2.2 +++ functions.php 3 May 2004 13:06:44 -0000 1.44.2.3 @@ -496,7 +496,13 @@ // Handle a database error function handle_db_error(&$obj) { - die($obj->message.'<br>'.$obj->userinfo); + define(RAWERROR, false); + if (!RAWERROR) { + show_text('A database error has occurred'); + } else { + show_text(htmlentities($obj->message).'<br>'.htmlentities($obj->userinfo)); + } + exit; } // Date() wrapper for smarty @@ -618,4 +624,13 @@ } } +// Check to make sure a bug is numeric +function check_id($id) { + if (!is_numeric($id) or !$id) { + show_text("Invalid ID"); + exit; + } + return $id; +} + ?> |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:04:05
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17850 Modified Files: Tag: htmltemplates user.php Log Message: Added taint checking Index: user.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/user.php,v retrieving revision 1.28.4.2 retrieving revision 1.28.4.3 diff -u -r1.28.4.2 -r1.28.4.3 --- user.php 16 Sep 2003 11:39:34 -0000 1.28.4.2 +++ user.php 3 May 2004 13:03:40 -0000 1.28.4.3 @@ -137,7 +137,7 @@ if (isset($_GET['op'])) { switch ($_GET['op']) { case 'delvote': - delete_vote($_GET['bugid']); + delete_vote(check_id($_GET['bugid'])); break; } } elseif (isset($_POST['do'])) { |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:03:12
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17728 Modified Files: Tag: htmltemplates index.php Log Message: Use the new bug_open field in the database to get define the open bug statuses Index: index.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/index.php,v retrieving revision 1.39.2.2 retrieving revision 1.39.2.3 diff -u -r1.39.2.2 -r1.39.2.3 --- index.php 5 Sep 2003 11:59:17 -0000 1.39.2.2 +++ index.php 3 May 2004 13:03:03 -0000 1.39.2.3 @@ -126,8 +126,8 @@ // Lastly we will need a list of all statuses so we can exclude 'closed" // for the open query - $sOpenStatusQuery = '&status%5B%5D='.@join('&status%5B%5D=', array(BUG_UNCONFIRMED, BUG_PROMOTED, - BUG_ASSIGNED, BUG_REOPENED)); + $sOpenStatusQuery = '&status%5B%5D='.@join('&status%5B%5D=', + $db->getCol("select status_id from status where bug_open = 1")); // QUESTION: Will this still work with using translate('Project')? foreach ($aProjects['projects'] as $iProjectNumberKey => $value1) { |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:02:33
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17556 Modified Files: Tag: htmltemplates include.php Log Message: Use the new bug_open field in the database to get define the OPEN_BUG_STATUSES constant Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.126.4.2 retrieving revision 1.126.4.3 diff -u -r1.126.4.2 -r1.126.4.3 --- include.php 5 Sep 2003 11:58:48 -0000 1.126.4.2 +++ include.php 3 May 2004 13:02:24 -0000 1.126.4.3 @@ -62,7 +62,7 @@ define($k, $v); } define('OPEN_BUG_STATUSES', join(', ', - array(BUG_UNCONFIRMED, BUG_PROMOTED, BUG_ASSIGNED, BUG_REOPENED))); + $db->getCol("select status_id from status where bug_open = 1"))); require_once ('inc/db/'.DB_TYPE.'.php'); |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:00:47
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17031 Modified Files: Tag: htmltemplates query.php Log Message: Added taint checking Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.98.2.4 retrieving revision 1.98.2.5 diff -u -r1.98.2.4 -r1.98.2.5 --- query.php 2 May 2004 17:04:00 -0000 1.98.2.4 +++ query.php 3 May 2004 13:00:36 -0000 1.98.2.5 @@ -155,11 +155,11 @@ // Project/Version/Component if (!empty($projects)) { - $proj[] = "b.project_id = $projects"; - if (!empty($versions) and $versions != 'All') $proj[] = "b.version_id = $versions"; - if (!empty($closedinversion) and $closedinversion != 'All') $proj[] = "b.closed_in_version_id = $closedinversion"; - if (!empty($tobeclosedinversion) and $tobeclosedinversion != 'All') $proj[] = "b.to_be_closed_in_version_id = $tobeclosedinversion"; - if (!empty($components) and $components != 'All') $proj[] = "b.component_id = $components"; + $proj[] = "b.project_id = '$projects'"; + if (!empty($versions) and $versions != 'All') $proj[] = "b.version_id = '$versions'"; + if (!empty($closedinversion) and $closedinversion != 'All') $proj[] = "b.closed_in_version_id = '$closedinversion'"; + if (!empty($tobeclosedinversion) and $tobeclosedinversion != 'All') $proj[] = "b.to_be_closed_in_version_id = '$tobeclosedinversion'"; + if (!empty($components) and $components != 'All') $proj[] = "b.component_id = '$components'"; $query[] = '('.@join(' and ',$proj).')'; } elseif (!$perm->have_perm('Admin')) { // Filter results from hidden projects $query[] = "b.project_id not in ($restricted_projects)"; @@ -192,6 +192,11 @@ return (!empty($colvalue) ? maskemail($colvalue) : ''); case 'priority' : return $select['priority'][$colvalue]; + case 'reporter' : + case 'owner' : + case 'lastmodifier' : + return (!empty($colvalue) ? maskemail($colvalue) : ''); + break; default: return $colvalue; } } @@ -311,6 +316,9 @@ $sort = 'asc'; } } + // Taint checking + if (empty($db_headers[$order])) $order = 'bug_id'; + if (!in_array($sort, array('asc', 'desc'))) $sort = 'asc'; if (empty($_SESSION['queryinfo'])) $_SESSION['queryinfo'] = array(); $_SESSION['queryinfo']['order'] = $order; @@ -393,11 +401,15 @@ $assignedto = !empty($_GET['assignedto']) ? $_GET['assignedto'] : 0; $open = !empty($_GET['open']) ? $_GET['open'] : 0; +// Make sure the page variable is numeric, if it's populated +if (!empty($_gv['page'])) $_gv['page'] = preg_replace('/[^0-9]/', '', $_gv['page']); + + if (isset($_GET['op'])) switch($_GET['op']) { case 'query' : show_query(); break; case 'doquery' : $_SESSION['queryinfo'] = array(); list_items(); break; case 'delquery' : - if ($auth->is_authenticated()) delete_saved_query($_GET['queryid']); + if ($auth->is_authenticated()) delete_saved_query(check_id($_GET['queryid'])); else show_query(); break; case 'mybugs' : |
|
From: Benjamin C. <bc...@us...> - 2004-05-03 13:00:13
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16697 Modified Files: Tag: htmltemplates bug.php Log Message: Added taint checking Index: bug.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/bug.php,v retrieving revision 1.134.2.2 retrieving revision 1.134.2.3 diff -u -r1.134.2.2 -r1.134.2.3 --- bug.php 1 Sep 2003 13:40:09 -0000 1.134.2.2 +++ bug.php 3 May 2004 12:59:59 -0000 1.134.2.3 @@ -89,8 +89,7 @@ '<a href="'.CVS_WEB.'\\1#rev\\4" target="_new">\\1</a>\\5' // external link to cvs web interface ); - return preg_replace($patterns, $replacements, - stripslashes($comments)); + return preg_replace($patterns, $replacements, stripslashes($comments)); } /// @@ -522,7 +521,7 @@ function show_form($bugid = 0, $error = '') { global $db, $t; - $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = {$_GET['project']}"); + $projectname = $db->getOne("select project_name from ".TBL_PROJECT." where project_id = '{$_GET['project']}'"); if ($bugid && !$error) { $t->assign($db->getRow("select * from ".TBL_BUG." where bug_id = '$bugid'")); } else { @@ -679,7 +678,7 @@ if (!empty($_REQUEST['op'])) { switch($_REQUEST['op']) { case 'history': - show_history($_GET['bugid']); + show_history(check_id($_GET['bugid'])); break; case 'add': $perm->check('Editbug'); @@ -690,22 +689,22 @@ } break; case 'show': - show_bug($_GET['bugid']); + show_bug(check_id($_GET['bugid'])); break; case 'update': - update_bug($_POST['bugid']); + update_bug(check_id($_POST['bugid'])); break; case 'do': - do_form($_POST['bugid']); + do_form(check_id($_POST['bugid'])); break; case 'print': - show_bug_printable($_GET['bugid']); + show_bug_printable(check_id($_GET['bugid'])); break; case 'vote': - vote_bug($_GET['bugid']); + vote_bug(check_id($_GET['bugid'])); break; case 'viewvotes': - vote_view($_GET['bugid']); + vote_view(check_id($_GET['bugid'])); break; } } else { |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:08:24
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20447/templates/default Modified Files: Tag: htmltemplates buglist.html Log Message: Added spreadsheet download Index: buglist.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/buglist.html,v retrieving revision 1.8.6.1 retrieving revision 1.8.6.2 diff -u -r1.8.6.1 -r1.8.6.2 --- buglist.html 30 Aug 2003 22:00:32 -0000 1.8.6.1 +++ buglist.html 2 May 2004 17:08:16 -0000 1.8.6.2 @@ -23,3 +23,6 @@ <?php } ?> </table> <?php include('admin/pagination.html'); ?> +<div align="center"> + <a href="<?php echo $_SERVER['REQUEST_URI']; ?>&xl=1"><?php echo translate("Download to spreadsheet"); ?></a> +</div> |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:07:16
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20289/templates/default Modified Files: Tag: htmltemplates install.html Log Message: Cleaning up Index: install.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/install.html,v retrieving revision 1.9.6.1 retrieving revision 1.9.6.2 diff -u -r1.9.6.1 -r1.9.6.2 --- install.html 30 Aug 2003 22:00:34 -0000 1.9.6.1 +++ install.html 2 May 2004 17:07:08 -0000 1.9.6.2 @@ -1,21 +1,25 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trasitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>phpBugTracker Installation</title> - <link rel="StyleSheet" href="styles/default.css" type="text/css"> - <script language="JavaScript"> + <link rel="StyleSheet" href="styles/default.css" type="text/css" /> + <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> + <script language="JavaScript" type="text/javascript"> + <!-- function testDB(frm) { window.open('install.php?op=dbtest&db_type=' + frm.db_type.options[frm.db_type.selectedIndex].value + '&db_host=' + frm.db_host.value + '&db_database=' + frm.db_database.value + '&db_user=' + frm.db_user.value + '&db_pass=' + frm.db_pass.value, 'iwin', 'dependent=yes,width=450,height=300,scrollbars=1'); } + // --> </script> </head> <body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> - <td width="200" valign="top"><br><img src="logo.jpg"></td> + <td width="200" valign="top"><br /><img src="logo.jpg" alt="phpBugTracker Logo" /></td> <td valign="top" align="center"> <div class="banner"><?php echo translate("phpBugTracker Installation"); ?></div> <?php if (!empty($error)) echo "<div class=\"error\">$error</div>"; ?> @@ -25,36 +29,36 @@ </tr> <tr> <td width="150">Type:</td> - <td><select name="db_type"><?php build_select($db_type) ?></select></td> + <td><select name="db_type"><?php db_type_options($db_type) ?></select></td> </tr> <tr> <td width="150">Host:</td> - <td><input type="text" name="db_host" value="<?php echo !empty($db_host) ? $db_host : 'localhost'; ?>"></td> + <td><input type="text" name="db_host" value="<?php echo !empty($db_host) ? $db_host : 'localhost'; ?>" /></td> </tr> <tr> <td width="150"> <?php echo translate("Database Name"); ?>: </td> - <td valign="top"><input type="text" name="db_database" value="<?php echo !empty($db_database) ? $db_database : 'bug_tracker'; ?>"></td> + <td valign="top"><input type="text" name="db_database" value="<?php echo !empty($db_database) ? $db_database : 'bug_tracker'; ?>" /></td> </tr> <tr> <td colspan="2" align="center"><b>(<?php echo translate("This database must already exist"); ?>)</b></td> </tr> <tr> <td width="150"><?php echo translate("User"); ?>:</td> - <td><input type="text" name="db_user" value="<?php echo !empty($db_user) ? $db_user : 'root'; ?>"></td> + <td><input type="text" name="db_user" value="<?php echo !empty($db_user) ? $db_user : 'root'; ?>" /></td> </tr> <tr> <td width="150"><?php echo translate("Password"); ?>:</td> - <td><input type="password" name="db_pass" value="<?php echo $db_pass; ?>"></td> + <td><input type="password" name="db_pass" value="<?php echo $db_pass; ?>" /></td> </tr> <tr> <td width="150"><?php echo translate("Table Prefix"); ?>:</td> - <td><input type="text" name="tbl_prefix" value="<?php echo !empty($tbl_prefix) ? $tbl_prefix : 'phpbt_'; ?>"></td> + <td><input type="text" name="tbl_prefix" value="<?php echo !empty($tbl_prefix) ? $tbl_prefix : 'phpbt_'; ?>" /></td> </tr> <tr> <td colspan="2" align="center"> - <input type="button" value="<?php echo translate("Test Database Connection"); ?>" onClick="testDB(this.form)"> + <input type="button" value="<?php echo translate("Test Database Connection"); ?>" onclick="testDB(this.form)" /> </td> </tr> <tr> @@ -63,47 +67,47 @@ <tr> <td width="150"> <?php echo translate("phpBT Email"); ?>: - <br> + <br /> (<?php echo translate("The email address used for sending bug updates, etc."); ?>) </td> - <td valign="top"><input type="text" name="phpbt_email" value="<?php echo !empty($phpbt_email) ? $phpbt_email : $default_email; ?>"></td> + <td valign="top"><input type="text" name="phpbt_email" value="<?php echo !empty($phpbt_email) ? $phpbt_email : $default_email; ?>" /></td> </tr> <tr> <td width="150"> <?php echo translate("Admin Login"); ?>: - <br> + <br /> (<?php echo translate("Must be a valid email address"); ?>) </td> - <td valign="top"><input type="text" name="admin_login" value="<?php echo $admin_login; ?>"></td> + <td valign="top"><input type="text" name="admin_login" value="<?php echo $admin_login; ?>" /></td> </tr> <tr> <td width="150"><?php echo translate("Admin Password"); ?>:</td> - <td><input type="password" name="admin_pass" value=""></td> + <td><input type="password" name="admin_pass" value="" /></td> </tr> <tr> <td width="150"><?php echo translate("Confirm Password"); ?>:</td> - <td><input type="password" name="admin_pass2" value=""></td> + <td><input type="password" name="admin_pass2" value="" /></td> </tr> <tr> <td width="150"><?php echo translate("Encrypt Passwords in DB"); ?>:</td> <td> - <input type="radio" name="encrypt_pass" value="1"> Yes - <input type="radio" name="encrypt_pass" value="0" checked> No + <input type="radio" name="encrypt_pass" value="1" /> Yes + <input type="radio" name="encrypt_pass" value="0" checked="checked" /> No </td> </tr> <tr> <td colspan="2" align="center"> - <hr size="1" width="220"> + <hr size="1" width="220" /> <?php if (@is_writeable('config.php')) { ?> <?php echo translate('When you submit the form, the database tables will be created and config.php will be saved to disk. You will then be able to login and use the bug tracker.'); ?> - <input type="hidden" name="op" value="save_config_file"> + <input type="hidden" name="op" value="save_config_file" /> <?php } else { ?> <?php echo translate('Since config.php is not writeable by this script, when you submit this form you will be prompted to save config.php. Copy this file to the location of the bug tracker, and then you will be able to <a href="index.php">login to the bug tracker</a>. From the home page you can go to the Admin Tools and customize your installation via the Configuration link. Once you have completed the configuration, you will be ready to add a project and start reporting bugs!'); ?> - <input type="hidden" name="op" value="dump_config_file"> + <input type="hidden" name="op" value="dump_config_file" /> <?php } ?> - <br> - <br> - <input type="submit" value="<?php echo translate("Save Options"); ?>"> + <br /> + <br /> + <input type="submit" value="<?php echo translate("Save Options"); ?>" /> </td> </tr> </table> |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:06:43
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20180/templates/default Modified Files: Tag: htmltemplates wrap.html Log Message: Cleaning up Index: wrap.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/wrap.html,v retrieving revision 1.28.4.2 retrieving revision 1.28.4.3 diff -u -r1.28.4.2 -r1.28.4.3 --- wrap.html 17 Nov 2003 12:42:03 -0000 1.28.4.2 +++ wrap.html 2 May 2004 17:06:35 -0000 1.28.4.3 @@ -2,11 +2,11 @@ <head> <META HTTP-EQUIV="Expires" CONTENT="-1"> <title>phpBugTracker - <?php echo $page_title ?></title> - <link rel="StyleSheet" href="styles/<?php echo STYLE ?>.css" type="text/css"> - <link rel="stylesheet" type"text/css" href="styles/print.css" media="print"> - <META http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET ?>"> + <link rel="StyleSheet" href="styles/<?php echo STYLE ?>.css" type="text/css" /> + <link rel="stylesheet" type="text/css" href="styles/print.css" media="print" /> + <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> -<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> +<body> <div class="nav"> <div class="header_image"> <img name="title" src="<?php echo $template_path ?>/images/title.gif" width="500" height="50" border="0" alt="" hspace="0" vspace="0"> @@ -58,7 +58,7 @@ </div> <?php } ?> -<div style="padding: 0px 5px;"> +<div style="padding: 5px;"> <?php include($content_template) ?> </div> |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:06:07
|
Update of /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel/Writer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20031/Excel/Writer Added Files: Tag: htmltemplates BIFFwriter.php Format.php Parser.php Validator.php Workbook.php Worksheet.php Log Message: Spreadsheet generator class from PEAR --- NEW FILE: BIFFwriter.php --- <?php /* * Module written/ported by Xavier Noguer <xn...@ph...> * * The majority of this is _NOT_ my code. I simply ported it from the * PERL Spreadsheet::WriteExcel module. * * The author of the Spreadsheet::WriteExcel module is John McNamara * <jmc...@cp...> * * I _DO_ maintain this code, and John McNamara has nothing to do with the * porting of this code to PHP. Any questions directly related to this * class library should be directed to me. * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@ph... * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once('PEAR.php'); /** * Class for writing Excel BIFF records. * * From "MICROSOFT EXCEL BINARY FILE FORMAT" by Mark O'Brien (Microsoft Corporation): * * BIFF (BInary File Format) is the file format in which Excel documents are * saved on disk. A BIFF file is a complete description of an Excel document. * BIFF files consist of sequences of variable-length records. There are many * different types of BIFF records. For example, one record type describes a * formula entered into a cell; one describes the size and location of a * window into a document; another describes a picture format. * * @author Xavier Noguer <xn...@ph...> * @category FileFormats * @package Spreadsheet_Excel_Writer */ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR { /** * The BIFF/Excel version (5). * @var integer */ var $_BIFF_version = 0x0500; /** * The byte order of this architecture. 0 => little endian, 1 => big endian * @var integer */ var $_byte_order; /** * The string containing the data of the BIFF stream * @var string */ var $_data; /** * The size of the data in bytes. Should be the same as strlen($this->_data) * @var integer */ var $_datasize; /** * The maximun length for a BIFF record. See _addContinue() * @var integer * @see _addContinue() */ var $_limit; /** * Constructor * * @access public */ function Spreadsheet_Excel_Writer_BIFFwriter() { $this->_byte_order = ''; $this->_data = ''; $this->_datasize = 0; $this->_limit = 2080; // Set the byte order $this->_setByteOrder(); } /** * Determine the byte order and store it as class data to avoid * recalculating it for each call to new(). * * @access private */ function _setByteOrder() { // Check if "pack" gives the required IEEE 64bit float $teststr = pack("d", 1.2345); $number = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); if ($number == $teststr) { $byte_order = 0; // Little Endian } elseif ($number == strrev($teststr)){ $byte_order = 1; // Big Endian } else { // Give up. I'll fix this in a later version. return $this->raiseError("Required floating point format ". "not supported on this platform."); } $this->_byte_order = $byte_order; } /** * General storage function * * @param string $data binary data to prepend * @access private */ function _prepend($data) { if (strlen($data) > $this->_limit) { $data = $this->_addContinue($data); } $this->_data = $data.$this->_data; $this->_datasize += strlen($data); } /** * General storage function * * @param string $data binary data to append * @access private */ function _append($data) { if (strlen($data) > $this->_limit) { $data = $this->_addContinue($data); } $this->_data = $this->_data.$data; $this->_datasize += strlen($data); } /** * Writes Excel BOF record to indicate the beginning of a stream or * sub-stream in the BIFF file. * * @param integer $type Type of BIFF file to write: 0x0005 Workbook, * 0x0010 Worksheet. * @access private */ function _storeBof($type) { $record = 0x0809; // Record identifier // According to the SDK $build and $year should be set to zero. // However, this throws a warning in Excel 5. So, use magic numbers. if ($this->_BIFF_version == 0x0500) { $length = 0x0008; $unknown = ''; $build = 0x096C; $year = 0x07C9; } elseif ($this->_BIFF_version == 0x0600) { $length = 0x0010; $unknown = pack("VV", 0x00000041, 0x00000006); //unknown last 8 bytes for BIFF8 $build = 0x0DBB; $year = 0x07CC; } $version = $this->_BIFF_version; $header = pack("vv", $record, $length); $data = pack("vvvv", $version, $type, $build, $year); $this->_prepend($header.$data.$unknown); } /** * Writes Excel EOF record to indicate the end of a BIFF stream. * * @access private */ function _storeEof() { $record = 0x000A; // Record identifier $length = 0x0000; // Number of bytes to follow $header = pack("vv", $record, $length); $this->_append($header); } /** * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In * Excel 97 the limit is 8228 bytes. Records that are longer than these limits * must be split up into CONTINUE blocks. * * This function takes a long BIFF record and inserts CONTINUE records as * necessary. * * @param string $data The original binary data to be written * @return string A very convenient string of continue blocks * @access private */ function _addContinue($data) { $limit = $this->_limit; $record = 0x003C; // Record identifier // The first 2080/8224 bytes remain intact. However, we have to change // the length field of the record. $tmp = substr($data, 0, 2).pack("v", $limit-4).substr($data, 4, $limit - 4); $header = pack("vv", $record, $limit); // Headers for continue records // Retrieve chunks of 2080/8224 bytes +4 for the header. for($i = $limit; $i < strlen($data) - $limit; $i += $limit) { $tmp .= $header; $tmp .= substr($data, $i, $limit); } // Retrieve the last chunk of data $header = pack("vv", $record, strlen($data) - $i); $tmp .= $header; $tmp .= substr($data,$i,strlen($data) - $i); return $tmp; } } ?> --- NEW FILE: Format.php --- <?php /* * Module written/ported by Xavier Noguer <xn...@re...> * * The majority of this is _NOT_ my code. I simply ported it from the * PERL Spreadsheet::WriteExcel module. * * The author of the Spreadsheet::WriteExcel module is John McNamara * <jmc...@cp...> * * I _DO_ maintain this code, and John McNamara has nothing to do with the * porting of this code to PHP. Any questions directly related to this * class library should be directed to me. * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * [...996 lines suppressed...] * @access public */ function setUnLocked() { $this->_locked = 0; } /** * Sets the font family name. * * @access public * @param string $fontfamily The font family name. Possible values are: * 'Times New Roman', 'Arial', 'Courier'. */ function setFontFamily($font_family) { $this->_font_name = $font_family; } } ?> --- NEW FILE: Parser.php --- <?php /** * Class for parsing Excel formulas * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * [...1721 lines suppressed...] $left_tree = ''; } if (PEAR::isError($left_tree)) { return $left_tree; } // add it's left subtree and return. return $left_tree.$this->_convertFunction($tree['value'], $tree['right']); } else { $converted_tree = $this->_convert($tree['value']); if (PEAR::isError($converted_tree)) { return $converted_tree; } } $polish .= $converted_tree; return $polish; } } ?> --- NEW FILE: Validator.php --- <?php /* * Module written by Herman Kuiper <he...@oz...> * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ //require_once('PEAR.php'); // Possible operator types /* FIXME: change prefixes */ define("OP_BETWEEN", 0x00); define("OP_NOTBETWEEN", 0x01); define("OP_EQUAL", 0x02); define("OP_NOTEQUAL", 0x03); define("OP_GT", 0x04); define("OP_LT", 0x05); define("OP_GTE", 0x06); define("OP_LTE", 0x07); /** * Baseclass for generating Excel DV records (validations) * * @author Herman Kuiper * @category FileFormats * @package Spreadsheet_Excel_Writer */ class Spreadsheet_Excel_Writer_Validator { var $_type; var $_style; var $_fixedList; var $_blank; var $_incell; var $_showprompt; var $_showerror; var $_title_prompt; var $_descr_prompt; var $_title_error; var $_descr_error; var $_operator; var $_formula1; var $_formula2; /** * The parser from the workbook. Used to parse validation formulas also * @var Spreadsheet_Excel_Writer_Parser */ var $_parser; function Spreadsheet_Excel_Writer_Validator(&$parser) { $this->_parser = $parser; $this->_type = 0x01; // FIXME: add method for setting datatype $this->_style = 0x00; $this->_fixedList = false; $this->_blank = false; $this->_incell = false; $this->_showprompt = false; $this->_showerror = true; $this->_title_prompt = "\x00"; $this->_descr_prompt = "\x00"; $this->_title_error = "\x00"; $this->_descr_error = "\x00"; $this->_operator = 0x00; // default is equal $this->_formula1 = ""; $this->_formula2 = ""; } function setPrompt($promptTitle = "\x00", $promptDescription = "\x00", $showPrompt = true) { $this->_showprompt = $showPrompt; $this->_title_prompt = $promptTitle; $this->_descr_prompt = $promptDescription; } function setError($errorTitle = "\x00", $errorDescription = "\x00", $showError = true) { $this->_showerror = $showError; $this->_title_error = $errorTitle; $this->_descr_error = $errorDescription; } function allowBlank() { $this->_blank = true; } function onInvalidStop() { $this->_style = 0x00; } function onInvalidWarn() { $this->_style = 0x01; } function onInvalidInfo() { $this->_style = 0x02; } function setFormula1($formula) { // Parse the formula using the parser in Parser.php $error = $this->_parser->parse($formula); if (PEAR::isError($error)) { return $this->_formula1; } $this->_formula1 = $this->_parser->toReversePolish(); if (PEAR::isError($this->_formula1)) { return $this->_formula1; } return true; } function setFormula2($formula) { // Parse the formula using the parser in Parser.php $error = $this->_parser->parse($formula); if (PEAR::isError($error)) { return $this->_formula2; } $this->_formula2 = $this->_parser->toReversePolish(); if (PEAR::isError($this->_formula2)) { return $this->_formula2; } return true; } function _getOptions() { $options = $this->_type; $options |= $this->_style << 3; if($this->_fixedList) $options |= 0x80; if($this->_blank) $options |= 0x100; if(!$this->_incell) $options |= 0x200; if($this->_showprompt) $options |= 0x40000; if($this->_showerror) $options |= 0x80000; $options |= $this->_operator << 20; return $options; } function _getData() { $title_prompt_len = strlen($this->_title_prompt); $descr_prompt_len = strlen($this->_descr_prompt); $title_error_len = strlen($this->_title_error); $descr_error_len = strlen($this->_descr_error); $formula1_size = strlen($this->_formula1); $formula2_size = strlen($this->_formula2); $data = pack("V", $this->_getOptions()); $data .= pack("vC", $title_prompt_len, 0x00) . $this->_title_prompt; $data .= pack("vC", $title_error_len, 0x00) . $this->_title_error; $data .= pack("vC", $descr_prompt_len, 0x00) . $this->_descr_prompt; $data .= pack("vC", $descr_error_len, 0x00) . $this->_descr_error; $data .= pack("vv", $formula1_size, 0x0000) . $this->_formula1; $data .= pack("vv", $formula2_size, 0x0000) . $this->_formula2; return $data; } } /*class Spreadsheet_Excel_Writer_Validation_List extends Spreadsheet_Excel_Writer_Validation { function Spreadsheet_Excel_Writer_Validation_list() { parent::Spreadsheet_Excel_Writer_Validation(); $this->_type = 0x03; } function setList($source, $incell = true) { $this->_incell = $incell; $this->_fixedList = true; $source = implode("\x00", $source); $this->_formula1 = pack("CCC", 0x17, strlen($source), 0x0c) . $source; } function setRow($row, $col1, $col2, $incell = true) { $this->_incell = $incell; //$this->_formula1 = ...; } function setCol($col, $row1, $row2, $incell = true) { $this->_incell = $incell; //$this->_formula1 = ...; } }*/ ?> --- NEW FILE: Workbook.php --- <?php /* * Module written/ported by Xavier Noguer <xn...@re...> * * The majority of this is _NOT_ my code. I simply ported it from the * PERL Spreadsheet::WriteExcel module. * * The author of the Spreadsheet::WriteExcel module is John McNamara * <jmc...@cp...> * * I _DO_ maintain this code, and John McNamara has nothing to do with the * porting of this code to PHP. Any questions directly related to this * class library should be directed to me. * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * [...1502 lines suppressed...] $this->_append($header); } // If the string (or substr) is small enough we can write it in the // new CONTINUE block. Else, go through the loop again to write it in // one or more CONTINUE blocks // if ($block_length < $continue_limit) { $this->_append($string); $written = $block_length; } else { $written = 0; } } } } } ?> --- NEW FILE: Worksheet.php --- <?php /* * Module written/ported by Xavier Noguer <xn...@re...> * * The majority of this is _NOT_ my code. I simply ported it from the * PERL Spreadsheet::WriteExcel module. * * The author of the Spreadsheet::WriteExcel module is John McNamara * <jmc...@cp...> * * I _DO_ maintain this code, and John McNamara has nothing to do with the * porting of this code to PHP. Any questions directly related to this * class library should be directed to me. * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * [...3450 lines suppressed...] $grbit = 0x0002; // Prompt box at cell, no cached validity data at DV records $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position $verPos = 0x00000000; // Vertical position of prompt box, if fixed position $objId = 0xffffffff; // Object identifier of drop down arrow object, or -1 if not visible $header = pack('vv', $record, $length); $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($this->_dv)); $this->_append($header.$data); $record = 0x01be; // Record identifier foreach($this->_dv as $dv) { $length = strlen($dv); // Bytes to follow $header = pack("vv", $record, $length); $this->_append($header.$dv); } } } ?> |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:06:07
|
Update of /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20031/Excel Added Files: Tag: htmltemplates Writer.php Log Message: Spreadsheet generator class from PEAR --- NEW FILE: Writer.php --- <?php /* * Module written/ported by Xavier Noguer <xn...@re...> * * PERL Spreadsheet::WriteExcel module. * * The author of the Spreadsheet::WriteExcel module is John McNamara * <jmc...@cp...> * * I _DO_ maintain this code, and John McNamara has nothing to do with the * porting of this code to PHP. Any questions directly related to this * class library should be directed to me. * * License Information: * * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets * Copyright (c) 2002-2003 Xavier Noguer xn...@re... * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require_once('PEAR.php'); require_once('Spreadsheet/Excel/Writer/Workbook.php'); /** * Class for writing Excel Spreadsheets. This class should change COMPLETELY. * * @author Xavier Noguer <xn...@re...> * @category FileFormats * @package Spreadsheet_Excel_Writer */ class Spreadsheet_Excel_Writer extends Spreadsheet_Excel_Writer_Workbook { /** * The constructor. It just creates a Workbook * * @param string $filename The optional filename for the Workbook. * @return Spreadsheet_Excel_Writer_Workbook The Workbook created */ function Spreadsheet_Excel_Writer($filename = '') { $this->_filename = $filename; $this->Spreadsheet_Excel_Writer_Workbook($filename); } /** * Send HTTP headers for the Excel file. * * @param string $filename The filename to use for HTTP headers * @access public */ function send($filename) { header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$filename"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); } /** * Utility function for writing formulas * Converts a cell's coordinates to the A1 format. * * @access public * @static * @param integer $row Row for the cell to convert (0-indexed). * @param integer $col Column for the cell to convert (0-indexed). * @return string The cell identifier in A1 format */ function rowcolToCell($row, $col) { if ($col > 255) { //maximum column value exceeded return new PEAR_Error("Maximum column value exceeded: $col"); } $int = (int)($col / 26); $frac = $col % 26; $chr1 = ''; if ($int > 0) { $chr1 = chr(ord('A') + $int - 1); } $chr2 = chr(ord('A') + $frac); $row++; return $chr1.$chr2.$row; } } ?> |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:04:36
|
Update of /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19771/inc/pear/Spreadsheet/Excel Log Message: Directory /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel added to the repository --> Using per-directory sticky tag `htmltemplates' |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:04:36
|
Update of /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel/Writer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19771/inc/pear/Spreadsheet/Excel/Writer Log Message: Directory /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet/Excel/Writer added to the repository --> Using per-directory sticky tag `htmltemplates' |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:04:18
|
Update of /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19723/inc/pear/Spreadsheet Log Message: Directory /cvsroot/phpbt/phpbt/inc/pear/Spreadsheet added to the repository --> Using per-directory sticky tag `htmltemplates' |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 17:04:08
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19653 Modified Files: Tag: htmltemplates query.php Log Message: Added excel download Index: query.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/query.php,v retrieving revision 1.98.2.3 retrieving revision 1.98.2.4 diff -u -r1.98.2.3 -r1.98.2.4 --- query.php 29 Feb 2004 02:17:26 -0000 1.98.2.3 +++ query.php 2 May 2004 17:04:00 -0000 1.98.2.4 @@ -179,6 +179,23 @@ } } +// Formatting for spreadsheet +function format_spreadsheet_col($colvalue, $coltype) { + global $select; + + switch($coltype) { + case 'created_date' : + case 'last_modified_date' : + case 'close_date' : + return ($colvalue ? date(DATE_FORMAT, $colvalue) : ''); + case 'lastmodifier' : + return (!empty($colvalue) ? maskemail($colvalue) : ''); + case 'priority' : + return $select['priority'][$colvalue]; + default: return $colvalue; + } +} + // Handle the formatting for various types of bug info in the bug list function format_bug_col($colvalue, $coltype, $bugid, $pos) { global $select; @@ -303,15 +320,7 @@ list($_SESSION['queryinfo']['query'], $paramstr) = build_query($assignedto, $reportedby, $open); } - $nr = $db->getOne($QUERY['query-list-bugs-count']. - (!empty($_SESSION['queryinfo']['query']) - ? $QUERY['query-list-bugs-count-join']. - $_SESSION['queryinfo']['query'] - : '')); - - $_SESSION['queryinfo']['numrows'] = $nr; - list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort"); - + $desired_fields = !empty($_SESSION['db_fields']) ? $_SESSION['db_fields'] : $default_db_fields; @@ -322,20 +331,62 @@ $headers[] = $db_headers[$field]; } - $t->assign(array( - 'db_fields' => $desired_fields, - 'field_titles' => $field_titles - )); - - $t->assign('bugs', $db->getAll($db->modifyLimitQuery( - sprintf($QUERY['query-list-bugs'], join(', ', $query_fields), + if (empty($_GET['xl'])) { // HTML view + $nr = $db->getOne($QUERY['query-list-bugs-count']. (!empty($_SESSION['queryinfo']['query']) - ? "and {$_SESSION['queryinfo']['query']} " : ''), - $order, $sort), $llimit, $selrange))); + ? $QUERY['query-list-bugs-count-join']. + $_SESSION['queryinfo']['query'] + : '')); + + $_SESSION['queryinfo']['numrows'] = $nr; + list($selrange, $llimit) = multipages($nr, $page, "order=$order&sort=$sort"); + + $t->assign(array( + 'db_fields' => $desired_fields, + 'field_titles' => $field_titles + )); + + $t->assign('bugs', $db->getAll($db->modifyLimitQuery( + sprintf($QUERY['query-list-bugs'], join(', ', $query_fields), + (!empty($_SESSION['queryinfo']['query']) + ? "and {$_SESSION['queryinfo']['query']} " : ''), + $order, $sort), $llimit, $selrange))); + + sorting_headers($me, $headers, $order, $sort, "page=$page". + (!empty($paramstr) ? $paramstr : '')); + $t->render('buglist.html', translate("Bug List")); + } else { // Spreasheet download + dump_spreadsheet($desired_fields, $field_titles, $db->getAll( + sprintf($QUERY['query-list-bugs'], join(', ', $query_fields), + (!empty($_SESSION['queryinfo']['query']) + ? "and {$_SESSION['queryinfo']['query']} " : ''), + $order, $sort))); + } +} - sorting_headers($me, $headers, $order, $sort, "page=$page". - (!empty($paramstr) ? $paramstr : '')); - $t->render('buglist.html', translate("Bug List")); +function dump_spreadsheet($fields, $titles, &$data) { + #echo '<pre>'; + #print_r($fields); print_r($data); exit; + chdir('./inc/pear/'); + include_once('./Spreadsheet/Excel/Writer.php'); + $workbook = new Spreadsheet_Excel_Writer(); + $workbook->send('buglist.xls'); + error_reporting(0); + $boldformat =& $workbook->addformat(array('bold' => 1)); + $worksheet =& $workbook->addworksheet('buglist'); + $row = 0; + for ($i = 0, $colcount = count($fields); $i < $colcount; $i++) { + $worksheet->write($row, $i, $titles[$i], $boldformat); + } + $row++; + for ($i = 0, $bugcount = count($data); $i < $bugcount; $i++) { + for ($j = 0; $j < $colcount; $j++) { + $worksheet->write($row, $j, format_spreadsheet_col($data[$i][$fields[$j]], $fields[$j])); + } + $row++; + } + $worksheet->freezepanes(array(1, 0)); + $workbook->close(); } $reportedby = !empty($_GET['reportedby']) ? $_GET['reportedby'] : 0; |
|
From: Benjamin C. <bc...@us...> - 2004-05-02 16:50:48
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17195 Modified Files: Tag: htmltemplates install.php Log Message: Various fixes Index: install.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/install.php,v retrieving revision 1.39.2.3 retrieving revision 1.39.2.4 diff -u -r1.39.2.3 -r1.39.2.4 --- install.php 5 Sep 2003 12:14:04 -0000 1.39.2.3 +++ install.php 2 May 2004 16:50:38 -0000 1.39.2.4 @@ -23,12 +23,15 @@ // ------------------------------------------------------------------------ // $Id$ +include_once('inc/functions.php'); +define('THEME', 'default'); + // Template class class template { var $vars; - function template() { - $this->vars = array(); + function template($vars = array()) { + $this->vars = $vars; } function render($content_template, $page_title, $wrap_file = '') { @@ -50,7 +53,8 @@ } } -$t = new template(); +$t = new template(array( + 'template_path' => 'templates/default')); $db_types = array( 'mysql' => 'MySQL', @@ -108,7 +112,7 @@ header("Location: index.php"); } -function build_select($selected = 0) { +function db_type_options($selected = 0) { global $db_types; foreach ($db_types as $val => $item) { @@ -118,13 +122,6 @@ } } -/// -/// Check the validity of an email address -/// (From zend.com user russIndr) -function bt_valid_email($email) { - return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,6})$', $email); -} - function grab_config_file() { global $t, $_POST; @@ -249,17 +246,17 @@ function show_finished() { global $t, $_POST; - $t->assign('login', $_POST['admin_login']); - $t->render('install-complete.html'); + $login = $_POST['admin_login']; + include('templates/default/install-complete.html'); } function show_front($error = '') { global $t, $_POST, $select, $HTTP_SERVER_VARS; - $t->assign($_POST); - $t->assign('error', $error); - $t->assign('default_email', 'phpbt@'.$HTTP_SERVER_VARS['SERVER_NAME']); - $t->render('install.html'); + extract($_POST); + $error = $error; + $default_email = 'phpbt@'.$HTTP_SERVER_VARS['SERVER_NAME']; + include('templates/default/install.html'); } if (isset($_POST['op'])) { |