<?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>
