|
|
@ -251,7 +251,6 @@ class UserController
|
|
|
|
$utilisateur = $_SESSION['utilisateur'];
|
|
|
|
$utilisateur = $_SESSION['utilisateur'];
|
|
|
|
$idPartie = $_GET['idPartie'];
|
|
|
|
$idPartie = $_GET['idPartie'];
|
|
|
|
$index = $_GET['index'];
|
|
|
|
$index = $_GET['index'];
|
|
|
|
$dateDebut = $model->getDateDebut($idPartie);
|
|
|
|
|
|
|
|
$lastIndex = $model->getLastIndex($idPartie);
|
|
|
|
$lastIndex = $model->getLastIndex($idPartie);
|
|
|
|
if ($lastIndex != 0 && $index == $lastIndex + 1) {
|
|
|
|
if ($lastIndex != 0 && $index == $lastIndex + 1) {
|
|
|
|
if ($model->checkGameIsEnd($idPartie)) {
|
|
|
|
if ($model->checkGameIsEnd($idPartie)) {
|
|
|
@ -259,6 +258,7 @@ class UserController
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$points = $model->getPointsAtTheEnd($utilisateur->getEmail(), $idPartie);
|
|
|
|
$points = $model->getPointsAtTheEnd($utilisateur->getEmail(), $idPartie);
|
|
|
|
|
|
|
|
$dateDebut = $model->getDateDebut($idPartie);
|
|
|
|
require($rep . $vues['lobbyEnd']);
|
|
|
|
require($rep . $vues['lobbyEnd']);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ($index == 1 ){
|
|
|
|
if ($index == 1 ){
|
|
|
@ -267,6 +267,7 @@ class UserController
|
|
|
|
$enigme = $model->getEnigmebyPartieIdAndIndex($idPartie, $index);
|
|
|
|
$enigme = $model->getEnigmebyPartieIdAndIndex($idPartie, $index);
|
|
|
|
$model->resoudreEnigmeMulti($utilisateur, $enigme->getIdEnigme(), $idPartie, $index);
|
|
|
|
$model->resoudreEnigmeMulti($utilisateur, $enigme->getIdEnigme(), $idPartie, $index);
|
|
|
|
$code = $model->getCode($utilisateur->getEmail(), $enigme->getIdEnigme());
|
|
|
|
$code = $model->getCode($utilisateur->getEmail(), $enigme->getIdEnigme());
|
|
|
|
|
|
|
|
$dateDebut = $model->getDateDebut($idPartie);
|
|
|
|
require($rep . $vues['partie']);
|
|
|
|
require($rep . $vues['partie']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception $e) {
|
|
|
|
} catch (Exception $e) {
|
|
|
|