//if(!$can_access) die('<head><title>Cannot View City</title></head><body><h2>You cannot view this city.</h2></body></html>'); $server = new server($_REQUEST['server_id']); if ($can_edit && $_POST['building_id']) { $message = $this_city->build(intval($_POST['building_id'])); if ($message) { $message = '<b style="padding:3px;border:1px solid red;display:block;"><img src="/images/error.png" alt="" /> ' . htmlentities($message) . '</b>'; } else { $message = '<div style="padding:3px;border:1px solid #ccc;display:block;"><img src="/images/information.png" alt="" /> Building started.</div>'; } if (isset($_REQUEST['ajax'])) { exit($message); } } //end if POST building_id if ($can_edit && $_POST['unit_id']) { $message = $this_city->create_units(intval($_POST['unit_id']), intval($_POST['unit_count'])); if ($message) { $message = '<b style="padding:3px;border:1px solid red;display:block;"><img src="/images/error.png" alt="" /> ' . htmlentities($message) . '</b>'; } else { $message = '<div style="padding:3px;border:1px solid #ccc;display:block;"><img src="/images/information.png" alt="" /> Units started.</div>'; } if (isset($_REQUEST['ajax'])) { exit($message); } } //end if POST unit_id ?> <head> <title>The Project - City @ <?php echo htmlentities($_REQUEST['city_id']); ?>