<?php
require_once '../includes/config.php';
require_once '../includes/functions.php';
if (!empty($_SESSION['admin_id'])) {
    logActivity($pdo, null, $_SESSION['admin_id'], 'admin_logout', 'Admin logged out');
}
unset($_SESSION['admin_id'], $_SESSION['admin_role']);
session_destroy();
header('Location: /admin/login.php');
exit;
