The ultimate solution for managing IPTV clients, providers, and financials.
A powerful, responsive, and intuitive control panel designed for IPTV resellers and providers.
- Dashboard Analytics: Real-time financial reports, income vs expenses tracking, and subscription growth charts
- Client Management: Track subscriptions, expiration dates, contact details, and payment history
- Provider Management: Organize different IPTV providers and their costs
- Payment Tracking: Comprehensive payment history with profit calculations
- Account Settings: User profile and password management
- Auto Geocoding: Automatically converts addresses to coordinates using OpenStreetMap Nominatim
- Manual Geocoding: Autocomplete search for failed geocoding addresses
- Clustering: Visualizes high-density client areas with marker clusters
- Status Filtering: Filter map markers by subscription status (Active, Expired, New)
- Batch Processing: Geocode all clients at once with
geocode_all.php
- Visual Alerts: Dashboard notifications for expiring subscriptions (7 days, 14 days)
- SMS Templates: Customizable SMS templates with dynamic variables (
{NAME},{DAYS},{DATE}) - One-click Sending: Mobile SMS app integration or clipboard copy for desktop
- Expiration Tracking: Real-time count of expiring subscriptions via API
- Security Logs: Detailed audit trail of failed logins, IP blocks, and critical actions
- Brute-force Protection: Automatic IP blocking after 5 failed login attempts (15-minute ban)
- Session Security: CSRF protection, honeypot fields, and session hijacking prevention
- SQL Injection Prevention: PDO prepared statements throughout
- XSS Protection: All output properly escaped with
htmlspecialchars() - Log Management: View and delete security logs to prevent database bloat
- ARPU Tracking: Average Revenue Per User calculated over 30-day periods
- Churn Rate: Monitor customer retention with automatic churn calculations
- Database Statistics: View table sizes, row counts, and last update times
- Database Backup: One-click SQL backup download with complete schema and data
- Performance Metrics: Active vs total clients, revenue trends, and growth indicators
- Fully Localized: Complete interface in Russian (RU) and English (EN)
- Easy Extension: Simple array-based translation system
- Runtime Switching: Change language on-the-fly without logout
- Consistent Keys: All UI elements use the
t()translation function
- Mobile Optimized: Works perfectly on smartphones and tablets
- Desktop Ready: Full-featured experience on larger screens
- Touch Friendly: Optimized touch targets and gestures
- Debug Payments: View last 100 payments with detailed breakdown
- API Endpoints: RESTful endpoints for geocoding and data retrieval
- Automated Setup: Web-based installer for easy deployment
- PHP 7.4+ with extensions:
- PDO (MySQL)
- JSON
- cURL (for geocoding)
- Session support
- MySQL 5.7+ or MariaDB 10.2+
- Web Server: Apache 2.4+ or Nginx 1.18+
- Modern Browser: Chrome, Firefox, Safari, or Edge (for map features)
-
Clone the repository
git clone https://github.com/squoll/pnl.git cd pnl -
Setup Configuration
Open
setup.phpin your browser to run the automatic installer:http://your-server/pnl/setup.phpThe installer will:
- Test database connection
- Create required tables (
tv_clients,tv_providers,tv_payments,users,security_logs) - Set up initial admin account
- Configure database credentials
-
Manual Configuration (Optional)
Rename
config/db.example.phptoconfig/db.phpand edit:<?php $host = 'localhost'; $db = 'your_database'; $user = 'your_username'; $pass = 'your_password';
-
Login
Navigate to
login.phpand use the credentials created during setup.
The system uses the following main tables:
tv_clients: Client information, subscription dates, addresses, coordinatestv_providers: IPTV provider details and coststv_payments: Payment records with income, expenses, and profit calculationsusers: Admin user accounts with hashed passwordssecurity_logs: Login attempts, IP blocks, and security events
- Add Client: Click "Add Client" from dashboard or clients page
- Auto-geocoding: Address is automatically geocoded when saved
- Manual Geocoding: If auto-geocoding fails, use the map page to manually geocode
- Edit/Delete: Use action buttons in the clients table
- Navigate to SMS Settings in the menu
- Create templates with variables:
{NAME}- Client's first name{DAYS}- Days until expiration{DATE}- Expiration date
- Click SMS icon next to expiring clients to send
- Dashboard: Overview of income, expenses, and active clients
- System Health: Detailed ARPU, churn rate, and database statistics
- Debug Payments: Verify payment calculations and yearly totals
Backup:
- Go to System Health page
- Click "Download Backup" button
- Save the
.sqlfile securely
Restore:
mysql -u username -p database_name < backup_file.sqlGeocode a single address using OpenStreetMap Nominatim.
Method: POST
Parameters:
address(string): Full address to geocode
Response:
{
"success": true,
"lat": 56.9496,
"lon": 24.1052
}Get count of subscriptions expiring within specified days.
Method: GET
Parameters:
days(int): Number of days threshold
Response:
{
"count": 5
}- Backend: PHP 7.4+ with PDO
- Database: MySQL/MariaDB
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- CSS Framework: Bootstrap 5
- Icons: Unicons
- Maps: Leaflet.js with OpenStreetMap tiles
- Geocoding: OpenStreetMap Nominatim API
- Charts: Chart.js (for analytics)
The system is built with i18n in mind.
Switch Language:
- Use the dropdown in the top-right menu
- Language preference is stored in session
Add New Language:
- Copy
lang/en.phptolang/your_code.php - Translate all array values
- Add language option to
includes/header.php
Translation Function:
<?= htmlspecialchars(t('translation_key')) ?>- Session Hijacking Protection: User agent and IP validation
- Rate Limiting: 5 failed login attempts β 15-minute IP ban
- SQL Injection Prevention: PDO prepared statements exclusively
- XSS Protection: All output escaped with
htmlspecialchars() - CSRF Protection: Honeypot fields and token validation
- Password Security: Bcrypt hashing with cost factor 12
- Secure Headers: Content-Security-Policy and X-Frame-Options
Issue: Addresses not converting to coordinates
Solutions:
- Check internet connectivity (requires external API access)
- Verify OpenStreetMap Nominatim is accessible
- Use manual geocoding from the map page
- Check
geocode_all.phpfor batch processing errors
Issue: Map page shows blank or errors
Solutions:
- Check browser console for JavaScript errors
- Verify Leaflet.js and OpenStreetMap tiles are loading
- Ensure clients have valid coordinates (not NULL)
- Clear browser cache
Issue: Cannot login or "Invalid credentials" error
Solutions:
- Verify database connection in
config/db.php - Check if IP is blocked in
security_logstable - Wait 15 minutes if rate-limited
- Reset password via database if needed
Issue: "Could not connect to database" error
Solutions:
- Verify MySQL/MariaDB service is running
- Check credentials in
config/db.php - Ensure database exists and user has permissions
- Test connection:
mysql -u username -p database_name
Issue: SMS button not working
Solutions:
- On mobile: Check if SMS app is installed
- On desktop: Use clipboard copy feature
- Verify SMS template has valid variables
- Check client has valid phone number
| Dashboard Overview | Client Management |
|---|---|
![]() |
![]() |
| Visualizes income, active users, and quick actions | Filterable list of all clients with status indicators |
| Financial Reports | Analysis Charts |
|---|---|
![]() |
![]() |
| Monthly breakdown of earnings and costs | Interactive graphs for business growth |
| Client Map | Security Logs |
|---|---|
![]() |
![]() |
| Geocoded client locations with status clusters | Audit trail of all login attempts and blocks |
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Code Style:
- Follow PSR-12 coding standards for PHP
- Use meaningful variable names
- Comment complex logic
- Use the
t()function for all user-facing strings
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenStreetMap - Geocoding and map tiles
- Leaflet.js - Interactive map library
- Bootstrap - UI framework
- Chart.js - Analytics visualizations




