@version(2) @load('css/lodging.css') @load('js/lodging.js') @php $ldg_df = isset($lang->lodging_date_fmt) ? $lang->lodging_date_fmt : 'Y.m.d'; $ldg_dtf = isset($lang->lodging_datetime_fmt) ? $lang->lodging_datetime_fmt : 'Y.m.d H:i'; $ldg_money = isset($lang->lodging_money) ? $lang->lodging_money : '%s' . $lang->lodging_won; $ldg_type_labels = [ 'hotel' => $lang->lodging_type_hotel, 'motel' => $lang->lodging_type_motel, 'pension' => $lang->lodging_type_pension, 'guesthouse' => $lang->lodging_type_guesthouse, 'resort' => $lang->lodging_type_resort, ]; $ldg_mid = $module_info->mid; $ldg_type_label = $ldg_type_labels[$property->property_type] ?? $property->property_type; $ldg_in = substr($checkin, 0, 4) . '-' . substr($checkin, 4, 2) . '-' . substr($checkin, 6, 2); $ldg_out = substr($checkout, 0, 4) . '-' . substr($checkout, 4, 2) . '-' . substr($checkout, 6, 2); $ldg_today = date('Y-m-d'); $ldg_tomorrow = date('Y-m-d', strtotime('+1 day')); $ldg_min = 0; $ldg_first_room = 0; $ldg_room_opts = []; foreach ($room_types as $ldg_rt) { if ($ldg_first_room === 0) { $ldg_first_room = (int)$ldg_rt->room_type_srl; } $ldg_room_opts[] = ['srl' => (int)$ldg_rt->room_type_srl, 'title' => (string)$ldg_rt->title]; if ($ldg_rt->available && $ldg_rt->price > 0 && ($ldg_min === 0 || $ldg_rt->price < $ldg_min)) { $ldg_min = (int)$ldg_rt->price; } } $ldg_free_days = -1; foreach ($cancel_rules as $ldg_rule) { if ((int)$ldg_rule->refund_rate >= 100 && (int)$ldg_rule->days_before > $ldg_free_days) { $ldg_free_days = (int)$ldg_rule->days_before; } } $ldg_address_full = trim($property->address . ' ' . $property->address_detail); $ldg_map_url = 'https://map.naver.com/v5/search/' . rawurlencode($ldg_address_full !== '' ? $ldg_address_full : $property->title); $ldg_image_count = count($property_images); $ldg_gallery_class = $ldg_image_count === 1 ? 'is-single' : ($ldg_image_count < 4 ? 'is-few' : ''); $ldg_thumb = $ldg_image_count ? $property_images[0]->url : ''; $ldg_round_avg = (int)round((float)$review_summary->average); $ldg_period_label = $stay_type === 'dayuse' ? zdate($checkin, $ldg_df) . ' ' . $lang->lodging_dayuse : zdate($checkin, 'm.d') . ' ~ ' . zdate($checkout, 'm.d') . ' · ' . sprintf($lang->lodging_nights, $nights); @endphp
@if ($ldg_image_count) @endif
{{ $ldg_type_label }} @if ($review_summary->count > 0) {{ $review_summary->average }}{{ sprintf($lang->lodging_review_count, number_format($review_summary->count)) }} @endif

{{ $property->title }}

@if ($ldg_address_full !== ''){{ $ldg_address_full }} {{ $lang->lodging_map_open }}@endif @if ($property->phone){{ $lang->lodging_phone }} {{ $property->phone }}@endif {{ $lang->lodging_checkin_time }} {{ substr($property->checkin_time, 0, 2) }}:{{ substr($property->checkin_time, 2, 2) }} · {{ $lang->lodging_checkout_time }} {{ substr($property->checkout_time, 0, 2) }}:{{ substr($property->checkout_time, 2, 2) }}

@if ($property->summary)

{{ $property->summary }}

@endif
@if (count($property->amenity_list))

{{ $lang->lodging_amenities }}

    @foreach ($property->amenity_list as $ldg_am)
  • {{ $ldg_am['label'] }}
  • @endforeach
@endif

{{ $lang->lodging_select_room }}

{{ $ldg_period_label }}@if ($person > 0) · {{ sprintf($lang->lodging_person_count, $person) }}@endif

    @foreach ($room_types as $ldg_rt) @php $ldg_can = $ldg_rt->available && $ldg_rt->fits_person; $ldg_book_url = getUrl('', 'mid', $ldg_mid, 'act', 'dispLodgingBook', 'property_srl', $property->property_srl, 'room_type_srl', $ldg_rt->room_type_srl, 'stay_type', $stay_type, 'checkin', $checkin, 'checkout', $checkout, 'person', $person > 0 ? $person : ''); $ldg_room_imgs = is_array($ldg_rt->images ?? null) ? $ldg_rt->images : []; @endphp
  • thumbnail_url) style="background-image:url('{{ $ldg_rt->thumbnail_url }}')" @endif data-ldg-gallery> @foreach ($ldg_room_imgs as $ldg_ri) @endforeach @if (count($ldg_room_imgs)){{ $lang->lodging_room_photos }} {{ count($ldg_room_imgs) }}@endif
    {{ $ldg_rt->title }}

    {{ sprintf($lang->lodging_std_person, $ldg_rt->std_person) }} · {{ sprintf($lang->lodging_max_person, $ldg_rt->max_person) }} @if ((int)($ldg_rt->min_nights ?? 1) > 1){{ sprintf($lang->lodging_min_nights_note, (int)$ldg_rt->min_nights) }}@endif @if ($stay_type === 'dayuse' && $ldg_rt->use_dayuse === 'Y') {{ sprintf($lang->lodging_dayuse_hours, $ldg_rt->dayuse_hours) }} ({{ substr($ldg_rt->dayuse_open, 0, 2) }}:{{ substr($ldg_rt->dayuse_open, 2, 2) }}~{{ substr($ldg_rt->dayuse_close, 0, 2) }}:{{ substr($ldg_rt->dayuse_close, 2, 2) }}) @elseif ($ldg_rt->use_dayuse === 'Y') {{ $lang->lodging_dayuse_available }} @endif

    @if ($ldg_rt->description)

    {{ $ldg_rt->description }}

    @endif @if (count($ldg_rt->amenity_list))
    @foreach (array_slice($ldg_rt->amenity_list, 0, 5) as $ldg_am) {{ $ldg_am['label'] }} @endforeach
    @endif
    @if ($ldg_can) @if ($ldg_rt->remaining > 0){{ sprintf($lang->lodging_rooms_left, $ldg_rt->remaining) }}@endif @if ($stay_type === 'dayuse'){{ $lang->lodging_dayuse }}@elseif ($nights > 1){{ sprintf($lang->lodging_total_for_nights, $nights) }}@else{{ $lang->lodging_per_night }}@endif {{ number_format($ldg_rt->price) }}{{ $lang->lodging_won }} {{ $lang->lodging_book_now }} @elseif (!$ldg_rt->fits_person) {{ $lang->lodging_person_over }} @elseif ($ldg_rt->unavailable_reason === 'no_dayuse') {{ $lang->lodging_no_dayuse }} @else {{ $lang->lodging_sold_out }} @endif
  • @endforeach @if (!count($room_types))
  • {{ $lang->lodging_no_property }}
  • @endif
@if (count($coupon_list))

{{ $lang->lodging_coupons_here }}

{{ $lang->lodging_coupon_code }} · {{ $lang->lodging_coupon_apply }}

    @foreach ($coupon_list as $ldg_cp)
  • @if ($ldg_cp->discount_type === 'rate'){{ sprintf($lang->lodging_coupon_off_rate, (int)$ldg_cp->discount_value) }}@else{{ sprintf($lang->lodging_coupon_off_amount, number_format((int)$ldg_cp->discount_value)) }}@endif {{ $ldg_cp->title }} @if ((int)$ldg_cp->min_amount > 0){{ sprintf($lang->lodging_coupon_min, number_format((int)$ldg_cp->min_amount)) }}@endif @if (($ldg_cp->end_ymd ?? '') !== '') · {{ sprintf($lang->lodging_coupon_until, zdate($ldg_cp->end_ymd, $ldg_df)) }}@endif @if ($ldg_cp->apply_to === 'stay') · {{ $lang->lodging_stay }}@elseif ($ldg_cp->apply_to === 'dayuse') · {{ $lang->lodging_dayuse }}@endif
    {{ $ldg_cp->code }}
  • @endforeach
@endif @if ($property->description)

{{ $lang->lodging_about }}

{!! $property->description !!}
@endif

{{ $lang->lodging_cancel_policy }}

@if (count($cancel_rules))
    @foreach ($cancel_rules as $ldg_rule)
  • @if ((int)$ldg_rule->days_before > 0){{ sprintf($lang->lodging_cancel_rule_row, (int)$ldg_rule->days_before, (int)$ldg_rule->refund_rate) }}@else{{ sprintf($lang->lodging_cancel_rule_today, (int)$ldg_rule->refund_rate) }}@endif
  • @endforeach
@else

{{ $lang->lodging_no_cancel_rule }}

@endif

{{ $lang->lodging_review }}

@if ($review_summary->count > 0)
{{ $review_summary->average }}
@for ($ldg_s = 1; $ldg_s <= 5; $ldg_s++) @endfor

{{ sprintf($lang->lodging_review_count, number_format($review_summary->count)) }}

@endif @if (count($review_list))
    @foreach ($review_list as $ldg_rv)
  • {{ $ldg_rv->writer_name }} {{ $ldg_rv->score }} {{ zdate($ldg_rv->regdate, $ldg_df) }}

    {{ $ldg_rv->content }}

    @if ($ldg_rv->reply)

    {{ $ldg_rv->reply }}

    @endif
  • @endforeach
@else

{{ $lang->lodging_no_review }}

@endif
@if ($ldg_address_full !== '')

{{ $lang->lodging_location }}

{{ $ldg_address_full }} {{ $lang->lodging_map_open }}
@endif
@if ($ldg_min > 0){{ sprintf($ldg_money, number_format($ldg_min)) }}{{ $ldg_period_label }} @else{{ $lang->lodging_sold_out }}@endif