<?php

require_once dirname(__FILE__) . '/../includes/inicio.php';

if (isset($_SESSION['sesCMSCodigo'])) {
    $objLog = LogCMS::inserir($_SESSION['sesCMSCodigo'], 'Efetuou logout', $_SESSION['sesCMSIP']);

    unset($_SESSION['sesCMSLogin']);
    unset($_SESSION['sesCMSEmail']);
    unset($_SESSION['sesCMSNome']);
    unset($_SESSION['sesCMSIdPerfil']);
    unset($_SESSION['sesCMSCodigo']);
    unset($_SESSION['sesCMSIP']);
    unset($_SESSION['sesCMSStatusLoginYak']);
}

header('Location: ../login.php');
