@includeif('user.partials.styles') @php $selLang = App\Models\Language::where('code', request()->input('language'))->first(); @endphp @yield('styles') cookie('user-theme') == 'dark') data-background-color="dark" @endif data-form-language="{{ @$selLang->rtl == 1 ? 'rtl' : '' }}" data-dashboard-language="{{ $dashboard_language->rtl == 1 ? 'rtl' : '' }}">
{{-- top navbar area start --}} @includeif('user.partials.top-navbar') {{-- top navbar area end --}} {{-- side navbar area start --}} @includeif('user.partials.side-navbar') {{-- side navbar area end --}} @include('user.partials.ai-image-modal') @include('user.partials.ai-content-modal')
@php $pendingUpiMemb = null; try { $lsUid = Auth::guard('web')->id() ?? Auth::id() ?? session('user_id'); if ($lsUid && class_exists('\App\Models\Membership')) { $hasActiveApproved = \App\Models\Membership::where('user_id', $lsUid) ->where('status', 1) ->where('expire_date', '>=', \Carbon\Carbon::now()->toDateString()) ->exists(); $pendingUpiMemb = \App\Models\Membership::where('user_id', $lsUid) ->where(function($q) { $q->where('status', 0)->orWhere('status', '0')->orWhere('status', 'pending'); }) ->whereNotNull('transaction_id') ->where('transaction_id', '!=', '') ->latest('id') ->first(); if ($pendingUpiMemb && $hasActiveApproved) { $latestActiveMemb = \App\Models\Membership::where('user_id', $lsUid) ->where('status', 1) ->latest('id') ->first(); if ($latestActiveMemb && $latestActiveMemb->id >= $pendingUpiMemb->id) { $pendingUpiMemb = null; // Approved package is active, hide pending notice! } } } } catch (\Throwable $e) {} $lsDaysLeft = null; $lsIsExpiringSoon = false; $lsIsExpired = false; $lsIsLocked = false; $lsExpiryNotice = ""; try { $lsLatestMemb = null; if ($lsUid && class_exists('\App\Models\Membership')) { $hasActive = \App\Models\Membership::where('user_id', $lsUid) ->where('status', 1) ->where('start_date', '<=', \Carbon\Carbon::now()->format('Y-m-d')) ->where('expire_date', '>=', \Carbon\Carbon::now()->toDateTimeString()) ->exists(); if (!$hasActive) { $lsLatestMemb = \App\Models\Membership::where('user_id', $lsUid) ->where('status', '<>', 2) ->orderBy('expire_date', 'desc') ->first(); } else { $lsLatestMemb = \App\Models\Membership::where('user_id', $lsUid) ->where('status', 1) ->orderBy('expire_date', 'desc') ->first(); } } if (!empty($lsLatestMemb) && !empty($lsLatestMemb->expire_date) && strpos($lsLatestMemb->expire_date, '9999') === false) { $expDate = \Carbon\Carbon::parse($lsLatestMemb->expire_date); $now = \Carbon\Carbon::now(); $diffSeconds = $now->diffInSeconds($expDate, false); $warnDays = 7; try { $bs = \App\Models\BasicSetting::first(); if ($bs && !empty($bs->recurring_warning_first_days)) { $warnDays = (int)$bs->recurring_warning_first_days; } } catch (\Throwable $te) {} if ($diffSeconds <= 0) { $lsIsExpired = true; if ($diffSeconds < -120) { $lsIsLocked = true; } $lsExpiryNotice = "Your store package has expired on " . $expDate->format('M d, Y h:i A'); } elseif ($diffSeconds <= ($warnDays * 86400)) { $lsIsExpiringSoon = true; if ($diffSeconds < 3600) { $mins = max(1, (int)ceil($diffSeconds / 60)); $lsExpiryNotice = "Your store package will expire in {$mins} minute(s) on " . $expDate->format('M d, Y h:i A'); } elseif ($diffSeconds < 86400) { $hrs = (int)ceil($diffSeconds / 3600); $lsExpiryNotice = "Your store package will expire in {$hrs} hour(s) on " . $expDate->format('M d, Y h:i A'); } else { $days = (int)ceil($diffSeconds / 86400); $lsExpiryNotice = "Your store package will expire in {$days} day(s) on " . $expDate->format('M d, Y'); } } } } catch (\Throwable $e) {} @endphp @php $isDemoTheme = false; try { $currAuthUser = \Illuminate\Support\Facades\Auth::guard('web')->user(); if ($currAuthUser && !empty($currAuthUser->preview_template)) { $isDemoTheme = true; } } catch (\Throwable $e) {} @endphp @if($isDemoTheme)
{{ __('This is a Demo Theme') }}
{{ __('You are exploring the demo store in preview mode. Modifications (create, update, delete) are restricted.') }}
{{ __('Demo Theme') }}
@endif @if($pendingUpiMemb && !empty($pendingUpiMemb->transaction_id))
Notice: Your UPI payment (UTR: {{ $pendingUpiMemb->transaction_id }}) is pending for admin verification.
Your store features remain active while our admin team reviews your payment reference.
Pending Verification
@endif @if($lsIsExpired || $lsIsExpiringSoon)
{{ $lsIsLocked ? '🔒 Account Locked: ' : ($lsIsExpired ? 'Urgent: ' : 'Warning: ') }}{{ $lsExpiryNotice }}.
{{ $lsIsLocked ? 'All navigation links are locked. Please renew your plan now to restore full access.' : ($lsIsExpired ? 'Please renew your plan now to restore your store and avoid public suspension.' : 'Please renew your package now to avoid store suspension.') }}
@if($lsIsLocked) @endif @endif @yield('content')
@includeif('user.partials.footer')
@includeif('user.partials.scripts') {{-- Loader --}}
{{-- Loader --}}