From 38914b6389fcdf9b7172227be349e9d419e1be91 Mon Sep 17 00:00:00 2001 From: Cliff Date: Mon, 1 Dec 2025 11:30:34 +0700 Subject: [PATCH] ok --- html.php | 18 +++++++++++++++--- ody git.js | 29 ++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/html.php b/html.php index 184b4bc..c7d694a 100644 --- a/html.php +++ b/html.php @@ -28,6 +28,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['bank_method'])) { $topup_success = true; } } + +// Handle balance update from game +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_balance'])) { + $new_balance = (int)$_POST['update_balance']; + if ($new_balance >= 0) { + $_SESSION['balance'] = $new_balance; + header('Content-Type: application/json'); + echo json_encode(['status' => 'success', 'balance' => $_SESSION['balance']]); + exit; + } +} ?> @@ -371,12 +382,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['bank_method'])) { - + +