$id)); else $db_blocks = getdbolist('db_blocks', "1 order by time desc limit 250"); showTableSorter('maintable', "{ tableClass: 'dataGrid', headers: { 0:{sorter:false}, 1:{sorter:false}, 2:{sorter:'metadata'}, 3:{sorter:'numeric'}, 4:{sorter:'currency'}, 5:{sorter:'text'}, 6:{sorter:'numeric'}, 7:{sorter:'numeric'}, 8:{sorter:'text'} }, widgets: ['zebra','filter'], widgetOptions: { filter_columnFilters: false, filter_ignoreCase: true } }"); echo << td.orphan { color: darkred; } Name Time Height Amount Status Difficulty Share Diff Finder Blockhash end; foreach($db_blocks as $db_block) { if(!$db_block->coin_id) continue; $coin = getdbo('db_coins', $db_block->coin_id); if(!$coin) continue; if($db_block->category == 'stake' && !$this->admin) continue; if($db_block->category == 'generated' && !$this->admin) continue; // mature stake income // $remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport); // $blockext = $remote->getblock($db_block->blockhash); // $tx = $remote->gettransaction($blockext['tx'][0]); // $db_block->category = $tx['details'][0]['category']; if($db_block->category == 'immature') echo ""; else echo ""; echo ''; echo ''; if ($this->admin) echo ''.$coin->name.''; else echo ''.$coin->name.''; echo ' ('.$coin->symbol.')'; // $db_block->confirmations = $blockext['confirmations']; // $db_block->save(); $d = datetoa2($db_block->time); echo ''.$d.' ago'; if (YIIMP_PUBLIC_EXPLORER) echo ''.$db_block->height.''; else echo "$db_block->height"; echo "$db_block->amount"; echo ''; if($db_block->category == 'orphan') echo "Orphan"; else if($db_block->category == 'immature') echo "Immature ({$db_block->confirmations})"; else if($db_block->category == 'generate') echo 'Confirmed'; else if($db_block->category == 'stake') echo "Stake ({$db_block->confirmations})"; else if($db_block->category == 'generated') echo 'Stake'; echo ""; echo ''.round_difficulty($db_block->difficulty).''; $diff_user = $db_block->difficulty_user; if (!$diff_user && substr($db_block->blockhash,0,4) == '0000') $diff_user = hash_to_difficulty($coin, $db_block->blockhash); echo ''.round_difficulty($diff_user).''; $finder = ''; if (!empty($db_block->userid)) { $user = getdbo('db_accounts', $db_block->userid); $finder = $user ? substr($user->username, 0, 7).'...' : ''; } echo ''.$finder.''; echo ''; if (YIIMP_PUBLIC_EXPLORER) echo ''.$db_block->blockhash.''; else echo $db_block->blockhash; echo ""; echo ""; } echo "";