1e versie

This commit is contained in:
2025-11-12 10:17:30 +01:00
commit 6b5f9abec7
10 changed files with 255 additions and 0 deletions

34
public/dashboard.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
session_start();
require_once __DIR__ . '/../includes/functions.php';
if (!isset($_SESSION['user'])) {
header('Location: login.php');
exit;
}
$gebruiker = $_SESSION['user'];
$lootje = getLootjeVoor($gebruiker);
?>
<!DOCTYPE html>
<html>
<head><title>Dashboard</title></head>
<body>
<h2>Welkom, <?= htmlspecialchars($gebruiker) ?></h2>
<?php if ($lootje): ?>
<p>Je hebt getrokken: <strong><?= htmlspecialchars($lootje) ?></strong></p>
<?php else: ?>
<p>Er is nog geen ronde gestart.</p>
<?php endif; ?>
<p><a href="wishlist.php">Mijn verlanglijstje</a></p>
<?php if (isAdmin($gebruiker)): ?>
<p><a href="admin.php">Beheerpagina</a></p>
<?php endif; ?>
<p><a href="logout.php">Uitloggen</a></p>
</body>
</html>