diff --git a/index.php b/index.php index 47e30b8ed73b9f3a16e2c708334de00265f65721..5c4a53db71d1783ca5bea0fb2a7474ef3a02432b 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()) { ?>