diff --git a/admin.php b/admin.php
index abddaea..ffd5cdf 100644
--- a/admin.php
+++ b/admin.php
@@ -1,13 +1,3 @@
-
-
beginTransaction();
$stmt = $pdo->prepare("INSERT INTO lootjes_rondes (naam) VALUES (?)");
@@ -75,15 +64,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['start_round'])) {
$pdo->commit();
log_action($pdo, $_SESSION['user']['username'], "Nieuwe ronde gestart: $rondeNaam", "Admin pagina");
- $message = "Nieuwe ronde '$rondeNaam' succesvol gestart!";
+ $message = "✅ Nieuwe ronde '$rondeNaam' succesvol gestart!";
} catch (Exception $e) {
$pdo->rollBack();
- $message = "Fout bij starten van nieuwe ronde: " . $e->getMessage();
+ $message = "❌ Fout bij starten van nieuwe ronde: " . $e->getMessage();
}
}
}
-// Ronde afronden
+// --- Ronde afronden ---
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['close_round'])) {
$ronde_id = $_POST['round_id'] ?? 0;
if ($ronde_id) {
@@ -94,7 +83,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['close_round'])) {
}
}
-// Huidige rondes ophalen (nieuwste eerst)
+// --- Huidige rondes ophalen ---
try {
$stmt = $pdo->query("SELECT * FROM lootjes_rondes ORDER BY created_at DESC");
$rondes = $stmt->fetchAll();
@@ -102,74 +91,173 @@ try {
die("Fout bij ophalen van rondes: " . $e->getMessage());
}
?>
-
+
Admin - Lootjesbeheer
-Admin - Lootjesbeheer
+
-
+
+
+ = htmlspecialchars($message) ?>
+
-
-= htmlspecialchars($message) ?>
-
+
-
+ 📅 Rondes
+
+ | ID | Naam | Status | Acties | Lootjes |
+
+
+ | = $r['id'] ?> |
+ = htmlspecialchars($r['naam']) ?> |
+ = htmlspecialchars($r['status']) ?> |
+
+
+
+
+ ✅ Afgerond
+
+ |
+
+ prepare("SELECT gever, ontvanger FROM lootjes WHERE ronde_id=?");
+ $stmtLootjes->execute([$r['id']]);
+ $lootjes = $stmtLootjes->fetchAll();
+ if ($lootjes):
+ ?>
+
+
+ - = htmlspecialchars($l['gever']) ?> → = htmlspecialchars($l['ontvanger']) ?>
+
+
+
+ Nog geen lootjes
+
+ |
+
+
+
+
-Rondes
-
-| ID | Naam | Status | Acties | Lootjes |
-
-
- | = $r['id'] ?> |
- = htmlspecialchars($r['naam']) ?> |
- = $r['status'] ?> |
-
-
-
-
- Afgerond
-
- |
-
- prepare("SELECT gever, ontvanger FROM lootjes WHERE ronde_id=?");
- $stmtLootjes->execute([$r['id']]);
- $lootjes = $stmtLootjes->fetchAll();
- if ($lootjes):
- ?>
-
-
- - = htmlspecialchars($l['gever']) ?> → = htmlspecialchars($l['ontvanger']) ?>
-
-
-
- Nog geen lootjes
-
- |
-
-
-
+