diff --git a/php/css/triviatime.css b/php/css/triviatime.css index 9b2c2be..26fbac5 100644 --- a/php/css/triviatime.css +++ b/php/css/triviatime.css @@ -1,4 +1,3 @@ - body { padding-top: 40px; padding-bottom: 60px; @@ -23,10 +22,13 @@ body { line-height: 16px; margin-bottom: 10px; } - .breakable { word-wrap: break-word; overflow-wrap: break-word; -ms-word-break: break-all; word-break: break-all -} \ No newline at end of file +} +.modal-table tbody tr:hover { + background-color: #E0E0E0; + cursor: pointer; +} diff --git a/php/includes/storage.php b/php/includes/storage.php index c671f0b..da140b4 100644 --- a/php/includes/storage.php +++ b/php/includes/storage.php @@ -46,6 +46,41 @@ return $result; } + public function getTopDeletions($page, $max) { + if(!$this->isConnected()) { + throw new StorageConnectionException(); + } + if($page < 1) { + $page = 1; + } + if($max < 1) { + $max = 1; + } + $q = $this->db->prepare('SELECT td.*, tq.question as question + FROM triviadelete td + INNER JOIN triviaquestion tq + ON tq.id=td.line_num + ORDER BY id DESC LIMIT :offset, :maxResults'); + $q->execute(array(':offset'=>($page-1) * $max, ':maxResults'=>$max)); + if ($q === false) { + throw new StorageSchemaException(); + } + $result = $q->fetchAll(); + return $result; + } + + public function getCountDeletions() { + if(!$this->isConnected()) { + throw new StorageConnectionException(); + } + $q = $this->db->query('SELECT count(id) FROM triviareport'); + if ($q === false) { + throw new StorageSchemaException(); + } + $result = $q->fetchColumn(); + return $result; + } + public function getTopReports($page, $max) { if(!$this->isConnected()) { throw new StorageConnectionException(); diff --git a/php/index.php b/php/index.php index 2bab2c4..8b3de83 100644 --- a/php/index.php +++ b/php/index.php @@ -66,7 +66,7 @@ try { } $storage->close(); ?> -
| Round # | @@ -98,6 +98,7 @@ try { +
|---|