<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

require_once "includes/auth.php";

/* =========================
   حذف كوكيز حفظ الدخول
========================= */
if (isset($_COOKIE['remember_email'])) {
    setcookie("remember_email", "", time() - 3600, "/");
    unset($_COOKIE['remember_email']);
}

if (isset($_COOKIE['remember_password'])) {
    setcookie("remember_password", "", time() - 3600, "/");
    unset($_COOKIE['remember_password']);
}

/* =========================
   تسجيل الخروج العادي
========================= */
admin_logout();

/* =========================
   إعادة توجيه
========================= */
header("Location: login.php");
exit;
