Pool Stats';
$ans = getAllUsers();
$pg .= "
\n";
$pg .= "";
$pg .= "Username | ";
$pg .= "Hash Rate 5m | ";
$pg .= "
\n";
if ($ans['STATUS'] == 'ok')
{
$all = array();
$count = $ans['rows'];
for ($i = 0; $i < $count; $i++)
{
$all[] = array('username' => $ans['username:'.$i],
'userid' => $ans['userid:'.$i],
'u_hashrate5m' => $ans['u_hashrate5m:'.$i]);
}
usort($all, 'allusersort');
for ($i = 0; $i < $count; $i++)
{
if (($i % 2) == 0)
$row = 'even';
else
$row = 'odd';
$pg .= "";
$pg .= ''.$all[$i]['username'].' | ';
$uhr = $all[$i]['u_hashrate5m'];
if ($uhr == '?')
$dsp = '?GHs';
else
{
$uhr /= 10000000;
if ($uhr < 100000)
$rate = 'G';
else
{
$rate = 'T';
$uhr /= 1000;
}
$dsp = number_format($uhr/100, 2).$rate.'Hs';
}
$pg .= "$dsp | ";
$pg .= "
\n";
}
}
$pg .= "
\n";
return $pg;
}
#
function show_stats($page, $menu, $name, $user)
{
gopage(NULL, 'dostats', $page, $menu, $name, $user);
}
#
?>