getUri(); $n = $uriObj->getTotalSegments(); $uri = $n >= 2 ? $uriObj->getSegment(2) : ''; $seg3 = $n >= 3 ? $uriObj->getSegment(3) : ''; $mbLevel = (int) session()->get('mb_level'); $isSuperAdmin = \Config\Roles::isSuperAdminEquivalent($mbLevel); $effectiveLgIdx = admin_effective_lg_idx(); $effectiveLgName = null; if ($effectiveLgIdx) { $lgRow = model(\App\Models\LocalGovernmentModel::class)->find($effectiveLgIdx); $effectiveLgName = $lgRow ? $lgRow->lg_name : null; } $userNav = session_user_nav_display(); $currentPath = current_nav_request_path(); $adminNavTree = get_admin_nav_tree(); /** DB 링크(mm_link)만 사용. 짧게 적은 항목(menus 등)은 실제 URI(admin/menus)와 맞춰 후보 비교 */ $adminNavItemIsCurrent = static function (?string $mmLink) use ($currentPath): bool { return menu_link_matches_request($mmLink, $currentPath, []); }; /** 메뉴가 DB에서 안 쓰일 때만(폴백 상단바) 세그먼트 기반 활성 */ $isActive = static function (string $path) use ($uri, $seg3) { if ($path === 'admin' || $path === '') return $uri === ''; if ($path === 'users') return $uri === 'users'; if ($path === 'login-history') return $uri === 'access' && $seg3 === 'login-history'; if ($path === 'approvals') return $uri === 'access' && $seg3 === 'approvals'; if ($path === 'roles') return $uri === 'roles'; if ($path === 'menus') return $uri === 'menus'; if ($path === 'local-governments') return $uri === 'local-governments'; if ($path === 'select-local-government') return $uri === 'select-local-government'; if ($path === 'designated-shops') return $uri === 'designated-shops'; return false; }; ?> <?= esc($title ?? '관리자') ?> - 종량제 시스템
base_url('admin')]) ?>
$userNav, 'effectiveLgName' => $effectiveLgName, 'showSiteLink' => true, 'showAdminLink' => false, ]) ?>
getFlashdata('success')): ?> getFlashdata('error')): ?> getFlashdata('errors')): ?>