<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> <th>Action</th> </tr> </thead> <tbody class="searchable"> <?php foreach (Building::GetAll() as $building) { echo "<tr>"; echo "<td>" . $building->GetChild() . "</td>"; echo "<td>" . $building->GetParent() . "</td>"; echo "<td>"; echo "<a class=\"btn btn-default btn-sm building_delete\" href=\"#confirm_delete\" data-name=\"" . $building->GetChild() . "\" data-toggle=\"modal\" title=\"Delete Building\"><span class=\"glyphicon glyphicon-trash\"></span></a>"; echo "</td>"; echo "</tr>"; } ?> </tbody> </table> <div class="modal fade" id="confirm_delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content">