diff --git a/htdocs/crashes.php b/htdocs/crashes.php
index 3c95677..bb1da3e 100644
--- a/htdocs/crashes.php
+++ b/htdocs/crashes.php
@@ -4,11 +4,31 @@ define("SITE_ROOT", realpath(dirname(__file__)));
require_once SITE_ROOT . "/lib/init.php";
$S->requireUser();
+$total = CrashReport::getTotal();
+$reports = CrashReport::getReports();
Layout::header();
?>
-Not implemented
+
Reports
+
+
+ | ID |
+ Version |
+ Operating System |
+ GPU |
+ Grid (region) |
+
+
+
+ | id ?> |
+ client_channel . " " . $reports[$i]->client_version) ?> |
+ os) ?> |
+ gpu) ?> |
+ grid . " (" . $reports[$i]->region . ")") ?> |
+
+
+
query("select count(id) as total from reports") OR !$row = $DB->fetchRow($res))
+ {
+ return 0;
+ }
+ else
+ {
+ return $row["total"];
+ }
+ }
+
+ function getReports($offset = 0, $limit = 100)
+ {
+ global $DB;
+
+ $ret = array();
+ if (!$res = $DB->query(kl_str_sql("select * from reports order by id desc limit !i offset !i", $limit, $offset)))
+ {
+ return $ret;
+ }
+
+ while ($row = $DB->fetchRow($res))
+ {
+ $r = new CrashReport;
+ $DB->loadFromDbRow($r, $res, $row);
+ $r->parseStackTrace($r->raw_stacktrace);
+ $ret[] = $r;
+ }
+
+ return $ret;
+ }
+
function delete()
{
global $DB;
diff --git a/htdocs/lib/DBH.php b/htdocs/lib/DBH.php
index d4081fe..c1a4cfd 100644
--- a/htdocs/lib/DBH.php
+++ b/htdocs/lib/DBH.php
@@ -1,6 +1,4 @@