<?php Session::Destroy(); RedirectTimer("dashboard", 0);
<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"> <button type="submit" name="add" class="btn btn-default">Add Building</button> </div> </form> <?php } elseif (isset($_GET["name"]) && isset($_GET["delete"])) { if (Building::Exists($_GET["name"])) { Building::Remove($_GET["name"]); ShowInfo("Removed Building Successfully"); RedirectTimer("admin&buildings", 0); } else { ShowError("Invalid building name."); } } else { ?> <p> <a href="index.php?p=admin&buildings&add"><button type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Add Building</button></a> </p> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th>Name</th> <th>Community</th>
$clientid = CleanString($_POST["clientid"]); $description = $_POST["description"]; if (!isset($_POST["tags"])) { ShowError("You must specify at least one tag!"); } else { $tags = $_POST["tags"]; $client = Client::GetByUsername($clientid); if (empty($clientid) || empty($description) || empty($tags)) { ShowError("One or more fields were empty!"); } elseif (!$client->IsValid()) { ShowError("Invalid Client ID."); } else { $ticket = Ticket::Add($client->GetID(), $me->GetID(), $description, STATUS_OPENED, $tags, $client->GetBuilding(), Building::GetCommunity($client->GetBuilding())); $me->IncrementPoints(5); ShowInfo("Created Ticket Successfully"); RedirectTimer("ticket&id=" . $ticket->GetID(), 0); } } } else { ?> <form class="form-horizontal" role="form" method="post"> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> Client Information </div> <div class="panel-body"> <div class="form-group"> <label for="clientid" class="col-sm-2 control-label">Client ID</label>