<?php
require_once __DIR__ . '/config.php';
if (!empty($_SESSION['manager_id']))
    logEvent('manager', $_SESSION['manager_id'], '', 'logout');
session_destroy();
header('Location: /login.php'); exit;
