function handle_deposit_by_id($id) { global $db; if (!is_numeric($id)) { $id = 0; } $slt_address_a = "SELECT * FROM deposit_address WHERE address = '{$address}'"; $rlt_address_a = mysql_query($slt_address_a); if (mysql_num_rows($rlt_address_a) != 0) { $row_address_a = mysql_fetch_assoc($rlt_address_a); if ($row_address_a["currency"] == "SLC") { return handle_deposit_slc($row_address_a); } if ($row_address_a["currency"] == "BTC") { return handle_deposit_btc($row_address_a); } if ($row_address_a["currency"] == "NMC") { return handle_deposit_nmc($row_address_a); } } return array("received" => 0, "booked" => 0, "pending" => 0); }
To deposit Bitcoins please transfer a certain amount of Bitcoins to an address that is dedicated to you.<br /><br /> Current balance: <?php echo nice_format($balance, false, 0, 8); ?> Bitcoins<br /> <br /> Your Bitcoins will be available after 3 confirmations.<br /> <table> <tr><td>Address</td><td>Received</td><td>Booked</td><td>Pending</td></tr> <?php $slt_address_a = "SELECT * FROM deposit_address WHERE user = '******'user_id']}' AND currency = 'BTC' ORDER BY creation_date DESC LIMIT 10"; $rlt_address_a = mysql_query($slt_address_a); if (mysql_num_rows($rlt_address_a) != 0) { $new = true; while ($row_address_a = mysql_fetch_assoc($rlt_address_a)) { $data = handle_deposit_btc($row_address_a); $received = $data["received"]; $pending = $data["pending"]; $booked = $data["booked"]; if ($row_address_a["creation_date"] > "2011-10-11 00:00:00") { if ($received == 0) { $new = false; echo "<tr><td>{$row_address_a['address']}</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n"; } elseif ($pending > 0) { echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'; this.onclick = 'function {}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n"; } else { echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'; this.onclick = 'function {}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td style=\"text-align: right\">" . nice_format($received, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 8) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 8) . "</td></tr>\r\n"; } } else { echo "<tr><td onclick=\"this.innerHTML='{$row_address_a['address']}'\">" . substr($row_address_a["address"], 0, 5) . "..." . substr($row_address_a["address"], -3, 3) . "</td><td>? (old address)</td><td>? (old address)</td><td>? (old address)</td></tr>\r\n"; }