2011-03-28 14:21:28 +00:00
|
|
|
<?
|
2012-05-18 13:35:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
define('PAYPAL_ADDRESS','');
|
|
|
|
|
2011-03-28 14:21:28 +00:00
|
|
|
define('PAYPAL_CURRENCY','EUR');
|
|
|
|
define('PAYPAL_SYMBOL','€');
|
|
|
|
define('PAYPAL_MINIMUM',5);
|
2011-08-09 21:03:28 +00:00
|
|
|
|
|
|
|
function btc_received() {
|
2013-05-16 16:15:57 +00:00
|
|
|
|
2011-08-09 21:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function btc_balance() {
|
2013-05-16 16:15:57 +00:00
|
|
|
|
2011-08-09 21:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This will be rarely called, so let's go directly to the database
|
|
|
|
function btc_address($UserID, $GenAddress = false) {
|
|
|
|
global $DB;
|
|
|
|
$UserID = (int)$UserID;
|
|
|
|
$DB->query("SELECT BitcoinAddress FROM users_info WHERE UserID = '$UserID'");
|
|
|
|
list($Addr) = $DB->next_record();
|
|
|
|
|
2013-05-16 16:15:57 +00:00
|
|
|
if (!empty($Addr)) {
|
|
|
|
return $Addr;
|
|
|
|
} elseif ($GenAddress) {
|
2013-05-14 08:00:34 +00:00
|
|
|
if (empty($NewAddr)) {
|
|
|
|
error(0);
|
|
|
|
}
|
|
|
|
$DB->query("
|
|
|
|
UPDATE users_info
|
|
|
|
SET BitcoinAddress = '".db_string($NewAddr)."'
|
|
|
|
WHERE UserID = '$UserID'
|
|
|
|
AND BitcoinAddress IS NULL");
|
2011-08-09 21:03:28 +00:00
|
|
|
return $NewAddr;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2011-03-28 14:21:28 +00:00
|
|
|
?>
|