".$sql."\n";
$result = db_query($db,$sql);
if ( PEAR::isError($result) )
{
echo "
".$result->getMessage()."
\n";
}
echo "\n";
$col[0]="jobid";
$col[1]="username";
$col[2]="account";
$ncols=3;
echo "jobid | account | username | ";
foreach ($keys as $key)
{
if ( $key!='jobid' && $key!='username' && $key!='account' && $key!='start_date' && $key!='end_date' )
{
echo "".$key." | ";
$col[$ncols]=$key;
$ncols++;
}
}
echo "
\n";
while ($result->fetchInto($row))
{
$rkeys=array_keys($row);
echo "";
foreach ($rkeys as $key)
{
$data[$key]=array_shift($row);
if ( $col[$key]=="submit_ts" || $col[$key]=="start_ts" || $col[$key]=="end_ts")
{
echo "".date("Y-m-d H:i:s",$data[$key])." | \n";
}
else
{
echo "".htmlspecialchars($data[$key])." | ";
}
}
echo "
\n";
}
echo "
\n";
db_disconnect($db);
page_timer();
bookmarkable_url();
}
else
{
begin_form("jobs-by-account.php");
pulldown("account","Account",user_accounts($_SERVER['PHP_AUTH_USER']),"None");
system_chooser();
date_fields();
# This is not the exhaustive list...
$props=array("jobname","nproc",
"nodes","feature","gres","queue","qos",
"submit_ts","start_ts","end_ts",
"cput_req","cput","walltime_req","walltime","mem_req","mem_kb",
"vmem_req","vmem_kb","software","submithost","hostlist",
"exit_status","script");
checkboxes_from_array("Properties",$props);
end_form();
}
page_footer();
?>