BGI HRMS Payroll & Attendance Complete Package
Phase 1 to Phase 11 with Installation Wizard
=============================================

Recommended Browser Installation
--------------------------------
1. Take full database and file backup.
2. Upload all folders/files to your ERP project root.
3. Open the installation wizard:

       /install/index.php

4. Enter database details:
   - Database host
   - Database port
   - Database name
   - Database username
   - Database password

5. Click Test Database Connection.
6. Click Create Config File.
7. Click Import Schema Now.
8. Create standalone HRMS admin user.
9. Finish installation to lock the installer.
10. Open:

       /admin/hrms/complete_dashboard.php

Generated Database Config
-------------------------
The wizard creates:

    /admin/hrms/_database.php

The HRMS config file uses this generated database config first. If this file is missing, it falls back to existing ERP database config search.

Security Lock
-------------
After installation, this file is created:

    /install/INSTALL_LOCK.php

The wizard cannot run again until this file is deleted manually. Delete it only after backup and only if reinstall is required.

Manual Installation Alternative
-------------------------------
If you do not want to use the wizard:

1. Create database manually.
2. Import:

       install_all_phases_schema.sql

3. Create database config manually at:

       /admin/hrms/_database.php

Example:

<?php
if (!defined('HRMS_DB_HOST')) { define('HRMS_DB_HOST', 'localhost'); }
if (!defined('HRMS_DB_PORT')) { define('HRMS_DB_PORT', '3306'); }
if (!defined('HRMS_DB_USER')) { define('HRMS_DB_USER', 'db_user'); }
if (!defined('HRMS_DB_PASS')) { define('HRMS_DB_PASS', 'db_password'); }
if (!defined('HRMS_DB_NAME')) { define('HRMS_DB_NAME', 'db_name'); }
if (!defined('HRMS_DB_CHARSET')) { define('HRMS_DB_CHARSET', 'utf8mb4'); }

Important URLs
--------------
Installation Wizard:
    /install/index.php

Complete Dashboard:
    /admin/hrms/complete_dashboard.php

Standalone HRMS Login:
    /admin/hrms/login.php

Logout:
    /admin/hrms/logout.php

Notes
-----
- PHP code uses English comments/messages.
- Package is kept PHP 5.6 compatible.
- Database user must have CREATE, ALTER, INSERT, UPDATE, SELECT permissions.
- Existing ERP admin login can still be used if your project already controls /admin pages.
