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...> - 2001-08-18 03:12:30
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4783
Modified Files:
attachment.php
Log Message:
DB conversion
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- attachment.php 2001/08/11 17:24:31 1.4
+++ attachment.php 2001/08/18 03:12:27 1.5
@@ -27,7 +27,7 @@
global $q;
if (list($filename, $mimetype) = grab_attachment($attachid)) {
- $q->query("delete from Attachment where AttachmentID = $attachid");
+ $q->query("delete from attachment where attachment_id = $attachid");
unlink($filename);
header("Location: bug.php?op=show&bugid=$attachid");
}
@@ -40,18 +40,18 @@
show_text($STRING['bad_attachment'], true);
return false;
}
- $ainfo = $q->grab("select a.BugID, FileName, MimeType, Project from Attachment a, Bug b where AttachmentID = $attachid and a.BugID = b.BugID");
+ $ainfo = $q->grab("select a.bug_id, file_name, mime_type, project_id from attachment a, bug b where attachment_id = $attachid and a.bug_id = b.bug_id");
if ($q->num_rows() != 1) {
show_text($STRING['bad_attachment'], true);
return false;
}
$filename = join('/',array(INSTALLPATH, ATTACHMENT_PATH,
- $ainfo['Project'], "{$ainfo['BugID']}-{$ainfo['FileName']}"));
+ $ainfo['project_id'], "{$ainfo['bug_id']}-{$ainfo['file_name']}"));
if (!is_readable($filename)) {
show_text($STRING['bad_attachment'], true);
return false;
}
- return array($filename, $ainfo['MimeType']);
+ return array($filename, $ainfo['mime_type']);
}
function add_attachment($bugid, $description) {
@@ -70,16 +70,16 @@
return;
}
- $projectid = $q->grab_field("select Project from Bug where BugID = $bugid");
+ $projectid = $q->grab_field("select project_id from bug where bug_id = $bugid");
if (!$projectid) {
show_text($STRING['nobug'], true);
return;
}
// Check for a previously-uploaded attachment with the same name, bug, and project
- $q->query("select a.BugID, Project from Attachment a, Bug b where FileName = '{$HTTP_POST_FILES['attachment']['name']}' and a.BugID = b.BugID");
+ $q->query("select a.bug_id, project_id from attachment a, Bug b where file_name = '{$HTTP_POST_FILES['attachment']['name']}' and a.bug_id = b.bug_id");
while ($ainfo = $q->grab()) {
- if ($bugid == $ainfo['BugID'] && $projectid == $ainfo['Project']) {
+ if ($bugid == $ainfo['bug_id'] && $projectid == $ainfo['project_id']) {
show_attachment_form($bugid, $STRING['dupe_attachment']);
return;
}
@@ -110,7 +110,7 @@
}
@chmod("$filepath/$projectid/$filename", 0766);
- $q->query("insert into Attachment (AttachmentID, BugID, FileName, Description, FileSize, MimeType, CreatedBy, CreatedDate) values (".$q->nextid('Attachment').", $bugid, '{$HTTP_POST_FILES['attachment']['name']}', '$description', {$HTTP_POST_FILES['attachment']['size']}, '{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
+ $q->query("insert into attachment (attachment_id, bug_id, file_name, description, file_size, mime_type, created_by, created_date) values (".$q->nextid('attachment').", $bugid, '{$HTTP_POST_FILES['attachment']['name']}', '$description', {$HTTP_POST_FILES['attachment']['size']}, '{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
$t->set_file('content', 'bugattachmentsuccess.html');
$t->set_var('bugid', $bugid);
}
@@ -124,7 +124,7 @@
return;
}
- $bugexists = $q->grab_field("select count(*) from Bug where BugID = $bugid");
+ $bugexists = $q->grab_field("select count(*) from bug where bug_id = $bugid");
if (!$bugexists) {
show_text($STRING['nobug'], true);
return;
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 19:30:09
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv8672 Modified Files: dbchanges.sql Log Message: Allow for longer color string for non-hex color strings Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dbchanges.sql 2001/08/17 14:36:30 1.3 +++ dbchanges.sql 2001/08/17 19:30:07 1.4 @@ -114,10 +114,10 @@ `severity_name` varchar(30) NOT NULL default '', `severity_desc` text NOT NULL, `sort_order` tinyint(3) unsigned NOT NULL default '0', - `severity_color` varchar(6) NOT NULL default 'FFFFFF', + `severity_color` varchar(10) NOT NULL default '#FFFFFF', PRIMARY KEY (`severity_id`) ); -insert into severity select * from Severity; +insert into severity select *, null from Severity; CREATE TABLE `status` ( `status_id` int(10) unsigned NOT NULL default '0', @@ -154,4 +154,4 @@ `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`version_id`) ); -insert into version select *, CreatedBy, CreatedDate from Version; \ No newline at end of file +insert into version select *, CreatedBy, CreatedDate from Version; |
|
From: Javier S. <ja...@us...> - 2001-08-17 14:55:29
|
Update of /cvsroot/phpbt/phpbt/admin/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv11383
Modified Files:
wrap.html
Log Message:
Adding Severity Admin link
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/templates/default/wrap.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- wrap.html 2001/08/13 13:34:49 1.6
+++ wrap.html 2001/08/17 14:55:25 1.7
@@ -1,72 +1,73 @@
<html>
<head>
- <META HTTP-EQUIV="Expires" CONTENT="-1">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
<title>phpBugTracker Admin - {TITLE}</title>
- <link rel="StyleSheet" href="../global.css" type="text/css">
+ <link rel="StyleSheet" href="../global.css" type="text/css">
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
<table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="640" colspan="2"><hr size="1" width="640"></td>
- </tr>
- <tr>
- <td width="540">
- <font class="navfont"><b>
- [
- <a href="project.php">Projects</a> |
- <a href="user.php">Users</a> |
- <a href="status.php">Statuses</a> |
- <a href="resolution.php">Resolutions</a> |
- <a href="os.php">OSes</a>
- ]
- </b></font>
- </td>
- <td width="100" align="right">
- <font class="navfont"><b>
- [
- <a href="../index.php">User Tools</a>
- ]
- </font>
- </td>
- </tr>
- <tr>
- <td width="640" colspan="2"><hr size="1" width="640"></td>
- </tr>
+ <tr>
+ <td width="640" colspan="2"><hr size="1" width="640"></td>
+ </tr>
+ <tr>
+ <td width="540">
+ <font class="navfont"><b>
+ [
+ <a href="project.php">Projects</a> |
+ <a href="user.php">Users</a> |
+ <a href="status.php">Statuses</a> |
+ <a href="resolution.php">Resolutions</a> |
+ <a href="severity.php">Severity</a> |
+ <a href="os.php">OSes</a>
+ ]
+ </b></font>
+ </td>
+ <td width="100" align="right">
+ <font class="navfont"><b>
+ [
+ <a href="../index.php">User Tools</a>
+ ]
+ </font>
+ </td>
+ </tr>
+ <tr>
+ <td width="640" colspan="2"><hr size="1" width="640"></td>
+ </tr>
</table>
{content}
<table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="640"><hr size="1" width="640"></td>
- </tr>
- <tr>
- <!-- BEGIN loginblock -->
- <td class="login-box">
- <form method="post" action="{me2}">
- <font color="{loginerrorcolor}"><b>{loginerror}<b></font>
- Email: <input type="text" name="username" class="login-box">
- Password: <input type="password" name="password" class="login-box">
- <!--<input type="image" border="0" name="login" value="doit" src="go.gif" width="30" height="20" align="middle" class="login-button">-->
- <input type="hidden" name="login" value="1">
- <input type="submit" value="Login" class="login-box">
- <input type="submit" name="sendpass" value="Email Password" class="login-box" title="Forgot your password? Have it sent to you">
- </form>
- </td>
- <!-- END loginblock -->
- <!-- BEGIN logoutblock -->
- <td>
- <font class="navfont"><b>
- [ Bugs assigned to me: <a href="../query.php?op=mybugs&assignedto=1&open=1" title="Open">{owner_open}</a> / <a href="query.php?op=mybugs&assignedto=1&open=0" title="Closed">{owner_closed}</a>
- | Bugs reported by me: <a href="../query.php?op=mybugs&reportedby=1&open=1" title="Open">{reporter_open}</a> / <a href="query.php?op=mybugs&reportedby=1&open=0" title="Closed">{reporter_closed}</a>
- | <a href="../user.php">Personal Page</a>
- | <a href="../logout.php">Logout {loggedinas}</a>
- ]
- </b></font>
- </td>
- <!-- END logoutblock -->
- </tr>
+ <tr>
+ <td width="640"><hr size="1" width="640"></td>
+ </tr>
+ <tr>
+ <!-- BEGIN loginblock -->
+ <td class="login-box">
+ <form method="post" action="{me2}">
+ <font color="{loginerrorcolor}"><b>{loginerror}<b></font>
+ Email: <input type="text" name="username" class="login-box">
+ Password: <input type="password" name="password" class="login-box">
+ <!--<input type="image" border="0" name="login" value="doit" src="go.gif" width="30" height="20" align="middle" class="login-button">-->
+ <input type="hidden" name="login" value="1">
+ <input type="submit" value="Login" class="login-box">
+ <input type="submit" name="sendpass" value="Email Password" class="login-box" title="Forgot your password? Have it sent to you">
+ </form>
+ </td>
+ <!-- END loginblock -->
+ <!-- BEGIN logoutblock -->
+ <td>
+ <font class="navfont"><b>
+ [ Bugs assigned to me: <a href="../query.php?op=mybugs&assignedto=1&open=1" title="Open">{owner_open}</a> / <a href="query.php?op=mybugs&assignedto=1&open=0" title="Closed">{owner_closed}</a>
+ | Bugs reported by me: <a href="../query.php?op=mybugs&reportedby=1&open=1" title="Open">{reporter_open}</a> / <a href="query.php?op=mybugs&reportedby=1&open=0" title="Closed">{reporter_closed}</a>
+ | <a href="../user.php">Personal Page</a>
+ | <a href="../logout.php">Logout {loggedinas}</a>
+ ]
+ </b></font>
+ </td>
+ <!-- END logoutblock -->
+ </tr>
</table>
<!-- BEGIN adminnavblock -->
<!-- END adminnavblock -->
</body>
-</html>
+</html>
\ No newline at end of file
|
|
From: Javier S. <ja...@us...> - 2001-08-17 14:54:21
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv11137
Added Files:
severity.php
Log Message:
Severity edition page
--- NEW FILE: severity.php ---
<?php
// status.php - Interface to the Status table
// ------------------------------------------------------------------------
// Copyright (c) 2001 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
// phpBugTracker is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// phpBugTracker 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
include '../include.php';
function do_form($severityid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder,$fcolor, $STRING;
// 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 severity (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$q->nextid('severity').", '$fname', '$fdescription', '$fsortorder','$fcolor')");
} else {
$q->query("update severity set severity_name = '$fname', severity_desc = '$fdescription', sort_order = '$fsortorder', severity_color = '$fcolor' where severity_id = '$severityid'");
}
header("Location: $me?");
}
function show_form($severityid = 0, $error = '') {
global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
if ($severityid && !$error) {
$row = $q->grab("select * from 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' => $fname,
'fdescription' => $fdescription,
'fsortorder' => $fsortorder,
'fcolor' => $fcolor));
}
}
function list_items($statusid = 0, $error = '') {
global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
$t->set_file('content','severitylist.html');
$t->set_block('content','row','rows');
if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
$nr = $q->query("select count(*) from severity where severity_id = '$severityid' order by $order $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->query("select * from severity order by $order $sort limit $llimit, $selrange");
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</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);
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'severityid' => $row['severity_id'],
'name' => $row['severity_name'],
'description' => $row['severity_desc'],
'sortorder' => $row['sort_order'],
'color' => $row['severity_color']));
$t->parse('rows','row',true);
}
show_form($statusid, $error);
$t->set_var('TITLE',$TITLE['severity']);
}
$t->set_file('wrap','wrap.html');
$perm->check('Administrator');
if ($op) switch($op) {
case 'add' : list_items(); break;
case 'edit' : list_items($id); break;
} elseif($submit) {
do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
?>
|
|
From: Javier S. <ja...@us...> - 2001-08-17 14:45:58
|
Update of /cvsroot/phpbt/phpbt/admin/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv9055
Modified Files:
oslist.html
Log Message:
litle bug on sort order links
{descriptionurl} become {regexurl}
Index: oslist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/templates/default/oslist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- oslist.html 2001/08/01 13:55:56 1.1
+++ oslist.html 2001/08/17 14:45:54 1.2
@@ -1,52 +1,52 @@
<br>
<table border="0" width="640">
- <tr>
- <td valign="top">
- <b> OS List</b>
- <hr size="1">
- <table border="0">
- <tr bgcolor="#eeeeee">
- <th><a href="{nameurl}">Name</a></th>
- <th><a href="{descriptionurl}">Regex</a></th>
- <th><a href="{sortorderurl}">Sort Order</a></th>
- </tr>
- <!-- BEGIN row -->
- <tr bgcolor="{bgcolor}">
- <td><a href="{me}?op=edit&id={osid}">{name}</a></td>
- <td> {regex}</td>
- <td align="center">{sortorder}</td>
- </tr>
- <!-- END row -->
- </table>
- </td>
- <td valign="top">
- <div align="right"><b>{action} OS </b></div>
- <hr size="1">
- <form action="{me}" method="post">
- <input type="hidden" name="id" value="{fosid}">
- <table border='0'>
- <tr>
- <td colspan="2" align="center" valign="top">
- <font color="#ff0000">{error}</font>
- </td>
- </tr>
- <tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="20" maxlength="40" name="fname" value="{fname}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">Regex:</td>
- <td><input type="text" size="20" maxlength="40" name="fregex" value="{fregex}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">Sort Order:</td>
- <td><input type="text" size="3" maxlength="3" name="fsortorder" value="{fsortorder}"></td>
- </tr>
+ <tr>
+ <td valign="top">
+ <b> OS List</b>
+ <hr size="1">
+ <table border="0">
+ <tr bgcolor="#eeeeee">
+ <th><a href="{nameurl}">Name</a></th>
+ <th><a href="{regexurl}">Regex</a></th>
+ <th><a href="{sortorderurl}">Sort Order</a></th>
+ </tr>
+ <!-- BEGIN row -->
+ <tr bgcolor="{bgcolor}">
+ <td><a href="{me}?op=edit&id={osid}">{name}</a></td>
+ <td> {regex}</td>
+ <td align="center">{sortorder}</td>
+ </tr>
+ <!-- END row -->
+ </table>
+ </td>
+ <td valign="top">
+ <div align="right"><b>{action} OS </b></div>
+ <hr size="1">
+ <form action="{me}" method="post">
+ <input type="hidden" name="id" value="{fosid}">
+ <table border='0'>
+ <tr>
+ <td colspan="2" align="center" valign="top">
+ <font color="#ff0000">{error}</font>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">Name:</td>
+ <td><input type="text" size="20" maxlength="40" name="fname" value="{fname}"></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">Regex:</td>
+ <td><input type="text" size="20" maxlength="40" name="fregex" value="{fregex}"></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">Sort Order:</td>
+ <td><input type="text" size="3" maxlength="3" name="fsortorder" value="{fsortorder}"></td>
+ </tr>
- </table>
- <div align="right">
- <input type='submit' name='submit' value='Submit'>
- </div>
- </form>
- </td>
-</table>
+ </table>
+ <div align="right">
+ <input type='submit' name='submit' value='Submit'>
+ </div>
+ </form>
+ </td>
+</table>
\ No newline at end of file
|
|
From: Javier S. <ja...@us...> - 2001-08-17 14:39:51
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv7513
Modified Files:
version.php user.php status.php resolution.php project.php
os.php component.php
Log Message:
SQL lower case modification, and fields's name change
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- version.php 2001/08/09 13:21:58 1.8
+++ version.php 2001/08/17 14:39:47 1.9
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,60 +24,60 @@
include '../include.php';
function do_form($versionid = 0) {
- global $q, $me, $projectid, $version, $active, $STRING, $now, $u;
-
- // Validation
- if (!$version = trim($version))
- $error = $STRING['giveversion'];
- if ($error) { show_form($versionid, $error); return; }
-
- if (!$active) $active = 0;
- if (!$versionid) {
- $q->query("insert into Version (VersionID, ProjectID, Name, Active, CreatedBy, CreatedDate) values (".$q->nextid('Version').", $projectid, '$version', '$active', $u, $now)");
- } else {
- $q->query("update Version set ProjectID = $projectid, Name = '$version', Active = '$active' where VersionID = '$versionid'");
- }
- header("Location: project.php?op=edit&id=$projectid");
-}
+ global $q, $me, $projectid, $version, $active, $STRING, $now, $u;
+ // Validation
+ if (!$version = trim($version))
+ $error = $STRING['giveversion'];
+ if ($error) { show_form($versionid, $error); return; }
+
+ if (!$active) $active = 0;
+ if (!$versionid) {
+ $q->query("insert into version (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid('version').", $projectid, '$version', '$active', $u, $now)");
+ } else {
+ $q->query("update version set project_id = $projectid, version_name = '$version', active = '$active' where version_id = '$versionid'");
+ }
+ header("Location: project.php?op=edit&id=$projectid");
+}
+
function show_form($versionid = 0, $error = '') {
- global $q, $me, $t, $projectid, $version, $active, $TITLE;
-
- $t->set_file('content','versionform.html');
- if ($versionid && !$error) {
- $row = $q->grab("select v.*, p.Name as ProjectName from Version v left join Project p using(ProjectID) where VersionID = '$versionid'");
- $t->set_var(array(
- 'versionid' => $row['VersionID'],
- 'projectid' => $row['ProjectID'],
- 'project' => $row['ProjectName'],
- 'version' => $row['Name'],
- 'active' => $row['Active'] ? 'checked' : '',
- 'TITLE' => $TITLE['editversion']));
- } else {
- $t->set_var(array(
- 'id' => $id,
- 'me' => $me,
- 'error' => $error,
- 'versionid' => $versionid,
- 'projectid' => $projectid,
- 'project' => $q->grab_field("select Name from Project where ProjectID = $projectid"),
- 'version' => $version,
- 'active' => $active ? ' checked' : '',
- 'TITLE' => $id ? $TITLE['editversion'] : $TITLE['addversion']));
- }
+ global $q, $me, $t, $projectid, $version, $active, $TITLE;
+
+ $t->set_file('content','versionform.html');
+ if ($versionid && !$error) {
+ $row = $q->grab("select v.*, p.project_name as project_name from version v left join project p using(project_id) where version_id = '$versionid'");
+ $t->set_var(array(
+ 'versionid' => $row['version_id'],
+ 'projectid' => $row['project_id'],
+ 'project' => $row['project_name'],
+ 'version' => $row['version_name'],
+ 'active' => $row['active'] ? 'checked' : '',
+ 'TITLE' => $TITLE['editversion']));
+ } else {
+ $t->set_var(array(
+ 'id' => $id,
+ 'me' => $me,
+ 'error' => $error,
+ 'versionid' => $versionid,
+ 'projectid' => $projectid,
+ 'project' => $q->grab_field("select project_name from project where project_id = $projectid"),
+ 'version' => $version,
+ 'active' => $active ? ' checked' : '',
+ 'TITLE' => $id ? $TITLE['editversion'] : $TITLE['addversion']));
+ }
}
$t->set_file('wrap','wrap.html');
if ($op) switch($op) {
- case 'add' : show_form(); break;
- case 'edit' : show_form($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'add' : show_form(); break;
+ case 'edit' : show_form($id); break;
+} elseif($submit) {
+ do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- user.php 2001/08/09 13:21:58 1.13
+++ user.php 2001/08/17 14:39:47 1.14
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,113 +24,113 @@
include '../include.php';
function do_form($userid = 0) {
- global $q, $me, $ffirstname, $flastname, $femail, $fpassword, $usertype, $STRING, $now;
-
- // Validation
- if (!valid_email($femail))
- $error = $STRING['giveemail'];
- elseif (!$fpassword = trim($fpassword))
- $error = $STRING['givepassword'];
- if ($error) { list_items($userid, $error); return; }
-
- if (!$userid) {
- if (ENCRYPTPASS) $mpassword = md5($fpassword);
- else $mpassword = $fpassword;
- $q->query("insert into User (UserID, FirstName, LastName, Email, Password, UserLevel, CreatedDate) values (".$q->nextid('User').", '$ffirstname', '$flastname', '$femail', '$mpassword', $usertype, $now)");
- } else {
- if (ENCRYPTPASS) {
- $oldpass = $q->grab_field("select Password from User where UserID = $userid");
- if ($oldpass != $fpassword) {
- $pquery = "Password = '".md5($fpassword)."',";
- } else {
- $pquery = '';
- }
- } else {
- $pquery = "Password = '$fpassword',";
- }
- $q->query("update User set FirstName = '$ffirstname', LastName = '$flastname', Email = '$femail', $pquery UserLevel = $usertype where UserID = '$userid'");
- }
- header("Location: $me?");
-}
+ global $q, $me, $ffirstname, $flastname, $femail, $fpassword, $usertype, $STRING, $now;
+ // Validation
+ if (!valid_email($femail))
+ $error = $STRING['giveemail'];
+ elseif (!$fpassword = trim($fpassword))
+ $error = $STRING['givepassword'];
+ if ($error) { list_items($userid, $error); return; }
+
+ if (!$userid) {
+ if (ENCRYPTPASS) $mpassword = md5($fpassword);
+ else $mpassword = $fpassword;
+ $q->query("insert into user (user_id, first_name, last_name, email, password, user_level, created_date) values (".$q->nextid('user').", '$ffirstname', '$flastname', '$femail', '$mpassword', $usertype, $now)");
+ } else {
+ if (ENCRYPTPASS) {
+ $oldpass = $q->grab_field("select password from user where user_id = $userid");
+ if ($oldpass != $fpassword) {
+ $pquery = "password = '".md5($fpassword)."',";
+ } else {
+ $pquery = '';
+ }
+ } else {
+ $pquery = "password = '$fpassword',";
+ }
+ $q->query("update user set first_name = '$ffirstname', last_name = '$flastname', email = '$femail', $pquery user_level = $usertype where user_id = '$userid'");
+ }
+ header("Location: $me?");
+}
+
function show_form($userid = 0, $error = '') {
- global $q, $me, $t, $firstname, $lastname, $email, $password, $usertype, $STRING;
-
- if ($userid && !$error) {
- $row = $q->grab("select * from User where UserID = '$userid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fuserid' => $row['UserID'],
- 'ffirstname' => stripslashes($row['FirstName']),
- 'flastname' => stripslashes($row['LastName']),
- 'femail' => $row['Email'],
- 'fpassword' => $row['Password'],
- 'usertype' => build_select('authlevels',$row['UserLevel']),
- 'createddate' => $row['CreatedDate']));
- } else {
- $t->set_var(array(
- 'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fuserid' => $userid,
- 'ffirstname' => stripslashes($firstname),
- 'flastname' => stripslashes($lastname),
- 'femail' => $email,
- 'fpassword' => $password ? $password : genpassword(10),
- 'usertype' => build_select('authlevels',$usertype),
- 'createddate' => $createddate));
- }
+ global $q, $me, $t, $firstname, $lastname, $email, $password, $usertype, $STRING;
+
+ if ($userid && !$error) {
+ $row = $q->grab("select * from user where user_id = '$userid'");
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fuserid' => $row['user_id'],
+ 'ffirstname' => stripslashes($row['first_name']),
+ 'flastname' => stripslashes($row['last_name']),
+ 'femail' => $row['email'],
+ 'fpassword' => $row['password'],
+ 'usertype' => build_select('authlevels',$row['user_level']),
+ 'createddate' => $row['created_date']));
+ } else {
+ $t->set_var(array(
+ 'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fuserid' => $userid,
+ 'ffirstname' => stripslashes($firstname),
+ 'flastname' => stripslashes($lastname),
+ 'femail' => $email,
+ 'fpassword' => $password ? $password : genpassword(10),
+ 'usertype' => build_select('authlevels',$usertype),
+ 'createddate' => $createddate));
+ }
}
function list_items($userid = 0, $error = '') {
- global $me, $q, $t, $selrange, $order, $sort, $select, $STRING, $TITLE, $page;
-
- $t->set_file('content','userlist.html');
- $t->set_block('content','row','rows');
-
- if (!$order) { $order = '1'; $sort = 'asc'; }
- $nr = $q->grab_field("select count(*) from User");
-
- 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->query("select UserID, concat(FirstName,' ',LastName) as FullName, Email,
- CreatedDate, UserLevel from User order by $order $sort
- limit $llimit, $selrange");
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'userid' => 'UserID',
- 'name' => 'LastName',
- 'login' => 'Email',
- 'password' => 'Password',
- 'userlevel' => 'UserLevel',
- 'date' => 'CreatedDate');
-
- sorting_headers($me, $headers, $order, $sort);
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'userid' => $row['UserID'],
- 'name' => stripslashes($row['FullName']),
- 'email' => $row['Email'],
- 'userlevel' => $select['authlevels'][$row['UserLevel']],
- 'date' => date(DATEFORMAT,$row['CreatedDate'])));
- $t->parse('rows','row',true);
- }
-
- show_form($userid, $error);
- $t->set_var('TITLE',$TITLE['user']);
+ global $me, $q, $t, $selrange, $order, $sort, $select, $STRING, $TITLE, $page;
+
+ $t->set_file('content','userlist.html');
+ $t->set_block('content','row','rows');
+
+ if (!$order) { $order = '1'; $sort = 'asc'; }
+ $nr = $q->grab_field("select count(*) from user");
+
+ 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->query("select user_id, concat(first_name,' ',last_name) as fullname, email,
+ created_date, user_level from user order by $order $sort
+ limit $llimit, $selrange");
+
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'userid' => 'user_id',
+ 'name' => 'last_name',
+ 'login' => 'email',
+ 'password' => 'password',
+ 'userlevel' => 'user_level',
+ 'date' => 'created_date');
+
+ sorting_headers($me, $headers, $order, $sort);
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'userid' => $row['user_id'],
+ 'name' => stripslashes($row['fullname']),
+ 'email' => $row['email'],
+ 'userlevel' => $select['authlevels'][$row['user_level']],
+ 'date' => date(DATEFORMAT,$row['created_date'])));
+ $t->parse('rows','row',true);
+ }
+
+ show_form($userid, $error);
+ $t->set_var('TITLE',$TITLE['user']);
}
$t->set_file('wrap','wrap.html');
@@ -138,14 +138,14 @@
$perm->check('Administrator');
if ($op) switch($op) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($id); break;
+} elseif($submit) {
+ do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- status.php 2001/08/09 12:54:47 1.8
+++ status.php 2001/08/17 14:39:47 1.9
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,91 +24,91 @@
include '../include.php';
function do_form($statusid = 0) {
- global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
-
- // 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 Status (StatusID, Name, Description, SortOrder) values (".$q->nextid('Status').", '$fname', '$fdescription', '$fsortorder')");
- } else {
- $q->query("update Status set Name = '$fname', Description = '$fdescription', SortOrder = '$fsortorder' where StatusID = '$statusid'");
- }
- header("Location: $me?");
-}
+ global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
+ // 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 status (status_id, status_name, status_desc, sort_order) values (".$q->nextid('status').", '$fname', '$fdescription', '$fsortorder')");
+ } else {
+ $q->query("update status set status_name = '$fname', status_desc = '$fdescription', sort_order = '$fsortorder' where status_id = '$statusid'");
+ }
+ header("Location: $me?");
+}
+
function show_form($statusid = 0, $error = '') {
- global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
-
- if ($statusid && !$error) {
- $row = $q->grab("select * from Status where StatusID = '$statusid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fstatusid' => $row['StatusID'],
- 'fname' => $row['Name'],
- 'fdescription' => $row['Description'],
- 'fsortorder' => $row['SortOrder']));
- } else {
- $t->set_var(array(
- 'action' => $statusid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fstatusid' => $statusid,
- 'fname' => $fname,
- 'fdescription' => $fdescription,
- 'fsortorder' => $fsortorder));
- }
+ global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
+
+ if ($statusid && !$error) {
+ $row = $q->grab("select * from 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' => $fname,
+ 'fdescription' => $fdescription,
+ 'fsortorder' => $fsortorder));
+ }
}
function list_items($statusid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
-
- $t->set_file('content','statuslist.html');
- $t->set_block('content','row','rows');
-
- if (!$order) { $order = 'SortOrder'; $sort = 'asc'; }
- $nr = $q->query("select count(*) from Status where StatusID = '$statusid' order by $order $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->query("select * from Status order by $order $sort limit $llimit, $selrange");
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['nostatuses']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'statusid' => 'StatusID',
- 'name' => 'Name',
- 'description' => 'Description',
- 'sortorder' => 'SortOrder');
-
- sorting_headers($me, $headers, $order, $sort);
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'statusid' => $row['StatusID'],
- 'name' => $row['Name'],
- 'description' => $row['Description'],
- 'sortorder' => $row['SortOrder']));
- $t->parse('rows','row',true);
- }
-
- show_form($statusid, $error);
- $t->set_var('TITLE',$TITLE['status']);
+ global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+
+ $t->set_file('content','statuslist.html');
+ $t->set_block('content','row','rows');
+
+ if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ $nr = $q->query("select count(*) from status where status_id = '$statusid' order by $order $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->query("select * from status order by $order $sort limit $llimit, $selrange");
+
+ 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);
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ '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']);
}
$t->set_file('wrap','wrap.html');
@@ -116,14 +116,14 @@
$perm->check('Administrator');
if ($op) switch($op) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($id); break;
+} elseif($submit) {
+ do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- resolution.php 2001/08/09 12:54:47 1.8
+++ resolution.php 2001/08/17 14:39:47 1.9
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,91 +24,91 @@
include '../include.php';
function do_form($resolutionid = 0) {
- global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
-
- // 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 Resolution (ResolutionID, Name, Description, SortOrder) values (".$q->nextid('Resolution').", '$fname', '$fdescription', '$fsortorder')");
- } else {
- $q->query("update Resolution set Name = '$fname', Description = '$fdescription', SortOrder = '$fsortorder' where ResolutionID = '$resolutionid'");
- }
- header("Location: $me?");
-}
+ global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
+ // 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 resolution (resolution_id, resolution_name, resolution_desc, sort_order) values (".$q->nextid('resolution').", '$fname', '$fdescription', '$fsortorder')");
+ } else {
+ $q->query("update resolution set resolution_name = '$fname', resolution_desc = '$fdescription', sort_order = '$fsortorder' where resolution_id = '$resolutionid'");
+ }
+ header("Location: $me?");
+}
+
function show_form($resolutionid = 0, $error = '') {
- global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
-
- if ($resolutionid && !$error) {
- $row = $q->grab("select * from Resolution where ResolutionID = '$resolutionid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fresolutionid' => $row['ResolutionID'],
- 'fname' => $row['Name'],
- 'fdescription' => $row['Description'],
- 'fsortorder' => $row['SortOrder']));
- } else {
- $t->set_var(array(
- 'action' => $resolutionid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fresolutionid' => $resolutionid,
- 'fname' => $fname,
- 'fdescription' => $fdescription,
- 'fsortorder' => $fsortorder));
- }
+ global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
+
+ if ($resolutionid && !$error) {
+ $row = $q->grab("select * from 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' => $fname,
+ 'fdescription' => $fdescription,
+ 'fsortorder' => $fsortorder));
+ }
}
function list_items($resolutionid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
-
- $t->set_file('content','resolutionlist.html');
- $t->set_block('content','row','rows');
-
- if (!$order) { $order = 'SortOrder'; $sort = 'asc'; }
- $nr = $q->query("select count(*) from Resolution where ResolutionID = '$resolutionid' order by $order $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->query("select * from Resolution order by $order $sort limit $llimit, $selrange");
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['noresolutions']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'resolutionid' => 'ResolutionID',
- 'name' => 'Name',
- 'description' => 'Description',
- 'sortorder' => 'SortOrder');
-
- sorting_headers($me, $headers, $order, $sort);
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'resolutionid' => $row['ResolutionID'],
- 'name' => $row['Name'],
- 'description' => $row['Description'],
- 'sortorder' => $row['SortOrder']));
- $t->parse('rows','row',true);
- }
-
- show_form($resolutionid, $error);
- $t->set_var('TITLE',$TITLE['resolution']);
+ global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+
+ $t->set_file('content','resolutionlist.html');
+ $t->set_block('content','row','rows');
+
+ if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ $nr = $q->query("select count(*) from resolution where resolution_id = '$resolutionid' order by $order $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->query("select * from resolution order by $order $sort limit $llimit, $selrange");
+
+ 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);
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ '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']);
}
$t->set_file('wrap','wrap.html');
@@ -116,14 +116,14 @@
$perm->check('Administrator');
if ($op) switch($op) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($id); break;
+} elseif($submit) {
+ do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-
-?>
+
+?>
\ No newline at end of file
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- project.php 2001/08/09 13:21:58 1.9
+++ project.php 2001/08/17 14:39:47 1.10
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,173 +24,173 @@
include '../include.php';
function do_form($projectid = 0) {
- global $q, $me, $name, $description, $active, $version, $u, $STRING, $now;
-
- // Validation
- if (!$name = htmlspecialchars(trim($name)))
- $error = $STRING['givename'];
- elseif (!$description = htmlspecialchars(trim($description)))
- $error = $STRING['givedesc'];
- elseif (!projectid and !$version = htmlspecialchars(trim($version)))
- $error = $STRING['giveversion'];
- if ($error) { show_form($projectid, $error); return; }
-
- if (!$active) $active = 0;
- if (!$projectid) {
- $projectid = $q->nextid('Project');
- $q->query("insert into Project (ProjectID, Name, Description, Active, CreatedBy, CreatedDate) values ($projectid , '$name', '$description', $active, $u, $now)");
- $q->query("insert into Version (VersionID, ProjectID, Name, Active, CreatedBy, CreatedDate) values (".$q->nextid('Version').", $projectid, '$version', $active, $u, $now)");
- $location = "component.php?op=add&projectid=$projectid";
- } else {
- $q->query("update Project set Name = '$name', Description = '$description', Active = $active where ProjectID = $projectid");
- $location = "$me?";
- }
- header("Location: $location");
-}
+ global $q, $me, $name, $description, $active, $version, $u, $STRING, $now;
+ // Validation
+ if (!$name = htmlspecialchars(trim($name)))
+ $error = $STRING['givename'];
+ elseif (!$description = htmlspecialchars(trim($description)))
+ $error = $STRING['givedesc'];
+ elseif (!projectid and !$version = htmlspecialchars(trim($version)))
+ $error = $STRING['giveversion'];
+ if ($error) { show_form($projectid, $error); return; }
+
+ if (!$active) $active = 0;
+ if (!$projectid) {
+ $projectid = $q->nextid('project');
+ $q->query("insert into project (project_id, project_name, project_desc, active, created_by, created_date) values ($projectid , '$name', '$description', $active, $u, $now)");
+ $q->query("insert into version (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid('version').", $projectid, '$version', $active, $u, $now)");
+ $location = "component.php?op=add&projectid=$projectid";
+ } else {
+ $q->query("update project set project_name = '$name', project_desc = '$description', active = $active where project_id = $projectid");
+ $location = "$me?";
+ }
+ header("Location: $location");
+}
+
function show_form($projectid = 0, $error = '') {
- global $q, $me, $t, $name, $description, $active, $version, $TITLE;
-
- $t->set_file('content','projectform.html');
- $t->set_block('content','box','details');
- $t->set_block('content','vfield','verfield');
- if ($projectid && !$error) {
- $row = $q->grab("select * from Project where ProjectID = $projectid");
- $t->set_var(array(
- 'projectid' => $row['ProjectID'],
- 'name' => $row['Name'],
- 'description' => $row['Description'],
- 'active' => $row['Active'] ? 'checked' : '',
- 'createdby' => $row['CreatedBy'],
- 'createddate' => $row['CreatedDate'],
- 'TITLE' => $TITLE['editproject']
- ));
- } else {
- $t->set_var(array(
- 'error' => $error,
- 'projectid' => $projectid,
- 'name' => $name,
- 'description' => $description,
- 'active' => (isset($active) and !$active) ? '' : 'checked',
- 'createdby' => $createdby,
- 'createddate' => $createddate,
- 'TITLE' => $projectid ? $TITLE['editproject'] : $TITLE['addproject']
- ));
- }
- if ($projectid) {
- $t->set_var('verfield','');
- list_components($projectid);
- list_versions($projectid);
- $t->parse('details','box',true);
- } else {
- $t->set_var(array(
- 'details' => '',
- 'version' => $version
- ));
- $t->parse('verfield','vfield',true);
- }
+ global $q, $me, $t, $name, $description, $active, $version, $TITLE;
+
+ $t->set_file('content','projectform.html');
+ $t->set_block('content','box','details');
+ $t->set_block('content','vfield','verfield');
+ if ($projectid && !$error) {
+ $row = $q->grab("select * from project where project_id = $projectid");
+ $t->set_var(array(
+ 'projectid' => $row['project_id'],
+ 'name' => $row['project_name'],
+ 'description' => $row['project_desc'],
+ 'active' => $row['active'] ? 'checked' : '',
+ 'createdby' => $row['created_by'],
+ 'createddate' => $row['created_date'],
+ 'TITLE' => $TITLE['editproject']
+ ));
+ } else {
+ $t->set_var(array(
+ 'error' => $error,
+ 'projectid' => $projectid,
+ 'name' => $name,
+ 'description' => $description,
+ 'active' => (isset($active) and !$active) ? '' : 'checked',
+ 'createdby' => $createdby,
+ 'createddate' => $createddate,
+ 'TITLE' => $projectid ? $TITLE['editproject'] : $TITLE['addproject']
+ ));
+ }
+ if ($projectid) {
+ $t->set_var('verfield','');
+ list_components($projectid);
+ list_versions($projectid);
+ $t->parse('details','box',true);
+ } else {
+ $t->set_var(array(
+ 'details' => '',
+ 'version' => $version
+ ));
+ $t->parse('verfield','vfield',true);
+ }
}
function list_versions($projectid) {
- global $q, $t, $STRING;
-
- $t->set_block('box','verrow','verrows');
- $q->query("select * from Version where ProjectID = $projectid");
- if (!$q->num_rows()) {
- $t->set_var('verrows',"<tr><td colspan='2' align='center'>{$STRING['noversions']}</td></tr>");
- return;
- }
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'verid' => $row['VersionID'],
- 'vername' => $row['Name'],
- 'verdate' => date(DATEFORMAT,$row['CreatedDate']),
- 'veractive' => $row['Active'] ? 'Y' : 'N'
- ));
- $t->parse('verrows','verrow',true);
- }
+ global $q, $t, $STRING;
+
+ $t->set_block('box','verrow','verrows');
+ $q->query("select * from version where project_id = $projectid");
+ if (!$q->num_rows()) {
+ $t->set_var('verrows',"<tr><td colspan='2' align='center'>{$STRING['noversions']}</td></tr>");
+ return;
+ }
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'verid' => $row['version_id'],
+ 'vername' => $row['version_name'],
+ 'verdate' => date(DATEFORMAT,$row['created_date']),
+ 'veractive' => $row['active'] ? 'Y' : 'N'
+ ));
+ $t->parse('verrows','verrow',true);
+ }
}
-
+
function list_components($projectid) {
- global $q, $t, $STRING;
-
- $t->set_block('box','row','rows');
- $q->query("select * from Component where ProjectID = $projectid");
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td colspan='2' align='center'>{$STRING['nocomponents']}</td></tr>");
- return;
- }
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'compid' => $row['ComponentID'],
- 'compname' => $row['Name'],
- 'compdesc' => stripslashes($row['Description']),
- 'owner' => $row['Owner'],
- 'compactive' => $row['Active'] ? 'Y' : 'N',
- 'createdby' => $row['CreatedBy'],
- 'compdate' => date(DATEFORMAT,$row['CreatedDate']),
- 'lastmodifiedby' => $row['LastModifiedBy'],
- 'lastmodifieddate' => date(DATEFORMAT,$row['LastModifiedDate'])
- ));
- $t->parse('rows','row',true);
- }
+ global $q, $t, $STRING;
+
+ $t->set_block('box','row','rows');
+ $q->query("select * from component where project_id = $projectid");
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td colspan='2' align='center'>{$STRING['nocomponents']}</td></tr>");
+ return;
+ }
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'compid' => $row['component_id'],
+ 'compname' => $row['component_name'],
+ 'compdesc' => stripslashes($row['project_desc']),
+ 'owner' => $row['Owner'],
+ 'compactive' => $row['active'] ? 'Y' : 'N',
+ 'createdby' => $row['created_by'],
+ 'compdate' => date(DATEFORMAT,$row['created_date']),
+ 'lastmodifiedby' => $row['last_modified_by'],
+ 'lastmodifieddate' => date(DATEFORMAT,$row['last_modified_date'])
+ ));
+ $t->parse('rows','row',true);
+ }
}
function list_items() {
- global $me, $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
-
- $t->set_file('content','projectlist.html');
- $t->set_block('content','row','rows');
-
- if (!$order) { $order = '1'; $sort = 'asc'; }
- $nr = $q->query("select count(*) from Project");
-
- 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,
- 'TITLE' => $TITLE['project']
- ));
-
- $q->query("select * from Project order by $order $sort limit $llimit, $selrange");
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['noprojects']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'projectid' => 'ProjectID',
- 'name' => 'Name',
- 'description' => 'Description',
- 'active' => 'Active',
- 'createdby' => 'CreatedBy',
- 'createddate' => 'CreatedDate'
- );
-
- sorting_headers($me, $headers, $order, $sort);
- $i = 0;
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'projectid' => $row['ProjectID'],
- 'name' => $row['Name'],
- 'description' => stripslashes($row['Description']),
- 'active' => $row['Active'] ? 'Y' : 'N',
- 'createdby' => $row['CreatedBy'],
- 'createddate' => date(DATEFORMAT,$row['CreatedDate'])
- ));
- $t->parse('rows','row',true);
- }
+ global $me, $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
+
+ $t->set_file('content','projectlist.html');
+ $t->set_block('content','row','rows');
+
+ if (!$order) { $order = '1'; $sort = 'asc'; }
+ $nr = $q->query("select count(*) from project");
+
+ 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,
+ 'TITLE' => $TITLE['project']
+ ));
+
+ $q->query("select * from project order by $order $sort limit $llimit, $selrange");
+
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['noprojects']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'projectid' => 'project_id',
+ 'name' => 'project_name',
+ 'description' => 'project_desc',
+ 'active' => 'active',
+ 'createdby' => 'created_by',
+ 'createddate' => 'created_date'
+ );
+
+ sorting_headers($me, $headers, $order, $sort);
+ $i = 0;
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'projectid' => $row['project_id'],
+ 'name' => $row['project_name'],
+ 'description' => stripslashes($row['project_desc']),
+ 'active' => $row['active'] ? 'Y' : 'N',
+ 'createdby' => $row['created_by'],
+ 'createddate' => date(DATEFORMAT,$row['created_date'])
+ ));
+ $t->parse('rows','row',true);
+ }
}
$t->set_file('wrap','wrap.html');
@@ -198,14 +198,14 @@
$perm->check('Administrator');
if (isset($_gv['op'])) switch($_gv['op']) {
- case 'add' : show_form(); break;
- case 'edit' : show_form($_gv['id']); break;
-} elseif(isset($_pv['submit'])) {
- do_form($_pv['id']);
+ case 'add' : show_form(); break;
+ case 'edit' : show_form($_gv['id']); break;
+} elseif(isset($_pv['submit'])) {
+ do_form($_pv['id']);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- os.php 2001/08/09 12:54:47 1.7
+++ os.php 2001/08/17 14:39:47 1.8
@@ -10,12 +10,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// phpBugTracker 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 General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -24,90 +24,90 @@
include '../include.php';
function do_form($osid = 0) {
- global $q, $me, $fname, $fregex, $fsortorder, $STRING;
-
- // Validation
- if (!$fname = trim($fname))
- $error = $STRING['givename'];
- if ($error) { list_items($osid, $error); return; }
-
- if (!$osid) {
- $q->query("insert into OS (OSID, Name, Regex, SortOrder) values (".$q->nextid('OS').", '$fname', '$fregex', '$fsortorder')");
- } else {
- $q->query("update OS set Name = '$fname', Regex = '$fregex', SortOrder = '$fsortorder' where OSID = '$osid'");
- }
- header("Location: $me?");
-}
+ global $q, $me, $fname, $fregex, $fsortorder, $STRING;
+ // Validation
+ if (!$fname = trim($fname))
+ $error = $STRING['givename'];
+ if ($error) { list_items($osid, $error); return; }
+
+ if (!$osid) {
+ $q->query("insert into os (os_id, os_name, regex, sort_order) values (".$q->nextid('os').", '$fname', '$fregex', '$fsortorder')");
+ } else {
+ $q->query("update os set os_name = '$fname', regex = '$fregex', sort_order = '$fsortorder' where os_id = '$osid'");
+ }
+ header("Location: $me?");
+}
+
function show_form($osid = 0, $error = '') {
- global $q, $me, $t, $fname, $fregex, $fsortorder, $STRING;
-
- #$t->set_file('content','osform.html');
- if ($osid && !$error) {
- $row = $q->grab("select * from OS where OSID = '$osid'");
- $t->set_var(array(
- 'action' => $STRING['edit'],
- 'fosid' => $row['OSID'],
- 'fname' => $row['Name'],
- 'fregex' => $row['Regex'],
- 'fsortorder' => $row['SortOrder']));
- } else {
- $t->set_var(array(
- 'action' => $osid ? $STRING['edit'] : $STRING['addnew'],
- 'error' => $error,
- 'fosid' => $osid,
- 'fname' => $fname,
- 'fregex' => $fregex,
- 'fsortorder' => $fsortorder));
- }
+ global $q, $me, $t, $fname, $fregex, $fsortorder, $STRING;
+
+ #$t->set_file('content','osform.html');
+ if ($osid && !$error) {
+ $row = $q->grab("select * from os where os_id = '$osid'");
+ $t->set_var(array(
+ 'action' => $STRING['edit'],
+ 'fosid' => $row['os_id'],
+ 'fname' => $row['os_name'],
+ 'fregex' => $row['regex'],
+ 'fsortorder' => $row['sort_order']));
+ } else {
+ $t->set_var(array(
+ 'action' => $osid ? $STRING['edit'] : $STRING['addnew'],
+ 'error' => $error,
+ 'fosid' => $osid,
+ 'fname' => $fname,
+ 'fregex' => $fregex,
+ 'fsortorder' => $fsortorder));
+ }
}
function list_items($osid = 0, $error = '') {
- global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
-
- $t->set_file('content','oslist.html');
- $t->set_block('content','row','rows');
-
- if (!$order) { $order = 'SortOrder'; $sort = 'asc'; }
- $nr = $q->query("select count(*) from OS where OSID = '$osid' order by $order $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->query("select * from OS order by $order $sort limit $llimit, $selrange");
-
- if (!$q->num_rows()) {
- $t->set_var('rows',"<tr><td>{$STRING['nooses']}</td></tr>");
- return;
- }
-
- $headers = array(
- 'osid' => 'OSID',
- 'name' => 'Name',
- 'regex' => 'Regex',
- 'sortorder' => 'SortOrder');
-
- sorting_headers($me, $headers, $order, $sort);
-
- while ($row = $q->grab()) {
- $t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'osid' => $row['OSID'],
- 'name' => $row['Name'],
- 'regex' => $row['Regex'],
- 'sortorder' => $row['SortOrder']));
- $t->parse('rows','row',true);
- }
-
- show_form($osid, $error);
- $t->set_var('TITLE',$TITLE['os']);
+ global $q, $t, $selrange, $order, $sort, $STRING, $TITLE;
+
+ $t->set_file('content','oslist.html');
+ $t->set_block('content','row','rows');
+
+ if (!$order) { $order = 'sort_order'; $sort = 'asc'; }
+ $nr = $q->query("select count(*) from os where os_id = '$osid' order by $order $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->query("select * from os order by $order $sort limit $llimit, $selrange");
+
+ if (!$q->num_rows()) {
+ $t->set_var('rows',"<tr><td>{$STRING['nooses']}</td></tr>");
+ return;
+ }
+
+ $headers = array(
+ 'osid' => 'os_id',
+ 'name' => 'os_name',
+ 'regex' => 'regex',
+ 'sortorder' => 'sort_order');
+
+ sorting_headers($me, $headers, $order, $sort);
+
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'osid' => $row['os_id'],
+ 'name' => $row['os_name'],
+ 'regex' => $row['regex'],
+ 'sortorder' => $row['sort_order']));
+ $t->parse('rows','row',true);
+ }
+
+ show_form($osid, $error);
+ $t->set_var('TITLE',$TITLE['os']);
}
$t->set_file('wrap','wrap.html');
@@ -115,14 +115,14 @@
$perm->check('Administrator');
if ($op) switch($op) {
- case 'add' : list_items(); break;
- case 'edit' : list_items($id); break;
-} elseif($submit) {
- do_form($id);
+ case 'add' : list_items(); break;
+ case 'edit' : list_items($id); break;
+} elseif($submit) {
+ do_form($id);
} else list_items();
$t->pparse('main',array('content','wrap','main'));
page_close();
-?>
+?>
\ No newline at end of file
Index: component.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/component.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- component.php 2001/08/09 13:21:58 1.7
+++ component.php 2001/08/17 14:39:47 1.8
@@ -37,9 +37,9 @@
if (!$owner) $owner = 0;
if (!$active) $active = 0;
if (!$componentid) {
- $q->query("insert into Component (ComponentID, ProjectID, Name, Description, Owner, Active, CreatedBy, CreatedDate, LastModifiedBy, LastModifiedDate) values (".$q->nextid('Component').", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
+ $q->query("insert into component (component_id, project_id, component_name, component_desc, owner, active, created_by, created_date, last_modified_by, last_modified_date) values (".$q->nextid('component ').", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
} else {
- $q->query("update Component set Name = '$name', Description = '$description', Owner = $owner, Active = $active, LastModifiedBy = $u, LastModifiedDate = $time where ComponentID = '$componentid'");
+ $q->query("update component set component_name = '$name', component_desc = '$description', owner = $owner, active = $active, last_modified_by = $u, last_modified_date = $time where component_id = '$componentid'");
}
header("Location: project.php?op=edit&id=$projectid");
}
@@ -50,19 +50,19 @@
$t->set_file('content','componentform.html');
if ($componentid && !$error) {
- $row = $q->grab("select c.*, p.Name as ProjectName from Component c left join Project p using (ProjectID) where ComponentID = '$componentid'");
+ $row = $q->grab("select c.*, p.project_name as project_name from component c left join project p using (project_id) where component_id = '$componentid'");
$t->set_var(array(
- 'componentid' => $row['ComponentID'],
- 'projectid' => $row['ProjectID'],
- 'project' => $row['ProjectName'],
- 'name' => $row['Name'],
- 'description' => $row['Description'],
- 'owner' => build_select('owner',$row['Owner']),
- 'active' => $row['Active'] ? 'checked' : '',
- 'createdby' => $row['CreatedBy'],
- 'createddate' => $row['CreatedDate'],
- 'lastmodifiedby' => $row['LastModifiedBy'],
- 'lastmodifieddate' => $row['LastModifiedDate'],
+ 'componentid' => $row['component_id'],
+ 'projectid' => $row['project_id'],
+ 'project' => $row['project_name'],
+ 'name' => $row['component_name'],
+ 'description' => $row['component_desc'],
+ 'owner' => build_select('owner',$row['owner']),
+ 'active' => $row['active'] ? 'checked' : '',
+ 'createdby' => $row['created_by'],
+ 'createddate' => $row['created_date'],
+ 'lastmodifiedby' => $row['last_modified_by'],
+ 'lastmodifieddate' => $row['last_modified_date'],
'TITLE' => $TITLE['editcomponent']));
} else {
$t->set_var(array(
@@ -70,7 +70,7 @@
'error' => $error,
'componentid' => $componentid,
'projectid' => $projectid,
- 'project' => $q->grab_field("select Name from Project where ProjectID = $projectid"),
+ 'project' => $q->grab_field("select project_name from project where project_id = $projectid"),
'name' => $name,
'description' => $description,
'owner' => build_select('owner',$owner),
|
|
From: Javier S. <ja...@us...> - 2001-08-17 14:36:33
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv6702 Modified Files: dbchanges.sql Log Message: Adding severity_color field on table severity Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dbchanges.sql 2001/08/17 03:02:57 1.2 +++ dbchanges.sql 2001/08/17 14:36:30 1.3 @@ -114,6 +114,7 @@ `severity_name` varchar(30) NOT NULL default '', `severity_desc` text NOT NULL, `sort_order` tinyint(3) unsigned NOT NULL default '0', + `severity_color` varchar(6) NOT NULL default 'FFFFFF', PRIMARY KEY (`severity_id`) ); insert into severity select * from Severity; @@ -134,7 +135,7 @@ `email` char(60) NOT NULL default '', `password` char(40) NOT NULL default '', `user_level` tinyint(3) unsigned NOT NULL default '1', - `created_by` int(10) unsigned NOT NULL default '0', + `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', @@ -153,4 +154,4 @@ `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`version_id`) ); -insert into version select *, CreatedBy, CreatedDate from Version; +insert into version select *, CreatedBy, CreatedDate from Version; \ No newline at end of file |
|
From: Benjamin C. <bc...@us...> - 2001-08-17 04:06:09
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv19303
Modified Files:
include.php query.php
Log Message:
DB conversion
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- include.php 2001/08/16 23:12:52 1.29
+++ include.php 2001/08/17 04:06:06 1.30
@@ -125,15 +125,15 @@
if (ENCRYPTPASS) {
$password = md5($password);
}
- $u = $q->grab("select * from User where Email = '$username' and Password = '$password' and UserLevel > 0");
+ $u = $q->grab("select * from user where email = '$username' and password = '$password' and user_level > 0");
if (!$q->num_rows()) {
return 'nobody';
} else {
- $this->auth['fname'] = $u['FirstName'];
- $this->auth['lname'] = $u['LastName'];
- $this->auth['email'] = $u['Email'];
- $this->auth['perm'] = $select['authlevels'][$u['UserLevel']];
- return $u['UserID'];
+ $this->auth['fname'] = $u['first_name'];
+ $this->auth['lname'] = $u['last_name'];
+ $this->auth['email'] = $u['email'];
+ $this->auth['perm'] = $select['authlevels'][$u['user_level']];
+ return $u['user_id'];
}
}
}
@@ -165,9 +165,9 @@
$this->set_block('wrap', 'adminnavblock', 'anblock');
if ($u && $u != 'nobody') {
list($owner_open, $owner_closed) =
- $q->grab("select sum(if(s.Name in ('Unconfirmed','New','Assigned','Reopened'),1,0)) as Open, sum(if(s.Name not in ('Unconfirmed','New','Assigned','Reopened'),1,0)) as Closed from Bug b left join Status s on Status = StatusID where AssignedTo = $u");
+ $q->grab("select sum(if(status_name in ('Unconfirmed','New','Assigned','Reopened'),1,0)), sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0)) from bug b left join status s using(status_id) where assigned_to = $u");
list($reporter_open, $reporter_closed) =
- $q->grab("select sum(if(s.Name in ('Unconfirmed','New','Assigned','Reopened'),1,0)) as Open, sum(if(s.Name not in ('Unconfirmed','New','Assigned','Reopened'),1,0)) as Closed from Bug b left join Status s on Status = StatusID where CreatedBy = $u");
+ $q->grab("select sum(if(status_name in ('Unconfirmed','New','Assigned','Reopened'),1,0)), sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0)) from bug b left join status s using(status_id) where created_by = $u");
$this->set_var(array(
'loggedinas' => $auth->auth['email'],
'liblock' => '',
@@ -225,62 +225,51 @@
///
/// Build a select box with the item matching $value selected
-function build_select($box, $value='',$project=0) {
- #static $select;
+function build_select($box, $value = '', $project = 0) {
global $q, $select;
-
- //include_once "select.php";
+
+ $text = '';
+ $queries = array(
+ 'severity' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'status' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'resolution' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'project' => "select {$box}_id, {$box}_name from $box where active = 1 order by {$box}_name",
+ 'component' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name",
+ 'version' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name"
+ );
+
switch($box) {
- case 'Severity' :
- case 'Status' :
- case 'Resolution' :
- $q->query("Select {$box}ID, Name from $box where SortOrder order by SortOrder");
- while ($row = $q->grab()) {
- if ($value == $row[$box.'ID'] and $value != '') $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.$row[$box.'ID']."\"$sel>{$row['Name']}</option>";
- }
- break;
- case 'Project' :
- $q->query("Select {$box}ID, Name from $box where Active order by Name");
+ case 'severity' :
+ case 'status' :
+ case 'resolution' :
+ case 'project' :
+ case 'component' :
+ case 'version' :
+ $q->query($queries[$box]);
while ($row = $q->grab()) {
- if ($value == $row[$box.'ID'] and $value != '') $sel = ' selected';
+ if ($value == $row[$box.'_id'] and $value != '') $sel = ' selected';
else $sel = '';
- $text .= '<option value="'.$row[$box.'ID']."\"$sel>{$row['Name']}</option>";
+ $text .= '<option value="'.
+ $row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
}
break;
- case 'Component' :
- $q->query("Select {$box}ID, Name from $box where ProjectID = $project order by Name");
+ case 'os' :
+ $q->query("select {$box}_id, {$box}_name, regex from $box order by sort_order");
while ($row = $q->grab()) {
- if ($value == $row[$box.'ID'] and $value != '') $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.$row[$box.'ID']."\"$sel>{$row['Name']}</option>";
- }
- break;
- case 'OS' :
- $q->query("Select {$box}ID, Name, Regex from $box order by SortOrder");
- while ($row = $q->grab()) {
if ($value == '' and $row['Regex'] and
preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
elseif ($value == $row[$box.'ID']) $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.$row[$box.'ID']."\"$sel>{$row['Name']}</option>";
- }
- break;
- case 'Version' :
- $q->query("Select {$box}ID, Name from $box where ProjectID = $project order by Name");
- while ($row = $q->grab()) {
- if ($value == $row[$box.'ID']) $sel = ' selected';
else $sel = '';
- $text .= '<option value="'.$row[$box.'ID']."\"$sel>{$row['Name']}</option>";
+ $text .= '<option value="'.
+ $row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
}
break;
case 'owner' :
- $q->query("Select UserID, Email from User where UserLevel > 1 order by Email");
+ $q->query("Select user_id, email from user where user_level > 1 order by email");
while ($row = $q->grab()) {
- if ($value == $row['UserID']) $sel = ' selected';
+ if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
- $text .= '<option value="'.$row['UserID']."\"$sel>{$row['Email']}</option>";
+ $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['email']}</option>";
}
break;
default :
@@ -422,7 +411,7 @@
// Check to see if the user is trying to login
if (isset($HTTP_POST_VARS['login'])) {
if (isset($HTTP_POST_VARS['sendpass'])) {
- list($email, $password) = $q->grab("select Email, Password from User where Email = '$username' and UserLevel > 0");
+ list($email, $password) = $q->grab("select email, password from user where email = '$username' and user_level > 0");
if (!$q->num_rows()) {
$t->set_var(array(
'loginerrorcolor' => '#ff0000',
@@ -432,7 +421,7 @@
if (ENCRYPTPASS) {
$password = genpassword(10);
$mpassword = md5($password);
- $q->query("update User set Password = '$mpassword' where Email = '$username'");
+ $q->query("update user set password = '$mpassword' where email = '$username'");
}
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- query.php 2001/08/17 03:26:37 1.15
+++ query.php 2001/08/17 04:06:06 1.16
@@ -83,12 +83,12 @@
$t->set_var(array(
'js' => $js,
- 'status' => build_select('Status',$q->grab_field("select status_id from status where status_name = 'New'")),
- 'resolution' => build_select('Resolution',$resolution),
- 'os' => build_select('OS',-1), // Prevent the OS regex selection
+ 'status' => build_select('status',$q->grab_field("select status_id from status where status_name = 'New'")),
+ 'resolution' => build_select('resolution',$resolution),
+ 'os' => build_select('os',-1), // Prevent the OS regex selection
'priority' => build_select('priority',$priority),
- 'severity' => build_select('Severity',$severity),
- 'projects' => build_select('Project'),
+ 'severity' => build_select('severity',$severity),
+ 'projects' => build_select('project'),
'TITLE' => $TITLE['bugquery']
));
@@ -180,7 +180,7 @@
'first' => $llimit+1,
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'total' => $nr,
- 'project' => build_select('Project'),
+ 'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
$q->query("select bug_id, title, reporter.email as reporter, owner.email as owner, severity_name as severity, bug.created_date, status_name as status, priority_id, version_name as version, component_name as component, resolution_name as resolution from bug, resolution, severity, status, version, component left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id where bug.resolution_id = resolution.resolution_id and bug.severity_id = severity.severity_id and bug.status_id = status.status_id and bug.version_id = version.version_id and bug.component_id = component.component_id ". ($querystring != '' ? "and $querystring " : ''). "order by $order $sort limit $llimit, $selrange");
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 03:26:40
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11197
Modified Files:
query.php
Log Message:
DB conversion
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- query.php 2001/08/13 13:34:49 1.14
+++ query.php 2001/08/17 03:26:37 1.15
@@ -26,7 +26,7 @@
function delete_saved_query($queryid) {
global $q, $u, $me;
- $q->query("delete from SavedQuery where UserID = $u and SavedQueryID = $queryid");
+ $q->query("delete from saved_query where user_id = $u and saved_query_id = $queryid");
header("Location: $me?op=query");
}
@@ -40,11 +40,11 @@
$t->set_block('savequeryblock','row','rows');
// Build the javascript-powered select boxes
- $q->query("select ProjectID, Name from Project where Active order by Name");
+ $q->query("select project_id, project_name from project where active order by project_name");
while (list($pid, $pname) = $q->grab()) {
// Version array
$js .= "versions['$pname'] = new Array(new Array('','All'),";
- $nq->query("select Name, VersionID from Version where ProjectID = $pid and Active");
+ $nq->query("select version_name, version_id from version where project_id = $pid and active");
while (list($version,$vid) = $nq->grab()) {
$js .= "new Array($vid,'$version'),";
}
@@ -53,7 +53,7 @@
// Component array
$js .= "components['$pname'] = new Array(new Array('','All'),";
- $nq->query("select Name, ComponentID from Component where ProjectID = $pid and Active");
+ $nq->query("select component_name, component_id from component where project_id = $pid and active");
while (list($comp,$cid) = $nq->grab()) {
$js .= "new Array($cid,'$comp'),";
}
@@ -63,15 +63,15 @@
if ($u != 'nobody') {
// Grab the saved queries if there are any
- $q->query("select * from SavedQuery where UserID = '$u'");
+ $q->query("select * from saved_query where user_id = '$u'");
if (!$q->num_rows()) {
$t->set_var('rows','');
} else {
while ($row = $q->grab()) {
$t->set_var(array(
- 'savedquerystring' => $row['SavedQueryString'],
- 'savedqueryname' => stripslashes($row['SavedQueryName']),
- 'savedqueryid' => $row['SavedQueryID']
+ 'savedquerystring' => $row['saved_query_string'],
+ 'savedqueryname' => stripslashes($row['saved_query_name']),
+ 'savedqueryid' => $row['saved_query_id']
));
$t->parse('rows', 'row', true);
}
@@ -83,7 +83,7 @@
$t->set_var(array(
'js' => $js,
- 'status' => build_select('Status',$q->grab_field("select StatusID from Status where Name = 'New'")),
+ 'status' => build_select('Status',$q->grab_field("select status_id from status where status_name = 'New'")),
'resolution' => build_select('Resolution',$resolution),
'os' => build_select('OS',-1), // Prevent the OS regex selection
'priority' => build_select('priority',$priority),
@@ -101,21 +101,21 @@
// Open bugs assigned to the user -- a hit list
if ($assignedto || $reportedby) {
- $q->query("select StatusID from Status where Name ".($open ? '' : 'not ')."in ('Unconfirmed', 'New', 'Assigned', 'Reopened')");
+ $q->query("select status_id from status where status_name ".($open ? '' : 'not ')."in ('Unconfirmed', 'New', 'Assigned', 'Reopened')");
while ($statusid = $q->grab_field()) $status[] = $statusid;
- $query[] = 'Status in ('.delimit_list(',',$status).')';
+ $query[] = 'status_id in ('.delimit_list(',',$status).')';
if ($assignedto) {
- $query[] = "AssignedTo = {$auth->auth['uid']}";
+ $query[] = "assigned_to = {$auth->auth['uid']}";
} else {
- $query[] = "Bug.CreatedBy = {$auth->auth['uid']}";
+ $query[] = "bug.created_by = {$auth->auth['uid']}";
}
} else {
// Select boxes
- if ($status) $flags[] = 'Status in ('.delimit_list(',',$status).')';
- if ($resolution) $flags[] = 'Resolution in ('.delimit_list(',',$resolution).')';
- if ($os) $flags[] = 'OS in ('.delimit_list(',',$os).')';
- if ($priority) $flags[] = 'Priority in ('.delimit_list(',',$priority).')';
- if ($severity) $flags[] = 'Severity in ('.delimit_list(',',$severity).')';
+ if ($status) $flags[] = 'bug.status_id in ('.delimit_list(',',$status).')';
+ if ($resolution) $flags[] = 'bug.resolution_id in ('.delimit_list(',',$resolution).')';
+ if ($os) $flags[] = 'bug.os_id in ('.delimit_list(',',$os).')';
+ if ($priority) $flags[] = 'bug.priority_id in ('.delimit_list(',',$priority).')';
+ if ($severity) $flags[] = 'bug.severity_id in ('.delimit_list(',',$severity).')';
if ($flags) $query[] = '('.delimit_list(' or ',$flags).')';
// Email field(s)
@@ -126,12 +126,12 @@
case 'not rlike' :
case '=' : $econd = "$emailtype1 '$email1'"; break;
}
- foreach($emailfield1 as $field) $equery[] = "$field.Email $econd";
+ foreach($emailfield1 as $field) $equery[] = "$field.email $econd";
$query[] = '('.delimit_list(' or ',$equery).')';
}
// Text search field(s)
- foreach(array('Title','Description','URL') as $searchfield) {
+ foreach(array('title','tescription','url') as $searchfield) {
if ($$searchfield) {
switch (${$searchfield."_type"}) {
case 'like' : $cond = "like '%".$$searchfield."%'"; break;
@@ -145,9 +145,9 @@
// Project/Version/Component
if ($projects) {
- $proj[] = "Bug.Project = $projects";
- if ($versions) $proj[] = "Bug.Version = $versions";
- if ($components) $proj[] = "Component = $components";
+ $proj[] = "bug.project_id = $projects";
+ if ($versions) $proj[] = "bug.version_id = $versions";
+ if ($components) $proj[] = "component_id = $components";
$query[] = '('.delimit_list(' and ',$proj).')';
}
}
@@ -166,11 +166,11 @@
// Save the query if requested
if ($savedqueryname) {
$savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $GLOBALS['QUERY_STRING']);
- $q->query("insert into SavedQuery (UserID, SavedQueryName, SavedQueryString) values ($u, '$savedqueryname', '$savedquerystring')");
+ $q->query("insert into saved_query (user_id, saved_query_name, saved_query_string) values ($u, '$savedqueryname', '$savedquerystring')");
}
- if (!$order) { $order = 'BugID'; $sort = 'asc'; }
+ if (!$order) { $order = 'bug_id'; $sort = 'asc'; }
if (!$querystring or $op) build_query($assignedto, $reportedby, $open);
- $nr = $q->grab_field("select count(*) from Bug left join User Owner on Bug.AssignedTo = Owner.UserID left join User Reporter on Bug.CreatedBy = Reporter.UserID ".($querystring != '' ? "where $querystring": ''));
+ $nr = $q->grab_field("select count(*) from bug left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id ".($querystring != '' ? "where $querystring": ''));
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -183,24 +183,24 @@
'project' => build_select('Project'),
'TITLE' => $TITLE['buglist']));
- $q->query("select BugID, Title, Reporter.Email as Reporter, Owner.Email as Owner, Severity.Name as Severity, Bug.CreatedDate, Status.Name as Status, Priority, Version.Name as Version, Component.Name as Component, Resolution.Name as Resolution from Bug, Severity, Status, Version, Component left join User Owner on Bug.AssignedTo = Owner.UserID left join User Reporter on Bug.CreatedBy = Reporter.UserID left join Resolution on Bug.Resolution = ResolutionID where Severity = SeverityID and Status = StatusID and Bug.Version = VersionID and Component = ComponentID ". ($querystring != '' ? "and $querystring " : ''). "order by $order $sort limit $llimit, $selrange");
+ $q->query("select bug_id, title, reporter.email as reporter, owner.email as owner, severity_name as severity, bug.created_date, status_name as status, priority_id, version_name as version, component_name as component, resolution_name as resolution from bug, resolution, severity, status, version, component left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id where bug.resolution_id = resolution.resolution_id and bug.severity_id = severity.severity_id and bug.status_id = status.status_id and bug.version_id = version.version_id and bug.component_id = component.component_id ". ($querystring != '' ? "and $querystring " : ''). "order by $order $sort limit $llimit, $selrange");
$headers = array(
- 'bugid' => 'BugID',
- 'title' => 'Title',
- 'description' => 'Description',
- 'url' => 'URL',
- 'severity' => 'Severity.SortOrder',
- 'priority' => 'Priority',
- 'status' => 'Status.SortOrder',
- 'owner' => 'Owner',
- 'createdby' => 'Reporter',
- 'createddate' => 'CreatedDate',
- 'project' => 'Project',
- 'component' => 'Component',
- 'os' => 'OS',
- 'browserstring' => 'BrowserString',
- 'resolution' => 'Resolution');
+ 'bugid' => 'bug_id',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'url' => 'url',
+ 'severity' => 'severity.sort_order',
+ 'priority' => 'bug.priority_id',
+ 'status' => 'status.sort_order',
+ 'owner' => 'owner',
+ 'createdby' => 'reporter',
+ 'createddate' => 'created_date',
+ 'project' => 'project_id',
+ 'component' => 'component',
+ 'os' => 'os_id',
+ 'browserstring' => 'browser_string',
+ 'resolution' => 'resolution');
sorting_headers($me, $headers, $order, $sort, "page=$page");
@@ -212,22 +212,22 @@
while ($row = $q->grab()) {
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
- 'bugid' => $row['BugID'],
- 'title' => $row['Title'],
- 'description' => $row['Description'],
- 'url' => $row['URL'],
- 'severity' => $row['Severity'],
- 'priority' => $select['priority'][$row['Priority']],
- 'status' => $row['Status'],
- 'assignedto' => $row['AssignedTo'],
- 'reporter' => maskemail($row['Reporter']),
- 'owner' => maskemail($row['Owner']),
- 'createddate' => date(DATEFORMAT,$row['CreatedDate']),
- 'project' => $row['Project'],
- 'component' => $row['Component'],
- 'os' => $row['OS'],
- 'browserstring' => $row['BrowserString'],
- 'resolution' => $row['Resolution']));
+ 'bugid' => $row['bug_id'],
+ 'title' => $row['title'],
+ 'description' => $row['description'],
+ 'url' => $row['url'],
+ 'severity' => $row['severity'],
+ 'priority' => $select['priority'][$row['priority_id']],
+ 'status' => $row['status'],
+ 'assignedto' => $row['assigned_to'],
+ 'reporter' => maskemail($row['reporter']),
+ 'owner' => maskemail($row['owner']),
+ 'createddate' => date(DATEFORMAT,$row['created_date']),
+ 'project' => $row['project_id'],
+ 'component' => $row['component'],
+ 'os' => $row['os_id'],
+ 'browserstring' => $row['browser_string'],
+ 'resolution' => $row['resolution']));
$t->parse('rows','row',true);
}
}
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 03:26:40
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv11197/templates/default
Modified Files:
queryform.html
Log Message:
DB conversion
Index: queryform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/queryform.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- queryform.html 2001/08/13 13:34:49 1.4
+++ queryform.html 2001/08/17 03:26:37 1.5
@@ -79,12 +79,12 @@
</option>
</select> </td>
- <td><input type="checkbox" name="emailfield1[]" value="Owner"
+ <td><input type="checkbox" name="emailfield1[]" value="owner"
checked>Assigned To</td>
</tr>
<tr>
- <td><input type="checkbox" name="emailfield1[]" value="Reporter">
+ <td><input type="checkbox" name="emailfield1[]" value="reporter">
Reporter</td>
</tr>
</table>
@@ -99,9 +99,9 @@
<tr>
<td align="right">Summary:</td>
- <td><input name="Title" size="30" value=""></td>
+ <td><input name="title" size="30" value=""></td>
- <td><select name="Title_type">
+ <td><select name="title_type">
<option value="like" selected>
substring
</option>
@@ -119,9 +119,9 @@
<tr>
<td align="right">A description entry:</td>
- <td><input name="Description" size="30" value=""></td>
+ <td><input name="description" size="30" value=""></td>
- <td><select name="Description_type">
+ <td><select name="description_type">
<option value="like" selected>
substring
</option>
@@ -139,9 +139,9 @@
<tr>
<td align="right">URL:</td>
- <td><input name="URL" size="30" value=""></td>
+ <td><input name="url" size="30" value=""></td>
- <td><select name="URL_type">
+ <td><select name="url_type">
<option value="like" selected>
substring
</option>
@@ -185,19 +185,19 @@
<input type="hidden" name="op" value="doquery">
<nobr><b>Sort By:</b>
<select name="order">
- <option value="BugID">
+ <option value="bug_id">
Bug Number
</option>
- <option selected value="Severity.SortOrder">
+ <option selected value="severity.sort_order">
Severity
</option>
- <option value="Reporter">
+ <option value="reporter">
Reporter
</option>
- <option value="Status.SortOrder">
+ <option value="status.sort_order">
Status
</option>
- <option value="Priority">
+ <option value="priority">
Priority
</option>
</select>
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 03:03:00
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv5249 Modified Files: dbchanges.sql Log Message: Tinyints for booleans instead of chars Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dbchanges.sql 2001/08/16 13:37:27 1.1 +++ dbchanges.sql 2001/08/17 03:02:57 1.2 @@ -60,7 +60,7 @@ `component_name` varchar(30) NOT NULL default '', `component_desc` text NOT NULL, `owner` int(10) unsigned NOT NULL default '0', - `active` char(1) binary NOT NULL default '1', + `active` tinyint(1) NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', @@ -82,7 +82,7 @@ `project_id` int(10) unsigned NOT NULL default '0', `project_name` varchar(30) NOT NULL default '', `project_desc` text NOT NULL, - `active` char(1) binary NOT NULL default '1', + `active` tinyint(1) NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', @@ -146,7 +146,7 @@ `version_id` int(10) unsigned NOT NULL default '0', `project_id` int(10) unsigned NOT NULL default '0', `version_name` char(10) NOT NULL default '', - `active` char(1) binary NOT NULL default '', + `active` tinyint(1) NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', |
|
From: Benjamin C. <bc...@us...> - 2001-08-17 02:56:25
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4119
Modified Files:
report.php
Log Message:
DB conversion
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- report.php 2001/08/14 13:19:39 1.12
+++ report.php 2001/08/17 02:56:22 1.13
@@ -31,10 +31,10 @@
$t->set_var('reporttitle', 'Bug resolutions');
// Start off our query
- $querystring = 'select Email as "Assigned To", sum(if(Resolution = "0",1,0)) as "Open"';
+ $querystring = 'select email as "Assigned To", sum(if(resolution_id = "0",1,0)) as "Open"';
$resfields = array('Assigned To','Open');
// Grab the resolutions from the database
- $q->query("select Name, concat(', sum(if(Resolution = \"',ResolutionID,'\",1,0)) as \"',Resolution.Name,'\"') from Resolution");
+ $q->query("select resolution_name, concat(', sum(if(resolution_id = \"',resolution_id,'\",1,0)) as \"',resolution_name,'\"') from resolution");
while (list($fieldname, $countquery) = $q->grab()) {
$resfields[] = $fieldname;
$querystring .= $countquery;
@@ -42,12 +42,12 @@
$resfields[] = 'Total';
if ($projectid && is_numeric($projectid)) {
- $projectquery = "where Project = $projectid";
+ $projectquery = "where project_id = $projectid";
} else {
$projectquery = '';
}
- $q->query("$querystring, count(BugID) as Total from Bug b left join User u on AssignedTo = UserID $projectquery group by AssignedTo");
+ $q->query("$querystring, count(bug_id) as 'Total' from bug b left join user u on assigned_to = user_id $projectquery group by assigned_to");
if (!$q->num_rows()) {
$t->set_var('rows', 'No data to display');
} else {
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 02:41:19
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv1219
Modified Files:
user.php
Log Message:
DB conversion
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- user.php 2001/08/09 12:54:47 1.7
+++ user.php 2001/08/17 02:41:16 1.8
@@ -40,7 +40,7 @@
$mpassword = $pass1;
}
- $q->query("update User set Password = '$mpassword' where UserID = $u");
+ $q->query("update user set password = '$mpassword' where user_id = $u");
$t->set_file('content', 'passwordchanged.html');
}
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 01:47:47
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv23306 Added Files: strings-de.php Log Message: Courtesy of Stefan Plank --- NEW FILE: strings-de.php --- <?php // strings-de.php - Deutsche Strings und Titel // Translation by Stefan Plank // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group // ------------------------------------------------------------------------ // Diese Datei ist Teil des phpBugTracker // // phpBugTracker ist freie Software; Sie koennen sie weiterverteilen // und/oder veraendern unter den Bedingungen der GNU General Public License, // publiziert durch die Free Software Foundation; entweder nach Version 2 // der Lizenz, oder (ihrer Wahl nach) irgendeiner spaeterern Version. // // phpBugTracker wird in der Hoffnung verteilt, dasz es nuetzlich ist, aber // OHNE JEDE GARANTIE; selbst ohne die eingeschloszene Garantie der // VERMARKTBARKEIT [MERCHANTIBILITY] oder EIGNUNG FUER // EINEN PARTIKULAEREN GEBRAUCH. Sie koennen mehr Details in der // GNU General Public License nachlesen. // // Sie sollten mit dem phpBugTracker eine Kopie der // GNU General Public License bekommen haben; wenn nicht, schreiben Sie der // Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, // MA 02111-1307, USA. // ------------------------------------------------------------------------- $STRING = array( 'nouser' => 'Dieser Benutzer extistiert nicht', 'dupeofself' => 'Ein Bug kann kein Duplikat von sich selbst sein', 'nobug' => 'Dieser Bug existiert nicht', 'givesummary' => 'Bitte geben Sie einen Bericht ein', 'givedesc' => 'Bitte geben Sie eine Beschreibung ein', 'noprojects' => 'Keine Projekte gefunden', 'totalbugs' => 'Total Bugs', 'giveemail' => 'Bitte geben Sie eine gültige E-mail Adresse ein.', 'loginused' => 'Dieser Benutzername ist schon in Gebrauch', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Ihr phpBugTracker Passwort ist %s", 'nobugs' => 'Kein Bug gefunden', 'givename' => 'Bitte geben Sie einen Namen ein', 'edit' => 'Bearbeiten', 'addnew' => 'Neuen hinzufügen', 'nooses' => 'Keine Betriebsysteme gefunden', 'giveinitversion' => 'Bitte geben Sie eine Initialversion für das Projekt an', 'giveversion' => 'Bitte geben Sie eine Version ein', 'noversions' => 'Keine Version gefunden', 'nocomponents' => 'Keine Komponenten gefunden', 'nostatses' => 'Keine Stati gefunden', 'givepassword' => 'Bitte geben Sie ein Passwort ein!', 'nousers' => 'Keinen Benutzer gefunden', 'bugbadperm' => 'Sie können diesen Bug nicht ändern', 'bugbadnum' => 'Dieser Bug existiert nicht', 'datecollision' => 'Jemand hat diesen Bug behoben seit Sie ihn gesehen haben. Die Buginformation wurde mit den letzten Änderunen erneut geladen.', 'passwordmatch' => 'Dieses Passwörter stimmen nicht -- Bitte probieren Sie noch einmal', 'nobughistory' => 'Es gibt keine History für diesen Bug', 'logintomodify' => 'Sie müssen eingeloggt sein, um diesen Bug zu ändern.', 'dupe_attachment' => 'Dieser Anhang existiert bereits für den Bug.', 'give_attachment' => 'Bitte geben Sie eine Datei für den Upload an.', 'no_attachment_save_path' => 'Konnte den Pfad zum Speichern nicht finden!', 'attachment_path_not_writeable' => 'Konnte keine Datei im Speicherpfad erstellen', 'attachment_move_error' => 'Es gab einen Fehler beim Bewegen der upzuloadenen Datei', 'bad_attachment' => 'Dieser Dateianhang existiert nicht', 'attachment_too_large' => 'Die angegebene Datei ist größer als '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Sie haben nicht die erforderlichen Rechte für diese Funktion' ); // Page titles $TITLE = array( 'enterbug' => 'Geben Sie einen Fehler ein', 'editbug' => 'Fehler Bearbeiten', 'newaccount' => 'Neuen Account anlegen', 'bugquery' => 'Fehlersuche Bug Query', 'buglist' => 'Fehlerliste', 'addcomponent' => 'Komponente hinzufügen', 'editcomponent' => 'Komponente bearbeiten', 'addproject' => 'Projekt hinzufügen', 'editproject' => 'Projekt bearbeiten', 'addversion' => 'Version hinzufügen', 'editversion' => 'Version bearbeiten', 'project' => 'Projekte', 'os' => 'Betriebssysteme', 'resolution' => 'Auflösungen', 'status' => 'Stati', 'user' => 'Benutzer', 'home' => 'Home', 'reporting' => 'Bericht' ); ?> |
|
From: Benjamin C. <bc...@us...> - 2001-08-17 01:43:20
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22682
Modified Files:
newaccount.php
Log Message:
DB conversion
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- newaccount.php 2001/08/09 12:54:47 1.9
+++ newaccount.php 2001/08/17 01:43:17 1.10
@@ -24,11 +24,11 @@
include 'include.php';
function do_form() {
- global $q, $t, $email, $firstname, $lastname, $STRING, $now;
+ global $q, $t, $email, $firstname, $lastname, $STRING, $now, $u;
if (!$email or !valid_email($email))
$error = $STRING['giveemail'];
- elseif ($q->grab_field("select UserID from User where Email = '$email'"))
+ elseif ($q->grab_field("select user_id from user where email = '$email'"))
$error = $STRING['loginused'];
if ($error) {
show_form($error);
@@ -42,7 +42,7 @@
} else {
$mpassword = $password;
}
- $q->query("insert into User (UserID, FirstName, LastName, Email, Password, CreatedDate, UserLevel) values (".$q->nextid('User').", '$firstname', '$lastname', '$email', '$mpassword', $now, 1)");
+ $q->query("insert into user (user_id, first_name, last_name, email, password, user_level, created_date, last_modified_date) values (".$q->nextid('User').", '$firstname', '$lastname', '$email', '$mpassword', 1, $now, $now)");
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
$t->set_file('content','newaccountsuccess.html');
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 01:34:58
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv21245
Modified Files:
images.php
Log Message:
DB conversion
Index: images.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/images.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- images.php 2001/08/09 12:54:47 1.4
+++ images.php 2001/08/17 01:34:55 1.5
@@ -31,22 +31,22 @@
include_once JPGRAPH_PATH.'jpgraph_pie.php';
// Grab the legend
- $q->query("select StatusID, Name from Status order by SortOrder");
+ $q->query("select status_id, status_name from status order by sort_order");
while ($row = $q->grab()) {
- $stats[$row['StatusID']]['Name'] = $row['Name'];
+ $stats[$row['status_id']]['name'] = $row['status_name'];
}
// Grab the data
- $q->query("select Status, count(Status) as Count from Bug group by Status");
+ $q->query("select status_id, count(status_id) as count from bug group by status_id");
while ($row = $q->grab()) {
- $stats[$row['Status']]['Count'] = $row['Count'];
+ $stats[$row['status_id']]['count'] = $row['count'];
}
$totalbugs = 0;
foreach ($stats as $stat) {
- if ($stat['Count']) {
- $data[] = $stat['Count'];
- $legend[] = "{$stat['Name']} ({$stat['Count']})";
- $totalbugs += $stat['Count'];
+ if ($stat['count']) {
+ $data[] = $stat['count'];
+ $legend[] = "{$stat['name']} ({$stat['count']})";
+ $totalbugs += $stat['count'];
}
}
|
|
From: Benjamin C. <bc...@us...> - 2001-08-17 01:25:52
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv19753
Modified Files:
index.php
Log Message:
DB conversion
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- index.php 2001/08/09 12:54:47 1.9
+++ index.php 2001/08/17 01:25:48 1.10
@@ -34,20 +34,20 @@
if (USE_JPGRAPH) {
$t->set_var('sblock', '<img src="images.php" align="right">');
} else {
- $q->query("select * from Status order by SortOrder");
+ $q->query("select * from status order by sort_order");
while ($row = $q->grab()) {
- $stats[$row['StatusID']]['Name'] = $row['Name'];
+ $stats[$row['status_id']]['name'] = $row['status_name'];
}
- $q->query("select Status, count(Status) as Count from Bug group by Status");
+ $q->query("select status_id, count(status_id) as count from bug group by status_id");
while ($row = $q->grab()) {
- $stats[$row['Status']]['Count'] = $row['Count'];
+ $stats[$row['status_id']]['count'] = $row['count'];
}
foreach ($stats as $stat) {
$t->set_var(array(
- 'status' => $stat['Name'],
- 'count' => $stat['Count'] ? $stat['Count'] : 0
+ 'status' => $stat['name'],
+ 'count' => $stat['count'] ? $stat['count'] : 0
));
- $total += $stat['Count'];
+ $total += $stat['count'];
$t->parse('rows','row',true);
}
$t->set_var(array(
|
|
From: Benjamin C. <bc...@us...> - 2001-08-16 23:12:55
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv24809
Modified Files:
include.php
Log Message:
Get rid of unused stuff
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- include.php 2001/08/13 13:34:49 1.28
+++ include.php 2001/08/16 23:12:52 1.29
@@ -74,8 +74,8 @@
$q = new dbclass;
$cssfile = 'global.css';
-$me = $PHP_SELF;
-$me2 = $REQUEST_URI;
+$me = $HTTP_SERVER_VARS['PHP_SELF'];
+$me2 = $HTTP_SERVER_VARS['REQUEST_URI'];
$selrange = 30;
$now = time();
$_gv = $HTTP_GET_VARS;
@@ -197,8 +197,8 @@
$t = new templateclass('templates/'.THEME,'keep');
$t->set_var(array(
'TITLE' => '',
- 'me' => $PHP_SELF,
- 'me2' => $REQUEST_URI,
+ 'me' => $me,
+ 'me2' => $me2,
'error' => '',
'cssfile' => $cssfile,
'loginerror' => ''));
@@ -296,20 +296,6 @@
}
///
-/// Convert a date from from MM/DD/YYYY to epoch seconds
-function convert_date($date) {
- $temp = explode('/',$date);
- //return join('-',array($temp[2],$temp[0],$temp[1])); - MySQL format
- return mktime(0,0,0,$temp[0],$temp[1],$temp[2]);
-}
-
-///
-/// Check the format of a date entered
-function bad_date($date) {
- return !ereg('[0-9]{2}/[0-9]{2}/[0-9]{4,4}',$date);
-}
-
-///
/// Divide the results of a database query into multiple pages
function multipages($nr, $page, $urlstr) {
global $me, $selrange;
@@ -333,12 +319,6 @@
}
}
return array($selrange, $llimit, $npages, $pages);
-}
-
-///
-/// Returns true if the HTTP method is POST
-function posted_form() {
- return ($GLOBALS['REQUEST_METHOD'] == 'POST');
}
///
|
|
From: Benjamin C. <bc...@us...> - 2001-08-16 19:21:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv27038
Modified Files:
configure
Log Message:
Slight tweak
Index: configure
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- configure 2001/08/13 13:47:37 1.6
+++ configure 2001/08/16 19:21:02 1.7
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
DIALOG=${DIALOG=dialog}
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15
|
|
From: Benjamin C. <bc...@us...> - 2001-08-16 13:37:31
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv28413 Added Files: dbchanges.sql Log Message: Starting the work needed to play nicely with postgres --- NEW FILE: dbchanges.sql --- CREATE TABLE `attachment` ( `attachment_id` int(10) unsigned NOT NULL default '0', `bug_id` int(10) unsigned NOT NULL default '0', `file_name` char(255) NOT NULL default '', `description` char(255) NOT NULL default '', `file_size` bigint(20) unsigned NOT NULL default '0', `mime_type` char(30) NOT NULL default '', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`attachment_id`) ); insert into attachment select * from Attachment; CREATE TABLE `bug` ( `bug_id` int(10) unsigned NOT NULL default '0', `bug_title` varchar(30) NOT NULL default '', `bug_desc` text NOT NULL, `bug_url` varchar(255) NOT NULL default '', `severity_id` tinyint(3) unsigned NOT NULL default '0', `priority_id` tinyint(3) unsigned NOT NULL default '0', `status_id` tinyint(3) unsigned NOT NULL default '0', `resolution_id` tinyint(3) unsigned NOT NULL default '0', `assigned_to` int(10) unsigned NOT NULL default '0', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', `project_id` int(10) unsigned NOT NULL default '0', `version_id` int(10) unsigned NOT NULL default '0', `component_id` int(10) unsigned NOT NULL default '0', `op_sys_id` tinyint(3) unsigned NOT NULL default '0', `browser_string` varchar(255) NOT NULL default '', PRIMARY KEY (`bug_id`) ); insert into bug select * from Bug; CREATE TABLE `bug_history` ( `bug_id` int(10) unsigned NOT NULL default '0', `changed_field` char(20) NOT NULL default '', `old_value` char(255) NOT NULL default '', `new_value` char(255) NOT NULL default '', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0' ); insert into bug_history select * from BugHistory; CREATE TABLE `comment` ( `comment_id` int(10) unsigned NOT NULL default '0', `bug_id` int(10) unsigned NOT NULL default '0', `comment_text` text NOT NULL, `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`comment_id`) ); insert into comment select * from Comment; CREATE TABLE `component` ( `component_id` int(10) unsigned NOT NULL default '0', `project_id` int(10) unsigned NOT NULL default '0', `component_name` varchar(30) NOT NULL default '', `component_desc` text NOT NULL, `owner` int(10) unsigned NOT NULL default '0', `active` char(1) binary NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`component_id`) ); insert into component select * from Component; CREATE TABLE `os` ( `os_id` int(10) unsigned NOT NULL default '0', `os_name` char(30) NOT NULL default '', `sort_order` tinyint(3) unsigned NOT NULL default '0', `regex` char(40) NOT NULL default '', PRIMARY KEY (`os_id`) ); insert into os select * from OS; CREATE TABLE `project` ( `project_id` int(10) unsigned NOT NULL default '0', `project_name` varchar(30) NOT NULL default '', `project_desc` text NOT NULL, `active` char(1) binary NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`project_id`) ); insert into project select *, CreatedBy, CreatedDate from Project; CREATE TABLE `resolution` ( `resolution_id` int(10) unsigned NOT NULL default '0', `resolution_name` varchar(30) NOT NULL default '', `resolution_desc` text NOT NULL, `sort_order` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`resolution_id`) ); insert into resolution select * from Resolution; CREATE TABLE `saved_query` ( `saved_query_id` int(10) unsigned NOT NULL auto_increment, `user_id` int(10) unsigned NOT NULL default '0', `saved_query_name` varchar(40) NOT NULL default '', `saved_query_string` text NOT NULL, PRIMARY KEY (`saved_query_id`,`user_id`) ); insert into saved_query select * from SavedQuery; CREATE TABLE `severity` ( `severity_id` int(10) unsigned NOT NULL default '0', `severity_name` varchar(30) NOT NULL default '', `severity_desc` text NOT NULL, `sort_order` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`severity_id`) ); insert into severity select * from Severity; CREATE TABLE `status` ( `status_id` int(10) unsigned NOT NULL default '0', `status_name` varchar(30) NOT NULL default '', `status_desc` text NOT NULL, `sort_order` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`status_id`) ); insert into status select * from Status; CREATE TABLE `user` ( `user_id` int(10) unsigned NOT NULL default '0', `first_name` char(40) NOT NULL default '', `last_name` char(40) NOT NULL default '', `email` char(60) NOT NULL default '', `password` char(40) NOT NULL default '', `user_level` tinyint(3) unsigned NOT NULL default '1', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`user_id`) ); insert into user select UserID, FirstName, LastName, Email, Password, UserLevel, 0, CreatedDate, 0, CreatedDate from User; CREATE TABLE `version` ( `version_id` int(10) unsigned NOT NULL default '0', `project_id` int(10) unsigned NOT NULL default '0', `version_name` char(10) NOT NULL default '', `active` char(1) binary NOT NULL default '', `created_by` int(10) unsigned NOT NULL default '0', `created_date` bigint(20) unsigned NOT NULL default '0', `last_modified_by` int(10) unsigned NOT NULL default '0', `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`version_id`) ); insert into version select *, CreatedBy, CreatedDate from Version; |
|
From: Benjamin C. <bc...@us...> - 2001-08-16 02:56:58
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv5854 Added Files: strings-pt-br.php Log Message: Portuguese - Brazil translation --- NEW FILE: strings-pt-br.php --- <?php // strings-br.php - Brazilian Portuguese strings and titles // Translation by Alexandre Ponso // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // // phpBugTracker is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // phpBugTracker 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ $STRING = array( 'nouser' => 'Este usuário não existe', 'dupeofself' => 'Um bug não pode ser duplicata de si mesmo', 'nobug' => 'Este bug não existe', 'givesummary' => 'Por favor, digite um resumo', 'givedesc' => 'Por favor, digite uma descrição', 'noprojects' => 'Nenhum projeto encontrado', 'totalbugs' => 'Total de Bugs', 'giveemail' => 'Por favor, digite um endereço de email válido', 'loginused' => 'Este login já está sendo usado', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Sua senha phpBugTracker é %s", 'nobugs' => 'Nenhum bug encontrado', 'givename' => 'Por favor, digite um nome', 'edit' => 'Editar', 'addnew' => 'Adicionar novo', 'nooses' => 'Nenhum OS encontrado', 'giveinitversion' => 'Por favor, digite uma versão inicial para o projeto', 'giveversion' => 'Por favor, digite uma versão', 'noversions' => 'Nenhuma versão encontrada', 'nocomponents' => 'Nenhum componente encontrado', 'nostatses' => 'Nenhum status encontrado', 'givepassword' => 'Por favor, digite uma senha', 'nousers' => 'Nenhum usuário encontrado', 'bugbadperm' => 'Você não pode alterar este bug', 'bugbadnum' => 'Este bug não existe', 'datecollision' => 'Alguém já alterou este bug desde que você o viu. A informação sobre o bug foi atualizada com as últimas alterações.', 'passwordmatch' => 'As senhas não conferem -- por favor, tente novamente', 'nobughistory' => 'Não há historico para este bug', 'logintomodify' => 'Você deve estar autenticado para alterar este bug', 'dupe_attachment' => 'Este anexo já existe para esse bug', 'give_attachment' => 'Por favor, escolha um arquivo para upload', 'no_attachment_save_path' => 'Não há diretório de destino!', 'attachment_path_not_writeable' => 'Não foi possível criar um arquivo no diretório de destino', 'attachment_move_error' => 'Ocorreu um erro ao mover o arquivo transmitido', 'bad_attachment' => 'Este anexo não existe', 'attachment_too_large' => 'O arquivo escolhido é maior que '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Você não tem as permissões necessárias para essa função' ); // Page titles $TITLE = array( 'enterbug' => 'Adicionar um Bug', 'editbug' => 'Editar Bug', 'newaccount' => 'Criar uma nova conta', 'bugquery' => 'Pesquisar Bug', 'buglist' => 'Listar Bug', 'addcomponent' => 'Adicionar Componente', 'editcomponent' => 'Editar Componente', 'addproject' => 'Adicionar Projeto', 'editproject' => 'Editar Projeto', 'addversion' => 'Adicionar Versão', 'editversion' => 'Editar Versão', 'project' => 'Projeto', 'os' => 'Sistemas Operacionais', 'resolution' => 'Normas', 'status' => 'Status', 'user' => 'Usuários', 'home' => 'Home', 'reporting' => 'Relatórios' ); ?> |
|
From: Benjamin C. <bc...@us...> - 2001-08-14 13:19:42
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5915
Modified Files:
report.php
Log Message:
Tighten this up a bit
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- report.php 2001/08/12 23:04:51 1.11
+++ report.php 2001/08/14 13:19:39 1.12
@@ -43,6 +43,8 @@
if ($projectid && is_numeric($projectid)) {
$projectquery = "where Project = $projectid";
+ } else {
+ $projectquery = '';
}
$q->query("$querystring, count(BugID) as Total from Bug b left join User u on AssignedTo = UserID $projectquery group by AssignedTo");
@@ -57,9 +59,10 @@
$t->set_var('bgcolor', '#eeeeee');
$t->parse('rows', 'row', true);
$t->set_var('cols', '');
+ $i = 0;
while ($row = $q->grab()) {
foreach ($resfields as $col) {
- if ($row[$col] == '') {
+ if (!isset($row[$col]) || $row[$col] == '') {
$coldata = 'Unassigned';
} elseif ($col == 'Assigned To') {
$coldata = maskemail($row[$col]);
@@ -79,6 +82,7 @@
}
}
+$projectid = isset($_gv['projectid']) ? $_gv['projectid'] : 0;
$t->set_file('wrap','wrap.html');
$t->set_file('content','report.html');
$t->set_var(array(
|
|
From: Benjamin C. <bc...@us...> - 2001-08-14 12:54:08
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv27156 Modified Files: CHANGELOG Log Message: Updated for 0.2.1 Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- CHANGELOG 2001/08/11 17:31:23 1.10 +++ CHANGELOG 2001/08/14 12:54:04 1.11 @@ -1,3 +1,8 @@ +-- 0.2.1 -- 14 Aug 2001 +: Bugfix to the configure script +: Updated the installation instructions +: Added stats on bugs reported by and assigned to the user on every page + -- 0.2.0 -- 11 Aug 2001 : Allow for browsing the bugs without logging in. : Started reporting. |
|
From: Benjamin C. <bc...@us...> - 2001-08-14 12:51:22
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv26065
Modified Files:
INSTALL
Log Message:
Added more detail about the jpgraph installation
Index: INSTALL
===================================================================
RCS file: /cvsroot/phpbt/phpbt/INSTALL,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- INSTALL 2001/08/09 03:30:44 1.4
+++ INSTALL 2001/08/14 12:51:19 1.5
@@ -18,7 +18,8 @@
encrypted in the database.
d. Change the USE_JPGRAPH constant to 1 if you want to use the jpgraph class
(http://www.aditus.nu/jpgraph/) to display the bug summary info. If you
- enable this you'll also need to edit the JPGRAPH_PATH constant.
+ enable this you'll also need to edit the JPGRAPH_PATH constant, and
+ you'll need to edit the jpgraph.php file from the jpgraph disribution.
6. Browse on over to the installation, choose Admin tools, login with the info
you put in the database creation script, and create your first project.
7. Start reporting bugs
|
|
From: Benjamin C. <bc...@us...> - 2001-08-13 13:47:42
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11198
Modified Files:
configure
Log Message:
Added database info to the configure script
Index: configure
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- configure 2001/08/13 12:33:11 1.5
+++ configure 2001/08/13 13:47:37 1.6
@@ -10,6 +10,9 @@
PHPLIBPATH=''
JPGRAPH_PATH=''
ATTACHMENT_PATH='attachments'
+DB_HOST='localhost'
+DB_USER='root'
+DB_PASS=''
# Booleans
ENCRYPTPASS=1
@@ -71,6 +74,35 @@
PHPLIBPATH=`<$tempfile`
}
+database() {
+ $DIALOG --backtitle "phpBT Configuration" \
+ --title "Database Host" \
+ --inputbox "Enter the hostname of the server hosting the database server" 0 0 $DB_HOST \
+ 2> $tempfile
+ if [ $? -gt 0 ]; then
+ return
+ fi
+ DB_HOST=`<$tempfile`
+
+ $DIALOG --backtitle "phpBT Configuration" \
+ --title "Database User" \
+ --inputbox "Enter the username to use for connecting to the database" 0 0 $DB_USER \
+ 2> $tempfile
+ if [ $? -gt 0 ]; then
+ return
+ fi
+ DB_USER=`<$tempfile`
+
+ $DIALOG --backtitle "phpBT Configuration" \
+ --title "Database Password" \
+ --inputbox "Enter the password to use when connecting to the database" 0 0 $DB_PASS \
+ 2> $tempfile
+ if [ $? -gt 0 ]; then
+ return
+ fi
+ DB_PASS=`<$tempfile`
+}
+
change_features() {
if [ $ENCRYPTPASS -eq 1 ]; then
OLD_ENCRYPTPASS=on
@@ -149,6 +181,7 @@
--title "Configuration Menu" \
--menu "Choose from the options below to configure your phpBugTracker installation." 15 68 4 \
"Administrivia" "Parameters that must be configured" \
+ "Database" "Database connection settings" \
"Features" "Optional features" \
"Save" "Save configuration changes" \
2> $tempfile
@@ -161,6 +194,9 @@
Administrivia)
administrivia
;;
+ Database)
+ database
+ ;;
Features)
change_features
;;
@@ -176,6 +212,9 @@
echo "/INSTALLURL/s|,'.*'|,'$INSTALLURL'|" >> $tempfile
echo "/PHPLIBPATH/s|,'.*'|,'$PHPLIBPATH'|" >> $tempfile
echo "/JPGRAPH_PATH/s|,'.*'|,'$JPGRAPH_PATH'|" >> $tempfile
+ echo "/var \$Host/s|'.*'|'$DB_HOST'|" >> $tempfile
+ echo "/var \$User/s|'.*'|'$DB_USER'|" >> $tempfile
+ echo "/var \$Password/s|'.*'|'$DB_PASS'|" >> $tempfile
sed -f $tempfile include.php.bak > include.php
$DIALOG --backtitle "phpBT Configuration" \
--infobox "Your changes have been saved" 5 36
|