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: Ben C. <php...@be...> - 2002-01-21 04:02:08
|
You need to make sure DB_HOST isn't being defined in config.php if you want to do the install. On Sun, Jan 20, 2002 at 06:31:47PM +0100, Patrick Mairif wrote: > On Sun, Jan 20, 2002 at 08:17:53AM -0800, Ben Curtis wrote: > > Ok, I just committed the changes to config.php and config-dist.php that > > will fix the problem. :) > > now it wants to connect to the database instead of loading > install.php: > > Warning: Access denied for user: 'root@localhost' (Using password: NO) > in /home/patrick/public_html/phpbt/inc/db/mysql.php on line 73 > Database error: pconnect(localhost, root, $Password) failed. > MySQL Error: () > Session halted. |
|
From: Patrick M. <mai...@st...> - 2002-01-20 17:31:09
|
On Sun, Jan 20, 2002 at 08:17:53AM -0800, Ben Curtis wrote: > Ok, I just committed the changes to config.php and config-dist.php that > will fix the problem. :) now it wants to connect to the database instead of loading install.php: Warning: Access denied for user: 'root@localhost' (Using password: NO) in /home/patrick/public_html/phpbt/inc/db/mysql.php on line 73 Database error: pconnect(localhost, root, $Password) failed. MySQL Error: () Session halted. |
|
From: Ben C. <php...@be...> - 2002-01-20 16:20:49
|
Ok, I just committed the changes to config.php and config-dist.php that will fix the problem. :) On Sun, Jan 20, 2002 at 04:19:20PM +0100, Patrick Mairif wrote: > ok, I found the bug! > > removing the @ in line 38 in include.php before the include tells me > the error message: > > Fatal error: Failed opening required > '/home/patrick/public_html/phpbt/inc/session.php' > (include_path='.:/php/includes:/usr/share/php') in > /home/patrick/public_html/phpbt/config.php on line 65 > > et voila, there is no session.php in inc! > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Benjamin C. <bc...@us...> - 2002-01-20 16:19:51
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv29370
Modified Files:
config.php config-dist.php
Log Message:
Don't need session.inc anymore
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- config.php 2001/11/30 06:23:24 1.20
+++ config.php 2002/01/20 16:19:48 1.21
@@ -62,7 +62,6 @@
define ('ONEDAY', 86400);
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/session.php');
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/auth.php');
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/template.php');
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config-dist.php 2001/12/15 18:45:48 1.4
+++ config-dist.php 2002/01/20 16:19:48 1.5
@@ -60,7 +60,6 @@
define ('ONEDAY', 86400);
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/session.php');
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/auth.php');
require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/template.php');
|
|
From: Patrick M. <mai...@st...> - 2002-01-20 15:19:14
|
ok, I found the bug! removing the @ in line 38 in include.php before the include tells me the error message: Fatal error: Failed opening required '/home/patrick/public_html/phpbt/inc/session.php' (include_path='.:/php/includes:/usr/share/php') in /home/patrick/public_html/phpbt/config.php on line 65 et voila, there is no session.php in inc! |
|
From: Patrick M. <mai...@st...> - 2002-01-20 15:08:37
|
On Sat, Jan 19, 2002 at 06:49:07AM -0800, Ben Curtis wrote: > A user had the same problem, and noticed that his register_globals was > off. Turning it on helped. phpinfo() says that it's on. I really get en empty document, no <html>, no <body> and the url does not change! |
|
From: Javier S. <js...@si...> - 2002-01-19 19:29:00
|
YEs oups :-) I used an editor with tab char de-activate ....sorry ... now it is ok have a look at this page http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/include.php.diff?r1=1.89&r2=1.90 I have only chagne a where clause on 'version' select Ben Curtis wrote: >Aside from converting my tabs to spaces :), what was the actual change >in this diff? > > |
|
From: Javier S. <js...@si...> - 2002-01-19 19:27:34
|
YEs oups :-) I used an editor with tab char de-activate ....sorry ... now it is ok have a look at this page http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpbt/phpbt/include.php.diff?r1=1.89&r2=1.90 I have only chagne a where clause on 'version' select Ben Curtis wrote: >Aside from converting my tabs to spaces :), what was the actual change >in this diff? > > |
|
From: Benjamin C. <bc...@us...> - 2002-01-19 17:20:14
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv21314
Modified Files:
query.php
Log Message:
Removing the need for register_globals = on
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- query.php 2002/01/19 15:11:25 1.53
+++ query.php 2002/01/19 17:20:11 1.54
@@ -33,8 +33,7 @@
}
function show_query() {
- global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE, $u,
- $perm, $auth;
+ global $q, $t, $TITLE, $u, $perm, $auth;
$nq = new dbclass;
$js = '';
@@ -101,11 +100,11 @@
$t->set_var(array(
'js' => $js,
- 'status' => build_select('status',$status),
- 'resolution' => build_select('resolution',$resolution),
+ 'status' => build_select('status'),
+ 'resolution' => build_select('resolution'),
'os' => build_select('os',-1), // Prevent the OS regex selection
- 'priority' => build_select('priority',$priority),
- 'severity' => build_select('severity',$severity),
+ 'priority' => build_select('priority'),
+ 'severity' => build_select('severity'),
'projects' => build_select('project'),
'TITLE' => $TITLE['bugquery']
));
@@ -195,17 +194,20 @@
}
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
- global $me, $q, $t, $selrange, $order, $sort, $query,
- $page, $op, $select, $TITLE, $STRING, $savedqueryname, $u, $auth,
- $default_db_fields, $all_db_fields, $_sv;
+ global $me, $q, $t, $select, $TITLE, $STRING, $_gv, $u, $auth,
+ $default_db_fields, $all_db_fields, $_sv, $HTTP_SERVER_VARS;
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
$t->set_block('row','col','cols');
+ extract($_gv);
+ if (!isset($page)) {
+ $page = 1;
+ }
// Save the query if requested
- if ($savedqueryname) {
- $savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $GLOBALS['QUERY_STRING']);
+ if (!empty($savedqueryname)) {
+ $savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $HTTP_SERVER_VARS['QUERY_STRING']);
$q->query("insert into ".TBL_SAVED_QUERY.
" (saved_query_id, user_id, saved_query_name, saved_query_string)
values (".$q->nextid(TBL_SAVED_QUERY).", $u, '$savedqueryname', '$savedquerystring')");
@@ -368,8 +370,8 @@
if (isset($_gv['op'])) switch($_gv['op']) {
case 'query' : show_query(); break;
case 'doquery' : $_sv['queryinfo'] = array(); list_items(); break;
- case 'delquery' : delete_saved_query($queryid); break;
- case 'mybugs' : list_items($assignedto, $reportedby, $open); break;
+ case 'delquery' : delete_saved_query($_gv['queryid']); break;
+ case 'mybugs' : list_items($_gv['assignedto'], $_gv['reportedby'], $_gv['open']); break;
default : show_query(); break;
}
else list_items($assignedto, $reportedby, $open);
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:42:24
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv9400 Removed Files: upgrade.php Log Message: Not currently needed --- upgrade.php DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:42:24
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv9400/templates/default Removed Files: upgrade.html upgrade-finished.html Log Message: Not currently needed --- upgrade.html DELETED --- --- upgrade-finished.html DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:39:17
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv8430 Removed Files: dbchanges.sql Log Message: Don't need this hanging around anymore --- dbchanges.sql DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:34:59
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv7357
Modified Files:
severity.php
Log Message:
Converting spaces to tabs :)
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- severity.php 2001/12/19 14:05:15 1.15
+++ severity.php 2002/01/19 16:34:56 1.16
@@ -26,64 +26,64 @@
include INCLUDE_PATH.'include.php';
function do_form($severityid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $q, $me, $_pv, $STRING;
extract($_pv);
$error = '';
- // Validation
- if (!$fname = trim($fname))
- $error = $STRING['givename'];
- elseif (!$fdescription = trim($fdescription))
- $error = $STRING['givedesc'];
- if ($error) { list_items($severityid, $error); return; }
+ // Validation
+ if (!$fname = trim($fname))
+ $error = $STRING['givename'];
+ elseif (!$fdescription = trim($fdescription))
+ $error = $STRING['givedesc'];
+ if ($error) { list_items($severityid, $error); return; }
- if (!$severityid) {
- $q->query("insert into ".TBL_SEVERITY.
+ if (!$severityid) {
+ $q->query("insert into ".TBL_SEVERITY.
" (severity_id, severity_name, severity_desc, sort_order, severity_color)
values (".$q->nextid(TBL_SEVERITY).", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
- } else {
- $q->query("update ".TBL_SEVERITY." set severity_name = '$fname',
+ } else {
+ $q->query("update ".TBL_SEVERITY." set severity_name = '$fname',
severity_desc = '$fdescription', sort_order = '$fsortorder',
severity_color = '$fcolor' where severity_id = '$severityid'");
- }
- header("Location: $me?");
+ }
+ header("Location: $me?");
}
function show_form($severityid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
- if ($severityid && !$error) {
- $row = $q->grab("select * from ".TBL_SEVERITY.
+ if ($severityid && !$error) {
+ $row = $q->grab("select * from ".TBL_SEVERITY.
" where severity_id = '$severityid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fseverityid' => $row['severity_id'],
- 'fname' => $row['severity_name'],
- 'fdescription' => $row['severity_desc'],
- 'fsortorder' => $row['sort_order'],
- 'fcolor' => $row['severity_color']));
- } else {
- $t->set_var(array(
- 'action' => $severityid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fseverityid' => $severityid,
- 'fname' => isset($_pv['fname']) ? stripslashes($_pv['fname']) : '',
- 'fdescription' => isset($_pv['fdescription']) ?
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fseverityid' => $row['severity_id'],
+ 'fname' => $row['severity_name'],
+ 'fdescription' => $row['severity_desc'],
+ 'fsortorder' => $row['sort_order'],
+ 'fcolor' => $row['severity_color']));
+ } else {
+ $t->set_var(array(
+ 'action' => $severityid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fseverityid' => $severityid,
+ 'fname' => isset($_pv['fname']) ? stripslashes($_pv['fname']) : '',
+ 'fdescription' => isset($_pv['fdescription']) ?
stripslashes($_pv['fdescription']) : '',
- 'fsortorder' => isset($_pv['fsortorder']) ? $_pv['fsortorder'] : '',
- 'fcolor' => isset($_pv['fcolor']) ? $_pv['fcolor'] : ''
+ 'fsortorder' => isset($_pv['fsortorder']) ? $_pv['fsortorder'] : '',
+ 'fcolor' => isset($_pv['fcolor']) ? $_pv['fcolor'] : ''
));
- }
+ }
}
function list_items($severityid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
- $t->set_file('content','severitylist.html');
- $t->set_block('content','row','rows');
+ $t->set_file('content','severitylist.html');
+ $t->set_block('content','row','rows');
- if (empty($_gv['order'])) {
+ if (empty($_gv['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
@@ -93,50 +93,50 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_SEVERITY);
+ $nr = $q->query("select count(*) from ".TBL_SEVERITY);
- list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
- "order=$order&sort=$sort");
+ list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
+ "order=$order&sort=$sort");
- $t->set_var(array(
- 'pages' => '[ '.$pages.' ]',
- 'first' => $llimit+1,
- 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
- 'records' => $nr));
+ $t->set_var(array(
+ 'pages' => '[ '.$pages.' ]',
+ 'first' => $llimit+1,
+ 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
+ 'records' => $nr));
- $q->limit_query("select * from ".TBL_SEVERITY." order by $order $sort",
+ $q->limit_query("select * from ".TBL_SEVERITY." order by $order $sort",
$selrange, $llimit);
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['noseverities']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'severityid' => 'severity_id',
- 'name' => 'severity_name',
- 'description' => 'severity_desc',
- 'sortorder' => 'sort_order',
- 'color' => 'severity_color');
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['noseverities']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'severityid' => 'severity_id',
+ 'name' => 'severity_name',
+ 'description' => 'severity_desc',
+ 'sortorder' => 'sort_order',
+ 'color' => 'severity_color');
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
((++$i % 2 == 0) ? '#dddddd' : ''),
'trclass' => USE_SEVERITY_COLOR ? '' : ($i % 2 ? '' : 'alt'),
- 'severityid' => $row['severity_id'],
- 'name' => $row['severity_name'],
- 'description' => $row['severity_desc'],
- 'sortorder' => $row['sort_order']));
- $t->parse('rows','row',true);
- }
+ 'severityid' => $row['severity_id'],
+ 'name' => $row['severity_name'],
+ 'description' => $row['severity_desc'],
+ 'sortorder' => $row['sort_order']));
+ $t->parse('rows','row',true);
+ }
- show_form($severityid, $error);
- $t->set_var('TITLE',$TITLE['severity']);
+ show_form($severityid, $error);
+ $t->set_var('TITLE',$TITLE['severity']);
}
$t->set_file('wrap','wrap.html');
@@ -144,10 +144,10 @@
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['id']); break;
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:33:23
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6943
Modified Files:
resolution.php
Log Message:
Converting spaces to tabs :)
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- resolution.php 2001/12/19 14:05:14 1.19
+++ resolution.php 2002/01/19 16:33:20 1.20
@@ -26,61 +26,61 @@
include INCLUDE_PATH.'include.php';
function do_form($resolutionid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $q, $me, $_pv, $STRING;
extract($_pv);
$error = '';
- // Validation
- if (!$fname = trim($fname))
- $error = $STRING['givename'];
- elseif (!$fdescription = trim($fdescription))
- $error = $STRING['givedesc'];
- if ($error) { list_items($resolutionid, $error); return; }
+ // Validation
+ if (!$fname = trim($fname))
+ $error = $STRING['givename'];
+ elseif (!$fdescription = trim($fdescription))
+ $error = $STRING['givedesc'];
+ if ($error) { list_items($resolutionid, $error); return; }
- if (!$resolutionid) {
- $q->query("insert into ".TBL_RESOLUTION.
+ if (!$resolutionid) {
+ $q->query("insert into ".TBL_RESOLUTION.
" (resolution_id, resolution_name, resolution_desc, sort_order)"
." values (".$q->nextid(TBL_RESOLUTION).", '$fname', '$fdescription', '$fsortorder')");
- } else {
- $q->query("update ".TBL_RESOLUTION.
+ } else {
+ $q->query("update ".TBL_RESOLUTION.
" set resolution_name = '$fname', resolution_desc = '$fdescription',
sort_order = '$fsortorder' where resolution_id = '$resolutionid'");
- }
- header("Location: $me?");
+ }
+ header("Location: $me?");
}
function show_form($resolutionid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
extract($_pv);
- if ($resolutionid && !$error) {
- $row = $q->grab("select * from ".TBL_RESOLUTION.
+ if ($resolutionid && !$error) {
+ $row = $q->grab("select * from ".TBL_RESOLUTION.
" where resolution_id = '$resolutionid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fresolutionid' => $row['resolution_id'],
- 'fname' => $row['resolution_name'],
- 'fdescription' => $row['resolution_desc'],
- 'fsortorder' => $row['sort_order']));
- } else {
- $t->set_var(array(
- 'action' => $resolutionid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fresolutionid' => $resolutionid,
- 'fname' => isset($fname) ? $fname : '',
- 'fdescription' => isset($fdescription) ? $fdescription : '',
- 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
- }
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fresolutionid' => $row['resolution_id'],
+ 'fname' => $row['resolution_name'],
+ 'fdescription' => $row['resolution_desc'],
+ 'fsortorder' => $row['sort_order']));
+ } else {
+ $t->set_var(array(
+ 'action' => $resolutionid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fresolutionid' => $resolutionid,
+ 'fname' => isset($fname) ? $fname : '',
+ 'fdescription' => isset($fdescription) ? $fdescription : '',
+ 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
+ }
}
function list_items($resolutionid = 0, $error = '') {
- global $me, $q, $t, $STRING, $TITLE, $_gv;
+ global $me, $q, $t, $STRING, $TITLE, $_gv;
- $t->set_file('content','resolutionlist.html');
- $t->set_block('content','row','rows');
+ $t->set_file('content','resolutionlist.html');
+ $t->set_block('content','row','rows');
- if (empty($_gv['order'])) {
+ if (empty($_gv['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
@@ -90,47 +90,47 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_RESOLUTION);
+ $nr = $q->query("select count(*) from ".TBL_RESOLUTION);
- list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
- "order=$order&sort=$sort");
+ list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
+ "order=$order&sort=$sort");
- $t->set_var(array(
- 'pages' => '[ '.$pages.' ]',
- 'first' => $llimit+1,
- 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
- 'records' => $nr));
+ $t->set_var(array(
+ 'pages' => '[ '.$pages.' ]',
+ 'first' => $llimit+1,
+ 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
+ 'records' => $nr));
- $q->limit_query("select * from ".TBL_RESOLUTION." order by $order $sort",
+ $q->limit_query("select * from ".TBL_RESOLUTION." order by $order $sort",
$selrange, $llimit);
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['noresolutions']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'resolutionid' => 'resolution_id',
- 'name' => 'resolution_name',
- 'description' => 'resolution_desc',
- 'sortorder' => 'sort_order');
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['noresolutions']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'resolutionid' => 'resolution_id',
+ 'name' => 'resolution_name',
+ 'description' => 'resolution_desc',
+ 'sortorder' => 'sort_order');
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
- 'resolutionid' => $row['resolution_id'],
- 'name' => $row['resolution_name'],
- 'description' => $row['resolution_desc'],
- 'sortorder' => $row['sort_order']));
- $t->parse('rows','row',true);
- }
+ 'resolutionid' => $row['resolution_id'],
+ 'name' => $row['resolution_name'],
+ 'description' => $row['resolution_desc'],
+ 'sortorder' => $row['sort_order']));
+ $t->parse('rows','row',true);
+ }
- show_form($resolutionid, $error);
- $t->set_var('TITLE',$TITLE['resolution']);
+ show_form($resolutionid, $error);
+ $t->set_var('TITLE',$TITLE['resolution']);
}
$t->set_file('wrap','wrap.html');
@@ -138,10 +138,10 @@
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['id']); break;
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:32:00
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6587
Modified Files:
status.php
Log Message:
Converting spaces to tabs :)
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- status.php 2001/12/19 14:05:15 1.19
+++ status.php 2002/01/19 16:31:57 1.20
@@ -26,61 +26,61 @@
include INCLUDE_PATH.'include.php';
function do_form($statusid = 0) {
- global $q, $me, $_pv, $STRING;
+ global $q, $me, $_pv, $STRING;
extract($_pv);
$error = '';
- // Validation
- if (!$fname = trim($fname))
- $error = $STRING['givename'];
- elseif (!$fdescription = trim($fdescription))
- $error = $STRING['givedesc'];
- if ($error) { list_items($statusid, $error); return; }
+ // Validation
+ if (!$fname = trim($fname))
+ $error = $STRING['givename'];
+ elseif (!$fdescription = trim($fdescription))
+ $error = $STRING['givedesc'];
+ if ($error) { list_items($statusid, $error); return; }
- if (!$statusid) {
- $q->query("insert into ".TBL_STATUS.
+ if (!$statusid) {
+ $q->query("insert into ".TBL_STATUS.
" (status_id, status_name, status_desc, sort_order) values (".
$q->nextid(TBL_STATUS).", '$fname', '$fdescription', '$fsortorder')");
- } else {
- $q->query("update ".TBL_STATUS.
+ } else {
+ $q->query("update ".TBL_STATUS.
" set status_name = '$fname', status_desc = '$fdescription',
sort_order = '$fsortorder' where status_id = '$statusid'");
- }
- header("Location: $me?");
+ }
+ header("Location: $me?");
}
function show_form($statusid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
extract($_pv);
- if ($statusid && !$error) {
- $row = $q->grab("select * from ".TBL_STATUS.
+ if ($statusid && !$error) {
+ $row = $q->grab("select * from ".TBL_STATUS.
" where status_id = '$statusid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fstatusid' => $row['status_id'],
- 'fname' => $row['status_name'],
- 'fdescription' => $row['status_desc'],
- 'fsortorder' => $row['sort_order']));
- } else {
- $t->set_var(array(
- 'action' => $statusid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fstatusid' => $statusid,
- 'fname' => isset($fname) ? $fname : '',
- 'fdescription' => isset($fdescription) ? $fdescription : '',
- 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
- }
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fstatusid' => $row['status_id'],
+ 'fname' => $row['status_name'],
+ 'fdescription' => $row['status_desc'],
+ 'fsortorder' => $row['sort_order']));
+ } else {
+ $t->set_var(array(
+ 'action' => $statusid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fstatusid' => $statusid,
+ 'fname' => isset($fname) ? $fname : '',
+ 'fdescription' => isset($fdescription) ? $fdescription : '',
+ 'fsortorder' => isset($fsortorder) ? $fsortorder : 0));
+ }
}
function list_items($statusid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
- $t->set_file('content','statuslist.html');
- $t->set_block('content','row','rows');
+ $t->set_file('content','statuslist.html');
+ $t->set_block('content','row','rows');
- if (empty($_gv['order'])) {
+ if (empty($_gv['order'])) {
$order = 'sort_order';
$sort = 'asc';
} else {
@@ -90,47 +90,47 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->query("select count(*) from ".TBL_STATUS);
+ $nr = $q->query("select count(*) from ".TBL_STATUS);
- list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
- "order=$order&sort=$sort");
+ list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
+ "order=$order&sort=$sort");
- $t->set_var(array(
- 'pages' => '[ '.$pages.' ]',
- 'first' => $llimit+1,
- 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
- 'records' => $nr));
+ $t->set_var(array(
+ 'pages' => '[ '.$pages.' ]',
+ 'first' => $llimit+1,
+ 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
+ 'records' => $nr));
- $q->limit_query("select * from ".TBL_STATUS." order by $order $sort",
+ $q->limit_query("select * from ".TBL_STATUS." order by $order $sort",
$selrange, $llimit);
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'statusid' => 'status_id',
- 'name' => 'status_name',
- 'description' => 'status_desc',
- 'sortorder' => 'sort_order');
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'statusid' => 'status_id',
+ 'name' => 'status_name',
+ 'description' => 'status_desc',
+ 'sortorder' => 'sort_order');
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
- 'statusid' => $row['status_id'],
- 'name' => $row['status_name'],
- 'description' => $row['status_desc'],
- 'sortorder' => $row['sort_order']));
- $t->parse('rows','row',true);
- }
+ 'statusid' => $row['status_id'],
+ 'name' => $row['status_name'],
+ 'description' => $row['status_desc'],
+ 'sortorder' => $row['sort_order']));
+ $t->parse('rows','row',true);
+ }
- show_form($statusid, $error);
- $t->set_var('TITLE',$TITLE['status']);
+ show_form($statusid, $error);
+ $t->set_var('TITLE',$TITLE['status']);
}
$t->set_file('wrap','wrap.html');
@@ -138,10 +138,10 @@
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['id']); break;
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:29:55
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv5866
Modified Files:
group.php
Log Message:
Converting spaces to tabs :)
Index: group.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/group.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- group.php 2001/12/04 14:32:46 1.2
+++ group.php 2002/01/19 16:29:51 1.3
@@ -39,56 +39,56 @@
}
function do_form($groupid = 0) {
- global $q, $me, $_pv, $STRING, $u, $now;
+ global $q, $me, $_pv, $STRING, $u, $now;
extract($_pv);
$error = '';
- // Validation
- if (!$fname = trim($fname))
- $error = $STRING['givename'];
- if ($error) { list_items($groupid, $error); return; }
+ // Validation
+ if (!$fname = trim($fname))
+ $error = $STRING['givename'];
+ if ($error) { list_items($groupid, $error); return; }
- if (!$groupid) {
- $q->query("insert into ".TBL_AUTH_GROUP.
+ if (!$groupid) {
+ $q->query("insert into ".TBL_AUTH_GROUP.
" (group_id, group_name, created_by, created_date, last_modified_by, last_modified_date)"
." values (".$q->nextid(TBL_AUTH_GROUP).", '$fname', $u, $now, $u, $now)");
- } else {
- $q->query("update ".TBL_AUTH_GROUP.
+ } else {
+ $q->query("update ".TBL_AUTH_GROUP.
" set group_name = '$fname', last_modified_by = $u,
last_modified_date = $now where group_id = '$groupid'");
- }
- header("Location: $me?");
+ }
+ header("Location: $me?");
}
function show_form($groupid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
- if ($groupid && !$error) {
- $row = $q->grab("select * from ".TBL_AUTH_GROUP.
+ if ($groupid && !$error) {
+ $row = $q->grab("select * from ".TBL_AUTH_GROUP.
" where group_id = '$groupid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fgroupid' => $row['group_id'],
- 'fname' => $row['group_name']));
- } else {
- $t->set_var(array(
- 'action' => $groupid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fgroupid' => $groupid,
- 'fname' => isset($fname) ? $fname : ''));
- }
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fgroupid' => $row['group_id'],
+ 'fname' => $row['group_name']));
+ } else {
+ $t->set_var(array(
+ 'action' => $groupid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fgroupid' => $groupid,
+ 'fname' => isset($fname) ? $fname : ''));
+ }
}
function list_items($groupid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
- $t->set_file('content','grouplist.html');
- $t->set_block('content','row','rows');
- $t->set_block('row','lockedblock','lockedb');
- $t->set_block('row','unlockedblock','unlockedb');
+ $t->set_file('content','grouplist.html');
+ $t->set_block('content','row','rows');
+ $t->set_block('row','lockedblock','lockedb');
+ $t->set_block('row','unlockedblock','unlockedb');
- if (empty($_gv['order'])) {
+ if (empty($_gv['order'])) {
$order = 'group_name';
$sort = 'asc';
} else {
@@ -98,42 +98,42 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->grab_field("select count(*) from ".TBL_AUTH_GROUP);
+ $nr = $q->grab_field("select count(*) from ".TBL_AUTH_GROUP);
- list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
- "order=$order&sort=$sort");
+ list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
+ "order=$order&sort=$sort");
- $t->set_var(array(
- 'pages' => '[ '.$pages.' ]',
- 'first' => $llimit+1,
- 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
- 'records' => $nr));
+ $t->set_var(array(
+ 'pages' => '[ '.$pages.' ]',
+ 'first' => $llimit+1,
+ 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
+ 'records' => $nr));
- $q->limit_query("select ag.group_id, group_name, locked, count(ug.group_id) as count from ".
+ $q->limit_query("select ag.group_id, group_name, locked, count(ug.group_id) as count from ".
TBL_AUTH_GROUP." ag left join ".TBL_USER_GROUP." ug using (group_id) left join ".
TBL_AUTH_USER." using (user_id) group by ag.group_id, group_name, locked order by $order $sort",
$selrange, $llimit);
- if (!$q->num_rows()) {
+ if (!$q->num_rows()) {
// This should never happen, as admin, user, and developer groups must exist
- $t->set_var('rows',"");
- return;
- }
-
- $headers = array(
- 'groupid' => 'group_id',
- 'name' => 'group_name',
+ $t->set_var('rows',"");
+ return;
+ }
+
+ $headers = array(
+ 'groupid' => 'group_id',
+ 'name' => 'group_name',
'count' => '4');
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
- 'groupid' => $row['group_id'],
- 'name' => $row['group_name'],
+ 'groupid' => $row['group_id'],
+ 'name' => $row['group_name'],
'count' => $row['count']
));
@@ -145,11 +145,11 @@
$t->parse('unlockedb', 'unlockedblock', false);
$t->set_var('lockedb', '');
}
- $t->parse('rows','row',true);
- }
+ $t->parse('rows','row',true);
+ }
- show_form($groupid, $error);
- $t->set_var('TITLE',$TITLE['group']);
+ show_form($groupid, $error);
+ $t->set_var('TITLE',$TITLE['group']);
}
$t->set_file('wrap','wrap.html');
@@ -157,12 +157,12 @@
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['id']); break;
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($_gv['id']); break;
case 'del' : del_group($_gv['id']); list_items($_gv['id']); break;
case 'purge' : purge_group($_gv['id']); list_items($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:21:50
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3729/admin
Modified Files:
user.php
Log Message:
Converting spaces to tabs :)
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- user.php 2002/01/19 16:09:37 1.36
+++ user.php 2002/01/19 16:21:47 1.37
@@ -26,39 +26,39 @@
include INCLUDE_PATH.'include.php';
function do_form($userid = 0) {
- global $q, $me, $_pv, $STRING, $now, $u;
+ global $q, $me, $_pv, $STRING, $now, $u;
$error = '';
- // Validation
- if (!EMAIL_IS_LOGIN && !$_pv['flogin'] = trim($_pv['flogin'])) {
- $error = $STRING['givelogin'];
- } elseif (!valid_email($_pv['femail'])) {
- $error = $STRING['giveemail'];
- } elseif (!$_pv['fpassword'] = trim($_pv['fpassword'])) {
- $error = $STRING['givepassword'];
- }
- if ($error) {
- list_items($userid, $error);
- return;
- }
- if (!isset($_pv['factive'])) $_pv['factive'] = 0;
-
- if (EMAIL_IS_LOGIN) {
- $login = $_pv['femail'];
- } else {
- $login = $_pv['flogin'];
- }
-
- if (!$userid) {
- if (ENCRYPT_PASS) $mpassword = md5($_pv['fpassword']);
- else $mpassword = $_pv['fpassword'];
- $new_user_id = $q->nextid(TBL_AUTH_USER);
- $q->query('insert into '.TBL_AUTH_USER
- ." (user_id, first_name, last_name, login, email, password, active,
- created_by, created_date, last_modified_by, last_modified_date)
- values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
- '$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
- $u, $now)");
+ // Validation
+ if (!EMAIL_IS_LOGIN && !$_pv['flogin'] = trim($_pv['flogin'])) {
+ $error = $STRING['givelogin'];
+ } elseif (!valid_email($_pv['femail'])) {
+ $error = $STRING['giveemail'];
+ } elseif (!$_pv['fpassword'] = trim($_pv['fpassword'])) {
+ $error = $STRING['givepassword'];
+ }
+ if ($error) {
+ list_items($userid, $error);
+ return;
+ }
+ if (!isset($_pv['factive'])) $_pv['factive'] = 0;
+
+ if (EMAIL_IS_LOGIN) {
+ $login = $_pv['femail'];
+ } else {
+ $login = $_pv['flogin'];
+ }
+
+ if (!$userid) {
+ if (ENCRYPT_PASS) $mpassword = md5($_pv['fpassword']);
+ else $mpassword = $_pv['fpassword'];
+ $new_user_id = $q->nextid(TBL_AUTH_USER);
+ $q->query('insert into '.TBL_AUTH_USER
+ ." (user_id, first_name, last_name, login, email, password, active,
+ created_by, created_date, last_modified_by, last_modified_date)
+ values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
+ '$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
+ $u, $now)");
// Add to the selected groups
if (isset($_pv['fusergroup']) and is_array($_pv['fusergroup']) and
$_pv['fusergroup'][0]) {
@@ -73,120 +73,120 @@
" (user_id, group_id, created_by, created_date)
select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP.
" where group_name = 'User'");
- } else {
- if (ENCRYPT_PASS) {
- $oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
- ." where user_id = $userid");
- if ($oldpass != $_pv['fpassword']) {
- $pquery = "password = '".md5($_pv['fpassword'])."',";
- } else {
- $pquery = '';
- }
- } else {
- $pquery = "password = '{$_pv['fpassword']}',";
- }
- $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
- last_name = '{$_pv['flastname']}', login = '$login',
+ } else {
+ if (ENCRYPT_PASS) {
+ $oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
+ ." where user_id = $userid");
+ if ($oldpass != $_pv['fpassword']) {
+ $pquery = "password = '".md5($_pv['fpassword'])."',";
+ } else {
+ $pquery = '';
+ }
+ } else {
+ $pquery = "password = '{$_pv['fpassword']}',";
+ }
+ $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
+ last_name = '{$_pv['flastname']}', login = '$login',
email = '{$_pv['femail']}', $pquery active = {$_pv['factive']}
where user_id = '$userid'");
- // Update group memberships
- // Get user's groups (without dropping the user group)
- $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
- .TBL_AUTH_GROUP.' g using (group_id) '
- ." where user_id = $userid and group_name <> 'User'");
- while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
- // Compute differences between old and new
- if (!isset($user_groups) or !is_array($user_groups)) {
- $user_groups = array();
- }
- if (!isset($_pv['fusergroup']) or !is_array($_pv['fusergroup']) or
+ // Update group memberships
+ // Get user's groups (without dropping the user group)
+ $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
+ .TBL_AUTH_GROUP.' g using (group_id) '
+ ." where user_id = $userid and group_name <> 'User'");
+ while ($group_id = $q->grab_field()) {
+ $user_groups[] = $group_id;
+ }
+ // Compute differences between old and new
+ if (!isset($user_groups) or !is_array($user_groups)) {
+ $user_groups = array();
+ }
+ if (!isset($_pv['fusergroup']) or !is_array($_pv['fusergroup']) or
!$_pv['fusergroup'][0]) {
- $_pv['fusergroup'] = array();
- }
+ $_pv['fusergroup'] = array();
+ }
- $remove_from = array_diff($user_groups, $_pv['fusergroup']);
- $add_to = array_diff($_pv['fusergroup'], $user_groups);
+ $remove_from = array_diff($user_groups, $_pv['fusergroup']);
+ $add_to = array_diff($_pv['fusergroup'], $user_groups);
- if (count($remove_from)) {
- foreach ($remove_from as $group) {
- $q->query('delete from '.TBL_USER_GROUP
- ." where user_id = $userid and group_id = $group");
- }
- }
- if (count($add_to)) {
- foreach ($add_to as $group) {
- $q->query("insert into ".TBL_USER_GROUP
- ." (user_id, group_id, created_by, created_date)
- values ('$userid' ,'$group', $u, $now)");
- }
- }
- }
- header("Location: $me?");
+ if (count($remove_from)) {
+ foreach ($remove_from as $group) {
+ $q->query('delete from '.TBL_USER_GROUP
+ ." where user_id = $userid and group_id = $group");
+ }
+ }
+ if (count($add_to)) {
+ foreach ($add_to as $group) {
+ $q->query("insert into ".TBL_USER_GROUP
+ ." (user_id, group_id, created_by, created_date)
+ values ('$userid' ,'$group', $u, $now)");
+ }
+ }
+ }
+ header("Location: $me?");
}
function show_form($userid = 0, $error = '') {
- global $q, $me, $t, $_pv, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
+
+ if ($userid && !$error) {
+ $row = $q->grab("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
- if ($userid && !$error) {
- $row = $q->grab("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
+ // Get user's groups
+ $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
+ while ($group_id = $q->grab_field()) {
+ $user_groups[] = $group_id;
+ }
- // Get user's groups
- $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
- while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
-
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fuserid' => $row['user_id'],
- 'flogin' => $row['login'],
- 'ffirstname' => stripslashes($row['first_name']),
- 'flastname' => stripslashes($row['last_name']),
- 'femail' => $row['email'],
- 'fpassword' => $row['password'],
- 'factive' => $row['active'] ? 'checked' : '',
- 'fusergroup' => build_select('group', $user_groups)
- ));
- } else {
- $t->set_var(array(
- 'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fuserid' => $userid,
- 'flogin' => isset($_pv['flogin']) ? $_pv['flogin'] : '',
- 'ffirstname' => isset($_pv['firstname']) ?
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fuserid' => $row['user_id'],
+ 'flogin' => $row['login'],
+ 'ffirstname' => stripslashes($row['first_name']),
+ 'flastname' => stripslashes($row['last_name']),
+ 'femail' => $row['email'],
+ 'fpassword' => $row['password'],
+ 'factive' => $row['active'] ? 'checked' : '',
+ 'fusergroup' => build_select('group', $user_groups)
+ ));
+ } else {
+ $t->set_var(array(
+ 'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fuserid' => $userid,
+ 'flogin' => isset($_pv['flogin']) ? $_pv['flogin'] : '',
+ 'ffirstname' => isset($_pv['firstname']) ?
stripslashes($_pv['firstname']) : '',
- 'flastname' => isset($_pv['flastname']) ?
+ 'flastname' => isset($_pv['flastname']) ?
stripslashes($_pv['flastname']) : '',
- 'femail' => isset($_pv['femail']) ? $_pv['femail'] : '',
- 'fpassword' => isset($_pv['fpassword']) ? $_pv['fpassword'] :
+ 'femail' => isset($_pv['femail']) ? $_pv['femail'] : '',
+ 'fpassword' => isset($_pv['fpassword']) ? $_pv['fpassword'] :
genpassword(10),
- 'factive' => isset($_pv['factive']) ? ($_pv['factive'] ? 'checked' : '')
- : 'checked',
- 'fusergroup' => build_select('group', (isset($_pv['fusergroup']) ?
+ 'factive' => isset($_pv['factive']) ? ($_pv['factive'] ? 'checked' : '')
+ : 'checked',
+ 'fusergroup' => build_select('group', (isset($_pv['fusergroup']) ?
$_pv['fusergroup'] : array()))
- ));
- }
+ ));
+ }
- // Show the login field only if login is not tied to email address
- if (EMAIL_IS_LOGIN) {
- $t->set_var('loginarea', '');
- } else {
- $t->parse('loginarea', 'loginentryarea', true);
- }
+ // Show the login field only if login is not tied to email address
+ if (EMAIL_IS_LOGIN) {
+ $t->set_var('loginarea', '');
+ } else {
+ $t->parse('loginarea', 'loginentryarea', true);
+ }
}
function list_items($userid = 0, $error = '') {
- global $me, $q, $t, $_gv, $STRING, $TITLE;
+ global $me, $q, $t, $_gv, $STRING, $TITLE;
- $t->set_file('content', 'userlist.html');
- $t->set_block('content', 'row', 'rows');
- $t->set_block('content', 'loginentryarea', 'loginarea');
+ $t->set_file('content', 'userlist.html');
+ $t->set_block('content', 'row', 'rows');
+ $t->set_block('content', 'loginentryarea', 'loginarea');
- if (empty($_gv['order'])) {
+ if (empty($_gv['order'])) {
$order = 'login';
$sort = 'asc';
} else {
@@ -196,53 +196,53 @@
$page = isset($_gv['page']) ? $_gv['page'] : 0;
- $nr = $q->grab_field("select count(*) from ".TBL_AUTH_USER);
+ $nr = $q->grab_field("select count(*) from ".TBL_AUTH_USER);
- list($selrange, $llimit, $npages, $pages) = multipages($nr, $page,
- "order=$order&sort=$sort");
+ list($selrange, $llimit, $npages, $pages) = multipages($nr, $page,
+ "order=$order&sort=$sort");
- $t->set_var(array(
- 'pages' => '[ '.$pages.' ]',
- 'first' => $llimit+1,
- 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
- 'records' => $nr));
-
- $q->limit_query("select user_id, first_name, last_name,
- email, login, created_date, active from ".TBL_AUTH_USER
- ." order by $order $sort", $selrange, $llimit);
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'userid' => 'user_id',
- 'name' => 'last_name',
- 'login' => 'login',
- 'email' => 'email',
- 'password' => 'password',
- 'active' => 'active',
- 'date' => 'created_date');
+ $t->set_var(array(
+ 'pages' => '[ '.$pages.' ]',
+ 'first' => $llimit+1,
+ 'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
+ 'records' => $nr));
+
+ $q->limit_query("select user_id, first_name, last_name,
+ email, login, created_date, active from ".TBL_AUTH_USER
+ ." order by $order $sort", $selrange, $llimit);
+
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'userid' => 'user_id',
+ 'name' => 'last_name',
+ 'login' => 'login',
+ 'email' => 'email',
+ 'password' => 'password',
+ 'active' => 'active',
+ 'date' => 'created_date');
- sorting_headers($me, $headers, $order, $sort);
+ sorting_headers($me, $headers, $order, $sort);
$i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'trclass' => $i % 2 ? '' : 'alt',
- 'userid' => $row['user_id'],
- 'login' => $row['login'],
- 'name' => stripslashes("{$row['first_name']} {$row['last_name']}"),
- 'email' => $row['email'],
- 'active' => $row['active'] ? 'Yes' : 'No',
- 'date' => date(DATE_FORMAT, $row['created_date'])));
- $t->parse('rows','row',true);
- }
+ 'userid' => $row['user_id'],
+ 'login' => $row['login'],
+ 'name' => stripslashes("{$row['first_name']} {$row['last_name']}"),
+ 'email' => $row['email'],
+ 'active' => $row['active'] ? 'Yes' : 'No',
+ 'date' => date(DATE_FORMAT, $row['created_date'])));
+ $t->parse('rows','row',true);
+ }
- show_form($userid, $error);
- $t->set_var('TITLE', $TITLE['user']);
+ show_form($userid, $error);
+ $t->set_var('TITLE', $TITLE['user']);
}
$t->set_file('wrap','wrap.html');
@@ -250,10 +250,10 @@
$perm->check('Admin');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($_gv['id']); break;
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($_gv['id']); break;
} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content', 'wrap', 'main'));
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:09:40
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv32739/admin
Modified Files:
user.php
Log Message:
Cleanup
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- user.php 2001/12/24 21:30:33 1.35
+++ user.php 2002/01/19 16:09:37 1.36
@@ -60,11 +60,14 @@
'$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
$u, $now)");
// Add to the selected groups
- foreach ($_pv['fusergroup'] as $group) {
- $q->query("insert into ".TBL_USER_GROUP
- ." (user_id, group_id, created_by, created_date)
- values ('$new_user_id' ,'$group', $u, $now)");
- }
+ if (isset($_pv['fusergroup']) and is_array($_pv['fusergroup']) and
+ $_pv['fusergroup'][0]) {
+ foreach ($_pv['fusergroup'] as $group) {
+ $q->query("insert into ".TBL_USER_GROUP
+ ." (user_id, group_id, created_by, created_date)
+ values ('$new_user_id' ,'$group', $u, $now)");
+ }
+ }
// And add to the user group
$q->query("insert into ".TBL_USER_GROUP.
" (user_id, group_id, created_by, created_date)
@@ -99,7 +102,8 @@
if (!isset($user_groups) or !is_array($user_groups)) {
$user_groups = array();
}
- if (!is_array($_pv['fusergroup']) or !$_pv['fusergroup'][0]) {
+ if (!isset($_pv['fusergroup']) or !is_array($_pv['fusergroup']) or
+ !$_pv['fusergroup'][0]) {
$_pv['fusergroup'] = array();
}
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 15:11:29
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16465
Modified Files:
query.php attachment.php
Log Message:
Cleanup
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- query.php 2002/01/05 19:49:35 1.52
+++ query.php 2002/01/19 15:11:25 1.53
@@ -234,7 +234,7 @@
$nr = $q->grab_field('select count(*) from '.TBL_BUG.' b
left join '.TBL_AUTH_USER.' owner on b.assigned_to = owner.user_id
left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '.
- ($_sv['queryinfo']['query'] != '' ? "where {$_sv['queryinfo']['query']}": ''));
+ (!empty($_sv['queryinfo']['query']) ? "where {$_sv['queryinfo']['query']}": ''));
$_sv['queryinfo']['numrows'] = $nr;
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
@@ -260,7 +260,7 @@
where b.severity_id = severity.severity_id and b.status_id = status.status_id
and b.os_id = os.os_id and b.version_id = version.version_id
and b.component_id = component.component_id and b.project_id = project.project_id '.
- ($_sv['queryinfo']['query'] != '' ? "and {$_sv['queryinfo']['query']} " : '').
+ (!empty($_sv['queryinfo']['query']) ? "and {$_sv['queryinfo']['query']} " : '').
"order by $order $sort, bug_id asc", $selrange, $llimit);
$headers = array(
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- attachment.php 2001/11/13 03:52:59 1.11
+++ attachment.php 2002/01/19 15:11:26 1.12
@@ -137,8 +137,8 @@
$t->set_var(array(
'error' => $error,
'bugid' => $bugid,
- 'projectid' => $projectid,
- 'description' => htmlspecialchars(stripslashes($description)),
+ 'description' => isset($description)
+ ? htmlspecialchars(stripslashes($description)) : '',
'max_size' => ini_get('upload_max_filesize') < ATTACHMENT_MAX_SIZE
? number_format(ini_get('upload_max_filesize'))
: number_format(ATTACHMENT_MAX_SIZE)
|
|
From: Benjamin C. <bc...@us...> - 2002-01-19 15:11:29
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv16465/templates/default
Modified Files:
bugattachmentform.html
Log Message:
Cleanup
Index: bugattachmentform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/bugattachmentform.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bugattachmentform.html 2001/08/11 17:09:24 1.1
+++ bugattachmentform.html 2002/01/19 15:11:26 1.2
@@ -1,6 +1,5 @@
<form enctype="multipart/form-data" action="{me}" method="post">
<input type="hidden" name="bugid" value="{bugid}">
-<input type="hidden" name="projectid" value="{projectid}">
<table border="0" width="640">
<tr>
<td colspan="2">
|
|
From: Ben C. <php...@be...> - 2002-01-19 14:52:51
|
Aside from converting my tabs to spaces :), what was the actual change
in this diff?
On Wed, Jan 16, 2002 at 01:43:20AM -0800, Javier Sixto wrote:
> Update of /cvsroot/phpbt/phpbt
> In directory usw-pr-cvs1:/tmp/cvs-serv7681
>
> Modified Files:
> include.php
> Log Message:
> Lastest version must be selected by default
>
> Index: include.php
> ===================================================================
> RCS file: /cvsroot/phpbt/phpbt/include.php,v
> retrieving revision 1.89
> retrieving revision 1.90
> diff -u -r1.89 -r1.90
> --- include.php 2002/01/05 20:34:50 1.89
> +++ include.php 2002/01/16 09:43:17 1.90
> @@ -24,23 +24,23 @@
>
> // Where are we?
> if (!empty($HTTP_SERVER_VARS['SCRIPT_FILENAME'])) {
> - define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
> + define ('INSTALL_PATH', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));
> } else {
> - define ('INSTALL_PATH', '.');
> + define ('INSTALL_PATH', '.');
> }
>
> // Handle being included from admin files
> if (!defined('INCLUDE_PATH')) {
> - define('INCLUDE_PATH', '');
> + define('INCLUDE_PATH', '');
> }
>
> if (!@include (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php')) {
> - header("Location: install.php");
> - exit();
> + header("Location: install.php");
> + exit();
> }
> if (!defined('DB_HOST')) { // Installation hasn't been completed
> - header("Location: install.php");
> - exit();
> + header("Location: install.php");
> + exit();
> }
>
> class dbclass extends DB_Sql {
> @@ -49,33 +49,33 @@
> var $Database = DB_DATABASE;
> var $User = DB_USER;
> var $Password = DB_PASSWORD;
> - var $Seq_Table = TBL_DB_SEQUENCE;
> - var $Seq_ID_Col = "nextid";
> - var $Seq_Name_Col = "seq_name";
> -
> - // Attempt to handle different limit syntax
> - function limit_query($q_string, $limit, $offset = 0) {
> - if ($offset) {
> - if (DB_TYPE == 'pgsql') {
> - $this->query("$q_string limit $limit offset $offset");
> - } else {
> - $this->query("$q_string limit $offset, $limit");
> - }
> - } else {
> - $this->query("$q_string limit $limit");
> - }
> - }
> -
> - // Handle the different types of concats
> - function concat() {
> - $pieces = func_get_args();
> - if (DB_TYPE == 'pgsql') {
> - return delimit_list(' || ', $pieces);
> - } else {
> - return 'concat('. delimit_list(', ', $pieces).')';
> - }
> - }
> -
> + var $Seq_Table = TBL_DB_SEQUENCE;
> + var $Seq_ID_Col = "nextid";
> + var $Seq_Name_Col = "seq_name";
> +
> + // Attempt to handle different limit syntax
> + function limit_query($q_string, $limit, $offset = 0) {
> + if ($offset) {
> + if (DB_TYPE == 'pgsql') {
> + $this->query("$q_string limit $limit offset $offset");
> + } else {
> + $this->query("$q_string limit $offset, $limit");
> + }
> + } else {
> + $this->query("$q_string limit $limit");
> + }
> + }
> +
> + // Handle the different types of concats
> + function concat() {
> + $pieces = func_get_args();
> + if (DB_TYPE == 'pgsql') {
> + return delimit_list(' || ', $pieces);
> + } else {
> + return 'concat('. delimit_list(', ', $pieces).')';
> + }
> + }
> +
> function grab($q_string = '') {
> if ($q_string) $this->query($q_string);
> $this->next_record();
> @@ -85,34 +85,34 @@
> function grab_field($q_string = '') {
> list($retval) = $this->grab($q_string);
> return $retval;
> + }
> +
> + function grab_set($q_string = '') {
> + $retary = array();
> + if ($q_string) $this->query($q_string);
> + while ($row = $this->grab()) { $retary[] = $row; }
> + return $retary;
> }
> -
> - function grab_set($q_string = '') {
> - $retary = array();
> - if ($q_string) $this->query($q_string);
> - while ($row = $this->grab()) { $retary[] = $row; }
> - return $retary;
> - }
> -
> - function grab_field_set($q_string = '') {
> - $retary = array();
> - if ($q_string) $this->query($q_string);
> - while ($item = $this->grab_field()) { $retary[] = $item; }
> - return $retary;
> - }
> - function nextid($seq_name) {
> - global $auth;
> -
> - if ($seq_name == TBL_SAVED_QUERY) {
> - if ($id = $this->grab_field("select max(saved_query_id)+1 from ".TBL_SAVED_QUERY." where user_id = ".$auth->auth['uid'])) {
> - return $id;
> - } else {
> - return 1;
> - }
> - } else {
> - return DB_Sql::nextid($seq_name);
> - }
> - }
> +
> + function grab_field_set($q_string = '') {
> + $retary = array();
> + if ($q_string) $this->query($q_string);
> + while ($item = $this->grab_field()) { $retary[] = $item; }
> + return $retary;
> + }
> + function nextid($seq_name) {
> + global $auth;
> +
> + if ($seq_name == TBL_SAVED_QUERY) {
> + if ($id = $this->grab_field("select max(saved_query_id)+1 from ".TBL_SAVED_QUERY." where user_id = ".$auth->auth['uid'])) {
> + return $id;
> + } else {
> + return 1;
> + }
> + } else {
> + return DB_Sql::nextid($seq_name);
> + }
> + }
> }
>
> $q = new dbclass;
> @@ -124,7 +124,7 @@
> // Set up the configuration variables
> $q->query('select varname, varvalue from '.TBL_CONFIGURATION);
> while (list($k, $v) = $q->grab()) {
> - define($k, $v);
> + define($k, $v);
> }
>
> // Localization - include the file with the desired language
> @@ -172,11 +172,11 @@
> $this->set_block('wrap', 'adminnavblock', 'anblock');
> if ($u) {
> list($owner_open, $owner_closed) = $q->grab("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
> - ."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
> - ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where assigned_to = $u");
> + ."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
> + ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where assigned_to = $u");
> list($reporter_open, $reporter_closed) = $q->grab("SELECT sum(CASE WHEN status_name in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END ) ,"
> - ."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
> - ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u");
> + ."sum(CASE WHEN status_name not in ('Unconfirmed','New','Assigned','Reopened') THEN 1 ELSE 0 END )"
> + ."from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u");
> $this->set_var(array(
> 'loggedinas' => $auth->auth['uname'],
> 'liblock' => '',
> @@ -190,7 +190,7 @@
> $this->set_var(array(
> 'loggedinas' => '',
> 'loblock' => '',
> - 'loginlabel' => EMAIL_IS_LOGIN ? 'Email' : 'Login'
> + 'loginlabel' => EMAIL_IS_LOGIN ? 'Email' : 'Login'
> ));
> $this->parse('liblock', 'loginblock', true);
> }
> @@ -205,9 +205,9 @@
> }
>
> if (INCLUDE_PATH == '../') {
> - $t = new templateclass(INCLUDE_PATH.'templates/'.THEME.'/admin', 'keep');
> + $t = new templateclass(INCLUDE_PATH.'templates/'.THEME.'/admin', 'keep');
> } else {
> - $t = new templateclass('templates/'.THEME.'/', 'keep');
> + $t = new templateclass('templates/'.THEME.'/', 'keep');
> }
>
> $t->set_var(array(
> @@ -216,7 +216,7 @@
> 'me2' => $me2,
> 'error' => '',
> 'loginerror' => '',
> - 'template_path' => INCLUDE_PATH.'templates/'.THEME));
> + 'template_path' => INCLUDE_PATH.'templates/'.THEME));
>
> // End classes -- Begin helper functions
>
> @@ -255,35 +255,35 @@
> );
>
> $text = '';
> - if (isset($cfgDatabase[$box])) {
> - $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
> - $queries = array(
> - 'group' => $querystart.' where group_name <> \'User\' order by group_name',
> - 'severity' => $querystart.' where sort_order > 0 order by sort_order',
> - 'status' => $querystart.' where sort_order > 0 order by sort_order',
> - 'resolution' => $querystart.' where sort_order > 0 order by sort_order',
> - 'project' => $perm->have_perm('Admin')
> - ? $querystart." where active > 0 order by {$box}_name"
> - : "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
> - TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
> - and (pg.project_id is null or pg.group_id in ('.
> - delimit_list(',', $auth->auth['group_ids']).')) group by
> - p.project_id, p.project_name order by project_name',
> - 'component' => $querystart." where project_id = $project order by {$box}_name",
> - 'version' => $querystart." where project_id = $project order by {$box}_name"
> - );
> - }
> + if (isset($cfgDatabase[$box])) {
> + $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
> + $queries = array(
> + 'group' => $querystart.' where group_name <> \'User\' order by group_name',
> + 'severity' => $querystart.' where sort_order > 0 order by sort_order',
> + 'status' => $querystart.' where sort_order > 0 order by sort_order',
> + 'resolution' => $querystart.' where sort_order > 0 order by sort_order',
> + 'project' => $perm->have_perm('Admin')
> + ? $querystart." where active > 0 order by {$box}_name"
> + : "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
> + TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
> + and (pg.project_id is null or pg.group_id in ('.
> + delimit_list(',', $auth->auth['group_ids']).')) group by
> + p.project_id, p.project_name order by project_name',
> + 'component' => $querystart." where project_id = $project order by {$box}_name",
> + 'version' => $querystart." where project_id = $project order by {$box}_id desc"
> + );
> + }
>
> switch($box) {
> case 'group' :
> - if ($project) { // If we are building for project admin page
> - if (!count($value) or (count($value) && in_array(0, $value))) {
> - $sel = ' selected';
> - } else {
> - $sel = '';
> - }
> - $text = "<option value=\"all\"$sel>All Groups</option>";
> - }
> + if ($project) { // If we are building for project admin page
> + if (!count($value) or (count($value) && in_array(0, $value))) {
> + $sel = ' selected';
> + } else {
> + $sel = '';
> + }
> + $text = "<option value=\"all\"$sel>All Groups</option>";
> + }
> $q->query($queries[$box]);
> while ($row = $q->grab()) {
> if (count($value) && in_array($row[$box.'_id'], $value)) $sel = ' selected';
> @@ -325,48 +325,48 @@
> $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['login']}</option>";
> }
> break;
> - case 'bug_cc' :
> - $q->query('select b.user_id, login from '.TBL_BUG_CC.' b left join '.
> - TBL_AUTH_USER." using(user_id) where bug_id = $value");
> - while (list($uid, $user) = $q->grab()) {
> - $text .= "<option value=\"$uid\">".maskemail($user).'</option>';
> - }
> -
> - // Pad the sucker
> - $text .= '<option value="" disabled>';
> - for ($i = 0; $i < 30; $i++) {
> - $text .= ' ';
> - }
> - $text .= '</option>';
> - break;
> - case 'LANGUAGE' :
> - $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'languages');
> - while (false !== ($file = readdir($dir))) {
> - if ($file != '.' && $file != '..' && $file != 'CVS') {
> - $file = str_replace('.php', '', $file);
> - if ($file == $value) {
> - $sel = ' selected';
> - } else {
> - $sel = '';
> - }
> - $text .= "<option value=\"$file\"$sel>$file</option>";
> - }
> - }
> - break;
> - case 'THEME' :
> - $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'templates');
> - while (false !== ($file = readdir($dir))) {
> - if ($file != '.' && $file != '..' && $file != 'CVS') {
> - $file = str_replace('.php', '', $file);
> - if ($file == $value) {
> - $sel = ' selected';
> - } else {
> - $sel = '';
> - }
> - $text .= "<option value=\"$file\"$sel>$file</option>";
> - }
> - }
> - break;
> + case 'bug_cc' :
> + $q->query('select b.user_id, login from '.TBL_BUG_CC.' b left join '.
> + TBL_AUTH_USER." using(user_id) where bug_id = $value");
> + while (list($uid, $user) = $q->grab()) {
> + $text .= "<option value=\"$uid\">".maskemail($user).'</option>';
> + }
> +
> + // Pad the sucker
> + $text .= '<option value="" disabled>';
> + for ($i = 0; $i < 30; $i++) {
> + $text .= ' ';
> + }
> + $text .= '</option>';
> + break;
> + case 'LANGUAGE' :
> + $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'languages');
> + while (false !== ($file = readdir($dir))) {
> + if ($file != '.' && $file != '..' && $file != 'CVS') {
> + $file = str_replace('.php', '', $file);
> + if ($file == $value) {
> + $sel = ' selected';
> + } else {
> + $sel = '';
> + }
> + $text .= "<option value=\"$file\"$sel>$file</option>";
> + }
> + }
> + break;
> + case 'THEME' :
> + $dir = opendir(INSTALL_PATH.'/'.INCLUDE_PATH.'templates');
> + while (false !== ($file = readdir($dir))) {
> + if ($file != '.' && $file != '..' && $file != 'CVS') {
> + $file = str_replace('.php', '', $file);
> + if ($file == $value) {
> + $sel = ' selected';
> + } else {
> + $sel = '';
> + }
> + $text .= "<option value=\"$file\"$sel>$file</option>";
> + }
> + }
> + break;
> default :
> $deadarray = $select[$box];
> while(list($val,$item) = each($deadarray)) {
> @@ -384,7 +384,7 @@
> function multipages($nr, $page, $urlstr) {
> global $me, $selrange;
>
> - $pages = '';
> + $pages = '';
> if (!$page) $page = 1;
> if ($page == 'all') {
> $selrange = $nr;
> @@ -429,7 +429,7 @@
>
> $vowels = array("a", "e", "i", "o", "u");
> $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
> - $password = '';
> + $password = '';
>
> $num_vowels = count($vowels);
> $num_cons = count($cons);
> @@ -501,9 +501,9 @@
> // Begin every page with a page_open
> if (!defined('NO_AUTH')) {
> session_start();
> - $_sv =& $HTTP_SESSION_VARS;
> + $_sv =& $HTTP_SESSION_VARS;
> $auth = new uauth;
> - $perm = new uperm;
> + $perm = new uperm;
> $u = isset($auth->auth['uid']) ? $auth->auth['uid'] : 0;
> }
>
> @@ -521,16 +521,16 @@
> }
> mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
> $password), sprintf("From: %s\nContent-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n",ADMIN_EMAIL, $STRING['lang_charset']));
> - $t->set_var('loginerror',
> - '<div class="result">Your password has been emailed to you</div>');
> + $t->set_var('loginerror',
> + '<div class="result">Your password has been emailed to you</div>');
> }
> } else {
> if (!$u = $auth->auth_validatelogin()) {
> $t->set_var('loginerror', '<div class="error">Invalid login</div>');
> - }
> + }
> }
> }
>
> $op = isset($_gv['op']) ? $_gv['op'] : (isset($_pv['op']) ? $_pv['op'] : '');
>
> -?>
> +?>
> \ No newline at end of file
>
>
> _______________________________________________
> phpbt-dev mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpbt-dev
|
|
From: Ben C. <php...@be...> - 2002-01-19 14:51:56
|
A user had the same problem, and noticed that his register_globals was off. Turning it on helped. https://sourceforge.net/forum/forum.php?thread_id=625204&forum_id=47358 On Sat, Jan 19, 2002 at 12:26:54AM +0100, Patrick Mairif wrote: > Hi, > > I just noticed some critical bugs in my actual running version (it's > an older release) of phpbt and wanted to take a look at the actual > cvs. I made a checkout on a clean system, entered the url in my browser > and got only an empty document! what did I miss? I can remember of an > webbased setup, but it does not appear! > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Patrick M. <mai...@st...> - 2002-01-18 23:31:12
|
Hi, I just noticed some critical bugs in my actual running version (it's an older release) of phpbt and wanted to take a look at the actual cvs. I made a checkout on a clean system, entered the url in my browser and got only an empty document! what did I miss? I can remember of an webbased setup, but it does not appear! |
|
From: Alessandro P. (T. / J578) <al...@ti...> - 2002-01-16 22:18:49
|
On Wed, 2002-01-16 at 23:06, Javier Sixto wrote: > Hi Alessandro, thanks for your notice, > Yes, i know this problem ... But i i have noticed that if you put an > exit() command just after header() call, > it works just fine ... But perhaps there still some none working cases > with exit command ? Don't know about exit(); after header( ... ); we just preferred an if with IE's own working code. but if the exit/header tip works, well, it's okay for me :> Bye, Alessandro -- Alessandro "TXM" Pisani - al...@ti... - ICQ #2209087 phpWebSite Development Team http://phpwebsite.appstate.edu INWO Project coordinator http://inwoproject.sourceforge.net "I will carry you through, hicking and screaming, and in the end you will thank me" - Tyler Durden [from "Fight Club"] |
|
From: Javier S. <js...@si...> - 2002-01-16 22:06:35
|
Hi Alessandro, thanks for your notice,
Yes, i know this problem ... But i i have noticed that if you put an
exit() command just after header() call,
it works just fine ... But perhaps there still some none working cases
with exit command ?
--
Javier Sixto
Alessandro Pisani (TXM / J578) wrote:
>As I experienced in the project I'm mainly working on (phpWebSite), the
>header("Location: blah"); directive is not understood fine by some
>version of M$ Internet Exploder (should be: IE 5.x and 6). I suggest
>this solution (this is what we used):
>
>create a function:
>
>function html_header_location($url) {
> $agent = (phpversion() > "4.1.0") ? $_SERVER[HTTP_USER_AGENT] :
>$HTTP_SERVER_VARS[HTTP_USER_AGENT];
>
> if (stristr($agent, 'msie'))
> Header("Refresh: 0;url=$url");
> else
> Header("Location: $url");
> }
>
>then replace all calls to header("Location: blah") with
>html_header_location("blah");
>
>HTH
>Bye,
>Alessadro
>
|