2003-08-07 21:40:17 +00:00
|
|
|
<?php
|
|
|
|
// show summary of a workunit
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/result.inc");
|
2003-08-07 21:40:17 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
$wuid = $_GET["wuid"];
|
|
|
|
page_head("Work unit");
|
2003-12-12 21:10:39 +00:00
|
|
|
$wu = lookup_wu($wuid);
|
|
|
|
if (!$wu) {
|
|
|
|
echo "can't find workunit";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
$app = lookup_app($wu->appid);
|
2003-08-07 21:40:17 +00:00
|
|
|
|
|
|
|
start_table();
|
2003-12-12 21:10:39 +00:00
|
|
|
row2("application", $app->user_friendly_name);
|
2003-08-07 21:40:17 +00:00
|
|
|
row2("created", time_str($wu->create_time));
|
|
|
|
row2("name", $wu->name);
|
2004-12-15 23:50:00 +00:00
|
|
|
if ($wu->canonical_resultid) {
|
|
|
|
row2("canonical result", "<a href=result.php?resultid=$wu->canonical_resultid>$wu->canonical_resultid</a>");
|
|
|
|
row2("granted credit", format_credit($wu->canonical_credit));
|
|
|
|
}
|
|
|
|
if ($wu->error_mask) {
|
|
|
|
row2("errors", wu_error_mask_str($wu->error_mask));
|
|
|
|
}
|
2003-08-07 21:40:17 +00:00
|
|
|
echo "</table>\n";
|
|
|
|
|
2004-01-08 00:09:26 +00:00
|
|
|
result_table_start(false, true, true);
|
2003-08-07 21:40:17 +00:00
|
|
|
$result = mysql_query("select * from result where workunitid=$wuid");
|
|
|
|
while ($res = mysql_fetch_object($result)) {
|
2004-01-08 00:09:26 +00:00
|
|
|
show_result_row($res, false, true, true);
|
2003-08-07 21:40:17 +00:00
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
echo "</table>\n";
|
|
|
|
page_tail();
|
|
|
|
?>
|