예제 #1
0
 /**
  * Insert new booking
  */
 function new_booking()
 {
     // check CSRF protection
     JSession::checkToken() or die('Invalid Token');
     // get the new booking
     $model = $this->getModel('Booking');
     $booking = $model->newBookig();
     // invalid booking request
     if (!$booking) {
         $this->setRedirect(clone JUri::getInstance());
         return;
     }
     $this->setRedirect(CHClient::route('booking'));
     return;
 }
/**
 * @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;
$view = isset($displayData['view']) ? $displayData['view'] : 'booking';
?>
<!DOCTYPE html>
<html lang="<?php 
echo JFactory::getLanguage()->getTag();
?>
">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		<title>Redirect</title>
		<script type="text/javascript">
			window.onload = function () {
				window.parent.document.location = '<?php 
echo CHClient::route($view);
?>
';
			};
		</script>
	</head>
	<body>
		&nbsp;
	</body>
</html>
예제 #3
0
    ?>
</h1>
	<?php 
}
?>


	<!-- rooms -->	
	<div class="ch-rooms-rooms uk-grid">

		<?php 
foreach ($rooms as $i => $room) {
    ?>

			<?php 
    $link = CHClient::route('room', ['id' => $room->id . '-' . JApplicationHelper::stringURLSafe($room->title)]);
    ?>

			<div class="uk-width-medium-1-2">

				<div class="ch-rooms-room uk-position-relative">

					<div class="ch-ratio ch-ratio-3-2" style="background-image: url(<?php 
    echo $room->image->med;
    ?>
);">
						<div class="ch-image-overlay ch-ratio-content uk-text-center">
							<div class="ch-vertical-align">
								<p class="uk-h2"><?php 
    echo $room->title;
    ?>
			<?php 
if (!$this->submit_confirm) {
    ?>

				<form id="ch-processing-form" action="<?php 
    echo clone JUri::getInstance();
    ?>
" method="post">

					<div class="uk-alert uk-alert-warning uk-alert-large">
						<h3>Sorry, your booking is not confirmed yet.</h3>
						<p>
							If you have successfully finished the confirmation process, your reservation should be confirmed in a few moments. If you don't receive a confirmation email in 15 minutes please contact us.
							<br><a href="<?php 
    echo CHClient::route('return');
    ?>
" class="uk-button uk-button-small">
								<i class="uk-icon-refresh"></i>
								Check if the booking has been confirmed now
							</a>
						</p>



						<p>Otherwise, if something went wrong and you could't finish the confirmation process, you can try again now.</p>
					</div>

					<p><?php 
    echo CHClient::string('confirmation_select');
    ?>
$list_adults = [];
for ($i = 1; $i <= $config->search_adults; $i++) {
    $list_adults[$i] = CHClient::numstring($i, 'guests_adult');
}
// children list
$list_children = [];
for ($i = 0; $i <= $config->search_children; $i++) {
    $list_children[$i] = CHClient::numstring($i, 'guests_child_baby');
}
// children ages list
$list_ages = [];
for ($i = 0; $i <= $config->search_children_ages; $i++) {
    $list_ages[] = $i;
}
// display data
$action = isset($displayData['action']) ? $displayData['action'] : CHClient::route('engine');
// title
$title = isset($displayData['title']) ? $displayData['title'] : false;
?>


<div class="ch-search-top uk-panel uk-panel-box uk-margin-bottom">

	<?php 
if ($title) {
    ?>
		<h3><?php 
    echo $title;
    ?>
</h3>
	<?php 
예제 #6
0
	<!-- promos -->	
	<div class="uk-grid-width-small-1-2 uk-grid-width-medium-1-3 uk-grid-width-large-1-3" data-uk-grid="{gutter: 35, controls: '#ch-promos-controls'}">

		<?php 
foreach ($this->promos as $i => $promo) {
    ?>

			<?php 
    if (!$promo->visible) {
        continue;
    }
    ?>

			<?php 
    $link = CHClient::route('promo', ['id' => "{$promo->promo_type}-{$promo->id}-" . JApplicationHelper::stringURLSafe($promo->title)]);
    ?>

			<div data-uk-filter="<?php 
    echo $promo->promo_type;
    ?>
">

				<div class="ch-promos-promo uk-position-relative">

					<div class="ch-ratio ch-ratio-3-2" style="background-image: url(<?php 
    echo $promo->image->med;
    ?>
);">
						<div class="ch-ratio-content uk-text-center ch-image-overlay">
							<div class="ch-vertical-align">
예제 #7
0
<?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();
$results = $this->results;
$link = CHClient::route('availability', ['hotel_id' => $results->hotel_id, 'promo_code' => CHLib::input()->getString('promo_code'), 'start_date' => CHLib::input()->getString('start_date'), 'end_date' => CHLib::input()->getString('end_date'), 'party' => CHLib::input()->getString('party')]);
$this->lowest_rate = 999999999;
$currency = CHLibDisplay::currencySymbol($this->availability->request->currency);
?>

<?php 
foreach ($results->search_rooms as $i => $search_room) {
    ?>

	<?php 
    $party = $search_room->party;
    ?>

	<p class="uk-margin-small">
		<strong>
			<?php 
    if (count($search->party) > 1) {
        ?>
				<?php