@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; } } // rows() 는 owner(false) 를 쓰므로 손님에게 장바구니 쿠키를 새로 심지 않는다. $ss_cart_count = 0; if ($ss_shop_mid !== '' && class_exists('\\Zittme\\Modules\\Commerce\\Models\\Cart')) { $ss_cart_count = count(\Zittme\Modules\Commerce\Models\Cart::rows()); } 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 ? '?' : '&'; $ss_lodging_mid = trim((string)($hr->lodging_mid ?? '')); if ($ss_lodging_mid === '') { foreach (ModuleModel::getMidList((object)['module' => 'lodging'], ['mid']) ?: [] as $ss_lrow) { $ss_lodging_mid = (string)($ss_lrow->mid ?? ''); break; } } $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 }} @if ($ss_lodging_mid !== '') {{ $lang->hr_lodging_admin }} @else {{ $lang->hr_shop_admin }} @endif {{ $lang->hr_pay_admin }} @elseif (class_exists('\Zittme\Modules\Commerce\Models\Staff') && \Zittme\Modules\Commerce\Models\Staff::isStaff()) {{ $lang->hr_shop_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')) { $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'); $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_lodging_mid !== '') @if (!$is_logged) {{ $lang->ss_my_booking }} @endif {{ $lang->ss_wish }} {{ $lang->ss_recent }} @elseif ($ss_shop_url !== '') @if ($ss_cart_count > 0){{ $ss_cart_count > 99 ? '99+' : $ss_cart_count }}@endif {{ $lang->ss_cart }} @endif
@php $ss_ldg_types = []; $ss_ldg_regions = []; $ss_ldg_tabs = []; $ss_ldg_act = (string)\Context::get('act'); if ($ss_lodging_mid !== '' && class_exists('\\Zittme\\Modules\\Lodging\\Models\\Property')) { $ss_ldg_info = ModuleModel::getModuleInfoByMid($ss_lodging_mid); $ss_ldg_srl = is_object($ss_ldg_info) ? (int)($ss_ldg_info->module_srl ?? 0) : 0; $ss_ldg_names = ['hotel' => $lang->ss_type_hotel, 'motel' => $lang->ss_type_motel, 'pension' => $lang->ss_type_pension, 'guesthouse' => $lang->ss_type_guesthouse, 'resort' => $lang->ss_type_resort]; foreach ($ss_ldg_srl > 0 ? \Zittme\Modules\Lodging\Models\Property::getList($ss_ldg_srl, 'open') : [] as $ss_lp) { $ss_lt = (string)$ss_lp->property_type; if (!isset($ss_ldg_types[$ss_lt])) { $ss_ldg_types[$ss_lt] = $ss_ldg_names[$ss_lt] ?? $ss_lt; } $ss_lr = \Zittme\Modules\Lodging\Controllers\Front::regionOf((string)$ss_lp->address); if ($ss_lr !== '' && !in_array($ss_lr, $ss_ldg_regions, true)) { $ss_ldg_regions[] = $ss_lr; } } $ss_ldg_home = getUrl('', 'mid', $ss_lodging_mid, 'act', 'dispLodgingIndex'); $ss_ldg_is_home = ($mid ?? '') === $ss_lodging_mid && ($ss_ldg_act === '' || $ss_ldg_act === 'dispLodgingIndex' || $ss_ldg_act === 'dispLodgingView') && (string)\Context::get('sort') !== 'price_asc'; $ss_ldg_tabs = [ [$lang->ss_tab_home, $ss_ldg_home, $ss_ldg_is_home], [$lang->ss_nav_deals, getUrl('', 'mid', $ss_lodging_mid, 'act', 'dispLodgingIndex', 'sort', 'price_asc'), (string)\Context::get('sort') === 'price_asc'], [$lang->ss_nav_benefits, getUrl('', 'mid', $ss_lodging_mid, 'act', 'dispLodgingCoupons'), $ss_ldg_act === 'dispLodgingCoupons'], [$lang->ss_tab_my, getUrl('', 'mid', $ss_lodging_mid, 'act', 'dispLodgingMy'), $ss_ldg_act === 'dispLodgingMy' || $ss_ldg_act === 'dispLodgingResult'], ]; } @endphp
@if (count($ss_ldg_tabs))
@endif @if (count($ss_cats))
@php $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