here to jump to the start of the last payout

"; $pg .= "\n"; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= "\n"; if (($ans['STATUS'] != 'ok') || !isset($ans['prefix_all'])) $pg = '

Shifts

'.$pg; else { $pre = $ans['prefix_all']; $count = $ans['rows']; $pg = '

Last '.($count+1).' Shifts

'.$pg; for ($i = 0; $i < $count; $i++) { $u = ''; $mark = ''; if (isset($ans['lastpayoutstart:'.$i]) && $ans['lastpayoutstart:'.$i] != '') { $u = 'u'; $mark = ''; } if (($i % 2) == 0) $row = "even$u"; else $row = "odd$u"; $pg .= ""; $shifname = $ans['shift:'.$i]; $shif = preg_replace(array('/^.* to /','/^.*fin: /'), '', $shifname); $ablock = false; if (preg_match('/to.*Block.* fin/', $shifname) == 1) $ablock = true; else { $shifex = $ans['endmarkextra:'.$i]; if (preg_match('/Block .* fin/', $shifex) == 1) $ablock = true; } if ($ablock === true) $btc = ' '; else $btc = ''; $pg .= ""; $start = $ans['start:'.$i]; $pg .= ''; $nd = $ans['end:'.$i]; $elapsed = $nd - $start; $pg .= ''; $diffacc = $ans[$pre.'diffacc:'.$i]; $pg .= ''; $diffinv = $ans[$pre.'diffinv:'.$i]; $pg .= ''; $hr = $diffacc * pow(2,32) / $elapsed; $pg .= ''; $shareacc = $ans[$pre.'shareacc:'.$i]; $pg .= ''; if ($shareacc > 0) $avgsh = $diffacc / $shareacc; else $avgsh = 0; $pg .= ''; $pg .= ''; $ppsr = (float)$ans['ppsrewarded:'.$i]; if ($ppsr > 0) $ppsd = sprintf('%.3e', $ppsr); else $ppsd = '0'; $pg .= ""; $ppsv = (float)$ans['ppsvalue:'.$i]; if ($ppsv > 0) $pgot = number_format(100.0 * $ppsr / $ppsv, 2).'%'; else $pgot = '?'; $pg .= ""; $pg .= "\n"; } } $pg .= "
ShiftStart UTCLengthYour DiffInv DiffAvg HsSharesAvg ShareRewardsPPS*PPS%
$shif$btc$mark'.utcd($start, true).''.howmanyhrs($elapsed).''.difffmt($diffacc).''.difffmt($diffinv).''.dsprate($hr).''.difffmt($shareacc).''.number_format($avgsh, 2).''.$ans['rewards:'.$i].'$ppsd$pgot
\n"; $pg .= "* The PPS value unit is satoshis
"; return $pg; } # function show_shifts($info, $page, $menu, $name, $user) { gopage($info, NULL, 'doshifts', $page, $menu, $name, $user); } # ?>