diff --git a/web/yaamp/modules/site/worker_results.php b/web/yaamp/modules/site/worker_results.php index 6e16efc..2169e59 100644 --- a/web/yaamp/modules/site/worker_results.php +++ b/web/yaamp/modules/site/worker_results.php @@ -19,20 +19,8 @@ end; showTableSorter('maintable', "{ tableClass: 'dataGrid', - headers: { - 0:{sorter:'metadata'}, - 1:{sorter:'text'}, - 2:{sorter:'text'}, - 3:{sorter:'text'}, - 4:{sorter:'text'}, - 5:{sorter:'text'}, - 6:{sorter:'metadata'}, - 7:{sorter:'numeric'}, - 8:{sorter:'numeric'}, - 9:{sorter:'numeric'}, - 10:{sorter:'numeric'}, - 11:{sorter:'numeric'}, - 12:{sorter:'text'} + textExtraction: { + 6: function(node, table, n) { return $(node).attr('data'); } }, widgets: ['zebra','filter','Storage','saveSort'], widgetOptions: { @@ -48,20 +36,20 @@ showTableSorter('maintable', "{ echo << - -Coin -Address -Pass -Client -Version -Hashrate -Diff -Shares -Bad -% -Found - - + +Coin +Address +Pass +Client +Version +Hashrate +Diff +Shares +Bad +% +Found +Name + end; @@ -81,7 +69,7 @@ foreach($workers as $worker) if ($total_rate) $percent = (100.0 * $user_rate) / $total_rate; $user_bad = yaamp_worker_rate_bad($worker->id); $pct_bad = ($user_rate+$user_bad)? round($user_bad*100/($user_rate+$user_bad), 3): 0; - $user_rate = Itoa2($user_rate).'h/s'; + $user_rate_h = $user_rate ? Itoa2($user_rate).'H' : '-'; $name = $worker->worker; $user = $coin = NULL; @@ -104,12 +92,12 @@ foreach($workers as $worker) echo ""; echo ''.$coinimg.''; - echo ''.$coinlink.' ('.$coinsym.')'; + echo ''.$coinlink.''.($coinsym ? ' ('.$coinsym.')':'-').''; echo "$worker->name"; echo "$worker->password"; echo "$dns"; echo "$worker->version"; - echo "$user_rate"; + echo "$user_rate_h"; echo "$worker->difficulty"; $shares = dboscalar("SELECT COUNT(id) as shares FROM shares WHERE workerid=:worker AND algo=:algo", array( @@ -140,7 +128,7 @@ foreach($workers as $worker) echo ''.$worker_blocs.' / '.$user_blocs.''; echo ''.$name.''; - echo ''.($gift ? "$gift %" : '').''; + echo ''.(isset($gift) && $gift ? "$gift %" : '').''; echo ''; }