コード例 #1
0
ファイル: admin.php プロジェクト: omusico/Xion
					</div>
				</div>
			</div>
		</div>
<?php 
    }
} elseif (isset($_GET["buildings"])) {
    if (isset($_POST["add"])) {
        $name = $_POST["name"];
        $parent = $_POST["parent"];
        if (empty($name) || empty($parent)) {
            ShowError("One or more fields were empty!");
        } elseif (Building::Exists($name)) {
            ShowError("A building with that name already exists");
        } else {
            Building::Add($name, $parent);
            ShowInfo("Added Building Successfully");
            RedirectTimer("admin&amp;buildings", 0);
        }
    } elseif (isset($_GET["add"])) {
        ?>
		<form class="form-horizontal" role="form" method="post">
			<div class="form-group">
				<label for="username">Building Name</label>
				<input type="text" class="form-control" id="name" name="name" placeholder="Enter building name">
			</div>
			<div class="form-group">
				<label for="password">Building Community</label>
				<input type="text" class="form-control" id="parent" name="parent" placeholder="Enter building community">
			</div>
			<div class="form-group">