42 lines
1.9 KiB
PHTML
42 lines
1.9 KiB
PHTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Notizen App</title>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width">
|
|
<link href="CSS/style.css" rel="stylesheet" type="text/css" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
|
|
<script src="JavaScript/script.js"></script>
|
|
</head>
|
|
<body>
|
|
<header class="top-bar">
|
|
<h1>Notes App <?php if(isset($_SESSION['role']) && $_SESSION['role'] === 'admin') echo "<span style='font-size:0.7em; color:#ffdd57;'>(Admin Panel)</span>"; ?></h1>
|
|
|
|
<nav class="top-nav">
|
|
<ul>
|
|
<li><a href="?controller=Welcome&do=showWelcome">Willkommen</a></li>
|
|
<li><a href="?controller=Notes&do=showNotes">Notizen</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<?php if (isset($_SESSION['user_id'])): ?>
|
|
<div class="user-info">
|
|
<span>Welcome, <?php echo htmlspecialchars($_SESSION['username'], ENT_QUOTES, 'UTF-8'); ?>!</span>
|
|
<form id="logout-form" method="POST" style="display: inline;">
|
|
<a class="icon-button" href="?controller=User&do=logoutUser">→</a>
|
|
</form>
|
|
<!-- <button class="icon-button" title="More options">⋮</button> -->
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="user-info">
|
|
<?php if (!isset($_SESSION['user_id'])): ?>
|
|
<a href="?controller=User&do=showUserLoginForm">Login</a>
|
|
<?php endif; ?>
|
|
<?php if (!isset($_SESSION['user_id'])): ?>
|
|
<a href="?controller=User&do=showUserRegisterForm">Register</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</header>
|
|
<div class="wrapper">
|
|
<main>
|