2 /*=====================================================================*\
3 || ################################################################### ||
4 || # [#]app[#] [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # All parts of this file are ©2003-[#]year[#] Iris Studios, Inc. No # ||
7 || # part of this file may be reproduced in any way: part or whole. # ||
8 || # --------------------------------------------------------------- # ||
9 || # ©2003 - [#]year[#] Iris Studios, Inc. | http://www.iris-studios.com # ||
10 || ################################################################### ||
11 \*=====================================================================*/
13 require_once('./global.php');
15 if (!($bugsys->userinfo
['permissions'] & CANVIEWBUGS
))
21 // ###################################################################
23 if (empty($_REQUEST['do']))
25 $_REQUEST['do'] = 'modify';
28 // ###################################################################
30 if ($_REQUEST['do'] == 'modify')
32 sanitize(array('bugid' => INT));
36 echo 'alert: bad bug';
40 $bugfetch = $DB_sql->query("
41 SELECT bug.*, user1.displayname, user1.email, user1.showemail,
42 comment.userid AS posterid, user2.displayname AS postedby,
43 user2.email AS posteremail, user2.showemail AS postershowemail,
44 comment.comment, comment.dateline AS postedon
45 FROM " . TABLE_PREFIX
. "bug AS bug
46 LEFT JOIN " . TABLE_PREFIX
. "comment AS comment
47 ON (bug.bugid = comment.bugid)
48 LEFT JOIN " . TABLE_PREFIX
. "user AS user1
49 ON (bug.userid = user1.userid)
50 LEFT JOIN " . TABLE_PREFIX
. "user AS user2
51 ON (comment.userid = user1.userid)
52 WHERE bug.bugid = $vars[bugid]
53 ORDER BY comment.dateline ASC"
55 while ($buginfo = $DB_sql->fetch_array($bugfetch))
60 'bugid' => $buginfo['bugid'],
61 'userid' => $buginfo['userid'],
62 'displayname' => $buginfo['displayname'],
63 'email' => $buginfo['email'],
64 'showemail' => $buginfo['showemail'],
65 'productid' => $buginfo['productid'],
66 'componentid' => $buginfo['componentid'],
67 'versionid' => $buginfo['versionid'],
68 'summary' => $buginfo['summary'],
69 'priority' => $buginfo['priority'],
70 'severity' => $buginfo['severity'],
71 'status' => $buginfo['status'],
72 'resolution' => $buginfo['resolution'],
73 'assignedto' => $buginfo['assignedto']
77 'userid' => $buginfo['posterid'],
78 'displayname' => $buginfo['displayname'],
79 'email' => $buginfo['posteremail'],
80 'showemail' => $buginfo['postershowemail'],
81 'dateline' => $buginfo['postedon'],
82 'comment' => $buginfo['comment']
88 echo 'alert: bad bug';
92 echo "<div><strong>Bug ID:</strong> $bug[bugid]</div>";
93 echo "<div><strong>Reported by:</strong> $bug[displayname]" . iff($bug['showemail'], " <$bug[email]>") . " (userid: $bug[userid])</div>";
94 echo "<div><strong>Product:</strong> " . $bugsys->datastore
['product']["$bug[productid]"]['title'] . iff($bug['componentid'], ' / <strong>Component:</strong>' . $bugsys->datastore
['product']["$bug[componentid]"]['title'] . '</strong>') . ' / <strong>Version:</strong> ' . $bugsys->datastore
['version']["$bug[versionid]"]['version'] . "</div>";
95 echo "<div><strong>Title / summary:</strong> $bug[summary]</div>";
96 echo "<div><strong>Status:</strong> " . $bugsys->datastore
['status']["$bug[status]"]['status'] . " / <strong>Resolution:</strong> " . $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'] . "</div>";
97 echo "<div><strong>Severity:</strong> " . $bugsys->datastore
['severity']["$bug[severity]"]['severity'] . "</div>";
98 echo "<div><strong>Priority:</strong> " . $bugsys->datastore
['priority']["$bug[priority]"]['priority'] . "</div>";
99 $assigninfo = $bugsys->datastore
['assignto']["$bug[assignedto]"];
100 echo iff(is_array($assigninfo), "<div><strong>Assigned to:</strong> " . $assigninfo['displayname'] . iff($assigninfo['showemail'], " <$assigninfo[email]>") . " (userid: $assigninfo[userid])</div>");
104 foreach ($comments AS $comment)
106 echo '<table border="1" cellspacing="2" cellpadding="4" width="100%"><tr style="background-color:#EEEEEE"><td><span style="float:right">' . datelike('standard', $comment['dateline']) . '</span>' . $comment['displayname'] . iff($comment['showemail'], " <$comment[email]>") . " (userid: $comment[userid])</td></tr>";
107 echo "<tr><td>" . nl2br($comment['comment']) . "</td></tr></table>";
110 if ($bugsys->userinfo
['permissions'] & CANPOSTCOMMENTS
)
112 echo "<div>[<a href=\"newcomment.php?bugid=$bug[bugid]\">New Comment</a>]</div>";
116 print_r($comments);*/
119 /*=====================================================================*\
120 || ###################################################################
123 || ###################################################################
124 \*=====================================================================*/