# Gym Management Pro Upgrade

This package upgrades the original PHP/MySQL gym system without replacing its existing member, plan, package, trainer and registration tables.

## 1. Backup first
Export the current `gym_db` database from phpMyAdmin.

## 2. Import the upgrade SQL
In phpMyAdmin select `gym_db` and import:

`database/gym_pro_upgrade.sql`

The migration adds the Pro tables for attendance, classes/bookings, assessments/goals, POS, inventory, finance, invoices, payroll, commissions, campaigns, notifications, audit logs and settings. It also adds useful fields to `members` and `trainers`.

## 3. Copy the application
Replace the files in your existing `gym` folder with this upgraded folder, keeping your database configuration in `db_connect.php` if it differs from the default.

## 4. Open
`http://localhost/gym/`

The upgraded dashboard is available after login.

## Main modules
- Executive dashboard
- Member management
- Attendance check-in/check-out
- Membership activation and expiry monitoring
- Membership plans and packages
- Trainers and group classes
- Schedule and class bookings
- POS / billing
- Inventory and stock movements
- Fitness assessments and goals
- Payments and invoicing foundation
- Revenue and expense ledger
- Payroll and commissions foundation
- Reports and analytics
- SMS campaign management foundation
- Notifications and alerts
- Settings and customization
- Users and roles
- SQL backup download

## SMS / cloud note
The application now stores campaigns and provides a clean integration point. Actual SMS delivery requires an SMS provider/API credentials. Cloud backup also requires a storage provider; the included backup page creates a full SQL export that can be uploaded to Drive, OneDrive, Dropbox or a server backup service.

## Compatibility
The code is intentionally written in a PHP 7.4-compatible style for XAMPP environments and uses the existing Bootstrap/jQuery assets already bundled with the project.
