"; switch ($mode) { case 'host': echo "Computer ID
click for details"; break; case 'user': echo "User"; break; case 'team': echo "Team"; break; case 'model': echo "Model"; break; case 'day': echo "Date"; break; } echo "CUDA CreditNumber of CUDA jobs\n"; } function show_row($x, $y, $mode, $i) { $class = $i%2?"row0":"row1"; echo ""; switch ($mode) { case 'host': echo "$x"; break; case 'user': $user = BoincUser::lookup_id($x); echo "$user->name"; break; case 'team': $team = BoincTeam::lookup_id($x); if ($team) { echo "$team->name"; } else { echo "(no team)"; } break; case 'model': echo $x; break; case 'day': echo $x; break; } echo "".format_credit_large($y->credit),"$y->nresults\n"; } $mode = get_str('mode'); $fname = "../ops/".filename($mode); $data = file_get_contents($fname); $array = unserialize($data); page_head(title($mode)); start_table(); header_row($mode); $i = 0; foreach ($array as $x=>$y) { show_row($x, $y, $mode, $i); $i++; } end_table(); page_tail(); ?>