create_time);
switch ($asgn->target_type) {
case 0:
$x = "All hosts";
break;
case 1:
$x = "id>Host $asgn->target_id";
break;
case 2:
if ($asgn->multi) {
$y = "All hosts belonging to ";
} else {
$y = "One host belonging to ";
}
$x = "$ytarget_id>Host $asgn->target_id";
break;
case 3:
if ($asgn->multi) {
$y = "All hosts belonging to ";
} else {
$y = "One host belonging to ";
}
$x = "$ytarget_id>Team $asgn->target_id";
break;
}
echo "
$asgn->id (created $when) |
$x |
workunitid>$asgn->workunitid |
resultid>$asgn->resultid |
";
}
function show_assigns() {
admin_page_head("Assignments");
$asgns = BoincAssignment::enum();
if (count($asgns)) {
start_table();
table_header("Assignment ID/time", "target", "workunit", "result");
foreach ($asgns as $asgn) {
show_assign($asgn);
}
end_table();
} else {
echo "No assignments";
}
admin_page_tail();
}
$action = get_str('action', true);
switch ($action) {
default:
show_assigns();
}
?>