@version(2) @php $ss_cats = []; $ss_shop_mid = trim((string)($hr->shop_mid ?? '')); if ($ss_shop_mid === '') { foreach (ModuleModel::getMidList((object)['module' => 'commerce'], ['mid']) ?: [] as $ss_row) { $ss_shop_mid = (string)($ss_row->mid ?? ''); break; } } if (($hr->use_shop_menu ?? 'Y') !== 'N' && $ss_shop_mid !== '') { $ss_out = executeQuery('commerce.getCategoryList', (object)['is_active' => 'Y']); if ($ss_out->toBool() && !empty($ss_out->data)) { $ss_rows = is_array($ss_out->data) ? $ss_out->data : [$ss_out->data]; $ss_child = []; foreach ($ss_rows as $ss_row) { if (empty($ss_row->category_srl)) { continue; } $ss_row->title = \Context::replaceUserLang((string)$ss_row->title); $ss_child[(int)$ss_row->parent_srl][] = $ss_row; } foreach ($ss_child[0] ?? [] as $ss_top) { $ss_top->kids = $ss_child[(int)$ss_top->category_srl] ?? []; $ss_cats[] = $ss_top; } } } $ss_shop_url = $ss_shop_mid !== '' ? getUrl('', 'mid', $ss_shop_mid) : ''; $ss_amp = strpos($ss_shop_url, '?') === false ? '?' : '&'; $hr_langs = \Context::get('lang_supported'); $hr_langs = is_array($hr_langs) ? $hr_langs : []; $hr_lang_now = \Context::getLangType(); $hr_lang_uri = (string)($_SERVER['REQUEST_URI'] ?? '/'); $hr_lang_uri = preg_replace('/([?&])l=[^&]*/', '$1', $hr_lang_uri); $hr_lang_uri = preg_replace('/[?&]+$/', '', $hr_lang_uri); $hr_lang_uri = str_replace('&&', '&', $hr_lang_uri); $hr_lang_sep = strpos($hr_lang_uri, '?') === false ? '?' : '&'; @endphp
@if ($is_logged) {{ $logged_info->nick_name }} @if ($logged_info->is_admin == 'Y') {{ $lang->hr_admin }} {{ $lang->hr_shop_admin }} {{ $lang->hr_pay_admin }} @endif {{ $lang->hr_logout }} @else {{ $lang->hr_login }} {{ $lang->hr_signup }} @endif @if (count($hr_langs) > 1)
@endif @if ($hr_scheme === 'auto') @endif
@if ($hr->use_search !== 'N') @endif
@if ($is_logged) @php $hr_nc_items = []; $hr_nc_unread = 0; $hr_nc_on = false; $hr_nc_member_mid = ''; $hr_nc_show_all = false; if (class_exists('NcenterliteModel')) { // 알림센터가 설치돼 있어도 사용 알림 종류가 없거나, 표시 대상(PC/모바일)이 아니면 벨을 숨긴다. $hr_nc_cfg = NcenterliteModel::getConfig(); $hr_nc_use = $hr_nc_cfg->use ?? null; $hr_nc_enabled = is_array($hr_nc_use) ? count($hr_nc_use) > 0 : ($hr_nc_use === 'Y'); $hr_nc_display = (string)($hr_nc_cfg->display_use ?? 'all'); $hr_nc_is_mobile = class_exists('Mobile') && Mobile::isFromMobilePhone(); if ($hr_nc_display === 'pc' && $hr_nc_is_mobile) { $hr_nc_enabled = false; } if ($hr_nc_display === 'mobile' && !$hr_nc_is_mobile) { $hr_nc_enabled = false; } if ($hr_nc_enabled) { $layout_info->use_ncenter_widget = 'Y'; $hr_nc_on = true; // 알림센터 "회원 메뉴 표시" 가 미사용이면 전체 알림 목록으로 보내는 링크도 두지 않는다. $hr_nc_show_all = (($hr_nc_cfg->user_config_list ?? 'N') === 'Y'); // 회원 모듈에 고정 mid 가 있으면 그 주소로 바로 보낸다 (리다이렉트 한 번 절약) $hr_nc_member_cfg = class_exists('MemberModel') ? MemberModel::getMemberConfig() : null; $hr_nc_member_mid = (is_object($hr_nc_member_cfg) && !empty($hr_nc_member_cfg->mid)) ? (string)$hr_nc_member_cfg->mid : ''; $hr_nc_out = getModel('ncenterlite')->getMyNotifyList($logged_info->member_srl); if ($hr_nc_out && !empty($hr_nc_out->data)) { $hr_nc_items = array_slice(is_array($hr_nc_out->data) ? $hr_nc_out->data : [], 0, 8); $hr_nc_unread = (int)($hr_nc_out->page_navigation->total_count ?? 0); } } } @endphp @if ($hr_nc_on)
@endif {{ $lang->ss_mypage }} @endif @if ($ss_shop_url !== '') {{ $lang->ss_cart }} @endif
@if (count($ss_cats))
@php // 1차 카테고리 수에 따라 열 수를 늘린다: 6개까지 3열(2줄), 8개까지 4열, 그 이상 5열. $ss_cat_count = count($ss_cats); $ss_cols = $ss_cat_count <= 6 ? 3 : ($ss_cat_count <= 8 ? 4 : 5); @endphp
@endif @if (count($ss_cats)) @endif