From 6fe5e90691b803079e02c7d98d629a9e46ee7d7e Mon Sep 17 00:00:00 2001 From: rootcoma Date: Sun, 3 Nov 2013 08:47:01 -0800 Subject: [PATCH 1/7] more info for reports --- php/reports.php | 158 ++++++++++++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 67 deletions(-) diff --git a/php/reports.php b/php/reports.php index 5d2c1cc..67da838 100644 --- a/php/reports.php +++ b/php/reports.php @@ -87,81 +87,105 @@

- -
-
-

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'] . '
+ } else { + die('Couldnt connect to db'); + } + ?> + + +
+
+ + +
+
+ +
+
+
+
+

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) { + 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'] . '
+
-
-
-

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'] . '
-
-