iPHONE ECID USER + SUBSCRIPTION PORTAL
=====================================

REQUIREMENTS
- PHP 8.1 or newer
- MySQL 5.7+ / MariaDB 10.4+
- PHP extensions: PDO, pdo_mysql
- HTTPS strongly recommended

INSTALLATION
1. Create a MySQL database and database user in cPanel.
2. Upload/extract this folder into your website's document root or a subfolder.
3. Edit config.php and set DB_HOST, DB_NAME, DB_USER, DB_PASS.
4. Visit https://your-domain/install.php
5. Create the first admin account.
6. Sign in at login.php.
7. DELETE install.php immediately after successful installation.
8. Open Admin Panel. Users can sign up, or admin can create accounts.
9. Open a user and assign 3 Months, 6 Months, or 1 Year.

PACKAGE RULES
- Packages are seeded as 3, 6 and 12 months.
- Assigning a package to a user who already has an active package extends from the current expiry date.
- Expired/no-package users cannot submit a registration request.
- Admin can suspend/activate accounts.
- Passwords are stored with PHP password_hash().
- Database writes use PDO prepared statements and forms use CSRF tokens.

IMPORTANT PROVIDER API NOTE
The uploaded HTML called an external endpoint with a browser-side fetch and no-cors mode.
That does not prove that the provider accepted the request, and it cannot safely confirm success.
This starter portal intentionally does NOT call that third-party endpoint. submit_sn.php verifies
the user's account and active subscription, then displays that the provider API is not connected.
To enable real registration, supply the official API documentation and credentials for a service
you own or are explicitly authorized to use. The integration should be implemented server-side,
with response validation and logging; never report success just because a request was sent.

SECURITY
- Use HTTPS.
- Use a strong MySQL password and a strong admin password.
- Keep config.php private and never publish database credentials.
- Delete install.php after setup.
- Back up the database regularly.
- Consider adding email verification, password reset and rate limiting before public launch.
