32 lines
773 B
PHP
32 lines
773 B
PHP
<?php
|
|
session_start();
|
|
require_once __DIR__ . '/../includes/functions.php';
|
|
require_once __DIR__ . '/../includes/db.php';
|
|
|
|
if (!isset($_SESSION['user']) || !isAdmin($_SESSION['user'])) {
|
|
header('Location: dashboard.php');
|
|
exit;
|
|
}
|
|
|
|
$bericht = '';
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['nieuwe_ronde'])) {
|
|
$lootjes = startNieuweRonde($pdo);
|
|
$bericht = 'Nieuwe ronde gestart!';
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>Beheer</title></head>
|
|
<body>
|
|
<h2>Beheerpagina</h2>
|
|
<?php if ($bericht): ?><p style="color:green"><?= htmlspecialchars($bericht) ?></p><?php endif; ?>
|
|
|
|
<form method="post">
|
|
<button type="submit" name="nieuwe_ronde">Start nieuwe lootjes-ronde</button>
|
|
</form>
|
|
|
|
<p><a href="dashboard.php">Terug</a></p>
|
|
</body>
|
|
</html>
|
|
|