pageTitle = $coin->name." bloc explorer"; $start = (int) getparam('start'); if ($coin) echo << $(function() { $('#favicon').remove(); $('head').append(''); }); ENDJS; // version is used for multi algo coins // but each coin use different values... $multiAlgos = versionToAlgo($coin, 0) !== false; echo "
"; echo "
"; echo "
$coin->name Explorer
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if ($multiAlgos) echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport); if (!$start || $start > $coin->block_height) $start = $coin->block_height; for($i = $start; $i > max(1, $start-21); $i--) { $hash = $remote->getblockhash($i); if(!$hash) continue; $block = $remote->getblock($hash); if(!$block) continue; $d = datetoa2($block['time']); $confirms = isset($block['confirmations'])? $block['confirmations']: ''; $tx = count($block['tx']); $diff = $block['difficulty']; $algo = versionToAlgo($coin, $block['version']); $type = ''; if (arraySafeval($block,'nonce',0) > 0) $type = 'PoW'; else if (isset($block['auxpow'])) $type = 'Aux'; else if (isset($block['mint']) || arraySafeVal($block,'flags') == 'proof-of-stake') $type = 'PoS'; // debuglog($block); echo ""; echo ""; echo ""; echo ""; echo ""; if ($multiAlgos) echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
TimeHeightDiffTypeAlgoTransactionsConfirmationsBlockhash
$d$i$diff$type$algo$tx$confirms$hash
"; $pager = ''; if ($start <= $coin->block_height - 20) $pager = '<< Prev'; if ($start != $coin->block_height) $pager .= '  Now'; if ($start > 20) $pager .= '  Next >>'; echo <<$pager
end; if ($start != $coin->block_height) return; echo <<













end; app()->clientScript->registerScript('graph'," graph_refresh(); ", CClientScript::POS_READY);