basically i took preport and converted it... here ya go...
mysql queries
CREATE TABLE `bugports` (
`brID` int(11) NOT NULL auto_increment,
`brREPORTER` int(11) NOT NULL default '0',
`brTEXT` longtext NOT NULL,
PRIMARY KEY (`brID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
bugport.php
<?php
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
get_diffvars();
$fm=money_formatter($ir['money']);
$cm=money_formatter($ir['credits'],'');
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm,$cm);
$h->menuarea();
if($_POST['report'])
{
event_add(1,"New Bug Report",$c);
mysql_query("INSERT INTO bugports VALUES('',$userid,'{$_POST['report']}')", $c) or die("Your report could not be processed, make sure you have filled out the form entirely.");
print "Report processed!";
}
else
{
print "Bug Report
Know of a bug? Don't exploit it! Report it here, you may be rewarded :)
What the bug is:
{$_GET['report']}
";
}
$h->endpage();
?>
open up admin.php
find
case 'reportsview': reports_view(); break;
case 'repclear': report_clear(); break;
after it add
case 'bugreportsview': bugreports_view(); break;
case 'bugrepclear': bugreport_clear(); break;
find
[[url='admin.php?action=reportsview']Player Reports[/url]]
after it add
[[url='admin.php?action=bugreportsview']Bug Reports[/url]]
find
function report_clear()
{
global $ir,$c,$h,$userid;
$_GET['ID'] = abs((int) $_GET['ID']);
mysql_query("DELETE FROM preports WHERE prID={$_GET['ID']}",$c);
print "Report cleared and deleted!
[url='admin.php?action=reportsview']> Back[/url]";
}
after it add
function bugreports_view()
{
global $ir,$c,$h,$userid;
print "Bug Reports
</pre>
<table width="80%">Reporter What the bug is [url='viewuser.php?u={$r[']{$r['reporter']}[/url] [{$r['brREPORTER']}] {$r['brTEXT']} [url='admin.php?action=bugrepclear&ID={$r[']Clear[/url] </table>";<br>}<br>function bugreport_clear()<br>{<br>global $ir,$c,$h,$userid;<br>$_GET['ID'] = abs((int) $_GET['ID']);<br>mysql_query("DELETE FROM bugports WHERE brID={$_GET['ID']}",$c);<br>print "Report cleared and deleted!<br><br>[url='admin.php?action=bugreportsview']> Back[/url]"