<?php
session_start();

echo "Session Status:<br>";
echo "user_id: " . (isset($_SESSION['user_id']) ? $_SESSION['user_id'] : 'NOT SET') . "<br>";
echo "is_admin: " . (isset($_SESSION['is_admin']) ? $_SESSION['is_admin'] : 'NOT SET') . "<br>";
echo "username: " . (isset($_SESSION['username']) ? $_SESSION['username'] : 'NOT SET') . "<br>";

if (empty($_SESSION['user_id']) || empty($_SESSION['is_admin'])) {
    echo "<br><strong style='color:red;'>❌ You are NOT logged in as admin</strong><br>";
    echo "Please <a href='admin_login.php'>login as admin</a>";
} else {
    echo "<br><strong style='color:green;'>✅ You ARE logged in as admin</strong><br>";
    echo "You can access: <a href='admin_manage_pages.php'>Manage Pages</a>";
}
?>
