From 9944b59332464038b0d25f6fcbb49447e8fcde3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 6 May 2026 15:24:27 +0000 Subject: [PATCH] fix: billing cleanup, PayPal guard, docs nav prefix, coupon dark theme, XML guide link Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/52e5015e-f5cf-42e2-bc32-b1c77193a13f Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/billing/admin.php | 2 - modules/billing/admin_coupons.php | 151 +++++++++++++++++++----- modules/billing/cart.php | 27 ++++- modules/billing/includes/menu.php | 12 ++ modules/billing/timestamp.txt | 2 +- modules/config_games/config_servers.php | 1 + 6 files changed, 158 insertions(+), 37 deletions(-) diff --git a/modules/billing/admin.php b/modules/billing/admin.php index 7b6d4ab0..42b0bf1b 100644 --- a/modules/billing/admin.php +++ b/modules/billing/admin.php @@ -55,8 +55,6 @@ function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); } Transaction Log Manage Coupons Edit Site Config - XML Config Editor - XML Config Guide
diff --git a/modules/billing/admin_coupons.php b/modules/billing/admin_coupons.php index e1d7678e..fb161aca 100644 --- a/modules/billing/admin_coupons.php +++ b/modules/billing/admin_coupons.php @@ -160,29 +160,120 @@ $coupons_result = mysqli_query($db, "SELECT * FROM {$table_prefix}billing_coupon @@ -643,11 +643,30 @@ $siteBase = $protocol . $host;

Checkout with PayPal

+ +
+ Checkout Unavailable: PayPal has not been configured for this site. + Please contact the site administrator or try again later. + 0 && $db) { + $ar = mysqli_query($db, "SELECT users_role FROM {$table_prefix}users WHERE user_id = " . $cart_user_id_check . " LIMIT 1"); + if ($ar && ($arow = mysqli_fetch_assoc($ar))) { + $cart_is_admin = strtolower($arow['users_role'] ?? '') === 'admin'; + } + } + if ($cart_is_admin): + ?> +
Admin: set $paypal_client_id in Site Config. + +
+

Click the button below to complete your purchase securely through PayPal.

-
- +
Continue Shopping My Account @@ -665,7 +684,7 @@ $siteBase = $protocol . $host; } - 0.00): ?> + 0.00 && !empty($client_id)): ?>