<?php
require_once './includes/session.php';
require_once './includes/utils.php';

// Initialize session
$session = SessionManager::getInstance();

// Log activity before logging out
if ($session->isLoggedIn()) {
    Utils::logActivity($session->getUserId(), 'logout', 'Admin logged out');
}

// Logout and redirect
$session->logout();
header('Location: login.php');
exit;
