Workers'; $ans = getWorkers($user); $pg .= "
Worker Name | "; // $pg .= "Difficulty | "; // $pg .= "Idle Notifications | "; // $pg .= "Idle Notification Time | "; $pg .= "Work Diff | "; $pg .= "Last Share | "; $pg .= "Shares | "; $pg .= "Diff | "; $pg .= "Invalid | "; $pg .= "Hash Rate | "; $pg .= "
'.$ans['workername:'.$i].' | '; /* $pg .= ''.$ans['difficultydefault:'.$i].' | '; $nots = $ans['idlenotificationenabled:'.$i]; switch ($nots) { case 'Y': case 'y': $nots = 'Y'; break; default: $nots = 'N'; } $pg .= ''.$nots.' | '; $pg .= ''.$ans['idlenotificationtime:'.$i].' | '; */ if ($ans['w_lastdiff:'.$i] > 0) $ld = difffmt($ans['w_lastdiff:'.$i]); else $ld = ' '; $pg .= "$ld | "; $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 .= "$lstdes | "; $shareacc = number_format($ans['w_shareacc:'.$i], 0); $tsh += $ans['w_shareacc:'.$i]; $diffacc = number_format($ans['w_diffacc:'.$i], 0); $tdif += $ans['w_diffacc:'.$i]; $pg .= "$shareacc | "; $pg .= "$diffacc | "; $dtot = $ans['w_diffacc:'.$i] + $ans['w_diffinv:'.$i]; if ($dtot > 0) $rej = number_format(100.0 * $ans['w_diffinv:'.$i] / $dtot, 3); else $rej = '0'; $tinv += $ans['w_diffinv:'.$i]; $pg .= "$rej% | "; if ($ans['w_elapsed:'.$i] > 3600) $uhr = $ans['w_hashrate1hr:'.$i]; else $uhr = $ans['w_hashrate5m:'.$i]; if ($uhr == '?') $uhr = '?GHs'; else { $thr += $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 .= "$uhr | "; $pg .= "
Total: | "; $shareacc = number_format($tsh, 0); $pg .= " | $shareacc | "; $diffacc = number_format($tdif, 0); $pg .= "$diffacc | "; $dtot = $tdif + $tinv; if ($dtot > 0) $rej = number_format(100.0 * $tinv / $dtot, 3); else $rej = '0'; $pg .= "$rej% | "; $pg .= "$thr |