$bugsys->datastore['product'] = $tempstore;
}
+// ##################### Start build_templatesets ####################
+function build_templatesets()
+{
+ global $DB_sql, $bugsys;
+
+ $templatesets = $DB_sql->query("SELECT * FROM " . TABLE_PREFIX . "templateset");
+ while ($templateset = $DB_sql->fetch_array($templatesets))
+ {
+ $tempstore["$templateset[templatesetid]"] = $templateset;
+ }
+
+ $DB_sql->query("
+ ### replacing the template set cache ###
+ REPLACE INTO " . TABLE_PREFIX . "datastore (title, data)
+ VALUES ('templateset', '" . addslasheslike(serialize($tempstore)) . "')"
+ );
+
+ $bugsys->datastore['templateset'] = $tempstore;
+}
+
/*=====================================================================*\
|| ###################################################################
|| # $HeadURL$
echo "language file (locale/$language[filename]) could not be loaded!";
exit;
}
+
+ // get the templateset
+ if ($this->userinfo['userid'])
+ {
+ $templatesetid = $this->userinfo['templatesetid'];
+ $templateset = $this->datastore['templateset']["$templatesetid"];
+ }
+ if (!$templatesetid)
+ {
+ foreach ($this->datastore['templateset'] AS $templateset)
+ {
+ if ($templateset['default'])
+ {
+ $templatesetid = $templateset['templatesetid'];
+ $templateset = $this->datastore['templateset']["$templatesetid"];
+ }
+ }
+ }
+
+ // load the template system
+ if (file_exists("./templates/$templateset[shortname]/tsinfo.php"))
+ {
+ $this->options['ts_includepath'] = "./templates/$templateset[shortname]/";
+ }
+ else
+ {
+ echo "template set info (templates/$templateset[shortname]/tsinfo.php) could not be loaded!";
+ exit;
+ }
}
function fetch_userinfo($userid = -1, $verify_password = false)
--- /dev/null
+<?php
+/*=====================================================================*\
+|| ################################################################### ||
+|| # [#]app[#] [#]version[#]
+|| # --------------------------------------------------------------- # ||
+|| # All parts of this file are ©2003-[#]year[#] Iris Studios, Inc. No # ||
+|| # part of this file may be reproduced in any way: part or whole. # ||
+|| # --------------------------------------------------------------- # ||
+|| # ©2003 - [#]year[#] Iris Studios, Inc. | http://www.iris-studios.com # ||
+|| ################################################################### ||
+\*=====================================================================*/
+
+require_once('./global.php');
+
+if (!can_perform('canviewbugs'))
+{
+ echo 'no permission';
+ exit;
+}
+
+// ###################################################################
+
+// #*# pagination needs to be done here
+
+$bugs = $DB_sql->query("
+ SELECT bug.*, user1.displayname AS firstreport, user2.displayname AS lastpost
+ FROM " . TABLE_PREFIX . "bug AS bug
+ LEFT JOIN user AS user1
+ ON (bug.userid = user1.userid)
+ LEFT JOIN user AS user2
+ ON (bug.lastpostby = user2.userid)
+ ORDER BY bug.lastposttime DESC"
+);
+
+echo '<table border="1" cellspacing="2" cellpadding="4" width="100%"><tr style="background-color:#EEEEEE">';
+echo '<td>Bug ID</td><td>Title</td><td>Reporter</td><td>Product/Version</td><td>Status/Resolution</td><td>Last Post</td></tr>';
+
+
+while ($bug = $DB_sql->fetch_array($bugs))
+{
+ echo "<tr>";
+ echo "<td>$bug[bugid]</td>";
+ echo "<td><a href=\"showreport.php?bugid=$bug[bugid]\">$bug[summary]</a></td>";
+ echo "<td>$bug[firstreport]</td>";
+ echo "<td>" . $bugsys->datastore['product']["$bug[productid]"]['title'] . '/' . $bugsys->datastore['version']["$bug[versionid]"]['version'] . "</td>";
+ echo "<td>" . $bugsys->datastore['status']["$bug[status]"]['status'] . '/' . $bugsys->datastore['resolution']["$bug[resolution]"]['resolution'] . "</td>";
+ echo "<td>" . datelike('standard', $bug['lastposttime']) . ' by ' . $bug['lastpost'] . "</td>";
+ echo "</tr>";
+}
+
+echo '</table>';
+
+echo '[<a href="newreport.php?">New Report</a>]';
+
+/*=====================================================================*\
+|| ###################################################################
+|| # $HeadURL$
+|| # $Id$
+|| ###################################################################
+\*=====================================================================*/
+?>
\ No newline at end of file