2 /*=====================================================================*\
3 || ################################################################### ||
4 || # Renapsus [#]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 (!can_perform('canviewbugs'))
21 // ###################################################################
23 if (empty($_REQUEST['do']))
25 $_REQUEST['do'] = 'modify';
28 // ###################################################################
30 if ($_REQUEST['do'] == 'modify')
32 sanitize(array('bugid' => INT));
34 $bug = $DB_sql->query_first("
35 SELECT bug.*, user.displayname, user.email, user.showemail
36 FROM " . TABLE_PREFIX
. "bug AS bug
37 LEFT JOIN " . TABLE_PREFIX
. "user AS user
38 ON (bug.userid = user.userid)
39 WHERE bug.bugid = $vars[bugid]"
44 echo 'alert: bad bug';
48 echo "<div><strong>Bug ID:</strong> $bug[bugid]</div>";
49 echo "<div><strong>Reported by:</strong> " . construct_user_display($bug) . "</div>";
50 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>";
51 echo "<div><strong>Title / summary:</strong> $bug[summary]</div>";
52 echo "<div><strong>Status:</strong> " . $bugsys->datastore
['status']["$bug[status]"]['status'] . " / <strong>Resolution:</strong> " . $bugsys->datastore
['resolution']["$bug[resolution]"]['resolution'] . "</div>";
53 echo "<div><strong>Severity:</strong> " . $bugsys->datastore
['severity']["$bug[severity]"]['severity'] . "</div>";
54 echo "<div><strong>Priority:</strong> " . $bugsys->datastore
['priority']["$bug[priority]"]['priority'] . "</div>";
55 $assigninfo = $bugsys->datastore
['assignto']["$bug[assignedto]"];
56 echo iff(is_array($assigninfo), "<div><strong>Assigned to:</strong> " . construct_user_display($assigninfo) . "</div>");
58 if (((can_perform('caneditown') AND $bugsys->userinfo
['userid'] == $comment['userid']) OR can_perform('caneditothers')) AND can_perform('caneditinfo'))
60 echo '<div>[<a href="editreport.php?bugid=' . $bug['bugid'] . '">Edit Bug Report</a>]</div>';
65 $comments = $DB_sql->query("
66 SELECT comment.*, user.email, user.showemail, user.displayname
67 FROM " . TABLE_PREFIX
. "comment AS comment
68 LEFT JOIN " . TABLE_PREFIX
. "user AS user
69 ON (comment.userid = user.userid)
70 WHERE comment.bugid = $vars[bugid]
71 ORDER BY comment.dateline ASC"
73 while ($comment = $DB_sql->fetch_array($comments))
75 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>";
76 echo "<tr><td>" . $comment['comment_parsed'] . "</td></tr>";
77 if ((can_perform('caneditown') AND $bugsys->userinfo
['userid'] == $comment['userid']) OR can_perform('caneditothers'))
79 echo "<tr style=\"background-color:#999999\"><td>[<a href=\"editcomment.php?commentid=$comment[commentid]\">Edit Comment</a>]</td></tr>";
84 if (can_perform('canpostcomments'))
86 echo "<div>[<a href=\"newcomment.php?bugid=$bug[bugid]\">New Comment</a>]</div>";
93 /*=====================================================================*\
94 || ###################################################################
97 || ###################################################################
98 \*=====================================================================*/