<?php
session_start();
echo "<h1>Debug Session</h1>";
echo "<pre>";
var_dump($_SESSION);
echo "</pre>";

// Cek session user
if (!isset($_SESSION['user_id'])) {
    echo "User belum login - akan redirect ke login.php";
    // header('Location: ../login.php');
    // exit;
} else {
    echo "User ID: " . $_SESSION['user_id'] . "<br>";
    echo "User Role: " . ($_SESSION['user_role'] ?? 'tidak ada') . "<br>";
}

echo "<h2>GET Parameters:</h2>";
var_dump($_GET);
?>