Esempio n. 1
0
         //$currency_list = array("LKR" => 'Sri Lankan Rupee (LKR)', "USD" => 'US Dollars (USD)', "GBP" => 'British Pound (GBP)',);
         $currency_list = array("USD" => 'US Dollars (USD)', "LKR" => 'Sri Lankan Rupee (LKR)');
     ?>
     <select id = "display_rate_in" onchange = "refreshCurrency()">
         <?php foreach ($currency_list as $ck => $cv) { ?>
             <option <?php if (isset($_SESSION['display_rate_in']) && $_SESSION['display_rate_in'] == $ck) {
                 echo "selected=selected";
             } else {
                 if ($ck == "USD") {
                     echo "selected=selected";
                 }
             } ?> value = "<?php echo $ck; ?>"><?php echo $cv; ?></option>
         <?php } ?>
     </select>
 </div>
 <div style = "font-size:13px;margin-top:10px;margin-bottom:10px;line-height: normal; display:none"><?php echo $hotels->hotelDescription(); ?></div>
 <ul class = "room-list-wrapper clearfix">
 <?php
     for ($k = 0; $k < count($getRoomType_row); $k++) {
         $hotelRoomType->extractor($getRoomType_row, $k);
         /* new room check */
         $no_of_rooms = 0;
         $all_dates_available = true;
         $rc_in_date = $from_date;
         $rc_out_date = $to_date;
         $room_control = new RoomControl();
         $_temp = $room_control->getAllRoomDates($rc_in_date, $rc_out_date, $hotelRoomType->roomTypeId());
         $number_array = array();
         for ($i = 0; $i < count($_temp); $i++) {
             $room_control->extractor($_temp, $i);
             if ($room_control->rcNumOfRooms() == 0) {
Esempio n. 2
0
function viewTableFront($data, $count)
{
    $paginations = new Paginations();
    $paginations->setLimit(10);
    $paginations->setPage($_REQUEST['page']);
    $paginations->setJSCallback("viewHotelsFront");
    $paginations->setTotalPages($count);
    $paginations->makePagination();
    $mainCity = new MainCity();
    $hotels = new Hotels();
    $dicount_hotel = new Hotels();
    $country = new country();
    $SubCity = new SubCity();
    $hotelimages = new HotelImages();
    $discount = new HotelRoomRates();
    ?>
        <?php 
    for ($x = 0; $x < count($data); $x++) {
        $dicount_hotel->extractor($data, $x);
        $discount->setHotelId($dicount_hotel->hotelId());
        $discount_data = $discount->getRatesFromHotelId();
        $discount->extractor($discount_data);
        if (round($discount->discountRatesUpLocal()) >= 0) {
            $new_hotel = new Hotels();
            $new_hotel->setHotelId($dicount_hotel->hotelId());
            $new_hotel_data = $new_hotel->getHotelFromId();
            $new_hotel->extractor($new_hotel_data);
            $hotelimages->setImageHotelId($new_hotel->hotelId());
            $hotelimages->extractor($hotelimages->getImageFromHotelsIdOne());
            $mainCity_discount = new MainCity();
            $mainCity_discount->setMainCityId($new_hotel->hotelMainCityId());
            $mainCity_discount->extractor($mainCity_discount->getMainCityFromId());
            $filename = '../../uploads/hotels/thumbnails/' . $hotelimages->imageName();
            ?>
                <div class="offer-listing">
                    <?php 
            if (file_exists($filename) && $hotelimages->imageName() != "") {
                ?>
                            <img src="uploads/hotels/thumbnails/<?php 
                echo $hotelimages->imageName();
                ?>
" width="157" height="130" alt="new_hotel"/>
                        <?php 
            } else {
                ?>
                            <img src="images/no_image.jpg" alt="image" width="151" height="130"/>
                        <?php 
            }
            ?>
                    <h4 onclick="makeAlert(<?php 
            echo $new_hotel->hotelId();
            ?>
);" style="cursor:pointer;"><?php 
            echo $new_hotel->hotelName();
            ?>
</h4>
                    <input type="hidden" id="<?php 
            echo $new_hotel->hotelId();
            ?>
" name="<?php 
            echo $new_hotel->hotelId();
            ?>
" value="<?php 
            echo $new_hotel->hotelSeoUrl();
            ?>
"/>
                    <h5><?php 
            echo $mainCity_discount->mainCityName();
            ?>
</h5>

                    <p><?php 
            echo substr($new_hotel->hotelDescription(), 0, 250);
            ?>
</p>

                    <div class="price_tag">
                        <span class="striked_price"><!--Rs. 5,600--></span>
                        <span class="actual_price"><?php 
            if ($discount->dblBbSellLocal()) {
                echo 'LKR ' . $discount->dblBbSellLocal();
            } else {
                echo 'N/A';
            }
            ?>
</span> <span class="label">Price Per Night</span>
                    </div>
                    <button onclick="makeAlert(<?php 
            echo $new_hotel->hotelId();
            ?>
);">Book Now ></button>
                </div>
            <?php 
        }
    }
    ?>
        <div id="pagination"><?php 
    $paginations->drawPagination();
    ?>
</div>
    <?php 
}