MULTI-POS LIVE REPORTS: POS1 / POS2 / POS3

IMPORTANT: Back up your working site first. This package is based on your uploaded shoppy.zip.

WEBSITE: Replace ONLY these files in htdocs/pos_reports/:
 index.php, common.php, live_lib.php, live_request.php, live_poll.php,
 live_status.php, live_upload.php
Keep your current config.php, upload.php, style.css, private directory and data unchanged.
DO NOT upload the shoppy.zip contents or existing live CSVs back to your website.

WINDOWS: Copy LIVE_POS.PRG to each POS and run it in a separate VFP9 instance.
POS 1:
DO LIVE_POS WITH "C:\POS1\DATA\INV_I_O.DBF", ;
 "https://unicomlb.com/pos_reports/", "YOUR_PRIVATE_UPLOAD_TOKEN", "pos1"
POS 2:
DO LIVE_POS WITH "C:\POS2\DATA\INV_I_O.DBF", ;
 "https://unicomlb.com/pos_reports/", "YOUR_PRIVATE_UPLOAD_TOKEN", "pos2"
POS 3:
DO LIVE_POS WITH "C:\POS3\DATA\INV_I_O.DBF", ;
 "https://unicomlb.com/pos_reports/", "YOUR_PRIVATE_UPLOAD_TOKEN", "pos3"
Change paths and use your actual upload token. Never share it in screenshots.

MOBILE: Choose All POS / POS 1 / POS 2 / POS 3, enter DD/MM/YYYY dates,
press Apply. All POS waits for all 3 responses. Single POS waits only for that POS.
No incoming Windows port required. Offline POS causes a timeout for All POS;
completed POS data is NOT silently reported as the complete total.

Each report request is stored by unique request ID. POS CSV files are separate.
The dashboard merges them only after all requested POS upload successfully.
Transaction details and CSV export include POS_ID. Dashboard amounts sum all selected POS.

Requires PHP 7.4+, HTTPS and writable protected private folder.
Do not leave makehash.php publicly accessible. Ensure private/.htaccess denies access.
Clean up old live_*.json and live_*_pos*.csv periodically (e.g. older than 7 days).
The old single-POS LIVE_POS.PRG is not compatible with these new polling endpoints.
This code has not been live-tested against your Windows VFP9 or hosting.
