<?php
// This file acts as the entry point for the /admin/ directory.

// Start the session to check for login status.
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

if (isset($_SESSION['admin_user_id'])) {
    header('Location: dashboard.php');
} else {
    header('Location: auth/login.php');
}
exit();