最新部署

This commit is contained in:
Flatlogic Bot 2026-02-21 15:11:50 +00:00
parent 190d007ef0
commit ddeeacc676
3 changed files with 14 additions and 5 deletions

View File

@ -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'] ?? '';

View File

@ -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;
}

View File

@ -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');