From 2bf710e215aa7e7d673667c84397c7ac31ceb55e Mon Sep 17 00:00:00 2001 From: foin137 <62767760+foin137@users.noreply.github.com> Date: Sun, 5 Nov 2023 16:02:36 +0100 Subject: [PATCH] Possibility to disable new games Include possibility to disable new games by changing a constant in constants.php --- Werwolf.php | 261 ++++++++++++++++++++++------------------- includes/constants.php | 8 +- 2 files changed, 145 insertions(+), 124 deletions(-) diff --git a/Werwolf.php b/Werwolf.php index f7541d1..d35517a 100644 --- a/Werwolf.php +++ b/Werwolf.php @@ -1463,8 +1463,16 @@ p#liste { if (isset($_POST['neuesSpiel'])) { //Starten wir ein neues Spiel - $mysqli->Query("UPDATE $spielID"."_game SET spielphase = ".PHASESETUP); - $mysqli->Query("UPDATE $spielID"."_spieler SET reload = 1"); + if (_NOGAMECREATIONERRORMESSAGE == "") + { + $mysqli->Query("UPDATE $spielID"."_game SET spielphase = ".PHASESETUP); + $mysqli->Query("UPDATE $spielID"."_spieler SET reload = 1"); + } + else + { + //Spiel darf nicht erstellt werden, da _NOGAMECREATIONERRORMESSAGE existiert + echo "
Spiel darf nicht erstellt werden: ". _NOGAMECREATIONERRORMESSAGE ."
"; + } } echo "