Example #1
0
require_once "../../includes/initialize.php";
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
if (!isset($_GET['id'])) {
    redirect_to("login.php");
}
$hotel = Hotel::find_by_id($_GET['id']);
if (!$hotel) {
    redirect_to("login.php");
}
if ($session->user_id != $hotel->id) {
    redirect_to("login.php");
}
$rule = rules::find_hotel_rules($hotel->id);
if (!$rule) {
    redirect_to("login.php");
}
$rooms = $hotel->rooms();
$photos = Photograph::find_by_hotel_id($hotel->id);
?>
<!DOCTYPE html>
<html>
<head>
	<title>
		Hotel
	</title>
	<link rel="stylesheet" type="text/css" href="../css/reset.css">
	<link rel="stylesheet" type="text/css" href="../css/hotel.css">
	<link rel="stylesheet" type="text/css" href="../css/demo.css">