From b7ba58d4669066eb781b3373560cb1f0e85d2725 Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 12 Nov 2025 15:16:02 +0100 Subject: [PATCH] admin --- admin.php | 232 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 160 insertions(+), 72 deletions(-) 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

+
+

🎩 Adminpaneel - Lootjesbeheer

+ +
-
- -
+
+ +
+ - -

- +
+ +
-
- -
+

📅 Rondes

+ + + + + + + + + + + +
IDNaamStatusActiesLootjes
+ +
+ + +
+ + ✅ Afgerond + +
+ prepare("SELECT gever, ontvanger FROM lootjes WHERE ronde_id=?"); + $stmtLootjes->execute([$r['id']]); + $lootjes = $stmtLootjes->fetchAll(); + if ($lootjes): + ?> +
    + +
  • + +
+ + Nog geen lootjes + +
+
-

Rondes

- - - - - - - - - - - -
IDNaamStatusActiesLootjes
- -
- - -
- - Afgerond - -
- prepare("SELECT gever, ontvanger FROM lootjes WHERE ronde_id=?"); - $stmtLootjes->execute([$r['id']]); - $lootjes = $stmtLootjes->fetchAll(); - if ($lootjes): - ?> -
    - -
  • - -
- - Nog geen lootjes - -
+