<?php require_once __DIR__.'/layout/header.php'; ?>

<?php
/* ===============================
   DESTROY SESSION
   =============================== */

session_start();

$_SESSION = [];

session_destroy();
?>

<meta http-equiv="refresh" content="0; url=https://api.jb26.co.za/admin/login.php">

<style>

body{
    font-family:Arial,sans-serif;
    background:#f4f6f8;
}

.logout-box{
    padding:40px;
    text-align:center;
}

</style>

<div class="logout-box">

<h2>Logging out…</h2>

<p>You are being redirected to the login page.</p>

</div>

<script>

/* also clear local storage token */

localStorage.removeItem("auth_token")
localStorage.removeItem("auth_user")

setTimeout(function(){
    window.location.href="login.php"
},200)

</script>

<?php require_once __DIR__.'/layout/footer.php'; ?>