<?php
$username = $_SESSION['username'] ?? null;
?>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  <a class="navbar-brand" href="/index.php">
    <img alt="logo" class="logo" src="/static/img/logo.gif" style="height:28px; margin-right:8px;">
    National Defense Force
  </a>

  <div class="collapse navbar-collapse" id="navbarSupportedContent">
    <ul class="navbar-nav mr-auto">
      <?php if ($username): ?>
        <li class="nav-item"><a class="nav-link" href="/admin/securenotes.php">Dashboard</a></li>
        <li class="nav-item"><a class="nav-link" href="/logout.php">Disconnect</a></li>
      <?php endif; ?>
    </ul>
  </div>
</nav>
