function viewTable($data, $count)
{
    $room_features = new RoomFeatures();
    $paginations = new Paginations();
    $paginations->setLimit(10);
    $paginations->setPage($_REQUEST['page']);
    $paginations->setJSCallback("viewRoomFeatures");
    $paginations->setTotalPages($count);
    $paginations->makePagination();
    ?>
        <div class="mws-panel-header">
            <span class="mws-i-24 i-table-1">View Room Features</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">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++) {
            $room_features->extractor($data, $i);
            ?>
                        <tr id="row_<?php 
            echo $room_features->roomFeatureId();
            ?>
">
                            <td class="con1"><?php 
            echo $room_features->roomFeatureName();
            ?>
</td>
                            <td class="con0"><?php 
            //echo $room_features->roomFeatureName();
            ?>
</td>
                            <td class="con0"><?php 
            //echo $room_features->username();
            ?>
</td>
                            <td class="center">
                                <a onclick="loadGUIContent('roomfeatures','edit','<?php 
            echo $room_features->roomFeatureId();
            ?>
')">Edit</a>
                                <a onclick="deleteRoomFeatures(<?php 
            echo $room_features->roomFeatureId();
            ?>
)"
                                   class="toggle">Delete</a></td>
                        </tr>
                    <?php 
        }
        ?>

                <?php 
    }
    ?>
                </tbody>
            </table>
        </div>
        <?php 
    $paginations->drawPagination();
}
Example #2
0
        if ($roomType->roomTypeMaxExtraBeds() == 0) {
            echo '<li><span class="text">Extra beds are not available for this room.</span></li>';
        } else {
            echo '<li><span class="text">Max Extra Beds: ' . $roomType->roomTypeMaxExtraBeds() . '</span></li>';
        }
        ?>
                            </ul>
                        </div>
                    </div>
                    <div class="right-col">
                        <h4>Room Facilities</h4>

                        <div class="right-col-upper height1">
                            <ul>
                                <?php 
        $roomFeatures = new RoomFeatures();
        $roomFeatures_rows = $roomFeatures->getAllRoomFeatures();
        $featurs_list = $roomType->roomTypeFeatures();
        $list_array = array_filter(explode(',', $featurs_list));
        foreach ($list_array as $roomFeatureId) {
            $roomFeatures->setRoomFeatureId($roomFeatureId);
            $roomFeatures_rows = $roomFeatures->getRoomFeaturesFromId();
            $roomFeatures->extractor($roomFeatures_rows);
            echo '<li><span class="text">' . $roomFeatures->roomFeatureName() . '</span></li>';
        }
        ?>
                            </ul>
                        </div>
                        <div class="right-col-lower"></div>
                    </div>
                </div>