This commit is contained in:
Felix Ivo
2025-06-23 10:49:07 +02:00
3 changed files with 20 additions and 5 deletions

View File

@@ -9,13 +9,12 @@
</head>
<body>
<header class="top-bar">
<h1>Notes App <?php if($_SESSION['role'] === 'admin') echo "<span style='font-size:0.7em; color:#ffdd57;'>(Admin Panel)</span>"; ?></h1>
<h1>Notes App <?php if(isset($_SESSION['role']) && $_SESSION['role'] === 'admin') echo "<span style='font-size:0.7em; color:#ffdd57;'>(Admin Panel)</span>"; ?></h1>
<?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;">
<input type="hidden" name="action" value="logout">
<button type="submit" class="icon-button" title="Logout"></button>
<a class="icon-button" href="?controller=User&do=logoutUser"></a>
</form>
<!-- <button class="icon-button" title="More options">⋮</button> -->
</div>