<?php
require_once __DIR__ . '/includes/functions.php';
if (current_user()) {
    log_activity($pdo, 'logout', 'خروج از سامانه');
}
$_SESSION = [];
session_destroy();
header('Location: ' . base_url('login.php'));
exit;
