SITE LEDGER - PROJECT REGISTRY MODULE
Plain PHP + MySQL. Nothing to install. Works on normal cPanel hosting.

REQUIREMENTS
- PHP 7.4 or newer (PHP 8.x is fine)
- MySQL 5.7+ or MariaDB 10.3+
- PDO MySQL extension (enabled by default on cPanel)

UPLOAD STEPS
1. In cPanel > MySQL Databases:
   a. Create a database (for example siteledger).
   b. Create a database user with a strong password.
   c. Add the user to the database with ALL PRIVILEGES.
   cPanel adds your account name in front, for example myacct_siteledger.
2. In cPanel > File Manager, open public_html (or the folder of the domain
   or subdomain you want). Upload site-ledger.zip and click Extract.
   You get a folder called site-ledger. Your address will be
   https://yourdomain.com/site-ledger/
   (Move the files up one level if you want it on the main address.)
3. Open site-ledger/includes/config.php with the File Manager editor.
   Fill in DB_NAME, DB_USER and DB_PASS from step 1. Leave DB_HOST as
   localhost. Save.
4. Visit https://yourdomain.com/site-ledger/install.php
   Enter your company name and your details. This creates the tables and
   your Super Administrator account. Tick the example-data box only if you
   want 8 sample projects to try it out.
5. DELETE install.php in the File Manager.
6. Sign in at https://yourdomain.com/site-ledger/login.php

TURN ON HTTPS
Use cPanel > SSL/TLS Status (AutoSSL) so the site opens with https://.
Passwords should not be sent over plain http.

ROLES
- Super Administrator: all companies, all projects, all users.
- Company Administrator: own company's projects and users.
- Project Manager: only projects linked to their login (set on the project).
- Accountant: own company's projects; can record expenses.

HOW IT WORKS
- Projects: register, edit, search, filter, sort, export to Excel (CSV).
- Each project has a budget split into 5 categories and a list of expenses.
  Spent = total of recorded expenses. Over-budget and behind-schedule
  projects are flagged.
- Admin page: add companies and users, reset passwords, deactivate users,
  view system activity.
- Account page: every user can change their own password.

BACKUP
Back up the database often: cPanel > Backup, or phpMyAdmin > Export.
The files themselves contain no business data except config.php.

TROUBLESHOOTING
- "Something went wrong" page: check includes/config.php. To see the
  technical message, set APP_DEBUG to true, reload, then set it back.
- Blank page or 500 error: in cPanel > MultiPHP Manager, choose PHP 8.1 or
  newer for the domain.
- Forgot the Super Administrator password: in phpMyAdmin open table users,
  or ask your developer to reset it.
