コード例 #1
0
ファイル: get.php プロジェクト: chadthegreat/FFPACgvsu
function getRooms($building = null)
{
    if ($building == null) {
        echo json_encode(array());
    }
    $rooms = new roomArray();
    return json_encode($rooms->toOptionList($building));
}
コード例 #2
0
 *
 * @Author:	Chris Schaefer
 *
*/
include_once ABSPATH . "Application/includes/initialize.php";
// ToDo: After we have the data we will need to load campus and then update the onchange to call an ajax script to load building and same for building -> room.
$campus = new campusArray();
$campus->load();
$data["campus"] = $campus->getArrayKeyValue();
$data["building"] = array();
$data["room"] = array();
if (isset($_SESSION["APP"]["campus"])) {
    $building = new buildingArray();
    $data["building"] = $building->loadByCampus($_SESSION["APP"]["campus"]);
    if (isset($_SESSION["APP"]["building"])) {
        $room = new roomArray();
        $data["room"] = $room->loadByBuilding($_SESSION["APP"]["building"]);
    }
}
get_header();
while (have_posts()) {
    the_post();
    ?>
	<div class="container" id="home-content">
		<h1 class="page-title"><?php 
    the_title();
    ?>
</h1>
		<?php 
    the_content();
    ?>
コード例 #3
0
ファイル: room-view.php プロジェクト: chadthegreat/FFPACgvsu
        if (isset($_REQUEST["room"])) {
            $_SESSION["APP"]["room"] = $_REQUEST["room"];
        }
    }
}
$campus = new campusArray();
$campus->load();
$data["campus"] = $campus->getArrayKeyValue();
$data["building"] = array();
$data["room"] = array();
if (isset($_SESSION["APP"]["campus"])) {
    $building = new buildingArray();
    $building->load();
    $data["building"] = $building->loadByCampus($_SESSION["APP"]["campus"]);
    if (isset($_SESSION["APP"]["building"])) {
        $room = new roomArray();
        $room->load();
        $data["room"] = $room->loadByBuilding($_SESSION["APP"]["building"]);
    }
}
get_header();
// Todo: query database for labels of campus/building/room for .page-title
while (have_posts()) {
    the_post();
    ?>
		<div class="container" id="home-content">
<?php 
    if (isset($_SESSION["APP"]["campus"]) && isset($_SESSION["APP"]["building"]) && isset($_SESSION["APP"]["room"])) {
        ?>
			<h1 class="page-title"><?php 
        echo $campus->getArrayKeyValue()[$_SESSION["APP"]["campus"]];