<?php
/*
* @author Istvan Franko
* @copyright 2014
*/
ob_start();
session_start();
if (isset($_SESSION['adminlogin'])){
	//user in logen in. Show a message on the screen
} else {
	//redirect the user to the login form.
	session_destroy();
	header('Location: index.php');
}
?>

<html>
 
<head>
<title>Natty Notebooks Inc.</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>

<div id="container">

<div id="header">
	<! header picture in css >
</div>
	
<div id="navigation">
	<?php include 'admin-nav-bar.php'; ?>
</div>
	
<div id="aside">
	<!--Links for navigation-->
	<a href="../index.php"><p style="text-align:center">Public Page</a></p>
</div>

<div id="content">

<?php

if ($_SERVER["REQUEST_METHOD"] == "POST")
{
unset($_SESSION['adminlogin']);
header('Location: index.php');
}
ob_end_flush();
?>

<br>
<fieldset style="width:70%"><legend>LOGOUT HERE</legend>
<br>
<form  method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
<input type="submit" value="Logout">
</fieldset>
<br>

</div>

<div id="footer">
<p align="center">Copyright &#169; Istvan Franko, 2014</p>
</div>
	

</div>
</body>
</html>