<?php

$currentPage = basename($_SERVER['PHP_SELF']);

?>

<!-- Main Sidebar -->
<aside class="main-sidebar sidebar-dark-primary elevation-4">

    <!-- Logo -->
    <a href="../admin/dashboard.php" class="brand-link text-center">

        <span class="brand-text font-weight-bold">
            Res Site Admin Panel
        </span>

    </a>

    <!-- Sidebar -->
    <div class="sidebar">

        <!-- Admin -->
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">

            <div class="info">

                <a href="#" class="d-block">

                    <i class="fas fa-user-shield"></i>

                    <?= e($_SESSION['admin_username']); ?>

                </a>

            </div>

        </div>

        <!-- Menu -->
        <nav class="mt-2">

            <ul class="nav nav-pills nav-sidebar flex-column"
                data-widget="treeview"
                role="menu">

                <li class="nav-item">

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

                        <i class="nav-icon fas fa-home"></i>

<p>Dashboard</p>

                    </a>

                </li>

                <li class="nav-item">

                    <a href="universities.php"
                       class="nav-link <?= ($currentPage == 'universities.php') ? 'active' : ''; ?>">

                        <i class="nav-icon fas fa-university"></i>

                        <p>Universities</p>

                    </a>

                </li>

                <li class="nav-item">

                    <a href="add-entry.php"
                       class="nav-link <?= ($currentPage == 'add-entry.php') ? 'active' : ''; ?>">

                        <i class="nav-icon fas fa-file-upload"></i>

                        <p>Add Entry</p>

                    </a>

                </li>

                <li class="nav-item">

                    <a href="entries.php"
                       class="nav-link <?= ($currentPage == 'entries.php') ? 'active' : ''; ?>">

                        <i class="nav-icon fas fa-folder-open"></i>

                        <p>Entries</p>

                    </a>

                </li>

                <li class="nav-item">

                    <a href="logout.php"
                       class="nav-link">

                        <i class="nav-icon fas fa-sign-out-alt text-danger"></i>

                        <p>Logout</p>

                    </a>

                </li>

            </ul>

        </nav>

    </div>

</aside>