diff --git a/php/reports.php b/php/reports.php
index 7b3d2d2..f146abb 100644
--- a/php/reports.php
+++ b/php/reports.php
@@ -77,232 +77,195 @@ $maxResults = 5;
-
-
-
-
-
-
-
-
Reports
-
-
-
- | Report # |
- Username |
- Question # |
- Question |
- Report Text |
-
-
-
- prepare('SELECT tr.*, tq.question as original
- FROM triviareport tr
- INNER JOIN triviaquestion tq
- on tq.id=question_num
- ORDER BY id DESC LIMIT :offset, :maxResults');
- $qCount = $db->query('SELECT count(id) FROM triviareport');
- $q->execute(array(':offset'=>($reportPage-1) * $maxResults, ':maxResults'=>$maxResults));
- if ($q === false) {
- die("Error: database error: table does not exist\n");
- } else {
- $result = $q->fetchAll();
- $resultCount = $qCount->fetchColumn();
- foreach($result as $res) {
- echo '';
- echo '| ' . $res['id'] . ' | ';
- echo '' . $res['username'] . ' | ';
- echo '' . $res['question_num'] . ' | ';
- echo '' . $res['original'] . ' | ';
- echo '' . $res['report_text'] . ' | ';
- echo '
';
- }
- }
- } else {
- die('Couldnt connect to db');
- }
- ?>
-
-
- paginate();
- ?>
-
-
-
-
+
+
+
+
Reports
+
+
+
+ | Report # |
+ Username |
+ Question # |
+ Question |
+ Report Text |
+
+
+
+ prepare('SELECT tr.*, tq.question as original
+ FROM triviareport tr
+ INNER JOIN triviaquestion tq
+ on tq.id=question_num
+ ORDER BY id DESC LIMIT :offset, :maxResults');
+ $qCount = $db->query('SELECT count(id) FROM triviareport');
+ $q->execute(array(':offset'=>($reportPage-1) * $maxResults, ':maxResults'=>$maxResults));
+ if ($q === false) {
+ die("Error: database error: table does not exist\n");
+ } else {
+ $result = $q->fetchAll();
+ $resultCount = $qCount->fetchColumn();
+ foreach($result as $res) {
+ echo '';
+ echo '| ' . $res['id'] . ' | ';
+ echo '' . $res['username'] . ' | ';
+ echo '' . $res['question_num'] . ' | ';
+ echo '' . $res['original'] . ' | ';
+ echo '' . $res['report_text'] . ' | ';
+ echo '
';
+ }
+ }
+ } else {
+ die('Couldnt connect to db');
+ }
+ ?>
+
+
+ paginate();
+ ?>
-
-
-
-
-
-
-
-
Edits
-
-
-
- | Edit # |
- Username |
- New Question |
- Old Question |
- Question # |
-
-
-
- prepare('SELECT te.*, tq.question as original
- FROM triviaedit te
- INNER JOIN triviaquestion tq
- on tq.id=question_id
- ORDER BY id DESC LIMIT :offset, :maxResults');
- $q->execute(array(':offset'=>($editPage-1) * $maxResults, ':maxResults'=>$maxResults));
- $qCount = $db->query('SELECT count(id) FROM triviaedit');
- if ($q === false) {
- die("Error: database error: table does not exist\n");
- } else {
- $result = $q->fetchAll();
- $resultCount = $qCount->fetchColumn();
- foreach($result as $res) {
- $isItalic = false;
- $splitNew = explode('*', $res['question']);
- $splitOld = explode('*', $res['original']);
+
+
+
Edits
+
+
+
+ | Edit # |
+ Username |
+ New Question |
+ Old Question |
+ Question # |
+
+
+
+ prepare('SELECT te.*, tq.question as original
+ FROM triviaedit te
+ INNER JOIN triviaquestion tq
+ on tq.id=question_id
+ ORDER BY id DESC LIMIT :offset, :maxResults');
+ $q->execute(array(':offset'=>($editPage-1) * $maxResults, ':maxResults'=>$maxResults));
+ $qCount = $db->query('SELECT count(id) FROM triviaedit');
+ if ($q === false) {
+ die("Error: database error: table does not exist\n");
+ } else {
+ $result = $q->fetchAll();
+ $resultCount = $qCount->fetchColumn();
+ foreach($result as $res) {
+ $isItalic = false;
+ $splitNew = explode('*', $res['question']);
+ $splitOld = explode('*', $res['original']);
- $differenceString = '';
- for($y=0;$y0) {
- $isItalic = false;
- $differenceString .= '';
- $differenceString .= '*';
- }
- $brokenNew = str_split($splitNew[$y]);
- if(!array_key_exists($y, $splitOld)){
- $splitOld[$y] = '*';
- }
- $brokenOld = str_split($splitOld[$y]);
- for($i=0;$i';
- echo '' . $res['id'] . ' | ';
- echo '' . $res['username'] . ' | ';
- echo '' . $differenceString . ' | ';
- echo '' . $res['original'] . ' | ';
- echo '' . $res['question_id'] . ' | ';
- echo '';
- }
- }
- } else {
- die($err);
+ $differenceString = '';
+ for($y=0;$y0) {
+ $isItalic = false;
+ $differenceString .= '';
+ $differenceString .= '*';
}
- ?>
-
-
- paginate();
- ?>
-
-
-
-
+ $brokenNew = str_split($splitNew[$y]);
+ if(!array_key_exists($y, $splitOld)){
+ $splitOld[$y] = '*';
+ }
+ $brokenOld = str_split($splitOld[$y]);
+ for($i=0;$i';
+ echo '' . $res['id'] . ' | ';
+ echo '' . $res['username'] . ' | ';
+ echo '' . $differenceString . ' | ';
+ echo '' . $res['original'] . ' | ';
+ echo '' . $res['question_id'] . ' | ';
+ echo '';
+ }
+ }
+ } else {
+ die($err);
+ }
+ ?>
+
+
+ paginate();
+ ?>
-
-
-
-
-
-
-
-
Added Questions
-
-
-
- | # |
- Author |
- New Question |
-
-
-
- prepare('SELECT tq.* FROM triviatemporaryquestion tq ORDER BY tq.id DESC LIMIT :offset, :maxResults');
- $q->execute(array(':offset'=>($newPage-1) * $maxResults, ':maxResults'=>$maxResults));
- $qCount = $db->query('SELECT count(id) FROM triviatemporaryquestion');
- if ($q === false) {
- die("Error: database error: table does not exist\n");
- } else {
- $result = $q->fetchAll();
- $resultCount = $qCount->fetchColumn();
- foreach($result as $res) {
- echo '';
- echo '| ' . $res['id'] . ' | ';
- echo '' . $res['username'] . ' | ';
- echo '' . $res['question'] . ' | ';
- echo '
';
- }
- }
- } else {
- die('Couldnt connect to db');
- }
- ?>
-
-
- paginate();
- ?>
-
-
-
-
+
+
+
+
Added Questions
+
+
+
+ | # |
+ Author |
+ New Question |
+
+
+
+ prepare('SELECT tq.* FROM triviatemporaryquestion tq ORDER BY tq.id DESC LIMIT :offset, :maxResults');
+ $q->execute(array(':offset'=>($newPage-1) * $maxResults, ':maxResults'=>$maxResults));
+ $qCount = $db->query('SELECT count(id) FROM triviatemporaryquestion');
+ if ($q === false) {
+ die("Error: database error: table does not exist\n");
+ } else {
+ $result = $q->fetchAll();
+ $resultCount = $qCount->fetchColumn();
+ foreach($result as $res) {
+ echo '';
+ echo '| ' . $res['id'] . ' | ';
+ echo '' . $res['username'] . ' | ';
+ echo '' . $res['question'] . ' | ';
+ echo '
';
+ }
+ }
+ } else {
+ die('Couldnt connect to db');
+ }
+ ?>
+
+
+ paginate();
+ ?>