<?php
session_name('ensi_admin_session');
session_start();

require_once 'config.php';

if (isset($_SESSION['admin_id'])) {
    logAdminActivity($_SESSION['admin_id'], 'logout', 'Admin logged out');
}

session_unset();
session_destroy();

header('Location: login.php?logout=1');
exit;
