|
|
@ -106,11 +106,12 @@ class UserModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function enigmeMultiEnded(string $mailUtilisateur, int $enigmeId){
|
|
|
|
public function enigmeMultiEnded(string $mailUtilisateur, int $enigmeId){
|
|
|
|
$end_time = $_SESSION['tpsMaxPartie'];
|
|
|
|
$idPartie = $_SESSION['idPartie'];
|
|
|
|
|
|
|
|
$dateDebut = $this->partie_gateway->getDateDebut($idPartie);
|
|
|
|
|
|
|
|
$end_time = $dateDebut->modify('+'. $_SESSION['tpsMaxPartie'] .'seconds');
|
|
|
|
$now = new DateTime();
|
|
|
|
$now = new DateTime();
|
|
|
|
$interval = $now->diff($end_time);
|
|
|
|
$interval = $now->diff($end_time);
|
|
|
|
$tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s;
|
|
|
|
$tempDeResolution = $interval->days * 24 * 60 * 60 + $interval->h * 60 * 60 + $interval->i * 60 + $interval->s;
|
|
|
|
$idPartie = $_SESSION['idPartie'];
|
|
|
|
|
|
|
|
$result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie);
|
|
|
|
$result = $this->resoudre_gateway->getMaxClassement($enigmeId, $idPartie);
|
|
|
|
if ($result == 0){
|
|
|
|
if ($result == 0){
|
|
|
|
$classement = 1;
|
|
|
|
$classement = 1;
|
|
|
|