TriviaTime

Reports

The reports and edits that are currently pending.

Reports

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 ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } } else { die('Couldnt connect to db'); } ?>
Report # Username Question # Question Report Text
' . $res['id'] . '' . $res['username'] . '' . $res['question_num'] . '' . $res['original'] . '' . $res['report_text'] . '
paginate(); ?>

Edits

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 ''; echo ''; echo ''; echo ''; echo ''; echo ''; } } } else { die($err); } ?>
Edit # Username New Question Old Question Question #
' . $res['id'] . '' . $res['username'] . '' . $differenceString . '' . $res['original'] . '' . $res['question_id'] . '
paginate(); ?>

Added Questions

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 ''; echo ''; echo ''; echo ''; } } } else { die('Couldnt connect to db'); } ?>
# Author New Question
' . $res['id'] . '' . $res['username'] . '' . $res['question'] . '
paginate(); ?>