From d78649905e1b2e3c3acf8f2fcf61f6f92d618c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Cocchi?= <kevin.cocchi@gmail.com> Date: Fri, 5 Oct 2018 16:05:11 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20probl=C3=A8me=20lors=20d'un?= =?UTF-8?q?e=20d=C3=A9connexion=20pendant=20la=20commande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 47e30b8..5c4a53d 100644 --- a/index.php +++ b/index.php @@ -91,7 +91,7 @@ if ($current_commande['food_id'] != 0) { $commande = implode(PHP_EOL, $commandes); $empty = empty($commande); -if ($date_fin_seconde_commande_battement > time()) { +if ($date_fin_seconde_commande_battement > time() && $consumer->is_authenticated()) { if ($submitted && !$empty) { $query = "INSERT INTO obigdelice_commandes(arise_id, arise_pseudo, commande, njv_numero) VALUES(\"".$identifiant."\", \"".$pseudo."\", \"".$commande."\", ".$NJV_NUMERO.")"; @@ -147,6 +147,13 @@ if ($date_fin_seconde_commande_battement > time()) { <strong>đ Les commandes sont fermĂ©es !</strong> </div>'; } + + if (!$consumer->is_authenticated() && $submitted && !$empty) { + echo ' + <div class="alert alert-danger"> + <strong>Une erreur est survenue lors de la commande : vous n\'ĂȘtes plus connectĂ©. Veuillez rĂ©essayer.</strong> + </div>'; + } ?> <?php if ($date_fin_seconde_commande_battement > time()) { ?> -- GitLab