1e versie
This commit is contained in:
34
public/dashboard.php
Normal file
34
public/dashboard.php
Normal 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>
|
||||
|
||||
Reference in New Issue
Block a user