Exemplo n.º 1
0
                        } ?> 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) {
                            $all_dates_available = false;
                        }
                        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;
Exemplo n.º 2
0
    }
</style>

<div class="hotel-check-rates-results-title" style="clear:both;"></div>
<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;
Exemplo n.º 3
0
function viewTable($data, $count)
{
    $hotel_room_type = new HotelRoomType();
    $paginations = new Paginations();
    $paginations->setLimit(10);
    $paginations->setPage($_REQUEST['page']);
    $paginations->setJSCallback("viewHotelRoomTypes");
    $paginations->setTotalPages($count);
    $paginations->makePagination();
    ?>
        <div class="mws-panel-header">
            <span class="mws-i-24 i-table-1">View Hotel Room Type</span>
        </div>
        <div class="mws-panel-body">
            <table cellpadding="0" cellspacing="0" border="0" class="mws-datatable-fn mws-table">
                <colgroup>
                    <col class="con0"/>
                    <col class="con1"/>
                </colgroup>
                <thead>
                <tr>
                    <th class="head1">Room Type Name</th>
                    <th class="head0">&nbsp;</th>
                    <th class="head0">&nbsp;</th>
                    <th class="head1">&nbsp;</th>
                </tr>
                </thead>
                <tbody>
                <?php 
    if (count($data) > 0) {
        ?>

                    <?php 
        for ($i = 0; $i < count($data); $i++) {
            $hotel_room_type->extractor($data, $i);
            ?>
                        <tr id="row_<?php 
            echo $hotel_room_type->roomTypeId();
            ?>
">
                            <td class="con1"><?php 
            echo $hotel_room_type->roomTypeName();
            ?>
</td>
                            <td class="con0"><?php 
            //echo $hotel_room_type->categorySeoName();
            ?>
</td>
                            <td class="con0"><?php 
            //echo $hotel_room_type->username();
            ?>
</td>
                            <td class="center"><a
                                    onclick="loadGUIContent('hotelroomtype','edit','<?php 
            echo $hotel_room_type->roomTypeId();
            ?>
')">Edit</a>
                                <a onclick="deleteHotelRoomType(<?php 
            echo $hotel_room_type->roomTypeId();
            ?>
)"
                                   class="toggle">Delete</a></td>
                        </tr>
                    <?php 
        }
        ?>

                <?php 
    }
    ?>
                </tbody>
            </table>
        </div>
        <?php 
    $paginations->drawPagination();
}