<?php
session_start();
include 'config.php';
$sessionTime = 365 * 24 * 60 * 60;
$sessionName = "user";
session_set_cookie_params($sessionTime);
session_name($sessionName);

session_unset();
setcookie('persistID', FALSE, -1, '/', null, true, true);
$_SESSION['user']     = NULL;
session_destroy();
unset($_SESSION);
session_regenerate_id(true);
header("Location: /admin?logout=0");
?>
