Status Info on
" . wap_timestamp() . "
";
$wapstr .= "#Users: " . getSingleQuery("select count(*) from user") . "
";
$wapstr .= "#Hosts: " . getSingleQuery("select count(*) from host") . "
";
$wapstr .= "#ModYr: " . sprintf("%ld", getSingleQuery("select sum(total_credit)/(.007*17280.0) from host")) . "
";
$wapstr .= "#Cobbl: " . sprintf("%ld", getSingleQuery("select sum(total_credit) from host")) . "
";
// I consider a host active if it's trickled in the last week
//$wapstr .= "#Activ: " . getSingleQuery("select count(distinct hostid) from cpdnexpt.trickle "
// . "where trickledate>=" . sprintf("%d", mktime() - (3600*24*7))) . "
";
// finally get last 5 trickles for everyone
//$wapstr .= show_trickles("a", 0, 5, 1);
// limit wap output to 1KB
if (strlen($wapstr)>1024)
echo substr($wapstr,0,1024);
else
echo $wapstr;
wap_end();
?>