Gazelle/sections/ajax/grab_report.php

21 lines
331 B
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-05-05 08:00:31 +00:00
if (!check_perms('admin_reports')) {
2011-03-28 14:21:28 +00:00
error(403);
}
2013-05-05 08:00:31 +00:00
if (!is_number($_GET['id'])) {
2011-03-28 14:21:28 +00:00
error(0);
}
2013-05-05 08:00:31 +00:00
$DB->query("
UPDATE reportsv2
2013-07-17 08:00:52 +00:00
SET Status = 'New'
WHERE ID = ".$_GET['id']."
2013-05-27 08:00:58 +00:00
AND Status != 'Resolved'");
2013-05-05 08:00:31 +00:00
if ($DB->affected_rows() > 0) {
2011-03-28 14:21:28 +00:00
//Win
} else {
2013-07-17 08:00:52 +00:00
echo 'You just tried to grab a resolved or nonexistent report!';
2011-03-28 14:21:28 +00:00
}
?>