1 )
row1( "There are ".$njobs." jobs listed !
" );
else
row1( "There is only one job listed !
" );
end_table();
start_table();
row6( "Job #", "User", "Job submit time", "Job status", "Job name", "Job ID" );
for( $jobindex = 0; $jobindex < $njobs; ++$jobindex )
{
$workunit = mysql_fetch_object( $alljobs );
$prefix = '';
$workunitname = $prefix.workunit_name( $workunit ).'';
$workunitidstr = "".$workunit -> id."";
$status = workunit_status_string( $workunit );
$jobsubmittime = time_str( $workunit -> create_time );
if( $status != "CANCELED" )
{
if( $status == "running" ) $status = "".$status."";
if( $status == "queued" ) $status = "".$status."";
$job = mysql_fetch_object( mysql_query( "SELECT * FROM q_list WHERE workunit=".$workunit->id ) );
$user = mysql_fetch_object( mysql_query( "SELECT * FROM user WHERE id=".$job -> user ) );
$jobusername = "".$user -> name."";
}
else
{
$jobusername = "UNKNOWN";
$status = "CANCELED";
$workunitname = workunit_name( $workunit );
}
row6( $jobindex+1, $jobusername, $jobsubmittime, $status, $workunitname, $workunitidstr );
}
}
else
row1("There are NO jobs listed !
");
end_table();
admin_page_tail();
?>