get('mb_level'); $isAdmin = ($mbLevel === \Config\Roles::LEVEL_SUPER_ADMIN || $mbLevel === \Config\Roles::LEVEL_LOCAL_ADMIN); $dashboardPathAliases = ['dashboard', 'dashboard/blend']; $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(); $resolveNavNodeMatchLen = static function (object $node) use ($currentPath, $dashboardPathAliases): int { $maxLen = -1; foreach (menu_link_candidate_paths($node->mm_link ?? null, $currentPath) as $cand) { if (menu_single_path_matches_request($cand, $currentPath, $dashboardPathAliases)) { $maxLen = max($maxLen, strlen($cand)); } } return $maxLen; }; $activeTopNav = null; $activeTopLen = -1; $activeTopNum = PHP_INT_MAX; foreach ($siteNavTree as $topNode) { $nodeLen = $resolveNavNodeMatchLen($topNode); if ($nodeLen > $activeTopLen || ($nodeLen === $activeTopLen && (int) ($topNode->mm_num ?? 0) < $activeTopNum)) { $activeTop = $topNode; $activeTopLen = $nodeLen; $activeTopNum = (int) ($topNode->mm_num ?? 0); } } ?> <?= esc($title ?? '종량제 시스템') ?>
$userNav, 'effectiveLgName' => $effectiveLgName, 'showSiteLink' => false, 'showAdminLink' => $isAdmin, ]) ?>
getFlashdata('success')): ?> getFlashdata('error')): ?>