/* Decoded by unphp.net */ prepare("UPDATE users SET balance = ? WHERE id = ?"); $stmt->bind_param("si", $balance_json, $user_id); $stmt->execute(); $stmt->close(); } goto bAOYD; VIZn2: if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } goto HbN95; z6S7P: $password = "skycry51_kd02@"; goto GBzfw; uXQ68: $conn = new mysqli($servername, $username, $password, $dbname); goto VIZn2; ZHpMc: $username = "skycry51_kd02"; goto z6S7P; ykLBd: process_request(); goto euf1B; bAOYD: function get_user_balance($user_id, $conn) { $stmt = $conn->prepare("SELECT balance FROM users WHERE id = ?"); $stmt->bind_param("i", $user_id); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $stmt->close(); if ($row && $row["balance"]) { return json_decode($row["balance"], true); } return array(); } goto T_FVx; euf1B: $conn->close(); goto ruSW0; T_FVx: function process_request() { $secret = "af825473570cf78d34add65183694ffe"; $subId = isset($_REQUEST["subId"]) ? $_REQUEST["subId"] : null; $transId = isset($_REQUEST["transId"]) ? $_REQUEST["transId"] : null; $reward = isset($_REQUEST["reward"]) ? $_REQUEST["reward"] : null; $signature = isset($_REQUEST["signature"]) ? $_REQUEST["signature"] : null; if (!$subId || !$transId || !$reward || !$signature) { echo "ERROR: Missing parameters"; return; } if (md5($subId . $transId . $reward . $secret) != $signature) { echo "ERROR: Signature doesn't match"; return; } $reward = $reward / 10000; $reward = $reward * 100000000; $currency = "USDT"; global $conn; update_user_balance($subId, $currency, $reward, $conn); echo "ok"; } goto ykLBd; GBzfw: $dbname = "skycry51_kd02"; goto uXQ68; ruSW0: ?>