<?php
/**
 * Super Admin Logout Handler
 * Location: public_html/admin/logout_admin.php
 */

require_once __DIR__ . '/../includes/functions.php';

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

unset($_SESSION['admin_logged_in']);
unset($_SESSION['admin_user_id']);
unset($_SESSION['admin_username']);
unset($_SESSION['admin_email']);
unset($_SESSION['admin_full_name']);
unset($_SESSION['admin_role']);

header("Location: login_admin.php?msg=logged_out");
exit;
?>