} // special_conditions if ($room->special_conditions) { echo '<br><i class="uk-icon-calendar-times-o"></i> <span class="ch-text-block">' . CHClient::string('special_conditions') . '</span>'; } // tip $rate_tip = '<strong>' . CHClient::string('cancellation') . '</strong>: ' . $room->rate->cancellation_policy; if ($room->free_cancellation) { $rate_tip .= '<br>' . CHClient::sprintf('free_cancellation_before', CHLibDate::dateToDisplay($room->rate->deadline, false)); } $rate_tip .= '<br><strong>' . CHClient::string('prepayment') . '</strong>: ' . CHClient::string(CHClientDisplay::ratePrepayment($room->rate->conditions)); echo ' <i class="uk-icon-info-circle" data-uk-tooltip title="' . $rate_tip . '"></i>'; ?> <br> <i class="uk-icon-users"></i> <?php echo CHClientDisplay::roomGuests($room->party->adults, $room->party->children, $room->party->babies); ?> <?php if (isset($room->party->children) && $room->party->children) { ?> <i class="uk-icon-info-circle" data-uk-tooltip title="<?php echo CHClient::sprintf('hotel_ages', $this->availability->results->ages->child, $this->availability->results->ages->adult); ?> "></i> <?php } ?> <?php $board_icon = $board == 'bb' ? 'coffee' : ($board != 'ro' ? 'cutlery' : 'bed'); ?> <br><i class="uk-icon-<?php
?> </select> </div> </div> </div> </div> <!-- loading container --> <div class="ch-loading-container"> <div data-ch-calendar-month> <?php echo CHClientDisplay::month($calendar->month, $hotel->rooms, $calendar->ari, $room); ?> </div> <!-- loader --> <div class="ch-loading" data-ch-calendar-loading> <div class="ch-loading-spinner"> <div class="ch-loading-bounce1"></div> <div class="ch-loading-bounce2"></div> </div> </div> </div> </div>
echo '<br><span class="ch-text-block"><i class="uk-icon-' . $board_icon . '"></i> ' . CHClient::string('board_' . $board) . '</span>'; if ($rate->free_cancellation) { echo '<br><span class="ch-text-block ch-text-green">' . CHClient::string('free_cancellation') . '</span>'; if ($rate->conditions == 'pay_at_hotel') { echo '<br><span class="ch-text-block ch-text-green">' . CHClient::string('pay_later') . '</span>'; } } elseif (in_array($rate->conditions, ['deposit_non_refundable', 'prepay_non_refundable'])) { echo '<br><span class="ch-text-block">' . CHClient::string('non_refundable') . '</span>'; } else { echo '<br><span class="ch-text-block">' . CHClient::string('special_conditions') . '</span>'; } $rate_tip = '<strong>' . CHClient::string('cancellation') . '</strong>: ' . $rate->cancellation_policy; if ($rate->free_cancellation) { $rate_tip .= '<br>' . CHClient::sprintf('free_cancellation_before', CHLibDate::dateToDisplay($rate->deadline, false)); } $rate_tip .= '<br><strong>' . CHClient::string('prepayment') . '</strong>: ' . CHClient::string(CHClientDisplay::ratePrepayment($rate->conditions)); echo ' <i class="uk-icon-info-circle" data-uk-tooltip title="' . $rate_tip . '"></i>'; echo '</label>'; $this->first_rate = false; $board_dispay = false; } } ?> </div> </div> <div class="ch-available-room-price"> <div data-ch-room-price="unit-<?php echo $unit; ?> room-<?php
/** * Method that the user can use to send the voucher to their contacts */ public function emailVoucher() { $layout_html = new JLayoutFile('chclient_alert', JPATH_ROOT . '/components/com_chclient/layouts'); $status = ''; // get the booking $booking = $this->getBooking(); if (!$booking) { $status = 'danger'; } // check the emails $emails = array_map('trim', explode(',', CHLib::input()->getString('emails'))); if (!$emails) { $status = 'danger'; } foreach ($emails as $email) { if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $status = 'danger'; } } // return if errors detected if ($status == 'danger') { return $layout_html->render(['status' => $status, 'message' => CHClient::string('error_incorrect_data')]); } // prepare mail $mailer = JFactory::getMailer(); $config = JFactory::getConfig(); $sender = array($config->get('mailfrom'), $config->get('fromname')); // mail content $mailer->setSubject($booking->hotel->title . ' - ' . $booking->voucher); $mailer->IsHTML(true); $mailer->Encoding = 'base64'; $mailer->setBody(CHClientDisplay::renderVoucher($booking)); // send emails foreach ($emails as $notification_email) { if ($notification_email) { $mailer->setSender($sender); $mailer->addRecipient($notification_email); try { $mailer->Send(); } catch (Exception $e) { // log errors } $mailer->ClearAddresses(); } } return $layout_html->render(['status' => 'success', 'message' => CHClient::string('emails_sent')]); }
if (count($search->party) > 1) { ?> <p class="uk-margin-small"> <strong><i class="uk-icon-bed"></i> <?php echo CHClient::numstring(count($search->party), 'rooms'); ?> </strong> <small> <?php foreach ($search->party as $i => $room) { ?> <br><?php echo CHClient::sprintf('room_n', $i + 1); ?> : <?php echo CHClientDisplay::roomGuests($room->adults, count($room->children)); ?> <?php } ?> </small> </p> <?php } ?> <?php if ($config->display_inline_search) { ?> <p class="uk-margin-small"> <a class="uk-button uk-button-mini" href="#" data-uk-toggle="{target:'#ch-availability-search', animation:'uk-animation-slide-bottom'}">
<?php /** * @package CHAdminPro * @copyright Copyright (C) CloudHotelier. All rights reserved. * @license GNU GPLv2 <http://www.gnu.org/licenses/gpl.html> * @author Xavier Pallicer <*****@*****.**> */ // defined('_JEXEC') or die; ?> <?php echo CHClientDisplay::month($this->calendar->month, $this->hotel->rooms, $this->calendar->ari, $this->room);
/** * Countries array * * @return array */ static function countries() { if (self::$countries) { return self::$countries; } self::$countries = CHLibDisplay::countries(); return self::$countries; }
<p class="uk-margin uk-margin-top uk-margin-small-left"> <?php if (count($search->party) > 1) { ?> <?php echo CHClient::sprintf('room_n', $unit + 1); ?> : <?php echo CHClient::sprintf('rates_for_', CHClientDisplay::roomGuests($party->adults, $party->children, $party->babies)); ?> <?php } else { ?> <?php echo CHClient::sprintf('rates_for', CHClientDisplay::roomGuests($party->adults, $party->children, $party->babies)); ?> <?php } ?> <?php if (isset($party->children) && $party->children) { ?> <i class="uk-icon-info-circle" data-uk-tooltip title="<?php echo CHClient::sprintf('hotel_ages', $this->availability->results->ages->adult, $this->availability->results->ages->child); ?> "></i> <?php } ?> </p>
<div class="uk-modal-header"> <h2><?php echo $extra->title; ?> </h2> </div> <div class="ch-engine-modal-body"> <ul id="ch-modal-extra-switcher-<?php echo $extra->id; ?> " class="uk-switcher"> <li class="ch-engine-modal-tab"> <?php echo CHClientDisplay::slideshowItem($extra, (object) ['autoplay' => false]); ?> </li> <li class="ch-engine-modal-tab"> <div class="ch-engine-modal-container ch-ratio ch-ratio-3-2"> <div class="ch-ratio-content"> <div class="uk-grid uk-grid-medium"> <div class="uk-width-1-3"> <img class="uk-thumbnail" src="<?php echo $extra->image->screen; ?> " alt="<?php echo $extra->title; ?> "> </div>
echo '<option ' . $selected . ' value="' . $month_item->value . '">' . $month_item->text . '</option>'; } ?> </select> </div> </div> </div> </div> <!-- loading container --> <div class="ch-loading-container"> <div class="ch-availability-room-month" data-ch-room-calendar-month="<?php echo $room->id; ?> "> <?php echo CHClientDisplay::month($month, $rooms, $month_ari, $room->id); ?> </div> <!-- loader --> <div class="ch-loading" data-ch-room-calendar-loading="<?php echo $room->id; ?> "> <div class="ch-loading-spinner"> <div class="ch-loading-bounce1"></div> <div class="ch-loading-bounce2"></div> </div> </div> </div> </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(); $config = CHClient::getConfig(); // prepare data filters $boards = $this->availability->results->boards; $conditions = (array) $this->availability->results->conditions; $conditions_filter = array_intersect($conditions, CHClientDisplay::ratesFreeCancellation()) && array_intersect($conditions, CHClientDisplay::ratesNonRefundable()); $conditions_filter = false; ?> <!-- filters --> <div data-uk-sticky="{boundary: true, top: 10}"> <div class="ch-availability-filters uk-panel uk-panel-box"> <div class="uk-clearfix"> <div class="uk-float-left uk-hidden-small"> <a data-ch-available-switch="list" class="ch-availability-filters-display uk-link-muted"><i class="uk-icon-th-list"></i></a> <a data-ch-available-switch="grid" class="ch-availability-filters-display uk-link-muted"><i class="uk-icon-th-large"></i></a> </div>
/** * Send notification emails */ public static function emailNotification($booking, $card = false, $cancellation = false) { // prepare mail $mailer = JFactory::getMailer(); $mailer->IsHTML(true); $mailer->Encoding = 'base64'; $config = JFactory::getConfig(); $sender = array($config->get('mailfrom'), $config->get('fromname')); // mail content $subject = $booking->hotel->title . ' - ' . $booking->booking_id; if ($cancellation) { $subject .= ' - ' . CHClient::string('cancellation'); } $mailer->setSubject($subject); $mailer->setBody(CHClientDisplay::renderVoucher($booking)); // voucher notification emails $hotel_notify = array_map('trim', explode(',', $booking->hotel->notify_voucher)); $app_notify = array_map('trim', explode(',', $booking->app->notify_voucher)); $notification_emails = array_values(array_merge($hotel_notify, $app_notify)); // send mails to notification list first if ($notification_emails) { foreach ($notification_emails as $notification_email) { if ($notification_email) { $mailer->setSender($sender); $mailer->addRecipient($notification_email); try { $mailer->Send(); } catch (Exception $e) { // log errors } $mailer->ClearAddresses(); } } } // send mail to guest $mailer->addRecipient($booking->customer->email); $mailer->setSender($sender); try { $mailer->Send(); } catch (Exception $e) { // log errors } $mailer->ClearAddresses(); // send card details email if ($card) { // generate card email $title = $booking->hotel->title . ' - ' . $booking->booking_id . ' - ' . CHClient::string('card_details'); $mailer->setSubject($title); // generate email body $layout_css = new JLayoutFile('chclient_email_css', JPATH_ROOT . '/components/com_chclient/layouts'); $layout_html = new JLayoutFile('chclient_email_card', JPATH_ROOT . '/components/com_chclient/layouts'); $html = $layout_html->render(['booking' => $booking, 'card' => $card, 'title' => $title]); $css = 'a { color:' . $booking->app->color . ';}' . $layout_css->render([]); $body = CHLibEmail::inlineCSS($html, $css); $mailer->setBody($body); // send to card notifications emails $hotel_notify = explode(',', $booking->hotel->notify_card); $app_notify = explode(',', $booking->app->notify_card); $notification_emails = array_values(array_merge($hotel_notify, $app_notify)); if ($notification_emails) { foreach ($notification_emails as $notification_email) { if ($notification_email) { $mailer->setSender($sender); $mailer->addRecipient($notification_email); try { $mailer->Send(); } catch (Exception $e) { // log errors } $mailer->ClearAddresses(); } } } } // execute notify plugins JPluginHelper::importPlugin('chclient'); $dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onNotify', [$booking]); }
?> <strong><?php echo CHClient::string('guest'); ?> </strong>: <?php echo $room->guest->name; ?> <br> <?php } ?> <strong><?php echo CHClient::string('party'); ?> </strong>: <?php echo CHClientDisplay::roomParty($room->party); ?> <br><strong><?php echo CHClient::string('board'); ?> </strong>: <?php echo CHClient::string('board_' . $room->board->board); ?> <?php if ($room->guest->smoking) { ?> <br><strong><?php echo CHClient::string('smoking'); ?> </strong>: <?php echo $room->guest->smoking;
/** * Print Voucher */ private function printVoucher() { // render and quit app CHLib::rawExit(CHClientDisplay::renderVoucher($this->booking)); }