Hey all.
I've been updating SeanyBobs Bug report system. I'm sick of seeing these one's around the forums with all this crap like urgency ect. I think it's un-needed and basically is just useless info...
All copyrights go to SeanyBob. I've simply updated the code

- Anyway here it is
CREATE TABLE IF NOT EXISTS `bugports` (
`brID` int(11) NOT NULL auto_increment,
`brREPORTER` int(11) NOT NULL default '0',
`brTEXT` longtext NOT NULL,
`active` int(11) NOT NULL default '0',
`time` varchar(40) NOT NULL default '0',
PRIMARY KEY (`brID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;Create a file called Bugports.php
<?php
include_once DIRNAME(__FILE__) . '/globals.php';
$bugtxt="Report a bug dont exploit it - Please be sure its a bug and not spelling mistake";
$bugadded="Your bug has been processed. Our admins have been alerted. Thank you";
if($_POST['report'])
{
event_add(1,"New Bug Report ",$c);
$insertbug = sprintf("INSERT INTO bugports VALUES ('', %u, '%s', '1',%u)", $userid, $db->escape($_POST['report']),time());
$db->query($insertbug);
echo $bugadded;
$h->endpage();
}
else
{
print "<h3>Bug Report</h3>
$bugtxt<br />
<form action='bugport.php' method='post'>
What the bug is: <br />
<textarea rows='20' cols='60' name='report'>{$_GET['report']}</textarea><br />
<input type='submit' value='Send Report' /></form>";
}
$h->endpage();
?>In staff_users.php
Cases
case 'breportsview': breports_view(); break;
case 'brepclear': breport_clear(); break;
add at the bottom
function breports_view()
{
global $db,$ir,$c,$h,$userid;
$time=date('F j Y, g:i:s a',$r['time']);
print "<h3>Bug Reports</h3>";
echo "<table class='table' width='80%' border='1'>";
echo "<tr>";
echo "<th width='25%'>Reporter</th>";
echo "<th width='25%'>bug</th>";
echo "<th width='25%'>clear</th>";
echo "<th width='25%'>time reported</th>";
echo "</tr>";
$q=$db->query("SELECT br.*,u1.username as reporter FROM bugports br LEFT JOIN users u1 ON u1.userid=br.brREPORTER WHERE active=1 ORDER BY br.brID DESC",$c) or die(mysql_error());
while($r=mysql_fetch_array($q))
{
print "\n<tr> <td><a href='viewuser.php?u={$r['brREPORTER']}'>{$r['reporter']}</a> [{$r['brREPORTER']}]</td>";
echo "<td>".stripslashes(htmlspecialchars($r['brTEXT']))."</td>
<td><a href='staff_users.php?action=brepclear&ID={$r['brID']}'>Clear</a></td>
<td>$time</td> </tr>";
}
//".time_format(time() - $r['time'])."
print "</table>";
}
function breport_clear()
{
global $db,$ir,$c,$h,$userid;
$_GET['ID'] = abs((int) $_GET['ID']);
$db->query("UPDATE bugports SET active=0 WHERE brID={$_GET['ID']}");
echo "Cleared<br /><a href='staff_users.php?action=breportsview'>> Back</a>";
}
This'll never delete any bugs from the database, It'll simple set it to NOT active bug and it wont appear in the bugs list
I may once again update the code later this month ;]