feat: created file for registration of actions and a file for functions; started first tests with form for work entries

This commit is contained in:
Ioannis20x
2025-07-07 07:04:13 +00:00
parent d772a6dc29
commit 3479fd9e1d
4 changed files with 60 additions and 46 deletions

View File

@@ -1,17 +1,22 @@
<?php
session_start();
?>
<nav>
<a href="index.php">Startseite</a>
<?php if (isset($_SESSION['user']) && $_SESSION['user']['hasRole']): ?>
<a href="admin.php">Admin-Menü</a>
<?php endif; ?>
<?php if (isset($_SESSION['user'])): ?>
<a href="logout.php">Logout</a>
<?php else: ?>
<a href="loginform.php">Login</a>
<?php endif; ?>
</nav>
<div class="navbar">
<div class="navbar-links" id="mobileMenu">
<a href="index.php">🏠 Home</a>
<?php if ($_SESSION['user']['hasRole']): ?>
<a href="admin.php">✍️ Eintragung</a>
<div class="dropdown">
<a href="#">📂 Verwaltung ▼</a>
<div class="dropdown-content">
<a href="statistik.php">📊 Statistik</a>
<a href="lager.php">🔧 Lager</a>
<a href="#">📝 Platzhalter</a>
</div>
</div>
<?php endif; ?>
</div>
<div class="user-info">
<img src="https://cdn.discordapp.com/avatars/<?php echo $_SESSION['user']['id']; ?>/<?php echo $_SESSION['user']['avatar']; ?>.png" alt="Avatar">
<span><?php echo htmlspecialchars($_SESSION['user']['nickname']); ?></span>
<a href="logout.php"><button class="logout-btn">Logout</button></a>
<span class="burger" onclick="toggleMenu()">☰</span>
</div>
</div>