<?php
session_start();
session_unset();
session_destroy();

// Clear Cookies
if (isset($_COOKIE['admin_remember'])) {
    setcookie('admin_remember', '', time() - 3600, '/');
}
if (isset($_COOKIE['user_remember'])) {
    setcookie('user_remember', '', time() - 3600, '/');
}

require_once '../functions.php'; // Needed for base_url
header("Location: " . base_url('public/index.php'));
exit;
?>