getUri(); $currentPath = trim((string) $uriObj->getPath(), '/'); if (str_starts_with($currentPath, 'index.php/')) { $currentPath = substr($currentPath, strlen('index.php/')); } $mbLevel = (int) session()->get('mb_level'); $isAdmin = ($mbLevel === \Config\Roles::LEVEL_SUPER_ADMIN || $mbLevel === \Config\Roles::LEVEL_LOCAL_ADMIN); $effectiveLgIdx = admin_effective_lg_idx(); $effectiveLgName = null; if ($effectiveLgIdx) { $lgRow = model(\App\Models\LocalGovernmentModel::class)->find($effectiveLgIdx); $effectiveLgName = $lgRow ? $lgRow->lg_name : null; } ?>