示例#1
0
?>
                                                    </select>
                                                </div>
                                            </div>

                                            <!-- Room Select box -->
                                            <div class="col-md-6">
                                                <div class="form-label">
                                                    <label for class="label-description">
                                                        Room:
                                                    </label>
                                                </div>
                                                <div class="form-input">
                                                    <select id="roomList" name="roomList">
                                                        <?php 
getRoomsInBuilding($curRoom->buildingId, "list", $curRoom->id);
?>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-row">
                                            <div class="form-label col-md-2">
                                                <label for class="label-description">
                                                    * Hostname:
                                                    <span>The name or IP address used for remote access</span>
                                                </label>
                                            </div>
                                            <div class="form-input col-md-6">
                                                <input type="text" placeholder="Hostname" name="txtDeviceHostname" id="txtDeviceHostname" value="<?php 
echo $curDevice->hostname;
示例#2
0
                    </h4>

                    <div class="example-box">
                        <div class="example-code">

                            <table class="table table-striped text-center">
                                <thead>
                                    <tr>
                                        <th class="text-center">Actions</th>
                                        <th>Name</th>
                                        <th class="text-center">Description</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <!-- Display a list of rooms in the database -->
                                    <?php 
getRoomsInBuilding($buildingId, "table", null);
?>
                                </tbody>
                            </table>

                        </div>
                    </div>
                	</div><!-- #page-content -->
	            </div><!-- #page-main -->
            </div><!-- #page-main-wrapper -->
        </div><!-- #page-wrapper -->

    </body>
</html>
<?php

/**
 * Created by PhpStorm.
 * User: William
 * Date: 12/31/13
 * Time: 11:19 AM
 */
require_once "../database/database.php";
require_once "../database/buildings.php";
require_once "../database/rooms.php";
require_once "../model/building.php";
require_once "../model/room.php";
$buildings = $_POST['buildings'];
$displayType = $_POST['displayType'];
$defaultRoom = $_POST['defaultRoom'];
//Echo a room list for the building
echo getRoomsInBuilding($buildings, $displayType, $defaultRoom);