2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 $fetchtemplates = array(
18 define('SVN', '$Id$');
20 require_once('./global.php');
22 if (!can_perform('canviewbugs'))
24 $message->error_permission();
27 // ###################################################################
29 // #*# pagination needs to be done here
31 $bugs_fetch = $db->query("
32 SELECT bug.*, user1.displayname AS firstreport, user2.displayname AS lastpost, user3.displayname AS hiddenlastpost
33 FROM " . TABLE_PREFIX
. "bug AS bug
34 LEFT JOIN user AS user1
35 ON (bug.userid = user1.userid)
36 LEFT JOIN user AS user2
37 ON (bug.lastpostby = user2.userid)
38 LEFT JOIN user AS user3
39 ON (bug.hiddenlastpostby = user3.userid)" . ((!can_perform('canviewhidden')) ?
"
40 WHERE !hidden" : "") . "
41 ORDER BY bug." . ((can_perform('canviewhidden')) ?
"lastposttime" : "hiddenlastposttime") . " DESC"
44 while ($bug = $db->fetch_array($bugs_fetch))
46 $bug['bgcolour'] = $bugsys->datastore
['status']["$bug[status]"]['color'];
47 $bug['product'] = $bugsys->datastore
['product']["$bug[productid]"]['title'];
48 $bug['version'] = $bugsys->datastore
['version']["$bug[versionid]"]['version'];
49 $bug['status'] = $bugsys->datastore
['status']["$bug[status]"]['status'];
50 $bug['resolution'] = $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'];
52 $bug['hiddendisplay'] = ((!can_perform('canviewhidden') AND $bug['hiddenlastposttime']) ? true
: false
);
54 $bug['lastposttime'] = (($bug['hiddendisplay']) ?
$bug['hiddenlastposttime'] : $bug['lastposttime']);
55 $bug['lastpost'] = (($bug['hiddendisplay']) ?
$bug['hiddenlastpost'] : $bug['lastpost']);
57 $bug['lastpostinfo'] = $datef->format($bugsys->options
['dateformat'], $bug['lastposttime']) . ' by ' . $bug['lastpost'];
59 eval('$bugs .= "' . $template->fetch('trackerhome_bits') . '";');
62 $db->free_result($bugs_fetch);
64 $show['newreport'] = ((can_perform('cansubmitbugs')) ? true
: false
);
66 eval('$template->flush("' . $template->fetch('TRACKERHOME') . '");');
68 /*=====================================================================*\
69 || ###################################################################
72 || ###################################################################
73 \*=====================================================================*/