summaryrefslogtreecommitdiff
blob: adc6566a23de597fa73891232259368a0d4b4b18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
function init_builds_index(&$S) {
	if (!isset($S['user'])) return 'login';
	return array('title' => 'My Builds');
}
function body_builds_index(&$S) {
	$r=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();
	}
}
?>