Pool Stats'; if (isset($data['info']) && $data['info'] !== false) { $info = $data['info']; if (isset($info['p_elapsed'])) { $dspel = howlongago($info['p_elapsed']); $pg .= "Pool Uptime: $dspel
"; } $dsp = '?THs'; $dsp5m = '?THs'; $dsp1hr = '?THs'; $dsp24hr = '?THs'; if (isset($info['p_hashrate'])) { $hr = $info['p_hashrate']; if ($hr != '?') $dsp = dsprate($hr); } if (isset($info['p_hashrate5m'])) { $hr = $info['p_hashrate5m']; if ($hr != '?') $dsp5m = dsprate($hr); } if (isset($info['p_hashrate1hr'])) { $hr = $info['p_hashrate1hr']; if ($hr != '?') $dsp1hr = dsprate($hr); } if (isset($info['p_hashrate24hr'])) { $hr = $info['p_hashrate24hr']; if ($hr != '?') $dsp24hr = dsprate($hr); } $pg .= ''; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= '
Pool Hashrate: $dsp5m: $dsp5m1hr: $dsp1hr24hr: $dsp24hr

'; } $ans = getAllUsers($user); $pg .= "\n"; $pg .= ""; $pg .= ""; $pg .= ""; $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 .= ''; $uhr = $all[$i]['u_hashrate5m']; if ($uhr == '?') $dsp = '?GHs'; else $dsp = dsprate($uhr); $pg .= ""; $pg .= "\n"; } } $pg .= "
UsernameHash Rate 5m
'.htmlspecialchars($all[$i]['username']).'$dsp
\n"; return $pg; } # function show_stats($info, $page, $menu, $name, $user) { gopage($info, NULL, 'dostats', $page, $menu, $name, $user); } # ?>