From c90ed683e4add3e0e87465769a8a0f0452163bee Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sat, 4 Jul 2026 01:48:43 +0000 Subject: [PATCH] a --- Controleur/ControleurPrestations.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Controleur/ControleurPrestations.php b/Controleur/ControleurPrestations.php index 17b11d5d..05f2c44e 100755 --- a/Controleur/ControleurPrestations.php +++ b/Controleur/ControleurPrestations.php @@ -104,8 +104,20 @@ class ControleurPrestations extends Controleur { file_put_contents($chemin, $data); $rand = rand(1,1000000); + $rand2 = rand(1,1000000); $nomImage = $username."_".$rand.'.'. $extension; - $nomImageCrypte_0 = $username."_".$rand.'.bin'; + + if($_SESSION['crypterPhoto']=="1") + { + $nomImageCrypte_0 = $username."_".$rand.'.bin'; + } + else + { + $nomImageCrypte_0 = $username."_".$rand2.'.jpg'; + } + + // $nomImageCrypte_0 = $username."_".$rand.'.bin'; + $nomImageCrypte = $_SESSION['lienPhotoFace'] . $nomImageCrypte_0; if ($compare_face=="1") @@ -231,7 +243,6 @@ class ControleurPrestations extends Controleur { $this->beneficiaire->registerface($username); $idBeneficiaire = $_SESSION['idBeneficiaire_C']; - // $this->beneficiaire->changerPhoto($idBeneficiaire, $nomImage); $this->beneficiaire->changerPhoto($idBeneficiaire, $nomImageCrypte_0); $_SESSION['messageFace'] = "Enrôlement effectué avec succès! / Enrollment completed successfully!!";