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 $bug = $DB_sql->query_first("
41 SELECT bug.*, user.displayname, user.email, user.showemail
42 FROM " . TABLE_PREFIX
. "bug AS bug
43 LEFT JOIN " . TABLE_PREFIX
. "user AS user
44 ON (bug.userid = user.userid)
45 WHERE bug.bugid = $vars[bugid]"
50 echo 'alert: bad bug';
54 echo "<div><strong>Bug ID:</strong> $bug[bugid]</div>";
55 echo "<div><strong>Reported by:</strong> " . construct_user_display($bug) . "</div>";
56 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>";
57 echo "<div><strong>Title / summary:</strong> $bug[summary]</div>";
58 echo "<div><strong>Status:</strong> " . $bugsys->datastore
['status']["$bug[status]"]['status'] . " / <strong>Resolution:</strong> " . $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'] . "</div>";
59 echo "<div><strong>Severity:</strong> " . $bugsys->datastore
['severity']["$bug[severity]"]['severity'] . "</div>";
60 echo "<div><strong>Priority:</strong> " . $bugsys->datastore
['priority']["$bug[priority]"]['priority'] . "</div>";
61 $assigninfo = $bugsys->datastore
['assignto']["$bug[assignedto]"];
62 echo iff(is_array($assigninfo), "<div><strong>Assigned to:</strong> " . construct_user_display($assigninfo) . "</div>");
64 if ($bugsys->userinfo
['permissions'] & CANEDITINFO
)
66 echo '<div>[<a href="editbug.php?bugid=' . $bug['bugid'] . '">Edit Bug Report</a>]</div>';
71 $comments = $DB_sql->query("
72 SELECT comment.*, user.email, user.showemail, user.displayname
73 FROM " . TABLE_PREFIX
. "comment AS comment
74 LEFT JOIN " . TABLE_PREFIX
. "user AS user
75 ON (comment.userid = user.userid)
76 WHERE comment.bugid = $vars[bugid]
77 ORDER BY comment.dateline ASC"
79 while ($comment = $DB_sql->fetch_array($comments))
81 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>' . construct_user_display($comment) . "</td></tr>";
82 echo "<tr><td>" . $comment['comment_parsed'] . "</td></tr>";
83 if (($bugsys->userinfo
['permissions'] & CANEDITOWN
AND $bugsys->userinfo
['userid'] == $comment['userid']) OR $bugsys->userinfo
['permissions'] & CANEDITOTHERS
)
85 echo "<tr style=\"background-color:#999999\"><td>[<a href=\"editcomment.php?commentid=$comment[commentid]\">Edit Comment</a>]</td></tr>";
90 if ($bugsys->userinfo
['permissions'] & CANPOSTCOMMENTS
)
92 echo "<div>[<a href=\"newcomment.php?bugid=$bug[bugid]\">New Comment</a>]</div>";
99 /*=====================================================================*\
100 || ###################################################################
103 || ###################################################################
104 \*=====================================================================*/