td.low { color: red; font-weight: bold; }
Block Explorer
end; showTableSorter('maintable', "{ tableClass: 'dataGrid2', textExtraction: { 6: function(node, table, n) { return $(node).attr('data'); }, 8: function(node, table, n) { return $(node).attr('data'); } } }"); echo << Name Symbol Algo Version Height Difficulty Connections Network Hash end; $list = getdbolist('db_coins', "enable and visible order by name"); foreach($list as $coin) { if($coin->symbol == 'BTC') continue; if(!empty($coin->symbol2)) continue; $coin->version = formatWalletVersion($coin); //if (!$coin->network_hash) $coin->network_hash = controller()->memcache->get("yiimp-nethashrate-{$coin->symbol}"); if (!$coin->network_hash) { $remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport); if ($remote) $info = $remote->getmininginfo(); if (isset($info['networkhashps'])) { $coin->network_hash = $info['networkhashps']; controller()->memcache->set("yiimp-nethashrate-{$coin->symbol}", $info['networkhashps'], 60); } else if (isset($info['netmhashps'])) { $coin->network_hash = floatval($info['netmhashps']) * 1e6; controller()->memcache->set("yiimp-nethashrate-{$coin->symbol}", $coin->network_hash, 60); } } $difficulty = Itoa2($coin->difficulty, 3); $nethash_sfx = $coin->network_hash? strtoupper(Itoa2($coin->network_hash)).'H/s': ''; echo ''; echo ''; echo ''.$coin->createExplorerLink($coin->name).''; echo ''.$coin->symbol.''; echo ''.$coin->algo.''; echo ''.$coin->version.''; echo ''.$coin->block_height.''; echo ''.$difficulty.''; $cnx_class = (intval($coin->connections) > 3) ? '' : 'low'; echo ''.$coin->connections.''; echo ''.$nethash_sfx.''; echo ""; if(!empty($coin->link_bitcointalk)) echo CHtml::link('forum', $coin->link_bitcointalk, array('target'=>'_blank')); elseif(!empty($coin->link_site)) echo CHtml::link('site', $coin->link_site, array('target'=>'_blank')); echo ""; echo ""; } echo <<






























end;