<?php
if (session_status() == PHP_SESSION_NONE) {
    session_start();
}

// Check if user is logged in as an admin
if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== true) {
    header("Location: login.php");
    exit;
}
?>
