Pool Stats';
$rep = getAllUsers();
$ans = repDecode($rep);
$pg .= "
\n";
$pg .= "";
$pg .= "Username | ";
$pg .= "Hash Rate 1hr | ";
$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_hashrate1hr' => $ans['u_hashrate1hr'.$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_hashrate1hr'];
if ($uhr == '?')
$uhr = '?GHs';
else
{
$uhr /= 10000000;
if ($uhr < 100000)
$uhr = (round($uhr)/100).'GHs';
else
$uhr = (round($uhr/1000)/100).'THs';
}
$pg .= "$uhr | ";
$pg .= "
\n";
}
}
$pg .= "
\n";
return $pg;
}
#
function show_stats($menu, $name, $user)
{
gopage(NULL, 'dostats', $menu, $name, $user);
}
#
?>