GYM MANAGEMENT PRO UPGRADE

1. Backup your existing gym_db database.
2. Import database/gym_pro_upgrade.sql into gym_db.
3. Put this folder in C:\xampp1\htdocs\ (or your XAMPP htdocs directory).
4. Confirm db_connect.php uses your MySQL credentials.
5. Open http://localhost/gym/

The upgraded dashboard includes:
Dashboard, Members, Attendance, Memberships, Plans, Packages, Trainers & Classes,
Schedule & Bookings, POS/Billing, Inventory, Assessments & Goals, Payments & Invoicing,
Revenue & Expenses, Payroll & Commissions, Reports & Analytics, SMS & Campaigns,
Notifications, Settings, Users/Roles and SQL Backup.

SMS sending and cloud storage require an external provider/API and are intentionally kept
as integration-ready modules rather than pretending that messages/backups were delivered.

COMMUNICATION UPGRADE
---------------------
Email and WhatsApp are now real provider integrations, not placeholders.

1) Open Settings -> Email SMTP and enter your SMTP host, port, encryption, username/password, sender email and sender name. Use a Gmail/Google Workspace App Password rather than a normal Google account password when required by Google.
2) Click Send Test Email.
3) Open Settings -> WhatsApp Business Cloud API and enter the Meta Graph API version, Phone Number ID, WABA ID and a System User access token with WhatsApp messaging permission. The official Cloud API sends messages through the Graph API /messages endpoint.
4) Set an approved WhatsApp template name for business-initiated campaigns outside an active customer-service window. Use {{name}} or {{first_name}} in campaign text; the template must contain a matching body variable.
5) Click Send Test WhatsApp and enter a destination number in international format, e.g. +2507XXXXXXXX.
6) Configure Meta's webhook verification URL to whatsapp_webhook.php. The page handles verification and stores received webhook payloads in uploads/whatsapp_webhook.log.
7) Scheduled campaigns can be processed with communication_cron.php. Run it every 5-15 minutes using Windows Task Scheduler or a hosting cron job.

STAFF LOGIN
-----------
Type 1 = Administrator. Type 2 = Staff. Type 3 = Subscriber/member legacy role. The management login now accepts type 1 and type 2 accounts.
