diff --git a/pool/page_workers.php b/pool/page_workers.php index dcbfa46c..ad917fdb 100644 --- a/pool/page_workers.php +++ b/pool/page_workers.php @@ -22,7 +22,8 @@ function workhashorder($a, $b) # function workuser($data, $user, &$offset, &$totshare, &$totdiff, &$totinvalid, &$totrate, &$blockacc, - &$blockreward, $old = false, $srt = false) + &$blockreward, $old = false, $srt = false, + $one = false, &$title) { $ans = getWorkers($user); @@ -33,6 +34,13 @@ function workuser($data, $user, &$offset, &$totshare, &$totdiff, $blockacc = $ans['blockacc']; if (isset($ans['blockreward'])) $blockreward = $ans['blockreward']; + if ($one === true && isset($ans['oldworkers'])) + { + $days = intval($ans['oldworkers']); + if ($days != 0) + $title = ' (last '.$days.' day'. + (($days==1)?'':'s').')'; + } $all = array(); $count = $ans['rows']; for ($i = 0; $i < $count; $i++) @@ -151,9 +159,9 @@ function worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $blockac # function doworker($data, $user) { - $pg = '

Workers

'; + $title = ''; - $pg .= "\n"; + $pg = "
\n"; $totshare = 0; $totdiff = 0; @@ -165,7 +173,8 @@ function doworker($data, $user) $pg .= worktitle($data, $user); $pg .= workuser($data, $user, $offset, $totshare, $totdiff, $totinvalid, - $totrate, $blockacc, $blockreward, false, true); + $totrate, $blockacc, $blockreward, false, true, true, + $title); $pg .= worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $blockacc, $blockreward); @@ -179,7 +188,7 @@ function doworker($data, $user) $pg .= "
\n"; - return $pg; + return "

Workers$title

".$pg; } # function doworkers($data, $user)