<?php 
session_start();
include_once 'dbh.inc.php';

// Check if the admin is logged in
if (!isset($_SESSION['admin_id']) || !isset($_SESSION['admin_username'])) {
  // Redirect to login page if not logged in
  header("Location: ../jadmin/adminlogin.php");
  exit(); // Stop further script execution
}

// The admin is logged in, continue with the page content
?>