diff options
Diffstat (limited to 'frontend/pages/builds/index.php')
-rw-r--r-- | frontend/pages/builds/index.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/frontend/pages/builds/index.php b/frontend/pages/builds/index.php new file mode 100644 index 0000000..4b6b7c8 --- /dev/null +++ b/frontend/pages/builds/index.php @@ -0,0 +1,18 @@ +<?php +function init_builds_index() { + global $S; + if (!isset($S['user'])) return 'login'; + return array('title' => 'My Builds'); +} +function body_builds_index() { + global $S; + $r=$S['pdo']->query('SELECT * FROM `builds` WHERE `owner`='.$S['user']->id.' ORDER BY `ctime` IS NULL ASC, `ctime` ASC, `status` DESC'); + if ($r->rowCount() == 0) { + echo print_warning('No builds found.'); + } + while ($build=$r->fetch(PDO::FETCH_ASSOC)) { + $build=new sql_build($build); + echo $build->display(); + } +} +?> |