<?php
session_start();
require_once 'includes/functions.php';

if (isset($_SESSION['user_id'])) {
    addSystemLog('logout', $_SESSION['username'] . ' çıkış yaptı', $_SESSION['user_id']);
}
session_destroy();
header('Location: index.php');
exit;
