2003-08-07 21:40:17 +00:00
|
|
|
<?php
|
2005-02-19 08:06:53 +00:00
|
|
|
// show summary of a workunit
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/result.inc");
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
db_init();
|
|
|
|
$wuid = get_int("wuid");
|
|
|
|
$wu = lookup_wu($wuid);
|
|
|
|
if (!$wu) {
|
|
|
|
error_page("car't find workunit");
|
|
|
|
}
|
2003-12-12 21:10:39 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
page_head("Work unit");
|
|
|
|
$app = lookup_app($wu->appid);
|
2003-08-07 21:40:17 +00:00
|
|
|
|
2005-02-19 08:06:53 +00:00
|
|
|
start_table();
|
|
|
|
row2("application", $app->user_friendly_name);
|
|
|
|
row2("created", time_str($wu->create_time));
|
|
|
|
row2("name", $wu->name);
|
|
|
|
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));
|
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
|
|
|
|
result_table_start(false, true, true);
|
|
|
|
$result = mysql_query("select * from result where workunitid=$wuid");
|
|
|
|
while ($res = mysql_fetch_object($result)) {
|
|
|
|
show_result_row($res, false, true, true);
|
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
echo "</table>\n";
|
|
|
|
page_tail();
|
2003-08-07 21:40:17 +00:00
|
|
|
|
|
|
|
?>
|