]>
src.bluestatic.org Git - bugdar.git/blob - index.php
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 require_once('./global.php');
20 if (!can_perform('canviewbugs'))
22 $message->error_permission();
25 // ###################################################################
27 // #*# pagination needs to be done here
29 $bugs_fetch = $db->query("
30 SELECT bug.*, user1.displayname AS firstreport, user2.displayname AS lastpost, user3.displayname AS hiddenlastpost
31 FROM " . TABLE_PREFIX
. "bug AS bug
32 LEFT JOIN user AS user1
33 ON (bug.userid = user1.userid)
34 LEFT JOIN user AS user2
35 ON (bug.lastpostby = user2.userid)
36 LEFT JOIN user AS user3
37 ON (bug.hiddenlastpostby = user3.userid)" . ((!can_perform('canviewhidden')) ? "
38 WHERE !hidden" : "") . "
39 ORDER BY bug." . ((can_perform('canviewhidden')) ? "lastposttime" : "hiddenlastposttime") . " DESC"
42 while ($bug = $db->fetch_array($bugs_fetch))
44 $bug['bgcolour'] = $bugsys->datastore
['status']["$bug[status]"]['color'];
45 $bug['product'] = $bugsys->datastore
['product']["$bug[productid]"]['title'];
46 $bug['version'] = $bugsys->datastore
['version']["$bug[versionid]"]['version'];
47 $bug['status'] = $bugsys->datastore
['status']["$bug[status]"]['status'];
48 $bug['resolution'] = $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'];
50 $bug['hiddendisplay'] = ((!can_perform('canviewhidden') AND $bug['hiddenlastposttime']) ? true : false);
52 $bug['lastposttime'] = (($bug['hiddendisplay']) ? $bug['hiddenlastposttime'] : $bug['lastposttime']);
53 $bug['lastpost'] = (($bug['hiddendisplay']) ? $bug['hiddenlastpost'] : $bug['lastpost']);
55 $bug['lastpostinfo'] = datelike('standard', $bug['lastposttime']) . ' by ' . $bug['lastpost'];
57 eval('$bugs .= "' . $template->fetch('trackerhome_bits') . '";');
60 $db->free_result($bugs_fetch);
62 $show['newreport'] = ((can_perform('cansubmitbugs')) ? true : false);
64 eval('$template->flush("' . $template->fetch('TRACKERHOME') . '");');
66 /*=====================================================================*\
67 || ###################################################################
70 || ###################################################################
71 \*=====================================================================*/