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 define('SVN', '$Id$');
15 require_once('./global.php');
17 if (!can_perform('canpostcomments'))
19 $message->error_permission();
22 // ###################################################################
24 if ($_POST['do'] == 'insert')
26 $bugsys->in
['comment_parsed'] = $bugsys->in
['comment'];
28 if (!$bugsys->options
['allowhtml'])
30 $bugsys->in
['comment_parsed'] = $bugsys->sanitize($bugsys->in
['comment_parsed']);
36 INSERT INTO " . TABLE_PREFIX
. "comment
37 (bugid, userid, dateline, comment, comment_parsed)
39 (" . intval($bugsys->in
['bugid']) . ", " . $bugsys->userinfo
['userid'] . ",
40 $time, '" . $bugsys->in
['comment'] . "',
41 '" . nl2br($bugsys->in
['comment_parsed']) . "'
45 $commentid = $db->insert_id();
48 UPDATE " . TABLE_PREFIX
. "bug
49 SET lastposttime = $time,
50 lastpostby = " . $bugsys->userinfo
['userid'] . ",
51 hiddenlastposttime = $time,
52 hiddenlastpostby = " . $bugsys->userinfo
['userid'] . "
53 WHERE bugid = " . intval($bugsys->in
['bugid'])
57 require_once('./includes/class_history.php');
59 $log->bugid
= $bugsys->in
['bugid'];
60 $log->language
= 'log_new_comment';
61 $log->arguments
= array($commentid);
64 $message->redirect($lang->string('Your reply has been added to the comment list.'), "showreport.php?bugid=" . intval($bugsys->in
['bugid']));
67 /*=====================================================================*\
68 || ###################################################################
71 || ###################################################################
72 \*=====================================================================*/