$title

$desc

$extra_html
$btns
HTML; if ($type === 'payment_block') { echo ''; } echo <<© 2025 Abrar Future Tech LLP HTML; exit; } } /* notification banner renderer */ if (!function_exists('showNotificationBanner')) { function showNotificationBanner($message, $type = 'warning', $pay_url = '') { $bg = $type === 'success' ? 'linear-gradient(135deg, #10b981, #059669)' : 'linear-gradient(135deg, #f59e0b, #d97706)'; $icon = $type === 'success' ? 'fa-circle-check' : 'fa-triangle-exclamation'; $pay_btn = ''; if (!empty($pay_url)) { $pay_btn = ' Pay Now'; } echo <<
$message $pay_btn
HTML; } } /* ------------------- MAIN LOGIC ------------------- */ $domains_data = loadDomains($domain_json_path, $json_url); if (!$domains_data || !isset($domains_data['domains'])) { showSuspendedPage("Unlicensed Domain", $current_domain, 'license'); } $main_domain = getMainDomain($current_domain); $domain_entry = null; $fallback_entry = null; foreach ($domains_data['domains'] as $d) { $domain_name = strtolower(trim($d['domain_name'])); if ($domain_name === $current_domain) { $domain_entry = $d; break; } if (isset($d['subdomains']) && is_array($d['subdomains'])) { foreach ($d['subdomains'] as $sub) { $sub_name = is_array($sub) ? ($sub['name'] ?? '') : $sub; $full_sub = strtolower(trim($sub_name)) . '.' . $domain_name; if ($current_domain === $full_sub) { $domain_entry = $d; if (is_array($sub)) { foreach ($sub as $k => $v) { if ($k !== 'name') { $domain_entry[$k] = $v; } } } break 2; } } } if (getMainDomain($domain_name) === $main_domain) { $fallback_entry = $d; } } if (!$domain_entry && $fallback_entry) { $domain_entry = $fallback_entry; } if (!$domain_entry) { showSuspendedPage("Unlicensed Domain", $current_domain, 'license'); } if (isset($domain_entry['status']) && (int)$domain_entry['status'] === 0) { showSuspendedPage("Manually Suspended", $current_domain, 'manual'); } $maintenance_mode = $domain_entry['maintenance_mode'] ?? false; if ($maintenance_mode) { showSuspendedPage("Under Maintenance", $current_domain, 'maintenance'); } $today = new DateTime(); $today->setTime(0, 0, 0); $hosting_by_us = $domain_entry['hosting_by_us'] ?? true; $hosting_end_str = trim($domain_entry['hosting_end_date'] ?? ''); if ($hosting_by_us && !empty($hosting_end_str)) { try { $hosting = new DateTime($hosting_end_str); $hosting->setTime(0, 0, 0); if ($today > $hosting) { showSuspendedPage("Hosting Expired", $current_domain, 'hosting'); } } catch (Exception $e) {} } $support_end_str = trim($domain_entry['support_end_date'] ?? ''); $renewed = (int)($domain_entry['support_renewed'] ?? 0); if (!empty($support_end_str)) { try { $support = new DateTime($support_end_str); $support->setTime(0, 0, 0); if ($today > $support && !in_array($renewed, [1, 2, 3, -1])) { showSuspendedPage("Support Expired", $current_domain, 'support'); } } catch (Exception $e) {} } $payment_completed = $domain_entry['payment_completed'] ?? true; if (!$payment_completed) { $amount = floatval($domain_entry['payment_due_amount'] ?? 0); $due_str = trim($domain_entry['payment_due_date'] ?? ''); $note = $domain_entry['payment_note'] ?? ($domain_entry['domain_name'] ?? ''); if (!empty($due_str)) { try { $due_date = new DateTime($due_str); $due_date->setTime(0, 0, 0); $diff = $today->diff($due_date); $days_left = $due_date >= $today ? (int)$diff->days : -(int)$diff->days; $upi_id = 'abrarfuturetech-6@okhdfcbank'; $amount_str = number_format($amount, 2, '.', ''); $upi_url = "upi://pay?pa={$upi_id}&pn=Abrar+Future+Tech+LLP&am={$amount_str}&cu=INR&tn=" . urlencode($note); $qr = '
Pay with UPI'; $pending_tr = $domain_entry['submitted_transaction_id'] ?? null; if ($pending_tr) { // Payment submitted but not yet approved - show temporary banner showNotificationBanner("Payment pending for approval — temporary access only", "success"); } elseif ($days_left < 0) { // Overdue and no submission - block site showSuspendedPage("Payment Required", $current_domain, 'payment_block', $amount, $due_date, $qr); } elseif ($days_left <= 2) { // Within warning window (2 days or less) $day_text = $days_left === 0 ? "today" : ($days_left === 1 ? "tomorrow" : "in $days_left days"); $amount_formatted = number_format($amount, 2); showNotificationBanner("⚠ Payment of ₹{$amount_formatted} due {$day_text}. Pay now to avoid suspension.", "warning", $upi_url); } } catch (Exception $e) {} } } use Illuminate\Contracts\Http\Kernel; use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); // Determine if the application is in maintenance mode... if (file_exists($maintenance = __DIR__ . '/../storage/framework/maintenance.php')) { require $maintenance; } // Register the Composer autoloader... require __DIR__ . '/../vendor/autoload.php'; // Bootstrap Laravel and handle the request... $app = require_once __DIR__ . '/../bootstrap/app.php'; $app->usePublicPath(__DIR__); $kernel = $app->make(Kernel::class); $response = $kernel->handle( $request = Request::capture() )->send(); $kernel->terminate($request, $response);