.
// web interfaces for viewing and controlling batches
ini_set('display_errors', 'stdout');
error_reporting(E_ALL);
require_once("../inc/util.inc");
require_once("../inc/boinc_db.inc");
require_once("../inc/submit_db.inc");
function show_batch($user) {
$batch_id = get_int('batch_id');
$batch = BoincBatch::lookup_id($batch_id);
if (!$batch || $batch->user_id != $user->id) {
error_page("no batch");
}
page_head("Batch $batch->id");
$wus = BoincWorkunit::enum("batch=$batch->id");
foreach ($wus as $wu) {
echo "
workunit: $wu->name";
$results = BoincResult::enum("workunitid=$wu->id");
foreach ($results as $result) {
echo "
result: $result->name";
}
}
page_tail();
}
function show_batches($user) {
$batches = BoincBatch::enum("user_id=$user->id");
page_head("Batches");
start_table();
table_header("Batch ID", "Submitted", "# jobs");
foreach ($batches as $batch) {
echo "