function flipSort($oldsort, $key) { if ($oldsort[0][0] == $key && $oldsort[0][1] == 'desc') { return addSort($oldsort, $key, 'asc'); } else { return addSort($oldsort, $key, 'desc'); } }
function worktitle($data, $user) { addSort(); $r = "input type=radio name=srt onclick=\"sott('worksrt',this);\""; $pg = '<tr class=title>'; $pg .= "<td class=dl>Worker <span class=nb>Name:<{$r} id=srtwrk data-sf=s0></span></td>"; $pg .= '<td class=dr>Work Diff</td>'; $pg .= "<td class=dr><span class=nb><{$r} id=srtlst data-sf=n2>:Last</span> Share</td>"; $pg .= '<td class=dr>Shares</td>'; $pg .= "<td class=dr><span class=nb><{$r} id=srtdiff data-sf=r4>:Diff</span></td>"; $pg .= "<td class=dr><span class=nb><{$r} id=srtshrate data-sf=r5>:Share Rate</span></td>"; $pg .= '<td class=dr>«Elapsed</td>'; $pg .= "<td class=dr><span class=nb><{$r} id=srtinv data-sf=r7>:Invalid</span></td>"; $pg .= "<td class=hid data-hid=dr><span class=nb><{$r} id=srtstale data-sf=r8>:Stale</span></td>"; $pg .= "<td class=hid data-hid=dr><span class=nb><{$r} id=srtdup data-sf=r9>:Dup</span></td>"; $pg .= "<td class=hid data-hid=dr><span class=nb><{$r} id=srthi data-sf=r10>:Hi</span></td>"; $pg .= "<td class=hid data-hid=dr><span class=nb><{$r} id=srtreject data-sf=r11>:Rej</span></td>"; $pg .= '<td class=dr>Block %</td>'; $pg .= "<td class=dr><span class=nb><{$r} id=srtrate data-sf=r13>:Hash</span> Rate</td>"; $pg .= "</tr>\n"; return $pg; }