/**
 * @package		CHClient
 * @copyright	Copyright (C) CloudHotelier. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/gpl.html>
 * @author		Xavier Pallicer <*****@*****.**>
 */
defined('_JEXEC') or die;
// load engine data
$config = CHClient::getConfig();
// get the data
$booking = $this->booking;
$hotel = $booking->hotel;
// get currency display
$currency = CHLibDisplay::currencySymbol($booking->customer->currency);
$hotel_currency = CHLibDisplay::currencySymbol($booking->currency);
$conversion = $booking->customer->currency_conversion;
?>

<!-- summary -->
<div data-uk-sticky="{boundary: true, top: 10, media: 640}">

	<div class="uk-panel uk-panel-box">

		<?php 
if (count($booking->rooms) < 3 && $config->display_book_hotel_info) {
    ?>
			<div class="ch-ratio ch-ratio-3-2" style="background-image: url(<?php 
    echo $hotel->image->med;
    ?>
);"></div>
<?php

/**
 * @package		CHClient
 * @copyright	Copyright (C) CloudHotelier. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/gpl.html>
 * @author		Xavier Pallicer <*****@*****.**>
 */
defined('_JEXEC') or die;
// get search
$search = CHClient::getSearch();
// hotel data
$hotel = $this->availability->hotel;
// currency
$currency = CHLibDisplay::currencySymbol($this->availability->request->currency);
// prepare data
$unit = $this->available_unit;
$rates = $this->availability->results->search_rooms[$unit];
$party = $rates->party;
$first_unit = $this->first_unit;
$class_active = $this->first_unit ? 'ch-active' : '';
$class_available = $this->available ? '' : 'ch-unavailable';
?>

<div <?php 
echo $this->available ? 'data-ch-available-item="' . $unit . '-' . $this->room->id . '"' : '';
?>
 class="uk-width-medium-1-1 ch-available-unit ch-available-list <?php 
echo $class_active;
?>
 <?php 
Beispiel #3
0
 /**
  * Render month row
  */
 static function monthRow($first, $last, $month, $rooms, $ari, $filter_room = false, $start_empty_days = 0, $end_empty_days = 0)
 {
     $html = [];
     $today_int = CHLibDate::getDate()->format('Ymd');
     $currency = isset($ari->currency) ? CHLibDisplay::currencySymbol($ari->currency) : '';
     foreach ($rooms as $room) {
         // check room
         if ($filter_room && $room->id != $filter_room) {
             continue;
         }
         // prepare available & rates keys
         $room_ari = isset($ari->ari) ? CHLibData::getObjectFromList($ari->ari, $room->id, 'room_id') : 0;
         // generate html
         if (!$filter_room) {
             $title = '<div class="uk-vertical-align-middle">' . $room->title . '</div>';
             $html[] = '<div class="uk-vertical-align ch-month-cell ch-month-cell-row ch-month-cell-title">' . $title . '</div>';
         }
         // empty rows
         for ($i = 0; $i < $start_empty_days; $i++) {
             $html[] = '<div class="ch-month-cell ch-month-cell-row"></div>';
         }
         foreach ($month->dates as $date) {
             // month rows
             $day = $date->day;
             if ($day < $first || $day > $last) {
                 continue;
             }
             // get day data
             $date_int = str_replace('-', '', $date->date);
             $rate = '-';
             $aclass = '';
             $is_not_in_past = $date_int >= $today_int;
             if ($room_ari) {
                 $has_availability = isset($room_ari->availability[$day - 1]);
                 $has_rate_and_is_not_zero = isset($room_ari->rates[0]->rate[$day - 1]) && $room_ari->rates[0]->rate[$day - 1] > 0;
                 if ($is_not_in_past && $has_availability && $has_rate_and_is_not_zero) {
                     $rate = CHLibDisplay::money($room_ari->rates[0]->rate[$day - 1], $currency);
                     $available = $room_ari->availability[$day - 1];
                     $aclass = 'ch-month-cell-span-available-' . ($available ? $available > 2 ? 'ok' : 'low' : 'no');
                 }
             }
             // cells
             $html[] = '<div class="ch-month-cell ch-month-cell-row ch-month-cell-day-' . $date->day_week . '">';
             $html[] = '<small class="uk-text-muted ch-month-cell-span ch-month-cell-span-available ' . $aclass . '">' . $rate . '</small>';
             $html[] = '</div>';
         }
         // empty rows
         for ($i = 0; $i < $end_empty_days; $i++) {
             $html[] = '<div class="ch-month-cell ch-month-cell-row"></div>';
         }
     }
     return implode("\n", $html);
 }
/**
 * @package		CHClient
 * @copyright	Copyright (C) CloudHotelier. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/gpl.html>
 * @author		Xavier Pallicer <*****@*****.**>
 */
defined('_JEXEC') or die;
// load engine data
$config = CHClient::getConfig();
$search = CHClient::getSearch();
// booking data
$hotel = $this->availability->hotel;
// get currency display
$currency = CHLibDisplay::currencySymbol($this->availability->request->currency);
$hotel_currency = CHLibDisplay::currencySymbol($hotel->currency);
?>

<div class="uk-visible-small uk-margin-top"></div>

<div class="uk-panel uk-panel-box">

	<form data-ch-book-form class="uk-form uk-form-stacked" action="<?php 
echo clone JUri::getInstance();
?>
" method="post" <?php 
echo $this->data->request ? 'data-ch-book-error' : '';
?>
>

		<?php 
<?php

/**
 * @package		CHClient
 * @copyright	Copyright (C) CloudHotelier. All rights reserved.
 * @license		GNU GPLv2 <http://www.gnu.org/licenses/gpl.html>
 * @author		Xavier Pallicer <*****@*****.**>
 */
defined('_JEXEC') or die;
// load data
$config = CHClient::getConfig();
$booking = $this->booking;
$customer = $booking->customer;
$hotel = $booking->hotel;
$currency = CHLibDisplay::currencySymbol($booking->currency);
$customer_currency = CHLibDisplay::currencySymbol($booking->customer->currency);
$booking_status = CHClient::bookingStatus($booking->booking_status, true);
?>

<h1><?php 
echo CHClient::string('your_booking');
?>
 - <?php 
echo $booking->booking_id;
?>
</h1>

<hr>

<h4><span class="ch-booking-status ch-booking-status-<?php 
echo $booking_status;