<?php
session_start();
if(isset($_SESSION["userId"])){
?>
<!DOCTYPE html>
<html lang="pl">
	<head>
		<meta charset="UTF-8">
		<title>Magazyn</title>
		<style>
			.left {
				float: left;
			}
			.right {
				float: right;
			}
		</style>
	</head>
	<body>
		<header><div class="left">Witaj <?=$_SESSION["userDisplayName"] ?></div><div class="right"><a href="logout.php">Wyloguj</a></div></header>
		<main>
		</main>
		<footer></footer>
	</body>
</html>
<?php 
} else {
	header("Location: login.php");
}	

?>
