20 Commits
Author SHA1 Message Date
CydandClaude Opus 4.8 f9f1dd2d13 Document verified XAMPP Lite 8.5 deployment + add launcher
- install/DEPLOYMENT-WALKTHROUGH.md: full verified runbook (operator + headless
  methods) from an actual deploy — PHP 8.5.5 + MariaDB 11.4.10 + Apache,
  app at www/pqs, DB provisioned via installer, registration/commit verified,
  zero PHP 8.5 warnings from app code.
- install/start-pqs.bat: one-command launcher (starts MariaDB + Apache, sets the
  XAMPP_LITE_ROOT/SRVROOT placeholders, provisions the DB on first run).
- install/README.md: aligned to this stack's layout (apps/, www/, control panel);
  corrected the installer 'safe to re-run' note (seed inserts are not idempotent).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 15:34:09 -05:00
CydandClaude Opus 4.8 238cdf5689 gitignore the XAMPP portable archive too
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 15:13:49 -05:00
CydandClaude Opus 4.8 b491bb4b8a Add on-demand XAMPP Lite 8.5 installer + Windows time.php support
- install/pqs_install.sql: one-shot installer (creates pqs DB + user, all
  tables as InnoDB, static seed) so a fresh portable XAMPP deploy needs no
  separate migrations. Derived from docs/pqs.sql with engines forced to InnoDB.
- install/README.md: XAMPP Lite 8.5 deployment steps plus fresh-vs-upgrade guidance.
- time.php: OS-aware clock set (PowerShell Set-Date on Windows/XAMPP, sudo date
  on Linux); epoch is int-cast so the exec has no injection.
- .gitignore: exclude the portable xampp_lite_8_5/ stack (not versioned here).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 15:08:09 -05:00
CydandClaude Opus 4.8 2ebf9a0ef2 Doc: record the 2026-07-01 improve-in-place pass (ARCHITECTURE §10)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:31:52 -05:00
CydandClaude Opus 4.8 689c6a4dd2 Item #4: centralize timezone, collapse the 16 pod branches to loops
- includes/db.php now defines PQS_TIMEZONE and sets it on include; the 9 files
  that hardcoded date_default_timezone_set('America/Chicago') drop the call
  (main pages already load db.php; display includes now require it).
- console.php: pod load and the 16 pod-checkbox lines collapsed into loops over
  a $pods array (fixed 16 kept - hardware max). Output unchanged.

Verified: timezone resolves to America/Chicago via the constant; console commit,
config update, and pod-checkbox rendering all correct; registration suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:30:57 -05:00
CydandClaude Opus 4.8 0313606cf1 Harden getgroup.php: cast $_POST[group] to int
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:07:40 -05:00
CydandClaude Opus 4.8 7658db0641 Parameterize history.php and search.php
Both now use db.php helpers with bound params: history's mission index (was
injectable via $_GET[index]) and the callsign LIKE search. Loops switched to
associative fetches.

Verified: history shows the committed mission + players + merc count; search
finds a queued callsign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:06:34 -05:00
CydandClaude Opus 4.8 530326b8e4 Parameterize registration.php; atomic player delete
- All staff paths (build, lock, edit, editgame, delete, add, search) and the
  render SELECTs now use db.php helpers with bound params. Removes SQL injection
  via playerid/missionid/callsign/newtype/newmap/buildmissions.
- Delete routes through new pqs_remove_player() (shared lock + transaction,
  resyncs numplayers from real occupancy instead of a raw numplayers-1).
- Drop a stray buggy line ($callsign from an undefined $line) and guard
  $_SERVER['SERVER_ADDR']. build now sets nummercs=0 (strict-mode safe).

Verified on the stack: build/edit/delete/editgame/lock/search all work; delete
resyncs numplayers; no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:04:04 -05:00
CydandClaude Opus 4.8 5aa01db123 Parameterize console.php; make Commit Mission atomic
- Config 'Update', 'Commit Mission', lock, and clearupdate now use db.php
  helpers with bound params (were injectable via ~20 raw $_GET values incl.
  nummercs and playerid). Pod toggles collapsed into a 16-iteration loop.
- Commit Mission runs under the shared queue lock and one transaction so a
  registration can't slip into the mission mid-commit.
- dev/migrations/002: pqs_currentmission + pqs_pastmissions -> InnoDB so the
  commit's snapshot/archive roll back with the queue delete (uses DELETE not
  TRUNCATE to stay in the transaction).

Verified: commit moves players to current/past, empties queue, marks completed
with nummercs; config update writes pods + settings; no errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:59:27 -05:00
CydandClaude Opus 4.8 905c46c4c4 Rewrite api.php: parameterized, no DEBUG output
- Strip DEBUG echoes. The 'call is set' line was prefixing the updateinfo JSON
  response, breaking JSON.parse on the display walls so the info-panel
  auto-refresh silently never fired.
- Parameterize updatemerc (was SQL-injectable via $_GET[playerid]).
- Use includes/db.php helpers; set JSON content-type on updateinfo.

Verified: updateinfo returns clean "0"/"1"; updatemerc add/remove flips the
flag; empty response on merc toggle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:50:51 -05:00
CydandClaude Opus 4.8 c82978776d Route all remaining fill paths through the shared atomic queue
Completes the overfill-race fix (item #1). New queue.php functions, all under
the same GET_LOCK + transaction and self-healing numplayers:
- pqs_add_player_to_mission     (staff 'new' -> registration.php)
- pqs_add_player_to_missions    (staff 'add to N missions' -> registration.php)
- pqs_enqueue_group             (kiosk group leader -> callsign.php)
- pqs_claim_group_slot          (kiosk group member -> callsign.php)
callsign.php and registration.php now call these instead of their own
non-atomic read-check-insert blocks.

Verified on the local stack: scenario test (leader/member/staff paths) and
120 mixed concurrent solo+group writers x3 -> zero overfill, zero drift;
HTTP smoke of leader/member/new paths all seat correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:49:10 -05:00
CydandClaude Opus 4.8 b6e6feca32 Fix config.php: fetch pqs_pods row before reading pod vars
The pod query result was never fetched, so $pod01..16 (and their $_SESSION
copies) read a stale row - silent on PHP 5, noisy warnings on PHP 8. Add the
missing mysqli_fetch_array. Behavior otherwise unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:41:23 -05:00
CydandClaude Opus 4.8 df04ab4eb7 Atomic mission-fill for kiosk registration (fixes overfill race)
- dev/migrations/001-innodb.sql: convert pqs_queue + pqs_mission to InnoDB.
- includes/queue.php: pqs_enqueue_player() seats a player in the next open
  mission (creating one if needed), serialized with GET_LOCK and wrapped in a
  transaction; capacity judged by real COUNT(*), numplayers rewritten from it
  so the counter self-heals and can't drift.
- callsign.php: normal registration path now calls pqs_enqueue_player instead
  of the non-atomic read-check-insert.

Verified on the local stack: 140 concurrent registrations -> 24 missions,
zero overfill, zero counter drift.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 13:40:44 -05:00
CydandClaude Opus 4.8 061291c951 Add centralized DB helper; fix legacy mysql_error() landmines
- includes/db.php: shared mysqli connection + parameterized query helpers
  (pqs_db/pqs_exec/pqs_rows/pqs_row/pqs_val), targets PHP 7.4+.
- Replace 11 mysql_error() calls (undefined function on PHP 7+) with
  mysqli_error($link) / mysqli_connect_error() across getFSgame, getFSplayers,
  config, callsign, console. Only affected already-failed error paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:51:13 -05:00
CydandClaude Opus 4.8 7d643dde17 Add local WSL test-stack setup tooling
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 12:48:38 -05:00
CydandClaude Opus 4.8 00d6ec148e Clarify 16-pod design: hardware max, fixed 16-line positional output contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:53:06 -05:00
CydandClaude Opus 4.8 d5ccc48dfe Add ahk/ placeholder for the unrecovered game-console bridge scripts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:23:25 -05:00
CydandClaude Opus 4.8 7b0cee2f8c Correct pod integration: AutoHotkey scripts scrape PQS, not direct polling
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:13:43 -05:00
CydandClaude Opus 4.8 5011c70414 Add architecture documentation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 11:08:54 -05:00
CydandClaude Opus 4.8 22e59d6290 Initial commit of PQS
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 10:59:51 -05:00