goback(); $remote = new Bitcoin($coin->rpcuser, $coin->rpcpasswd, $coin->rpchost, $coin->rpcport); $reserved1 = dboscalar("select sum(balance) from accounts where coinid=$coin->id"); $reserved2 = dboscalar("select sum(amount*price) from earnings where status!=2 and userid in (select id from accounts where coinid=$coin->id)"); $reserved = ($reserved1 + $reserved2) * 2; $owed = dboscalar("select sum(amount) from earnings where status!=2 and coinid=$coin->id"); $owed_btc = $owed? bitcoinvaluetoa($owed*$coin->price): ''; $owed = $owed? altcoinvaluetoa($owed): ''; echo "cleared $reserved1, earnings $reserved2, reserved $reserved, balance $coin->balance, owed $owed, owned btc $owed_btc

"; ////////////////////////////////////////////////////////////////////////////////////// $list = getdbolist('db_markets', "coinid=$coin->id order by price desc"); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $bestmarket = getBestMarket($coin); foreach($list as $market) { $marketurl = '#'; $price = bitcoinvaluetoa($market->price); $price2 = bitcoinvaluetoa($market->price2); $marketurl = getMarketUrl($coin, $market->name); if($bestmarket && $market->id == $bestmarket->id) echo ""; else echo ""; echo ""; echo ""; echo ""; $sent = datetoa2($market->lastsent); $traded = datetoa2($market->lasttraded); $late = $sent > $traded? 'late': ''; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
NamePricePrice2SentTradedLateDepositMessage
$market->name$price$price2$sent ago$traded ago$late$market->deposit_address "; echo "edit "; echo "sell "; echo "del$market->message

"; ////////////////////////////////////////////////////////////////////////////////////// echo ""; //showTableSorter('maintable'); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if($coin->enable) echo ""; else echo ""; echo ""; echo ""; $info = $remote->getinfo(); if(!$info) { echo "ERROR $remote->error

"; // echo ""; return; } $errors = isset($info['errors'])? $info['errors']: ''; $balance = isset($info['balance'])? $info['balance']: ''; $txfee = isset($info['paytxfee'])? $info['paytxfee']: ''; $connections = isset($info['connections'])? $info['connections']: ''; $blocks = isset($info['blocks'])? $info['blocks']: ''; echo ""; if(!empty($errors)) echo ""; else echo ""; echo ""; $btc = $balance*$coin->price; echo ""; echo ""; echo ""; echo ""; if($coin->difficulty) $index = round($coin->reward * $coin->price / $coin->difficulty * 10000, 3); echo ""; echo ""; echo "
NameSymbolDifficultyBlocksBalanceBTCConnsPriceRewardIndex *
[ + ][    ]$coin->name$coin->symbol$coin->difficulty$blocks$blocks$balance$btc$connections$coin->price$coin->reward$index
"; echo "

"; ////////////////////////////////////////////////////////////////////////////////////// echo ""; //showTableSorter('maintable'); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //$transactions = $remote->listsinceblock(''); $ts = $remote->listtransactions('', 10); $res_array = array(); if (!empty($ts)) foreach($ts as $val) { $t = $val['time']; $res_array[$t] = $val; } krsort($res_array); foreach($res_array as $transaction) { $block = null; if(isset($transaction['blockhash'])) $block = $remote->getblock($transaction['blockhash']); $d = datetoa2($transaction['time']); echo ""; echo ""; if($block) echo ""; else echo ""; echo ""; echo ""; if(isset($transaction['confirmations'])) echo ""; else echo ""; echo ""; echo ""; } echo "
TimeHeightCategoryAmountConfirmations
$d{$block['height']}{$transaction['category']}{$transaction['amount']}{$transaction['confirmations']}"; if(isset($transaction['address'])) { $address = $transaction['address']; echo "address $address
"; } // if($block) foreach($block['tx'] as $i=>$tx) // echo "tx-$i $tx
"; echo "
";