예제 #1
0
function getBuildings($campus = null)
{
    if ($campus == null) {
        echo json_encode(array());
    }
    $buildings = new buildingArray();
    return json_encode($buildings->toOptionList($campus));
}
예제 #2
0
/*
 * Template Name: Room Select
 *
 * @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>
예제 #3
0
if (isset($_REQUEST["campus"])) {
    $_SESSION["APP"]["campus"] = $_REQUEST["campus"];
    if (isset($_REQUEST["building"])) {
        $_SESSION["APP"]["building"] = $_REQUEST["building"];
        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