59 lines
1.4 KiB
PHP
59 lines
1.4 KiB
PHP
<?php
|
|
session_start();
|
|
|
|
if(!isset($_SESSION['logged'])) {
|
|
header("Location: login.php");
|
|
exit();
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Projekt</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: Arial;
|
|
}
|
|
|
|
body {
|
|
background-color: cornflowerblue;
|
|
}
|
|
|
|
.container {
|
|
border: 1px solid black;
|
|
box-shadow: 5px 5px 0px black;
|
|
background-color: beige;
|
|
width: fit-content;
|
|
margin: 1em auto;
|
|
padding: 1em;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>SIEMANDEROOO</h1>
|
|
<p>Jesteś zalogowany jako <span style="font-weight: bold;"><?= $_SESSION['username'] ?></span>.</p><br>
|
|
|
|
<?php
|
|
if($_SESSION['user_rights_level'] >= 1) {
|
|
echo '<a href="">Przeglądaj treści...</a>';
|
|
}
|
|
if($_SESSION['user_rights_level'] >= 2) {
|
|
echo '<br><a href="">Dodaj treści...</a>';
|
|
}
|
|
if($_SESSION['user_rights_level'] >= 3) {
|
|
echo '<br><a href="">Modyfikuj/usuń treści...</a>';
|
|
}
|
|
?>
|
|
|
|
<br><br><a href="logout.php">Wyloguj</a>
|
|
</div>
|
|
</body>
|
|
</html>
|