@php $pendingUpiPayment = null; try { $targetCust = $customer ?? null; if (!$targetCust) { $wbCustId = \Illuminate\Support\Facades\Auth::guard('wb_customer')->id() ?? session('wb_customer_id'); if ($wbCustId && class_exists('\App\Models\WebsiteBuilder\WbCustomer')) { $targetCust = \App\Models\WebsiteBuilder\WbCustomer::find($wbCustId); } } if ($targetCust) { $purch = $targetCust->latestPurchase; if ($purch && (stripos($purch->status ?? '', 'pending') !== false || ($purch->status ?? '') === 'Pending Verification' || ($purch->payment_status ?? '') === 'pending')) { $pendingUpiPayment = (object)[ 'utr_number' => $purch->transaction_id ?? $purch->payment_id ?? $purch->utr ?? 'Pending' ]; } } if (!$pendingUpiPayment && class_exists('\App\Models\WebsiteBuilder\WbTemplatePurchase')) { $custEmail = isset($targetCust) && !empty($targetCust->email) ? strtolower(trim($targetCust->email)) : strtolower(trim(session('wb_customer_email') ?? '')); if ($custEmail) { $purch = \App\Models\WebsiteBuilder\WbTemplatePurchase::whereRaw('LOWER(TRIM(customer_email)) = ?', [$custEmail]) ->where(function($q) { $q->where('status', 'like', '%pending%') ->orWhere('status', 'Pending Verification'); }) ->latest() ->first(); if ($purch) { $pendingUpiPayment = (object)[ 'utr_number' => $purch->transaction_id ?? $purch->payment_id ?? 'Pending' ]; } } } } catch (\Throwable $e) {} $wbDaysLeft = null; $wbIsExpiringSoon = false; $wbIsExpired = false; $wbExpiryNotice = ""; if (isset($customer) && !empty($customer->expire_date)) { try { $expDate = \Carbon\Carbon::parse($customer->expire_date); $now = \Carbon\Carbon::now(); $diffSeconds = $now->diffInSeconds($expDate, false); // Use configured first warning days (default 7) $wbWarnDays = 7; try { if (class_exists('\App\Models\WebsiteBuilder\WbLandingSetting')) { $lSetting = \App\Models\WebsiteBuilder\WbLandingSetting::first(); if ($lSetting && !empty($lSetting->recurring_warning_first_days)) { $wbWarnDays = (int)$lSetting->recurring_warning_first_days; } } } catch (\Throwable $te) {} if ($diffSeconds <= 0) { $wbIsExpired = true; if ($diffSeconds < -120) { $wbIsLocked = true; } $wbExpiryNotice = "Your website package has expired on " . $expDate->format('M d, Y h:i A'); } elseif ($diffSeconds <= ($wbWarnDays * 86400)) { $wbIsExpiringSoon = true; if ($diffSeconds < 3600) { $mins = max(1, (int)ceil($diffSeconds / 60)); $wbExpiryNotice = "Your website package will expire in {$mins} minute(s) on " . $expDate->format('M d, Y h:i A'); } elseif ($diffSeconds < 86400) { $hrs = (int)ceil($diffSeconds / 3600); $wbExpiryNotice = "Your website package will expire in {$hrs} hour(s) on " . $expDate->format('M d, Y h:i A'); } else { $days = (int)ceil($diffSeconds / 86400); $wbExpiryNotice = "Your website package will expire in {$days} day(s) on " . $expDate->format('M d, Y'); } } } catch (\Throwable $e) {} } @endphp @if(session('wb_demo_admin'))
Demo Theme Admin Panel (Protected Mode)
You are exploring the demo template in preview mode. Content modifications (saving, updating, deleting) are strictly restricted to protect the live demo themes for all users.
Demo Protected
@endif @if($pendingUpiPayment && !empty($pendingUpiPayment->utr_number))
Notice: Your UPI payment (UTR: {{ $pendingUpiPayment->utr_number }}) is pending for admin verification.
Your website builder features remain fully active while our admin team reviews your transaction reference.
Pending Verification
@endif @if($wbIsExpired || $wbIsExpiringSoon)
{{ $wbIsLocked ? '🔒 Account Locked: ' : ($wbIsExpired ? 'Urgent: ' : 'Warning: ') }}{{ $wbExpiryNotice }}.
{{ $wbIsLocked ? 'All navigation links are locked. Please renew your plan now to restore full access.' : ($wbIsExpired ? 'Please renew your plan now to restore your live website and avoid service interruption.' : 'Please renew your package now to ensure uninterrupted live website service.') }}
@if($wbIsLocked) @endif @endif @yield('content')
@yield('scripts')