Workers'; $rep = getWorkers($user); $ans = repDecode($rep); $pg .= "\n"; $pg .= ""; $pg .= ""; // $pg .= ""; // $pg .= ""; // $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= "\n"; if ($ans['STATUS'] == 'ok') { $tot = 0; $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $pg .= ''; /* $pg .= ''; $nots = $ans['idlenotificationenabled'.$i]; switch ($nots) { case 'Y': case 'y': $nots = 'Y'; break; default: $nots = 'N'; } $pg .= ''; $pg .= ''; */ if ($ans['w_lastdiff'.$i] > 0) $ld = difffmt($ans['w_lastdiff'.$i]); else $ld = ' '; $pg .= ""; $lst = $ans['STAMP'] - $ans['w_lastshare'.$i]; if ($lst < 60) $lstdes = $lst.'s'; else { $lst = round($lst/60); if ($lst < 60) $lstdes = $lst.'min'; else { $lst = round($lst/60); if ($lst < 24) { $lstdes = $lst.'hr'; if ($lst != 1) $lstdes .= 's'; } else { $lst = round($lst/24); if ($lst < 9999) { $lstdes = $lst.'day'; if ($lst != 1) $lstdes .= 's'; } else $lstdes = 'never'; } } } $pg .= ""; if ($ans['w_elapsed'.$i] > 3600) $uhr = $ans['w_hashrate1hr'.$i]; else $uhr = $ans['w_hashrate5m'.$i]; if ($uhr == '?') $uhr = '?GHs'; else { $tot += $uhr; $uhr /= 10000000; if ($uhr < 0.01) $uhr = '0GHs'; else { if ($uhr < 100000) $uhr = number_format(round($uhr)/100,2).'GHs'; else $uhr = number_format(round($uhr/1000)/100,2).'THs'; } } $pg .= ""; $pg .= "\n"; } } $thr /= 10000000; if ($thr < 0.01) $thr = '0GHs'; else { if ($thr < 100000) $thr = number_format(round($thr)/100,2).'GHs'; else $thr = number_format(round($thr/1000)/100,2).'THs'; } if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= "\n"; $pg .= "
Worker NameDifficultyIdle NotificationsIdle Notification TimeWork DiffLast ShareHash Rate
'.$ans['workername'.$i].''.$ans['difficultydefault'.$i].''.$nots.''.$ans['idlenotificationtime'.$i].'$ld$lstdes$uhr
$thr
\n"; return $pg; } # function doworkers($data, $user) { $pg = doworker($data, $user); return $pg; } # function show_workers($menu, $name, $user) { gopage(NULL, 'doworkers', $menu, $name, $user); } # ?>