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 $focus['showreport
'] = 'focus
';
17 require_once('./global.php
');
19 if (!$bugsys->userinfo['userid
'])
21 $message->error_permission();
24 // ###################################################################
26 if (empty($_REQUEST['do']))
28 $message->error($lang->getlex('error_invalid_id
'));
31 // ###################################################################
33 if ($_REQUEST['do'] == 'handle
')
35 $bug = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "bug WHERE bugid = " . intval($bugsys->in['bugid
']) . ((!can_perform('canviewhidden
')) ? " AND !bug.hidden" : ''));
38 $message->error($lang->getlex('error_invalid_id
'));
41 if ($db->query_first("SELECT * FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid
'] . " AND bugid = " . intval($bugsys->in['bugid
'])))
43 $db->query("DELETE FROM " . TABLE_PREFIX . "favourite WHERE userid = " . $bugsys->userinfo['userid
'] . " AND bugid = " . intval($bugsys->in['bugid
']));
44 $message->redirect($lang->string('This bug has been removed from your favourites
list.'), "showreport.php?bugid=" . intval($bugsys->in['bugid
']));
48 $db->query("INSERT INTO " . TABLE_PREFIX . "favourite (userid, bugid) VALUES (" . $bugsys->userinfo['userid
'] . ", " . intval($bugsys->in['bugid
']) . ")");
49 $message->redirect($lang->string('This bug has been added to your favourites
list.'), "showreport.php?bugid=" . intval($bugsys->in['bugid
']));
53 /*=====================================================================*\
54 || ###################################################################
57 || ###################################################################
58 \*=====================================================================*/