LICENSE CONTROL PANEL — CPANEL INSTALL
======================================

This is an independent license key manager. It does not connect to or copy another
website's private backend or license service.

OWNER LOGIN
Username: sofikulislam
Password: 781319

FEATURES
- Responsive dark purple admin dashboard for mobile and desktop
- Quick key generation and bulk generation (up to 100 keys per batch)
- Durations: 1h, 3h, 6h, 12h, 1d, 3d, 10d, 20d, 30d and lifetime
- Optional custom key list (one key per line)
- Target account and game selection
- Device limit per key and device binding
- Users & Keys: enable/disable, reset device, extend one day
- Reseller login accounts (owner creates username/password), reseller key generation dashboard, Games, Credit Rates, Bulk Tools and Config
- Maintenance toggle with visible status; bulk pasted-key device reset and global hardware reset
- FREEFIRE automatically selected for owner and reseller key generation
- Client activation endpoint at /api/activate.php

CPANEL INSTALL
1. Make a backup of the current panel folder and storage/licenses.json.
2. Upload this ZIP into a NEW folder, e.g. public_html/license-panel/.
3. Extract the ZIP. Keep the storage folder and all files together. To retain existing
   keys, copy your OLD storage/licenses.json into the new storage folder after backup.
4. In cPanel > File Manager, select storage and set permissions to 750 (if PHP
   cannot write, try 755; do not use 777). The storage folder is protected by
   .htaccess. Keep off-site backups of storage/licenses.json.
5. Visit https://YOUR-DOMAIN/license-panel/index.php
6. Sign in with the owner credentials above. The dashboard has Logout. In Resellers, create a reseller display name, username and password (8+ characters); share those credentials privately. Resellers sign in at the same login.php and are sent to their own reseller.php dashboard.
7. Client users open https://YOUR-DOMAIN/license-panel/ and enter the generated key.

IMPORTANT
- PHP 8.1+ and HTTPS are recommended.
- This panel generates and validates its own license keys only. It does not provide
  VPN servers, VLESS credentials, proxy access, game cheats or third-party service
  access. Only issue keys for services and software you own or are authorized to manage.
- Device binding uses a browser-generated device ID saved in localStorage; clearing
  browser data or changing browsers may create a new device identity.
- This package has passed PHP syntax checks; the live cPanel installation still needs
  testing on your hosting account.
- Default password is short and intended only for initial setup. Replace it with a
  strong password and protect the config.php file.


RESELLER LOGIN
Open /reseller-login.php. Owner can also use /login.php and the Reseller Login link.
Create reseller accounts from Owner -> Resellers and set starting credits. Resellers can only generate keys while they have enough credits.

UPDATED BUILD
- Separate PHP entrypoints: dashboard.php, resellers.php, users.php, bulk.php, games.php, rates.php, tools.php, panel-config.php.
- Owner login is login.php; reseller login is reseller-login.php.
- Allowed key durations are strictly: 1 Hour, 3 Hours, 6 Hours, 12 Hours, 1 Day, 3 Days, 7 Days.
- Lifetime, 10 Days, 20 Days and 30 Days are removed from the UI and rejected by backend validation.
- Existing stored credit rates are sanitized on load to remove unsupported durations while preserving custom rates for supported durations.
- 7 Days uses the previous 10 Days rate of 10 credits.


PURGE EVERYTHING (OWNER ONLY)
- Open Owner -> Bulk Tools -> Purge Entire Repository.
- Removes all generated license keys from the active database; reseller accounts and balances are preserved.
- Owner -> Bulk Tools has a lock/unlock toggle for revealing the purge controls.
- Requires typing PURGE EVERYTHING and confirming a second browser warning.
- Saves a protected JSON backup in storage/purge-backups/ before deletion.
- Owner login, reseller accounts, panel settings, games and credit rates are retained.

UPDATED HISTORY UI
- Owner and reseller key-history pages now use responsive dashboard-style cards, summary stats, search and copy controls.
- Owner can filter history by reseller; deleting keys from a reseller-filtered history only affects that reseller's keys.
