<?php
session_start();

include('inc/check_admin.php');
require_once('inc/header.php'); ?>

<div class="container mt-5">
    <h2 class="mb-4">Debug-Informationen</h2>

    <div class="card shadow mb-4">
        <div class="card-header bg-primary-subtle text-secondary">
            <h4>Session-Daten ($_SESSION)</h4>
        </div>
        <div class="card-body">
            <?php if (!empty($_SESSION)): ?>
                <pre><?php print_r($_SESSION); ?></pre>
            <?php else: ?>
                <p class="text-muted">Keine aktiven Session-Daten.</p>
            <?php endif; ?>
        </div>
    </div>

    <div class="card shadow">
        <div class="card-header bg-success bg-opacity-50 text-secondary">
            <h4>Cookie-Daten ($_COOKIE)</h4>
        </div>
        <div class="card-body">
            <?php if (!empty($_COOKIE)): ?>
                <pre><?php print_r($_COOKIE); ?></pre>
            <?php else: ?>
                <p class="text-muted">Keine Cookies gefunden.</p>
            <?php endif; ?>
        </div>
    </div>
</div>

<?php require_once 'inc/footer.php'; ?>