<?php
$currentPage = basename($_SERVER['PHP_SELF']);
?>

<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow">
<div class="container-fluid">

<a class="navbar-brand fw-bold" href="dashboard.php">
🔐 Admin Panel
</a>

<button class="navbar-toggler" type="button"
data-bs-toggle="collapse"
data-bs-target="#adminNav"
aria-controls="adminNav"
aria-expanded="false"
aria-label="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<div class="collapse navbar-collapse" id="adminNav">

<ul class="navbar-nav me-auto">

<li class="nav-item">
<a class="nav-link <?=($currentPage=='dashboard.php')?'active':''?>"
href="dashboard.php">Dashboard</a>
</li>

<li class="nav-item">
<a class="nav-link <?=($currentPage=='generate_link.php')?'active':''?>"
href="generate_link.php">Generate Link</a>
</li>

<li class="nav-item">
<a class="nav-link <?=($currentPage=='manage_links.php')?'active':''?>"
href="manage_links.php">Manage Links</a>
</li>

<li class="nav-item">
<a class="nav-link <?=($currentPage=='photos.php')?'active':''?>"
href="photos.php">Photos</a>
</li>

</ul>

<ul class="navbar-nav">

<li class="nav-item">
<a class="nav-link text-danger" href="logout.php">Logout</a>
</li>

</ul>

</div>
</div>
</nav>