Exemple #1
0
<div class="hotel-room-types-results-main-rows">
<?php 
$hotelRoomType->setRoomTypeHotelId($hotels_id);
$getRoomType_row = $hotelRoomType->getHotelRoomTypeFromHotelsId();
for ($k = 0; $k < count($getRoomType_row); $k++) {
    $hotelRoomType->extractor($getRoomType_row, $k);
    $no_of_rooms = 0;
    $all_dates_available = true;
    $rc_in_date = $_REQUEST['check_in_date'];
    $rc_out_date = $_REQUEST['check_out_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) {
            $all_dates_available = false;
        }
        //$no_of_rooms = $no_of_rooms + $room_control->rcNumOfRooms();
        array_push($number_array, $room_control->rcNumOfRooms());
    }
    sort($number_array);
    $no_of_rooms = $number_array[0];
    if (!$all_dates_available) {
        $no_of_rooms = 0;
    }
    $roomsCount = $no_of_rooms;
    /*if($hotelRoomType->roomTypeImg() !=''){
        $countArry=0;
       $temp_arr = array();
       $temp_arr = explode(",",$hotels->roomTypeImg());