最新部署
This commit is contained in:
parent
190d007ef0
commit
ddeeacc676
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once __DIR__ . '/../db/config.php';
|
||||
ini_set('display_errors', 0);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$action = $_GET['action'] ?? '';
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../db/config.php';
|
||||
require_once __DIR__ . '/../includes/lang.php';
|
||||
session_start();
|
||||
|
||||
header('Content-Type: application/json');
|
||||
ini_set('display_errors', 0);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$db = db();
|
||||
$user_id = $_SESSION['user_id'] ?? null;
|
||||
@ -166,10 +167,14 @@ if ($action === 'recharge') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$stmt = $db->prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_method, tx_hash, fiat_amount, fiat_currency, status, ip_address) VALUES (?, 'recharge', ?, ?, ?, ?, ?, ?, 'pending', ?)");
|
||||
$stmt->execute([$user_id, $amount, $symbol, $method, $tx_hash, $fiat_amount, $fiat_currency, getRealIP()]);
|
||||
|
||||
echo json_encode(['success' => true, 'id' => $db->lastInsertId()]);
|
||||
try {
|
||||
$stmt = $db->prepare("INSERT INTO finance_requests (user_id, type, amount, symbol, payment_method, tx_hash, fiat_amount, fiat_currency, status, ip_address) VALUES (?, 'recharge', ?, ?, ?, ?, ?, ?, 'pending', ?)");
|
||||
$stmt->execute([$user_id, $amount, $symbol, $method, $tx_hash, $fiat_amount, $fiat_currency, getRealIP()]);
|
||||
|
||||
echo json_encode(['success' => true, 'id' => $db->lastInsertId()]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'error' => $e->getMessage()]);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../db/config.php';
|
||||
header('Content-Type: application/json');
|
||||
ini_set('display_errors', 0);
|
||||
error_reporting(E_ALL);
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate');
|
||||
header('Pragma: no-cache');
|
||||
header('Expires: 0');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user