diff --git a/admin_reports.php b/admin_reports.php index df8b3fb..778425b 100644 --- a/admin_reports.php +++ b/admin_reports.php @@ -1,5 +1,7 @@ - $value) { - if ($key == $reportsData[$i]['status']) $reports[$key][$reportsData[$i]['id']] = $reportsData[$i]; - } - } + for ($i = 0; $i < count($reportsData); $i++) + foreach ($statusTypes as $key => $value) + if ($key == $reportsData[$i]['status']) + $reports[$key][$reportsData[$i]['id']] = $reportsData[$i]; } // POST logic (Update report and give player points) @@ -40,9 +41,9 @@ if (!empty($_POST)) { $customPoints = getValue($_POST['customPoints']); $reportId = getValue($_POST['id']); - $changelogReportId = getValue($_POST['changelogReportId']); - $changelogValue = getValue($_POST['changelogValue']); - $changelogText = getValue($_POST['changelogText']); + $changelogReportId = &$_POST['changelogReportId']; + $changelogValue = &$_POST['changelogValue']; + $changelogText = &$_POST['changelogText']; $changelogStatus = ($changelogReportId !== false && $changelogValue === '2' && $changelogText !== false) ? true : false; if ($customPoints !== false) $price = (int)($price + $customPoints); @@ -101,11 +102,14 @@ if (!empty($_POST)) { } elseif (!empty($_GET)) { // Fetch GET data $action = getValue($_GET['action']); - $playerName = getValue($_GET['playerName']); + $playerName = getValue($_GET['name']); $reportId = getValue($_GET['id']); // Fetch the report we intend to modify - foreach ($reports as $sid => $sa) foreach ($sa as $rid => $ra) if ($rid == $reportId) $report = $reports[$sid][$reportId]; + foreach ($reports as $sid => $sa) + foreach ($sa as $rid => $ra) + if ($rid == $reportId) + $report = $reports[$sid][$reportId]; // Create html form ?> @@ -117,19 +121,16 @@ if (!empty($_POST)) {
Set status:
Give user points: +
$statusArray) { ?> -

(Visible)

+

(Visible)

- - + + Reported:
Status:. Edit - + No reports submitted."; ?> + \ No newline at end of file
Info
Description
InfoDescription
-
-