Summary
Coins
Exchange
Users
Workers
Version
Earnings
Payments
Big Miners
EmptyMarket
refresh
";
echo "
";
echo "";
echo "";
echo " | ";
echo " | ";
echo "Wallet | ";
echo " | ";
echo "Last | ";
echo "Blocks | ";
echo "Balance | ";
echo "Total Paid | ";
echo "Miners | ";
echo "Shares | ";
echo " | ";
echo " | ";
echo "
";
echo "";
function showUser($userid, $what)
{
$user = getdbo('db_accounts', $userid);
if(!$user) return;
$d = datetoa2($user->last_login);
$balance = bitcoinvaluetoa($user->balance);
$paid = dboscalar("select sum(amount) from payouts where account_id=$user->id");
$paid = bitcoinvaluetoa($paid);
$t = time()-24*60*60;
$miner_count = getdbocount('db_workers', "userid=$user->id");
$share_count = getdbocount('db_shares', "userid=$user->id");
$block_count = getdbocount('db_blocks', "userid=$user->id and time>$t");
$coin = getdbo('db_coins', $user->coinid);
echo "";
if($coin)
echo " $coin->symbol | ";
else
echo " | ";
echo "$user->id | ";
echo "$user->username | ";
echo "$what | ";
echo "$d | ";
echo "$block_count | ";
echo "$balance | ";
if(intval($paid) > 0.01)
echo "$paid | ";
else
echo "$paid | ";
echo "$miner_count | ";
echo "$share_count | ";
if($user->is_locked)
{
echo "locked | ";
echo "unblock | ";
}
else
{
echo " | ";
echo "block | ";
}
echo "
";
}
$t = time()-24*60*60;
$list = dbolist("select userid from shares where pid is null or pid not in (select pid from stratums) group by userid");
foreach($list as $item)
showUser($item['userid'], 'pid');
$list = dbolist("select id from accounts where balance>0.001 and id not in (select distinct userid from blocks where userid is not null and time>$t)");
foreach($list as $item)
showUser($item['id'], 'blocks');
$monsters = dbolist("SELECT COUNT(*) AS total, userid FROM workers GROUP BY userid ORDER BY total DESC LIMIT 5");
foreach($monsters as $item)
showUser($item['userid'], 'miners');
$monsters = dbolist("SELECT COUNT(*) AS total, workerid FROM shares GROUP BY workerid ORDER BY total DESC LIMIT 5");
foreach($monsters as $item)
{
$worker = getdbo('db_workers', $item['workerid']);
if(!$worker) continue;
showUser($worker->userid, 'shares');
}
$list = getdbolist('db_accounts', "is_locked");
foreach($list as $user)
showUser($user->id, 'locked');
echo "
";