示例#1
0
 function display($tpl = null)
 {
     $this->hotels = $this->get("Hotels");
     $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     if ($this->appSettings->is_enable_reservation == 0) {
         JHotelUtil::getInstance()->showUnavailable();
     }
     //if a single hotel redirect to hotel description
     if (count($this->hotels) == 1 && ENABLE_SINGLE_HOTEL == 1) {
         $hotelLink = JHotelUtil::getHotelLink($this->hotels[0]);
         $app = JFactory::getApplication();
         $app->redirect($hotelLink);
     }
     JRequest::setVar('showFilter', 1);
     $voucher = JRequest::getVar('voucher');
     $this->voucher = $voucher;
     $pagination = $this->get('Pagination');
     $this->pagination = $pagination;
     $orderBy = JRequest::getVar('orderBy');
     $this->orderBy = $orderBy;
     $session = JFactory::getSession();
     $this->userData = $_SESSION['userData'];
     //dmp($this->userData);
     $this->searchFilter = $this->get('SearchFilter');
     parent::display($tpl);
 }
示例#2
0
 function changeSearch()
 {
     //$log = Logger::getInstance(JPATH_COMPONENT."/logs/site-log-".date("d-m-Y").'.log',1);
     //	$log->LogDebug("changeSearch");
     UserDataService::initializeUserData();
     $data = JRequest::get("post");
     UserDataService::initializeReservationData();
     $hotel = HotelService::getHotel($data["hotel_id"]);
     $link = JHotelUtil::getHotelLink($hotel);
     $this->setRedirect($link);
 }
 function back()
 {
     UserDataService::removeLastRoom();
     $userData = UserDataService::getUserData();
     if ($userData->hotelId > 0) {
         $hotel = HotelService::getHotel($userData->hotelId);
         $link = JHotelUtil::getHotelLink($hotel);
     } else {
         $link = JRoute::_('index.php?option=com_jhotelreservation&task=excursionslisting.searchExcursions', false);
         UserDataService::initializeExcursions();
     }
     $this->setRedirect($link);
 }
示例#4
0
 function getHotels()
 {
     $userData = $_SESSION['userData'];
     //dmp($userData);
     $this->createSeachFilter($userData->filterParams, $userData->orderBy);
     $this->searchParams = $this->createDBSearchParams($this->searchFilter["filterCategories"]);
     $this->searchParams["keyword"] = $userData->keyword;
     $this->searchParams["orderBy"] = $userData->orderBy;
     $this->searchParams["adults"] = $userData->adults;
     $this->searchParams["voucher"] = $userData->voucher;
     $this->searchParams["startDate"] = $userData->start_date;
     $this->searchParams["endDate"] = $userData->end_date;
     $this->searchParams["languageTag"] = JRequest::getVar('_lang');
     $this->searchParams["city"] = JRequest::getVar('city');
     $this->searchParams["showAll"] = JRequest::getVar('showAll');
     $this->searchParams["searchType"] = JRequest::getVar('searchType');
     $this->searchParams["searchId"] = JRequest::getVar('searchId');
     if ($this->searchParams["searchType"] == JText::_("LNG_HOTELS")) {
         $hotel = $hotel = HotelService::getHotel($this->searchParams["searchId"]);
         $link = JHotelUtil::getHotelLink($hotel);
         $app = JFactory::getApplication();
         $app->redirect($link);
     }
     if (!isset($userData->noDates)) {
         $userData->noDates = 0;
     }
     $this->searchParams["no-dates"] = $userData->noDates;
     $hotelTable = $this->getTable('hotels');
     $hotels = $hotelTable->getHotels($this->searchParams, $this->getState('limitstart'), $this->getState('limit'));
     $userData->searchFilter = $this->searchFilter;
     $_SESSION['userData'] = $userData;
     $nearByHotels = array();
     if (count($hotels) <= 3) {
         $nearByHotels = $this->getNearByHotels($this->searchParams["keyword"], $this->searchParams, $hotels);
         if (!empty($nearByHotels)) {
             foreach ($nearByHotels as &$hotel) {
                 $hotel->nearBy = 1;
             }
             $hotels = array_merge($hotels, $nearByHotels);
         }
     }
     $hotels = $this->prepareHotelOffers($hotels);
     $this->itemHotels = $hotels;
     //dmp($userData->orderBy);
     if (isset($userData->voucher) && $userData->voucher != '' && $userData->orderBy == '' && count($this->itemHotels) > 0) {
         //dmp("shuffle");
         shuffle($this->itemHotels);
     }
     return $this->itemHotels;
 }
示例#5
0
			<img class="hotelimage" 
				src='<?php 
if (isset($hotel->pictures[0])) {
    echo JURI::root() . PATH_PICTURES . $hotel->pictures[0]->hotel_picture_path;
}
?>
' 
			/>
		</a>
	</div>
	<div class="hotelinfo">
		<div class="hotelcontent">								
			<div class="hoteltitle">
				<h2 >
					<a href="<?php 
echo JHotelUtil::getHotelLink($hotel);
?>
">
						<?php 
echo stripslashes($hotel->hotel_name);
?>
					</a> 
				</h2>
				<span class="hotelstars">
					<?php 
for ($i = 1; $i <= $hotel->hotel_stars; $i++) {
    ?>
						<img  src='<?php 
    echo JURI::root() . "administrator/components/" . getBookingExtName() . "/assets/img/star.png";
    ?>
' />
					<img class="hotel-image" 
						src='<?php 
if (isset($this->hotel->pictures[0])) {
    echo JURI::root() . PATH_PICTURES . $this->hotel->pictures[0]->hotel_picture_path;
}
?>
' 
					/>
				</a>
			</div>

			<div class="hotel-content">								
				<div class="hotel-title">
					<h2 >
						<a href="<?php 
echo JHotelUtil::getHotelLink($this->hotel);
?>
">
							<?php 
echo stripslashes($this->hotel->hotel_name);
?>
						</a> 
					</h2>
					<span class="hotel-stars">
						<?php 
for ($i = 1; $i <= $this->hotel->hotel_stars; $i++) {
    ?>
							<img  src='<?php 
    echo JURI::root() . "administrator/components/" . getBookingExtName() . "/assets/img/star.png";
    ?>
' />
        ?>
"></a>
							<div class="info" onclick="document.location.href='<?php 
        echo JHotelUtil::getHotelLink($item);
        ?>
'">
								<h2><a href="<?php 
        echo JHotelUtil::getHotelLink($item);
        ?>
"><?php 
        echo stripslashes($item->offer_name);
        ?>
</a></h2>
								<div class="hover_info">
									<a href="<?php 
        echo JHotelUtil::getHotelLink($item);
        ?>
" title="<?php 
        echo $item->offer_name;
        ?>
" class="btn" rel="nofollow noindex"><?php 
        echo JText::_("LNG_BOOK");
        ?>
</a>
								</div>
							</div>
						</figure>
						<div class="post-content">
							<p>
								<?php 
        echo strip_tags($item->offer_short_description);
示例#8
0
//echo JHotelUtil::truncate($offer->hotel_description,300)
?>
	
					
				</div>
				<div class="offer-content">
					
					<?php 
$offerContent = $params->get('offerContent');
if (isset($offerContent) && strlen($offerContent) > 0) {
    echo $offerContent;
} else {
    echo $offer->offer_content;
}
?>
				</div> 
				<br/>
				<a href="<?php 
echo JHotelUtil::getHotelLink($offer) . '?resetSearch=1&minNights=' . $offer->offer_min_nights;
?>
"><?php 
echo JText::_("LNG_MORE_INFORMATIONS_AND_RESERVE");
?>
</a>
			</div>
		</div>
	</div>
</div>


"
					src='<?php 
        echo JURI::root() . PATH_PICTURES . $picture->hotel_picture_path;
        ?>
' />
			</div>	
			
		<?php 
    }
    ?>
		</div>
		
		<div class="clear"> </div>
		<div class="right">
			<a href="<?php 
    echo JHotelUtil::getHotelLink($this->hotel) . '?' . strtolower(JText::_("LNG_PHOTO_GALLERY"));
    ?>
" ><?php 
    echo JText::_('LNG_VIEW_ALL_PHOTOS');
    ?>
</a>
		</div>
	</div>
<?php 
}
?>
<div class="clear"> </div>
<div class="reservation-details-holder row-fluid">
	<h3><?php 
echo isset($this->hotel->types) & $this->hotel->types[0]->id == PARK_TYPE_ID ? JText::_('LNG_SEARCH_PARKS_SPECIALS') : JText::_('LNG_SEARCH_ROOMS_SPECIALS');
?>
		</div>
		
		<div class="clear"> </div>
		<div class="right">
		<!--micod
		El enlace tiene un mal direccionamiento, enlace original-->
			<!--<a href="<?php 
    echo JHotelUtil::getHotelLink($this->hotel) . '?' . strtolower(JText::_("LNG_PHOTO_GALLERY"));
    ?>
" ><?php 
    echo JText::_('LNG_VIEW_ALL_PHOTOS');
    ?>
</a>-->

			<a href="<?php 
    echo JHotelUtil::getHotelLink($this->hotel) . '?' . 'foto';
    ?>
" ><?php 
    echo JText::_('LNG_VIEW_ALL_PHOTOS');
    ?>
</a>
		</div>
	</div>
<?php 
}
?>
<div class="clear"> </div>
<div class="reservation-details-holder row-fluid">
	<h3><?php 
echo isset($this->hotel->types) & $this->hotel->types[0]->id == PARK_TYPE_ID ? JText::_('LNG_SEARCH_PARKS_SPECIALS') : JText::_('LNG_SEARCH_ROOMS_SPECIALS');
?>
示例#11
0
						</dd>
						<dd class="location">
							<span class="adr"> <span class="locality"> <?php 
        echo $offer->hotel_city;
        ?>
 </span>, <span
								class="country-name"><?php 
        echo $offer->country_name;
        ?>
</span>
							</span>
						</dd>
						<dd class="">
							<div class="small-arrow">
								<a href="<?php 
        echo JHotelUtil::getHotelLink($offer) . '?minNights=' . $offer->offer_min_nights . (!empty($this->mediaReferer) ? '&mediaReferer=' . $this->mediaReferer : '') . (!empty($this->voucher) ? '&voucher=' . $this->voucher : '');
        ?>
"><?php 
        echo JText::_('LNG_VIEW_HOTEL', true);
        ?>
</a>
							</div>
						</dd>
					</dl>
				</div>
				<div class="sp_offers span8">
					<div class="offerDescription">
						<div class="offer-price hidden-phone">
							<span class="details"><?php 
        echo JText::_('LNG_FROM', true);
        ?>
示例#12
0
echo $text;
?>
	</div>
	<?php 
/*-------------------------------------------------------*/
//MICOD: Código original:
//echo $this->reservation->reservationInfo
/*-------------------------------------------------------*/
echo $this->reservation->reservationData->userData->confirmation_details;
?>
	<BR>
</form>	
<form action="<?php 
echo JRoute::_('index.php');
?>
" method="post" name="userForm_new" >
	<div class="hotel_reservation">
		<a class="ui-hotel-button" href="<?php 
echo JHotelUtil::getHotelLink($this->reservation->reservationData->hotel);
?>
">
			<span class="ui-button-text"><?php 
echo isset($this->reservation->reservationData->hotel->types) & $this->reservation->reservationData->hotel->types[0]->id == PARK_TYPE_ID ? JText::_('LNG_BACK_TO_PARK') : JText::_('LNG_BACK_TO_HOTEL');
?>
</span>
		</a>
	</div>
	<input type="hidden" name="task" id="task" value="" />
</form>
</div>
	
示例#13
0
        echo JText::_('LNG_REVIEWS');
        ?>
</span></a>
							</li>
						<?php 
    }
    ?>
						<?php 
    if ($this->appSettings->enable_hotel_facilities == 1) {
        ?>
							<li class="<?php 
        echo isset($facilities) ? 'selected' : '';
        ?>
">
								<a  href="<?php 
        echo JHotelUtil::getHotelLink($this->hotel) . '?' . strtolower(JText::_("LNG_FACILITIES"));
        ?>
"><span><?php 
        echo isset($this->hotel->types) & $this->hotel->types[0]->id == PARK_TYPE_ID ? JText::_('LNG_PARK_FACILITIES') : JText::_('LNG_HOTEL_FACILITIES');
        ?>
</span></a>
							</li>
						<?php 
    }
    ?>
					</ul>
				</div>
				<div class="clear"></div>
			</div>
			<?php 
}
示例#14
0
        } else {
            echo $roomDescription;
        }
        ?>
	 
								</div>
								<ul class="hotel_links">
									<li> <a href="<?php 
        echo JHotelUtil::getRoomLink($room);
        ?>
"> <?php 
        echo count($room->pictures) . " " . JText::_('LNG_PHOTOS');
        ?>
</a> </li>
									<li> <a href="<?php 
        echo JHotelUtil::getHotelLink($room);
        ?>
?map"> <?php 
        echo JText::_('LNG_VIEW_ON_MAP');
        ?>
</a> </li>
								</ul>
							</div>
							
						</div>
						
						<div class="hotel-details span3">
							
							<?php 
        if (!isset($this->userData->voucher) || $this->userData->voucher == '') {
            ?>
示例#15
0
        setMarkers(map, hotels);
      }

      /**
       * Data for the markers consisting of a name, a LatLng and a zIndex for
       * the order in which these markers should display on top of each
       * other.
       */
      var hotels = [
        <?php 
$db = JFactory::getDBO();
foreach ($hotels as $hotel) {
    $description = str_replace("\r\n", "", $hotel->hotelDescription);
    $description = str_replace("\\\\'", "", $description);
    $description = addslashes($description);
    $contentString = '<div id="map-content">' . '<h1 id="firstHeading" class="firstHeading">' . $db->escape($hotel->hotel_name) . '</h1>' . '<p>' . '<img src="' . JURI::root() . PATH_PICTURES . $hotel->hotel_picture_path . '" alt="' . $db->escape($hotel->hotel_name) . '">' . JHotelUtil::truncate(strip_tags($description), 180, ' &hellip; ', true) . '</p>' . '<p><a href="' . $db->escape(JHotelUtil::getHotelLink($hotel)) . '">' . JText::_('LNG_BOOK_HOTEL', true) . '</a></p>' . '</div>';
    echo "['" . $hotel->hotel_name . "', '" . $hotel->hotel_latitude . "','" . $hotel->hotel_longitude . "', 4,'" . $contentString . "']," . "\n";
}
?>
     	
      ];

      function setMarkers(map, locations) {
        // Add markers to the map

        // Marker sizes are expressed as a Size of X,Y
        // where the origin of the image (0,0) is located
        // in the top left of the image.

        // Origins, anchor positions and coordinates of the marker
        // increase in the X direction to the right and in
 function back()
 {
     UserDataService::removeLastRoom();
     $userData = UserDataService::getUserData();
     $hotel = HotelService::getHotel($userData->hotelId);
     $link = JHotelUtil::getHotelLink($hotel);
     $this->setRedirect($link);
 }
示例#17
0
echo isset($this->hotel->types) & $this->hotel->types[0]->id == PARK_TYPE_ID ? JText::_('LNG_REVIEW_TOTAL_SCORE_PARK', true) : JText::_('LNG_REVIEW_TOTAL_SCORE', true);
?>
</h4>
				<div >
					<div class="rating_total_score_number">
						<strong><?php 
echo JHotelUtil::fmt($hotel->hotel_rating_score, 1);
?>
</strong>
					</div>
				</div>
				<p> <?php 
echo JText::_('LNG_REVIEW_BASED_ON', true);
?>
 <a href="<?php 
echo JHotelUtil::getHotelLink($this->hotel) . '?' . strtolower(JText::_("LNG_REVIEWS"));
?>
" ><?php 
echo count($hotel->reviews);
?>
 <?php 
echo JText::_('LNG_REVIEW_NAMING', true);
?>
</a></p>
				<p> <?php 
echo JText::_('LNG_REVIEWS_DESCRIPTION_TEXT_1', true);
?>
  <strong> <?php 
echo JText::_('LNG_REVIEWS_DESCRIPTION_TEXT_2', true);
?>
 </strong> <?php