<aside class="main-sidebar sidebar-dark-primary elevation-4">
  <!-- Brand Logo -->
  <a href="admin_dashboard.php" class="brand-link">
    <span class="brand-text font-weight-light ml-2">Exam System</span>
  </a>

  <div class="sidebar">
    <nav class="mt-2">
      <?php
      $currentPage = basename($_SERVER['PHP_SELF']);

      $menu = [
        ['icon' => 'fas fa-tachometer-alt', 'text' => 'Dashboard', 'link' => 'admin_dashboard.php'],
        ['icon' => 'fas fa-book', 'text' => 'Manage Exams', 'link' => 'manage_exams.php'],
        ['icon' => 'fas fa-users', 'text' => 'Manage Students', 'link' => 'manage_students.php'],
        ['icon' => 'fas fa-key', 'text' => 'Manage Tokens', 'link' => 'manage_tokens.php'],
        ['icon' => 'fas fa-plus-circle', 'text' => 'Generate Bulk Tokens', 'link' => 'Bulk_token.php'],
        ['icon' => 'fas fa-print', 'text' => 'Print Tokens', 'link' => 'printtoken.php'],
        ['icon' => 'fas fa-chart-bar', 'text' => 'Examination Results', 'link' => 'exam_result.php'],
        ['icon' => 'fas fa-question', 'text' => 'Question Bank', 'link' => 'manage_questions.php'],
        ['icon' => 'fas fa-filter', 'text' => 'Questions by Exam', 'link' => 'questions_by_exam.php'],
        ['icon' => 'fas fa-user-plus', 'text' => 'Enroll Admin', 'link' => 'enroll_admin.php'],
		
		['icon' => 'fas fa-binoculars', 'text' => 'Track Token Activity', 'link' => 'track_token_activity.php'],

		
		
        ['icon' => 'fas fa-sign-out-alt text-danger', 'text' => 'Logout', 'link' => 'logout.php'],
      ];
      ?>

      <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">
        <?php foreach ($menu as $item): ?>
          <li class="nav-item">
            <a href="<?= $item['link'] ?>" class="nav-link<?= $currentPage === $item['link'] ? ' active' : '' ?>">
              <i class="nav-icon <?= $item['icon'] ?>"></i>
              <p><?= htmlspecialchars($item['text']) ?></p>
            </a>
          </li>
        <?php endforeach; ?>
      </ul>
    </nav>
  </div>
</aside>
