diff --git a/php/reports.php b/php/reports.php index 5d2c1cc..3e01206 100644 --- a/php/reports.php +++ b/php/reports.php @@ -87,81 +87,130 @@

- -
-
-

Reports

- - - - - - - - - - query('SELECT * FROM triviareport LIMIT 10'); - if ($q === false) { - die("Error: database error: table does not exist\n"); - } else { - $result = $q->fetchAll(); - foreach($result as $res) { +
+
+ +
+
+
+
+

Reports

+
#UsernameReport Text
+ + + + + + + + + + + query('SELECT tr.*, tq.question as original FROM triviareport tr INNER JOIN triviaquestion tq on tq.id=question_num LIMIT 10'); + if ($q === false) { + die("Error: database error: table does not exist\n"); + } else { + $result = $q->fetchAll(); + foreach($result as $res) { echo ''; echo ''; echo ''; + echo ''; + echo ''; echo ''; echo ''; + } } + } else { + die('Couldnt connect to db'); + } + ?> + +
Report #UsernameQuestion #QuestionReport Text
' . $res['id'] . '' . $res['username'] . '' . $res['question_num'] . '' . $res['original'] . '' . $res['report_text'] . '
+
+
+ + +
+
+ +
+
+
+
+

Edits

+ + + + + + + + + + + + query('SELECT te.*, tq.question as original FROM triviaedit te INNER JOIN triviaquestion tq on tq.id=question_id ORDER BY id DESC LIMIT 10'); + if ($q === false) { + die("Error: database error: table does not exist\n"); + } else { + $result = $q->fetchAll(); + foreach($result as $res) { + $isItalic = false; + $brokenNew = str_split($res['question']); + $brokenOld = str_split($res['original']); + $differenceString = ''; + for($i=0;$i'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; } - } else { - die('Couldnt connect to db'); - } - ?> - -
Edit #UsernameNew QuestionOld QuestionQuestion #
' . $res['id'] . '' . $res['username'] . '' . $differenceString . '' . $res['original'] . '' . $res['question_id'] . '
+ } + } else { + die($err); + } + ?> + + +
-
-
-

Edits

- - - - - - - - - - - - query('SELECT *, tq.question as original FROM triviaedit INNER JOIN triviaquestion tq on tq.id=question_id ORDER BY id DESC LIMIT 10'); - if ($q === false) { - die("Error: database error: table does not exist\n"); - } else { - $result = $q->fetchAll(); - foreach($result as $res) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - } - } - } else { - die($err); - } - ?> - -
Edit #UsernameNew QuestionOld QuestionQuestion #
' . $res['id'] . '' . $res['username'] . '' . $res['question'] . '' . $res['original'] . '' . $res['question_id'] . '
-
-