Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
Current balance: <?php 
echo nice_format($balance, false, 0, 4);
?>
 Solidcoins<br />
<br />
Your Solidcoins will be available after 2, 4 or 6 confirmations depending on how much you deposit.<br />
<small>(6 confirmations for deposits greater than 500 Solidcoins and 4 confirmations for deposits greater than 5 Solidcoins)</small><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 = 'SLC' 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_slc($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, 4) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 4) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 4) . "</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, 4) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 4) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 4) . "</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, 4) . "</td><td style=\"text-align: right\">" . nice_format($booked, true, 0, 4) . "</td><td style=\"text-align: right\">" . nice_format($pending, true, 0, 4) . "</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>? (old address)</td><td>? (old address)</td><td>? (old address)</td></tr>\r\n";
        }