Commit graph

42 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
3219ed335e
fix: billing DB safety, remove mapping table, sync services from game config
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/0b960e6d-bdf7-4b5b-8114-6c63e6b11a8d

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 15:22:13 +00:00
copilot-swe-agent[bot]
f4f222953f
fix: address code review feedback on billing admin fixes
- menu.php: remove unnecessary @ suppression from mysqli_thread_id()
  (instanceof check already guarantees a mysqli object)
- adminserverlist.php: split ternary flash message into separate if/else
  for readability; replace dynamic SQL fragment with explicit if/else
  query branches

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/988997ed-7568-48bf-96ef-889fb5d91fec

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 13:41:13 +00:00
copilot-swe-agent[bot]
bb77620796
fix: resolve 3 billing admin errors and normalize remote_servers query
- admin_config.php: guard session_start() — was firing Notice because
  admin_auth.php → session_bridge.php already started the session
- includes/menu.php: check mysqli_thread_id() before reusing $db so a
  closed handle does not cause 'mysqli object is already closed' fatal
- admin_invoices.php / admin_payments.php: set $db = null after
  mysqli_close() so menu.php's reuse-check correctly falls through to
  opening a fresh connection
- adminserverlist.php: use col_exists() to detect missing 'enabled'
  column in gsp_remote_servers; fall back to constant 1 and display a
  schema-notice banner; guard UPDATE accordingly; also add missing
  price_daily / price_year columns to the services SELECT; remove
  duplicate 'Update Enabled Servers' button
- add_remote_server_enabled_column.sql: idempotent migration to add the
  'enabled' INT column to gsp_remote_servers on older installs

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/988997ed-7568-48bf-96ef-889fb5d91fec

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 13:40:10 +00:00
copilot-swe-agent[bot]
fcc54cb2da
style: clean up string concatenation in config_loader.php
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/a3e1e4bb-8eb1-4e6e-b1f8-7f3952301231

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 13:16:40 +00:00
copilot-swe-agent[bot]
1247e5e7ca
fix: harden billing module for standalone portability
- config_loader.php: prefer local billing config FIRST (root cause fix)
  - was: panel config loaded first, overriding local config with wrong db name
  - now: local modules/billing/includes/config.inc.php always wins when present
- config.inc.php: add $db_port="3306"
- config.example.php: new example config with all variables documented
- menu.php: add $db_port to mysqli_connect
- admin_auth.php: add $db_port; remove hardcoded /_website path detection
- bootstrap.php billing_get_db(): add $db_port
- login.php: fix /_website path detection
- adminserverlist.php: add $db_port; fix hardcoded /modules/billing/ URL
- All other mysqli_connect calls: add isset($db_port) port parameter
  (my_servers, forgot_password, serverlist, server_status, order, register,
   reset_password, payment_success, my_account, admin_invoices, admin_payments,
   diag_remote, admin_coupons, test_db_connection, tools/check_db_user,
   renew_server)
- timestamp.txt: updated

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/a3e1e4bb-8eb1-4e6e-b1f8-7f3952301231

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 13:15:50 +00:00
copilot-swe-agent[bot]
d4332808e6
chore: remove 22 stray backup files (.bak/.BAK/.orig/.backup); update CHANGELOG and timestamp
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/fe14a5ef-8993-48c4-a867-17971b58ac92

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 12:51:18 +00:00
copilot-swe-agent[bot]
3066d9c75c
fix(billing): address code review issues - ALTER TABLE syntax, null period handling, type detection
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/e8da2cb7-dbf1-4296-b25d-766f8e099581

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 12:23:23 +00:00
copilot-swe-agent[bot]
986a4e53b4
refactor(billing): clean architecture with payment gateway abstraction
- Add PaymentGatewayInterface contract for all payment providers
- Add PayPalGateway (reads credentials from config, not hardcoded)
- Add ManualGateway for admin-triggered payments
- Add StripeGateway stub for future implementation
- Add GatewayFactory for gateway instantiation by name
- Add BillingRepository: parameterized-SQL data layer
- Add BillingService: pricing, invoice creation, payment processing
- Add gsp_billing_transactions table (DB version 2) for audit trail
- Add new columns to gsp_billing_invoices (home_id, rate_type, players, period_start/end, subtotal, total_due, payment_status)
- Add gsp_billing_service_remote_servers mapping table
- Move PayPal credentials from api files into config.inc.php
- Fix double session_start() bug in capture_order.php
- Replace raw SQL with prepared statements throughout
- Refactor admin_invoices.php to use billing_invoices + BillingRepository
- Refactor admin_payments.php to read from gsp_billing_transactions
- Update admin.php with links to Transaction Log and Manage Invoices

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 12:17:36 +00:00
copilot-swe-agent[bot]
b03d9b2171
feat: simplify billing status to Active/Invoiced/Expired with new SQL migration and cron rewrite
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/5dbd58e1-7aa0-41e2-8dd3-c56b69ede05e

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-01 22:17:22 +00:00
copilot-swe-agent[bot]
b8543dfbc5
feat: add GSP customized install.php with port support, auto-admin, and ogp_ migration
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/4b32e3c2-afec-458b-bf16-48e58045cc8b

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-04-27 19:57:03 +00:00
copilot-swe-agent[bot]
e44519c030
Apply automated PHP8 safety transforms
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-04-23 14:01:37 +00:00
43f911dc93 fix menu 2025-12-06 07:15:45 -05:00
21696b36c5 fix 2025-12-05 15:27:13 -05:00
834ec56a4c fix login 2025-12-05 15:19:10 -05:00
5f5008b377 fixed missign config file and added check if xmlrpc istnt installed 2025-11-23 14:42:37 -05:00
dc24d43921 site changes by codex 2025-11-20 08:10:31 -05:00
1434929258 more game docs 2025-11-11 07:10:22 -05:00
0a85bc1111 fixed cart.php formatting 2025-11-10 13:20:11 -05:00
0a46a892b8 updated timestamps 2025-11-10 12:16:04 -05:00
2160fba52e Merge branch 'Panel-unstable' of https://github.com/GameServerPanel/GSP into Panel-unstable 2025-11-10 07:23:04 -05:00
ba6b8d9e6b Fix tableprefix and cart mysql 2025-11-10 07:23:01 -05:00
copilot-swe-agent[bot]
86bfdb68c9 Add PHPDoc hints to additional billing module files for IDE support
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-10 03:15:15 +00:00
copilot-swe-agent[bot]
563ce13252 Fix cart display, menu styling, and documentation formatting
- Add menu include to cart.php so the page displays properly
- Link header.css stylesheet in cart.php
- Change My Account from prominent button to regular nav link in menu
- Update all 148 game documentation files with proper Quick Info from XML configs
- Fix contrast issues in Quick Info (dark blue background with white text)
- Add Font Awesome icons and fix contrast in Important Notes (dark orange background)
- Sort games alphabetically (case-insensitive) in docs.php
- Add Font Awesome CDN link to docs.php

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-08 15:22:23 +00:00
copilot-swe-agent[bot]
7b7a42ca30 Fix cart CSS, update menu, consolidate game docs, add navigation
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-07 13:39:41 +00:00
copilot-swe-agent[bot]
7dcecd49ed Complete coupon system integration with payment processing
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-07 11:59:06 +00:00
copilot-swe-agent[bot]
d7e9b54763 Fix hardcoded ogp_users table reference in menu.php
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-07 11:54:19 +00:00
copilot-swe-agent[bot]
b9d3d5a285 Implement new documentation system with categorized docs browser
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-07 10:52:35 +00:00
copilot-swe-agent[bot]
0be96da2a0 Update table prefix from ogp_ to gsp_ in SQL files and config
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-07 10:48:01 +00:00
7276af0d32 removed all hardcoded table prefixes 2025-11-05 13:33:45 -05:00
efa1440e91 admin coupons 2025-10-29 08:12:40 -04:00
a56c24bdfd changing db credentials 2025-10-29 07:48:55 -04:00
68fa6d9b1c password in config php 2025-10-29 07:34:08 -04:00
copilot-swe-agent[bot]
91a63a780f Fix PayPal capture_order.php to use standalone database connection
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-10-29 10:52:32 +00:00
90c7eef36b some fixes 2025-10-28 23:06:45 -04:00
copilot-swe-agent[bot]
4397e67ccb Fix 4 critical billing module issues
- Fix path error in payment_processor.php for website deployment
- Add invoice creation when renew button is clicked
- Fix end_date comparison in create_servers.php for DATETIME type
- Add explicit input text colors in login.php for visibility

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-10-29 02:19:12 +00:00
copilot-swe-agent[bot]
4e73997a4b Refactor process_payment_record into reusable payment_processor.php helper
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-10-29 01:42:24 +00:00
ed94cf17db updated 2025-10-25 10:49:40 -04:00
2347205469 website fixes 2025-10-24 17:27:59 -04:00
copilot-swe-agent[bot]
40c575f025 Add My Account page with menu integration and config file
Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-10-24 15:11:56 +00:00
ff0b2b2843 style fixes 2025-10-23 19:44:24 -04:00
426b32b747 Changes to be committed:
modified:   modules/billing/admin.php
	modified:   modules/billing/cart.php
	modified:   modules/billing/css/header.css
	renamed:    modules/billing/includes/config.inc.php -> modules/billing/includes/config.inc.php.orig
	modified:   modules/billing/includes/menu.php
	modified:   modules/billing/order.php
	modified:   modules/billing/privacy.php
	modified:   modules/billing/serverlist.php
	modified:   modules/billing/tos.php
2025-10-23 19:25:29 -04:00
437fbad5e6 Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00