Live News Ticker Bar (index.php)
Landing Page
Added a sticky live news ticker bar below the navbar. The ticker shows 3 rotating categories: (1) 24 Server Country Flags (name + flag icon, gold-filtered), (2) 26 Communication App icons from connection_apps/, (3) 14 Payment Gateway logos from payment_ic/. Items are grouped in sets of 5 with a ◇ separator. Category labels (SERVERS / APPS / PAYMENTS) appear between groups. The ticker is sticky (stays below navbar at all times, even on scroll). Navbar height is dynamically measured via JS offsetHeight for accurate sticky top positioning. Images use loading=lazy + decoding=async for performance. Animation: pure CSS transform translateX, 110s linear infinite, pauses on hover. Gold filter: sepia(0.4) saturate(2) hue-rotate(8deg) brightness(1.2).
- index.php: .nt-bar sticky ticker CSS — height:32px, bg:#040c07, border-bottom neon-green
- index.php: .nt-live left badge — blinking red dot + LIVE text (neon green)
- index.php: .nt-overflow fade edges — ::before/::after gradient overlays
- index.php: .nt-track @keyframes ntScroll — 110s linear translateX(-50%) seamless loop
- index.php: .nt-item-img gold filter — sepia(0.4) saturate(2) hue-rotate(8deg) brightness(1.2)
- +5 more…
Dual Hero CTA Buttons + Auto-Cycling Hero Text (index.php)
Landing Page
Added two side-by-side CTA buttons in the homepage hero section. Button 1: "Neon Tunnel Panel & APK" — uses the existing rotating neon-green conic-gradient border (btn-explore). Button 2: "Purchase Source Code & Application" — same size, different blue/purple conic-gradient glow (btn-src-code). Auto-cycling hero text: after 5 seconds the title/subtitle smoothly transitions to Phase 2 ("Admin Panel & Source Code / Kharidne ke liye.") with re-triggered typing + circle-reveal animations, then loops every 8 seconds between phases. Mobile: both buttons side by side (flex:1, align-items:stretch), smaller font, no stacking. No existing animations or functionality modified.
- index.php: <style> block added — .hero-btns-wrap flex container, .btn-src-code conic-gradient overrides, mobile responsive breakpoints (600px, 400px)
- index.php: Existing single btn-explore replaced with .hero-btns-wrap div containing #btn-hero-panel + #btn-hero-src
- index.php: JS IIFE — _cycleTo() fades out title/subtitle, swaps textContent, re-triggers animate-typing + animate-circle-reveal CSS classes
- index.php: Hero cycling starts after 5000ms, loops every 8000ms (Phase 0 ↔ Phase 1)
- index.php: Both buttons href="#" (target pages to be built in future session)
Server Access Preview Card in Plan Create/Edit Modals
VPN Management
Added a live Server Access Preview card inside the Create Plan and Edit Plan modals, placed just above the Description field. The card shows all accessible servers as compact pill-chips. Servers within the server_limit are shown as green/unlocked chips; servers beyond the limit are shown as grey/locked chips. When the \u221e Unlimited toggle is checked, all chips turn green. The count badge (e.g. 3 / 12) updates live as the admin types in the limit field. Servers are fetched role-aware: Main Admin sees all 50 servers, Sub-Admin sees assigned servers, Reseller sees parent-pool servers. CSS class .plan-srv-preview added to admin.css.
- admin/plans.php: PHP $planModalServers + $planModalServersJson fetch (role-aware, max 50)
- admin/plans.php: Create modal — .plan-srv-preview card with #create_srv_chips + #create_srv_count
- admin/plans.php: Edit modal — .plan-srv-preview card with #edit_srv_chips + #edit_srv_count
- admin/plans.php: JS renderSrvPreview(prefix) — renders lock/unlock chips based on limit
- admin/plans.php: slUnlimitedToggle() — calls renderSrvPreview on toggle
- +4 more…
Unlimited Server Limit — Plan Create/Edit + Auto-Unlock Everywhere
VPN Management
Added Unlimited option (server_limit=0 sentinel) for VPN subscription plans. Plan create/edit modals now have an ∞ Unlimited toggle checkbox. When checked, the number input is locked and value=0 is submitted. All display locations (plan cards, active subscription banners, server-list active plan card, category unlock badges) show ∞ Unlimited instead of 0 when server_limit=0. Backend: getServersForActivePlan() already treated 0 as PHP_INT_MAX (no change needed). server-list.php unlock logic: planServerLimit=0 unlocks all servers in active category. api/index.php: server_limit=0 removes the SQL LIMIT clause entirely (all servers returned). API response includes server_limit="unlimited" string for Android APK awareness.
- admin/plans.php: renderPlanCard() — shows ∞ Unlimited when server_limit=0
- admin/plans.php: Active Subscription Banner — shows ∞ Unlimited when plan_server_limit=0
- admin/plans.php: Create Plan modal — ∞ Unlimited toggle added (checkbox + readonly input)
- admin/plans.php: Edit Plan modal — ∞ Unlimited toggle added
- admin/plans.php: JS slUnlimitedToggle() function — manages input readOnly + min removal + styling
- +7 more…
Dashboard Dual-Grid Equal Height Fix + Documentation Sync
Dashboard
Fixed the dashboard dual-grid visual height mismatch where the Recent Activity section appeared shorter than Active Servers. Root fix: .dual-grid > .data-section now uses flex-direction:column, .dash-scroll-box uses flex:1 to fill remaining space. Both columns are now always equal height via CSS Grid stretch + flexbox fill. All 3 documentation files and catalog updated with Session 6 (P79-P83) changes.
- admin/css/admin.css: .dual-grid { align-items: stretch } — explicit
- admin/css/admin.css: .dual-grid > .data-section { display:flex; flex-direction:column; margin-bottom:0 }
- admin/css/admin.css: .dual-grid > .data-section .dash-scroll-box { flex:1; min-height:0; max-height:400px }
- admin/dashboard.php: removed inline max-height from both dash-scroll-box divs — CSS flex handles it
- Documentation/AdminPanelProgress.md: Session 6 (P79-P83) added
- +2 more…
server-edit.php UX Improvements + Checked Protocol Visual Highlight
VPN Management
Improved server-edit.php: session_write_close() added before detect_ip HTTP call, auto-migration session-cached (sedit_migrated flag). Supported Protocols section moved above Status dropdown to reduce scrolling. Added CSS :has(input:checked) rule so selected protocols glow with neon-green border/background — instantly distinguishable from unchecked. server-add.php also received session_write_close() in suggest_ip and detect_ip handlers.
- admin/server-edit.php: session_write_close() before file_get_contents in detect_ip AJAX handler
- admin/server-edit.php: auto-migration wrapped in if(empty($_SESSION[sedit_migrated])) — runs once per session
- admin/server-edit.php: Supported Protocols section moved above Status dropdown field
- admin/css/admin.css: .checkbox-item:has(input:checked) { border-color:var(--neon-green); background:rgba(0,255,136,0.09); color:var(--neon-green); box-shadow:0 0 8px ... }
- CSS version bumped v2.5→v2.6 across all 22 PHP files
PHP Session Lock Fix — Instant Page Navigation
Core Engine
Root cause found for slow page navigation: ping AJAX requests hold PHP session file lock for 2-6 seconds (exec ping -W 2 + fsockopen × 4 ports × 1.5s each). When user navigates to any page, session_start() is blocked by concurrent ping requests. Fix: session_write_close() added immediately before slow network operations in all AJAX handlers. JS ping initialization delayed by 2.5 seconds so navigation within first 2.5s is also unblocked.
- admin/servers.php: session_write_close() after IP validation in ?action=ping handler — before exec/fsockopen
- admin/servers.php: auto-migration wrapped in session flag svr_migrated — runs once per session
- admin/servers.php: JS ping init wrapped in setTimeout(fn, 2500) — 2.5s delay before ping AJAX starts
- admin/configs.php: JS ping init wrapped in setTimeout(fn, 2500) — same delay
- admin/server-add.php: session_write_close() before file_get_contents in detect_ip handler
- +2 more…
Mobile Table Card Layout — Label-Top Fix + Proper Scroll Boxes
Mobile UX
Fixed mobile card layout: switched from absolute-left label approach (caused Location row wrapping: "Phoenix, United States" split across 2 lines) to label-top approach (::before display:block on separate line). Available content width now 287px vs 183px previously — location text fits on one line on all screen sizes. table-scroll-container on mobile now uses overflow-y:auto max-height:600px (proper scroll box) instead of overflow:visible max-height:none.
- admin/css/admin.css: mobile .table-scroll-container — overflow-y:auto; overflow-x:hidden; max-height:600px (was overflow:visible; max-height:none)
- admin/css/admin.css: .table-scroll-container td::before — changed from position:absolute to display:block (label-top layout)
- admin/css/admin.css: .table-scroll-container td — padding changed from 7px 14px 7px 98px to 8px 14px 7px (full width)
- Content width improvement: 183px → 287px on 375px screen — no more text wrapping
Internal Scroll System — 6-Item Containers for Tables, Grids, Dashboard
VPN Management
Added internal scroll (max-height + overflow-y:auto) to all major data containers so page scroll is replaced with container-level scroll. servers.php/configs.php: 500px limit (~6 rows). server-list.php .srv-grid: 450px (2 rows of 3 cards = 6 cards on desktop, 640px mobile). dashboard.php Active Servers: 360px, Recent Activity: 245px. Mobile table containers: 600px. All containers use neon-green scrollbar styling.
- admin/css/admin.css: .table-scroll-container max-height changed 540px→500px (~6 rows)
- admin/css/admin.css: .dash-scroll-box class added — overflow-y:auto + neon scrollbar
- admin/dashboard.php: Active Servers table wrapped in <div class="dash-scroll-box"> max-height:360px
- admin/dashboard.php: Recent Activity logs wrapped in <div class="dash-scroll-box"> max-height:245px
- admin/dashboard.php: Active Servers SQL LIMIT 5→20 (more servers fetchable, scroll to see all)
- +3 more…
Mobile Table Card Layout + Performance Optimization
Mobile UX
Fixed empty left cells on mobile for servers.php and configs.php. Converted table-scroll-container tables to stacked card layout on mobile using CSS data-label technique. Added data-label attributes to all <td> elements. Removed expensive backdrop-filter from sidebar on mobile. Reduced modal blur. Slowed cube animation. Overall mobile performance significantly improved with no UI design changes.
- admin/css/admin.css: @media (max-width:768px) responsive table CSS — table rows → stacked cards with data-label
- admin/css/admin.css: .table-scroll-container thead hidden on mobile, tbody tr becomes block card
- admin/css/admin.css: td::before shows data-label as column title on left side
- admin/css/admin.css: td.td-actions — flex-end layout for action buttons
- admin/css/admin.css: performance — sidebar backdrop-filter removed on mobile (heavy GPU)
- +7 more…
Real-Time Server Ping + Live User Count + 195-Country Smart Search
VPN Management
Added real-time ping display on all three server views (management table, server list cards, config list). Ping uses 2-tier: ICMP exec (Linux VPS) with TCP socket fallback (ports 443→80→22→8080). Color-coded badges: green <100ms, yellow 100-200ms, red >200ms. Users column shows red if active_conns > max_users. Added 195-country smart search dropdown on server-add.php with substring match highlighting. Auto IP detection and suggestion with NTP pool + ccTLD NS + 195-country static fallback. Country name shown in IP suggestion bar.
- admin/servers.php: AJAX endpoint ?action=ping&ip=X&sid=Y — ICMP exec + TCP socket latency fallback
- admin/servers.php: Ping column added to Server Management table
- admin/servers.php: Users column — red <span class="users-over"> if active_conns > max_users
- admin/servers.php: Real-time JS polling every 30s — updates ping badge + user count via same AJAX
- admin/servers.php: white-space:nowrap on server name td (fixes "United States" wrapping)
- +9 more…
Subscription Payment + Activation + Visibility Critical Bug Fixes
VPN Management
Fixed "Plan not found or unauthorized" error for Sub Admin wallet purchase (hardcoded created_by=1 bug). Fixed reseller seeing ALL sub-admin plans instead of only their parent's. Added purchased_from column for dynamic server hierarchy. Added duplicate plan block. Added active subscription banner + Already Active badge on plan cards. Enhanced getAccessibleServers() with purchased_from awareness. Added getServersForActivePlan() with MIN(plan_limit, pool) logic.
- CRITICAL BUG FIX: plans.php purchase_balance — Sub Admin: replaced hardcoded created_by=1 with getMainAdminId($pdo)
- CRITICAL BUG FIX: plans.php purchase_balance — Reseller: restricted to ONLY parent Sub-Admin's plans (was showing ALL)
- plans.php auto-migration: purchased_from INT column added to plan_subscriptions
- plans.php purchase_balance: stores purchased_from (plan.created_by) for server hierarchy tracking
- plans.php razorpay_verify: stores purchased_from in INSERT
- +11 more…
Real-Time Subscription System — Plans, Expiry, Server Access Hierarchy
VPN Management
Complete overhaul of the subscription and server-access system. "Recharge Plans" renamed to "Subscription Plans" everywhere. Added real-time expiry countdown on VPN Users, auto-expiry engine, wallet auto-renew logic, hierarchical server access (Admin→SubAdmin→Reseller), and plan server_limit enforcement in API. All roles now see only servers they are entitled to based on subscription hierarchy.
- RENAME: "Recharge Plans" → "Subscription Plans" — sidebar.php, plans.php (title + h1 + icon)
- functions.php: Added runAutoExpiry() — auto-expires overdue plan_subscriptions + vpn_users in one call
- functions.php: Added daysUntilExpiry($expiryDate) — returns int days remaining
- functions.php: Added formatExpiryCountdown($expiryDate) — returns color-coded UI array (text/color/icon)
- functions.php: Added getActiveSubscription($pdo, $adminId) — latest active plan_subscription row with server_limit
- +12 more…
Full Project Analysis + Documentation Gap Fill
Documentation
Conducted a complete top-to-bottom audit of the admin panel codebase (NeonTunnelVPN_APK/ excluded). Verified every file, cross-reference, role gate, and financial flow. Identified previously undocumented production components and added them to all 3 documentation files + this catalog. Zero code changes — pure documentation synchronization.
- Read-through verified: config.php, auth.php, functions.php, all admin pages, chat system, payment flows, live-sync, catalog system
- Confirmed role hierarchy: Main Admin → Sub-Admin → Reseller via getDataFilter()
- Confirmed financial atomicity: transferBalance / addBalance guard with inTransaction()
- Confirmed auto-migration patterns across plans, payment-gateways, payment-history, chat_api
- Documented Public REST API (api/index.php): 6 endpoints for Android APK (login, servers, configs, user-status, user-plan, dashboard-stats) via token auth
- +6 more…
Catalog System — Feature Library & Changelog Viewer
Catalog System
Built a comprehensive Feature Catalog & Changelog system accessible from admin panel sidebar and public homepage. Integrates all 73 documented updates with search, filter, copy buttons, and role-based access.
- Created includes/catalog_data.php — single shared data source for all 73 entries
- Created admin/catalog.php — full admin panel catalog with sidebar integration
- Created catalog.php — public catalog page (no login required, neon theme)
- Added Catalog menu item to sidebar below Help & Support
- Added /catalog route to admin/.htaccess
- +9 more…
Sidebar Live Clock — Removed
Sidebar
Removed the navbar clock widget after user clarification. User only wanted chat message timestamps fixed, not a persistent clock on every admin page.
- Removed #liveClockWidget HTML div from top navbar in sidebar.php
- Removed Live Timezone Clock JS IIFE from sidebar.php script block
- Zero impact on any other existing functionality
Sidebar Notification localStorage Sync
Help & Support Chat
Fixed false notification re-trigger: updateSidebarBadge() in support-chat.php now writes unread count to localStorage so the sidebar global poll starts from the correct baseline when user navigates away from chat.
- support-chat.php updateSidebarBadge(): added localStorage.setItem('_chatUnread', cnt)
- Prevents sidebar _prev from being stale after reading messages in chat
- On navigate-away: _prev correctly initializes to 0, no false positive notifications
Chat Page Notification Suppression
Notification System
Stopped toast and sound notifications from firing when user is already on the /admin/support-chat page. Badge still updates silently.
- sidebar.php _poll(): added check for window.location.pathname.indexOf('support-chat')
- When on chat page: badge updates silently — no toast, no sound
- When NOT on chat page: full toast + Web Audio notification fires as normal
Homepage Chat Notification + AudioContext Fix
Notification System
Added chat notification system to landing page for logged-in admins. Fixed Web Audio not playing due to AudioContext lifecycle mismanagement.
- index.php: PHP session check + $_homepageAdminLoggedIn variable
- Notification IIFE injected only when admin is logged in (PHP gate)
- Polls get_unread_total every 6s; shows neon-green toast on new messages
- Toast: bottom-right, 5s auto-dismiss, click → /admin/support-chat
- AudioContext fix: click handler now creates _sndAC if null (not just resumes)
- +2 more…
WhatsApp-Style Message Tick Propagation
Help & Support Chat
If any sent message is seen (blue tick), all previous sent messages in the conversation now also show blue ticks — matching WhatsApp-style behavior.
- updateTicksForRead(): added anySeen flag check
- anySeen = data.messages.some(m => m.sender_id === MY_ID && m.is_read === 1)
- If anySeen is true: ALL rendered sent message ticks update to tick-seen (blue)
- Previously: only the specific message marked is_read=1 showed blue tick
- DB already marks ALL unread messages read in one batch — UI now matches
Chat Message Timestamps — UTC Local Conversion Fix
Help & Support Chat
Fixed chat timestamps showing wrong time (e.g., 2PM IST when actual time was 7:43PM IST). Root cause: MySQL TIMESTAMP stores UTC; JavaScript was treating it as local time.
- fmtTime(): changed ts.replace(' ','T') → ts.replace(' ','T') + 'Z'
- fmtDate(): same UTC suffix fix applied
- Z suffix tells browser the timestamp is UTC → auto-converts to user's local timezone
- Tested: India user (UTC+5:30) now sees 7:43 PM instead of 2:13 PM
- Applies to all countries — each user sees correct local time automatically
Chat Profile Preview Modal
Help & Support Chat
Click the avatar or name in the chat header to view the contact's profile card — showing name, email, phone, role, username, joined date, and online status.
- chat_api.php: New get_profile action — returns full_name, email, phone, role, avatar, is_online, last_seen, joined
- Role-visibility enforced: Main Admin sees any, SubAdmin/Reseller use isContactAllowed()
- support-chat.php: Profile preview modal (neon-dark card, 320px, scale-in animation)
- Chat header wrapped in .header-profile-clickable div (hover:rgba(0,255,136,0.06))
- Modal: avatar circle (role-colored), name + verified badge, role label, status, rows for email/phone/username/joined
- +2 more…
PayU Real Transaction ID Bug Fix
Payment Gateways
PayU callback was ignoring the actual mihpayid from POST and using a timestamp fallback, meaning real PayU transaction IDs were never stored in Payment History.
- balance.php payu_verify: $ppayId = $_POST['mihpayid'] ?? $_POST['txnid'] ?? ('PAYU_'.time())
- Real PayU transaction ID (mihpayid) now captured and stored in Payment History
- api/webhooks.php header updated to list all handled gateways correctly
Payment Gateway Real-Time Enforcement — UTR Modal Permanently Removed
Payment Gateways
Eliminated the manual UTR input fallback entirely. All gateways now operate in real-time only. Unsupported gateways are visually locked (greyed out, OFFLINE badge).
- balance.php: removed manual fallback block from create_universal_topup
- Returns success:false with descriptive error instead of pending record + mode=manual
- Frontend: gateways with has_api_key=0 → opacity:0.35, pointer-events:none, OFFLINE badge
- Error handling: !data.success → showBalanceNotif('error', ...) instead of alert()
- mode==='manual' safety net → error notification, never UTR modal
- +1 more…
bKash Tokenized Checkout API v1.2 — Full Integration
Payment Gateways
Integrated bKash Tokenized Checkout API v1.2. Requires 4 credentials: App Key, App Secret, Username, Password. Full token grant → create → redirect → execute flow.
- payment-gateways.php: bKash API Config section (Username, Password, Sandbox checkbox)
- save_extra_config: saves bkash_username, bkash_password, is_sandbox to extra_config JSON
- balance.php create_universal_topup: Step 1 POST /token/grant → id_token
- Step 2 POST /create with Bearer token → bkashURL; frontend redirects via mode='redirect'
- bk_verify callback: re-grants token → POST /execute {paymentID} → verifies statusCode=0000
- +3 more…
Rigorous Pre-Flight Protocol Enforcement
Documentation
Established mandatory deep-dive analysis protocol before any code edit. No future update to be applied without verifying backend references, breakage risk, and cross-dependencies.
- Added STRICT PRE-UPDATE ANALYSIS PROTOCOL to AgentRules.md
- Mandated reading target file + ALL backend references before editing
- Enforced breakage prevention and cross-dependency check process
- Cleanup rule: duplicate files, test scripts, dead code must be actively removed
Gateway Pre-Selection Default & Compact Table Dropdown
Payment Gateways
All 13 payment gateways now pre-selected by default when creating a Sub-Admin. Compact single-badge dropdown replaces multi-badge column in Sub-Admin table.
- New Sub-Admin form: all 13 gateways pre-selected (user unchecks unwanted)
- cancelEdit() also resets to all-selected state
- Sub-Admin table: single "X Gateways" badge with plug icon replaces multi-badge row
- Click-to-expand scrollable dropdown (max-height 220px) with all assigned gateways
- Dropdown closes on outside click, smooth CSS transition
- +1 more…
Payment Gateway API UI Separation & Isolation
Payment Gateways
Created separate card grid for Sub-Admin's active gateway configurations, visually separated from Main Admin's own gateways on the payment-gateways.php page.
- payment-gateways.php: "All Payment Gateways" grid (Main Admin's own gateways)
- "Sub-Admin Active Integrations" grid visible ONLY to Main Admin (below)
- Sub-Admin cards: stacked vertical badges — owner name (cyan) + ACTIVE status (green)
- Strict role-boundary protection maintained while giving Main Admin visibility
Opening Balance & Manual Credit Tracking Sync
Financial System
Fixed bug: new Sub-Admin/Reseller creations with ₹0.00 balance were not creating payments table entries. Fund Wallet modal also missing MTXN logging.
- Fixed: 0.00 opening balance now creates MTXN_ payment entry in payments table
- Fund Wallet modal: explicit MTXN transaction insert added to complete financial loop
- All manual funds now appear instantly in Payment History for all roles
- try/catch transactional safety added around all MTXN inserts
Strict Financial Visibility Engine — Role-Based Sync
Financial System
Fixed payment history column misalignment across different roles. Synchronized thead/tbody column positions globally.
- Fixed payment-history.php thead vs tbody column misalignment for Sub-Admin role
- Column order unified: Paid By → Amount → Type → Status → Gateway/Sender → Order ID → Payment ID → Date → Action
- Paid By column: visible for Admin + SubAdmin only (hidden for Reseller)
- MTXN_ transactions: show "Manual Credit" with sender name
Multi-Gateway Assignment System (Sub-Admin Integration)
Payment Gateways
Main Admin can assign specific payment gateways to each Sub-Admin. Sub-Admins only see and use their assigned gateways.
- Sub-Admin create/edit form: multi-select gateway assignment checkboxes
- payment-gateways.php: Sub-Admin auto-seeds only their assigned gateways
- 'Gateways' column added to Sub-Admin table with badge display
- Select All / Deselect All quick controls
- admins table: allowed_gateways (JSON) column added for gateway control
Payment Gateway API Management Module
Payment Gateways
Created a full card-based payment gateway management page. Supports 13 global gateways with per-gateway API key management, on/off toggle, and role-based access.
- Created admin/payment-gateways.php — 13 gateway card UI
- Auto-seeded gateways: Razorpay, Paytm, PhonePe, UPI, Instamojo, Cashfree, PayU (India); PayPal, Stripe (Global); SSLCommerz, bKash, Nagad, Rocket (Bangladesh)
- Razorpay auto-populated with live keys from config.php (Main Admin only)
- Masked API key display with eye toggle
- Per-gateway: Save / Toggle On-Off / Delete controls
- +3 more…
Multi-Role Settings Support
Settings
All roles now have Settings accessible from sidebar. Admin → full global settings page. Sub-Admin and Reseller → redirected to profile modal instead.
- Settings link shown in sidebar for ALL roles (Admin, Sub-Admin, Reseller)
- Admin: settings.php full page
- Sub-Admin/Reseller: settings link calls openProfileModal() JS function
- Profile modal used for name, email, phone, password, avatar update
Navigation Layout Optimization
Sidebar
Moved Recharge Plans from Management section to Finance section for logical grouping. Renamed org section labels for clarity.
- Recharge Plans moved from Management → Finance section in sidebar
- "Organization" section renamed to "Create Sub Admin" and "Create Reseller"
- Finance section: Recharge Plans, Balance, PIN Recharge, Payment History, Payment Gateways
- Logical financial grouping across all admin roles
Sub-Admin UI Pruning & Master Password Removal
Authentication
Completely removed the Master Password concept and all its legacy code. Sub-Admins no longer see the "Sub Admins" menu item. Servers/Configs locked to Main Admin only.
- Deleted verify-master.php and all associated modal/lock UI elements
- Master Password concept permanently removed from all files
- Sub-Admin role: "Sub Admins" link hidden from sidebar
- Sub-Admin role: "Settings" → profile modal redirect
- Servers and Configs: add/edit/delete restricted strictly to isAdmin()
Global Favicon Standardization
Landing Page
Added professional favicon set (32×32, 16×16, Apple Touch, ICO) to all admin pages including balance.php which was missing.
- favicon/favicon-32x32.png, favicon-16x16.png, apple-touch-icon.png, favicon.ico
- Favicon links added to ALL admin pages: dashboard, balance, pins, plans, payment-history, etc.
- 100% visual consistency across all pages and browser tabs
Global Sidebar Renaming & Branding Sync
Sidebar
Renamed "Plans" to "Recharge Plans" across all admin pages, sidebar, headers, and page titles for professional clarity.
- Sidebar: "Plans" → "Recharge Plans" with updated icon
- Page titles, h1 headers, breadcrumbs updated globally
- 100% naming consistency across the admin ecosystem
Production LIVE Launch — Razorpay LIVE Mode
Financial System
Switched Razorpay from Test mode to LIVE mode with real bank credentials. All financial transactions are now real-money operations.
- config.php: RAZORPAY_KEY_ID and RAZORPAY_KEY_SECRET updated to LIVE keys
- Razorpay gateway auto-populated with LIVE keys on payment-gateways.php
- All payment flows verified for production readiness
- LIVE MODE — never revert to test mode
Global Financial UI Synchronization
Financial System
Unified topup chip presets across all roles (Admin, Sub-Admin, Reseller). Same ₹5k/₹10k/₹25k/₹35k/₹50k chips for all.
- Topup chips unified: ₹5,000 / ₹10,000 / ₹25,000 / ₹35,000 / ₹50,000
- Applied across Admin, Sub-Admin, Reseller wallet pages
- Consistent fintech experience for all administrative layers
Elite Manual Funding System
Financial System
Added high-value funding chips (₹5k–₹50k) to Admin's manual credit form with auto-fill logic for large transactions.
- Admin manual credit form: ₹5,000 / ₹10,000 / ₹25,000 / ₹50,000 quick-fill chips
- Auto-fill JS: clicking chip populates amount field instantly
- Chip selection highlight (neon-green active state)
Ph.5
P47_P48
Apr 04, 2026
Elite Interactive Receipt System
Financial System
Developed GPay/PhonePe-style interactive receipt popups for all financial transactions. Single-page visibility guaranteed on all devices.
- GPay/PhonePe style branded receipt modal
- Official logo at top (/assets/logo/web_logo_png.png)
- Status icon + text on same horizontal row (saves vertical space)
- Color-matched buttons with neon-green theme
- @media print CSS for PDF generation
- +3 more…
Ph.5
P45_P46
Apr 02, 2026
Plan Subscription System + Financial Engine Sync
VPN Management
Built card-based Recharge Plans system with role-based CRUD, purchase flow, and subscription history. Synchronized payments and transactions tables for atomic entries.
- admin/plans.php: 3-column responsive card grid
- Admin: full CRUD; Sub-Admin: 3-plan limit; Reseller: view + purchase only
- Purchase flow: balance deduction + subscription record + activity log
- Plan subscriptions history table with duration, server_limit, created_by
- Auto-migration: created_by, server_limit columns + plan_subscriptions table
- +2 more…
RBAC Activity Logs — All Roles Access
Activity Logs
Granted Sub-Admins and Resellers access to Activity Logs with hierarchical data filtering. Removed sidebar locks.
- Activity Logs accessible by Admin, Sub-Admin, Reseller
- getDataFilter() applied to both System and Login activity queries
- Sub-Admin: sees own logs + child resellers' logs
- Reseller: sees only own logs
- Sidebar lock/restriction for activity-logs removed
Ph.5
P42_P43
Mar 28, 2026
Login Activity Overhaul + Device Detection Stabilization
Activity Logs
Rebuilt login activity log with internal table scrolling, telemetry parsing, country flag emojis, OS icons, and expanded browser detection.
- activity-logs.php: internal scrollable table (no page overflow)
- Country flags via emoji (🇮🇳 🇺🇸 etc.) from Geo-IP data
- OS + Browser detection: Chrome, Brave, Samsung Browser, Edge, Firefox, Safari
- Regex patterns expanded for 10+ device types
- Login Activity table: IP, Country, City, Device, OS, Browser, Time columns
- +1 more…
Full System Analytical Audit
Documentation
Conducted a comprehensive codebase audit including database schema verification, logic flow validation, and cross-reference check across all 19 active files.
- Verified all admin pages link correctly to includes/
- Database schema cross-checked against all SQL queries in codebase
- Logic flow validated: login → session → requireLogin() → dashboard
- Financial flow audit: addBalance(), transferBalance(), payments table sync
- Identified and documented all cross-file dependencies
Ph.4
P37_P40
Mar 15, 2026
Audit Log Architecture + Telemetry + Docs Sync
Activity Logs
Split activity logs into System and Login sections. Added Geo-IP tracking, City detection, device/browser tracking. Full documentation rewrite to structured roadmap format.
- admin/activity-logs.php: two separate tabs — System Activity + Login Activity
- logActivity() extended to capture Geo-IP, city, OS, browser
- Country flag emoji mapping from IP geolocation
- Responsive table: data-label system applied to activity-logs
- Documentation rewritten into structured task-roadmap format
- +1 more…
Ph.4
P35_P36
Mar 05, 2026
Financial Flow Reform + Reseller Ecosystem Expansion
Financial System
Corrected financial logic so all incoming funds are credits. Enabled PIN recharge for Resellers with strict UI pruning (Redeem-only view, no Generate section).
- Unified financial model: all incoming = credit, all outgoing = debit
- Reseller role: PIN Redeem section enabled; Generate section completely hidden
- Reseller: Generated PINs (Unused) section hidden; only Redeemed PINs (Used) shown
- addBalance() used for PIN redemption wallet credit
Ph.4
P33_P34
Feb 25, 2026
ATM Redemption UI + Live Sync Integration
PIN System
Complete redesign of pins.php to ATM-style interface. Added live-sync.js for real-time dashboard data without page reloads.
- admin/pins.php: ATM-style card interface redesign
- Generate PINs card: quantity selector, value input, generate button
- Redeem PINs card: PIN code input, live wallet balance display
- Generated PINs table: creator tabs (ALL / MAIN ADMIN / Sub-Admin names)
- filterPinsByCreator(): r.style.display = '' (browser default, not 'table-row')
- +2 more…
Atomic Ledger Guard — addBalance() Refactor
Financial System
Refactored addBalance() to fix nested transaction crash when called inside an already-open PDO transaction (e.g., PIN redemption inside financial flow).
- addBalance(): checks $pdo->inTransaction() before calling beginTransaction()
- If external transaction exists: skips begin/commit (caller manages transaction)
- Prevents PDOException: "There is already an active transaction"
- Identical pattern applied to transferBalance() for consistency
Ph.3
P28_P31
Feb 10, 2026
Wallet Automation Engine — Hierarchical Balance System
Financial System
Built the complete hierarchical wallet system. Main Admin funds Sub-Admins, Sub-Admins fund Resellers. Balance displayed live, atomic transfer with debit/credit logging.
- includes/functions.php: transferBalance() — atomic PDO transaction (debit → credit)
- transferBalance() logs to transactions table and inserts MTXN payment record
- addBalance() — direct credit without debit (used for PIN redemption, top-up)
- admin/balance.php: transaction history with credit/debit color coding
- admin/sub-admins.php + resellers.php: Fund Wallet modal with amount input
- +1 more…
Ph.3
P26_P27
Feb 01, 2026
SQL Authentication System
Authentication
Created full SQL-based authentication with hashed passwords, session management, and role-based access control.
- sql/schema.sql: admins table (id, username, password_hash, role, balance, status, parent_id)
- admin/login.php: password_verify() for bcrypt authentication
- Session: $_SESSION['admin_logged_in'], 'admin_role', 'admin_id', 'admin_user', 'admin_name'
- includes/auth.php: requireLogin(), requireRole(), isAdmin(), isSubAdmin(), isReseller()
- getDataFilter(): returns hierarchical SQL WHERE clause per role
- +1 more…
Ph.3
P21_P25
Jan 25, 2026
Hostinger Remote MySQL Connectivity
Core Engine
Integrated the admin panel with Hostinger remote MySQL database. PDO connection with error handling, UTF8MB4 charset, and strict exception mode.
- includes/config.php: PDO connection to Hostinger MySQL (u888945335_vpn)
- PDO: ATTR_ERRMODE_EXCEPTION, ATTR_DEFAULT_FETCH_MODE_ASSOC, UTF8MB4
- Razorpay LIVE credentials added (RAZORPAY_KEY_ID, RAZORPAY_KEY_SECRET)
- DB connection error stored as $db_connection_error for login page feedback
- Tested IPv4 connectivity from Hostinger server to localhost DB
Ph.2
P17_P20
Jan 20, 2026
Spotlight Interaction Layer + AI Safety & Branding
Landing Page
Added cursor-based radial glow on feature cards. Created AgentRules.md for project governance. Added infinite cross-fading logo animation.
- feature-card: --mouse-x, --mouse-y CSS vars updated via onmousemove JS
- Radial gradient spotlight follows cursor on each card independently
- Created Documentation/AgentRules.md — master AI agent directive
- Infinite cross-fading logo animation in hero section
- Brand identity standards documented
Ph.2
P14_P16
Jan 12, 2026
Bidirectional Reveal Engine + Advanced Entrance Effects
Landing Page
Built IntersectionObserver-based scroll reveal system with 10 animation types. Added typing animation and circular reveal effect on hero title.
- IntersectionObserver with threshold:0.15 and rootMargin offset
- 10 reveal types: reveal-up, reveal-down, reveal-left, reveal-right, reveal-zoom, reveal-flip, reveal-rotate, reveal-spin, reveal-slide-zoom, reveal-tilt-right
- Random animation type assigned to feature cards on scroll-out
- Re-trigger: active class removed when element leaves viewport (re-animates on re-entry)
- .animate-typing: typewriter effect on hero title line
- +1 more…
Ph.2
P11_P13
Jan 05, 2026
Responsive Glassmorphism Mobile Menu
Landing Page
Built full-screen mobile drawer with glassmorphism effect, smooth slide-in animation, overlay backdrop, and auto-close on link click.
- .mobile-drawer: full-screen overlay with backdrop-filter: blur()
- Slide-in from top with CSS transform animation
- Hamburger menu toggle (fa-bars ↔ state)
- Close on: × button, link click, outside tap
- body overflow:hidden when menu open (prevents background scroll)
- +1 more…
Branding & Header Scaling — VPN Cube Logo
Landing Page
Integrated "VPN" text into the 3D cube design. Added mini-cube to the navbar logo area. Refined all font sizes and spacing for cross-device consistency.
- .cube-text "VPN" overlay on spinning cube in hero section
- mini-cube-wrapper: small 3D cube in navbar logo (CSS only)
- Logo: "NEON TUNNEL" text + mini cube side by side
- Responsive font scaling: clamp() for hero title
- Navbar links spacing and alignment refined
Mobile Fluidity Optimization
Landing Page
Stabilized mobile viewport, scaled the 3D cube for mobile screens, and ensured touch-friendly navigation.
- meta viewport: width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no
- 3D cube size scaled via clamp() for ≤480px screens
- Hero layout: flex column on mobile, row on desktop
- Touch targets minimum 44×44px across all interactive elements
Directory Architecture Setup
Core Engine
Established clean directory structure separating public, admin, includes, api, css, and assets folders.
- /admin/ — protected admin panel area
- /includes/ — shared PHP backend (config, auth, functions)
- /api/ — public API endpoint
- /css/ — global stylesheets
- /assets/ — logos, icons, static images
- +3 more…
Hexagon UI System — Feature Cards
Landing Page
Built the hexagonal icon system for feature cards using clip-path. Added glowing icon hexagons with neon-green borders.
- .hex-icon: CSS clip-path hexagon shape
- .hex-inner: inner circle with neon-green glow on hover
- Feature cards: Discover, Display, Deliver with icons fa-satellite-dish, fa-shield-alt, fa-globe-americas
- Card hover: translateY(-4px) + box-shadow glow effect
- --mouse-x/--mouse-y spotlight preparation
Admin Login Isolation
Authentication
Moved authentication to admin/login.php. Clean separation of public landing page from admin area.
- admin/login.php created as authentication gateway
- admin/.htaccess: DirectoryIndex login.php
- Root .htaccess: /admin → admin/login.php mapping
- Clean URL: vpn.example.com/admin shows login form
- Login form: username + password + submit
Landing Page Overhaul — 3D Neon Theme
Landing Page
Built the entire public landing page from scratch. Features a 3D CSS animated VPN cube, neon-dark theme, hero section, feature cards, security info section, and footer.
- index.php: full public landing page
- 3D CSS cube: 6-face rotating animation (rotateX + rotateY infinite)
- Neon-dark theme: --neon-green: #00ff88, dark backgrounds
- css/styles.css: 15KB global stylesheet with CSS variables
- Hero section: animated title + subtitle + CTA button
- +4 more…