".$sql."\n";
$result = db_query($db,$sql);
if ( PEAR::isError($result) )
{
echo "
".$result->getMessage()."
\n";
}
echo "\n";
echo "user | group | job count | CPU-hours |
\n";
while ($result->fetchInto($row))
{
echo "";
$rkeys=array_keys($row);
foreach ($rkeys as $key)
{
$data[$key]=array_shift($row);
echo "".htmlspecialchars($data[$key])." | ";
}
echo "
\n";
}
echo "
\n";
db_disconnect($db);
bookmarkable_url();
}
else
{
begin_form("active-users.php");
system_chooser();
date_fields();
$choices=array("cpuhours","jobs");
$defaultchoice="cpuhours";
pulldown("order","Order by",$choices,$defaultchoice);
textfield("limit","Max shown","10",4);
end_form();
}
page_footer();
?>