$errors[] = 'False public key'; } if ($_POST['buy_invitation'] == '0') { //... and the invite if (!defined('FORUM_BITCOIN_FUNCTIONS_LOADED')) { require FORUM_ROOT . 'include/invite.php'; } $username2 = get_username($invite); $proper_invitation = get_proper_invitation($username2, $username); if ($proper_invitation != $invite) { $errors[] = 'False invitation code'; } } else { $new_balance = market_get_single_address_balance($my_bitcoin_address); if (satoshi2bitcoin($new_balance - $_SESSION['balance']) < $_SESSION['price'] * 0.99 && $new_balance > 1.0E-8 && $_SESSION['balance'] > 1.0E-8) { $payed_diff = $_SESSION['price'] - satoshi2bitcoin($new_balance - $_SESSION['balance']); $errors[] = sprintf($lang_profile['Please make payment'], $payed_diff, $my_bitcoin_address); } else { $username2 = round($_SESSION['price'], 6) . ' BTC'; } } } else { $pubkey = 'None'; $username2 = 'None'; } ############# // Check if it's a banned e-mail address $banned_email = is_banned_email($email1); if ($banned_email && $forum_config['p_allow_banned_email'] == '0') { $errors[] = $lang_profile['Banned e-mail']; }
function update_btcaddresses2() { global $blockchainUserRoot, $blockchainpassword1; $json_url = $blockchainUserRoot . 'list?password='******'Failed to open blockchain.info connection'); return 1; } else { $addressesinfo = json_decode($json_data)->addresses; $number_of_addresses = count($addressesinfo); if ($number_of_addresses > 1) { for ($i = 0; $i < $number_of_addresses; $i++) { $btcaddressinfo = $addressesinfo[$i]; $balance = satoshi2bitcoin($btcaddressinfo->balance); $btcaddress = $btcaddressinfo->address; $id = find_address_id($btcaddress); $old_balance = find_address_balance($id); if ($balance > $old_balance) { $escrowinfo = find_escrow_by_address($btcaddress); if ($escrowinfo['status'] == ESCROW_STARTED) { $now = time(); change_escrow_status($escrowinfo['index'], BITCOINS_RECEIVED); escrow_set_received_bitcoins_time($escrowinfo['index'], $now); } // wysylam wiadomosc do sprzedawcy i odbiorcy ,ze wplata zostala zaksiegowana $amount = $balance - $old_balance; notify_payment_received($btcaddress, $amount, $balance, $escrowinfo); update_address_balance($id, $balance); } else { if ($balance != $old_balance) { update_address_balance($id, $balance); } } } } } } catch (Exception $e) { echo 'Exception - addresses not updated.'; } }