From 37cdd36c8952806a8b4d4eb328414c3a3811a058 Mon Sep 17 00:00:00 2001 From: KANE LAZENI Date: Sun, 4 Jan 2026 10:15:23 +0000 Subject: [PATCH] a --- Modele/Beneficiaire.php | 35 +++++++++++++-------------------- Vue/Fichebeneficiaire/index.php | 8 ++++++++ Vue/gabarit.php | 25 ++++++++++++++++++++++- 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/Modele/Beneficiaire.php b/Modele/Beneficiaire.php index ae13c3b..25254be 100755 --- a/Modele/Beneficiaire.php +++ b/Modele/Beneficiaire.php @@ -156,18 +156,15 @@ class Beneficiaire extends Modele { $_SESSION['faceRegistered_C'] = $context['faceRegistered']; $photoFace = ""; - - if ($_SESSION['lienPhoto_C']>" ") + $photo = ""; + $_SESSION['photoAssureCrypte'] = ""; + + if ($_SESSION['faceRegistered_C'] == "1" && $_SESSION['lienPhoto_C']>" ") { - $photoFace = $_SESSION['dossierSociete'].$_SESSION['dossierSociete'].'/Photos/'.$_SESSION['lienPhoto_C']; - /* - if(!@fopen($photoFace, 'r')) - { - $_SESSION['lienPhoto_C'] = ""; - } - */ + $photo = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$_SESSION['lienPhoto_C']; + $_SESSION['photoAssureCrypte'] = $photo; } - + $photoFace = $photo; } public function getContexteBeneficiaireAssure($id) { @@ -214,20 +211,16 @@ class Beneficiaire extends Modele { $_SESSION['fraisFunerairePaye_C'] = $context['fraisFunerairePaye']; $_SESSION['garantieArchive_C'] = $context['garantieArchive']; - // vérifier que la photo du bénéficiaire existe - $photoFace = ""; - - if ($_SESSION['lienPhoto_C']>" ") + $photo = ""; + $_SESSION['photoAssureCrypte'] = ""; + + if ($_SESSION['faceRegistered_C'] == "1" && $_SESSION['lienPhoto_C']>" ") { - $photoFace = $_SESSION['dossierSociete'].$_SESSION['dossierSociete'].'/Photos/'.$_SESSION['lienPhoto_C']; - /* - if(!@fopen($photoFace, 'r')) - { - $_SESSION['lienPhoto_C'] = ""; - } - */ + $photo = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$_SESSION['lienPhoto_C']; + $_SESSION['photoAssureCrypte'] = $photo; } + $photoFace = $photo; } public function getContexteAdherentId($id) { diff --git a/Vue/Fichebeneficiaire/index.php b/Vue/Fichebeneficiaire/index.php index 407a9f1..825dc1f 100644 --- a/Vue/Fichebeneficiaire/index.php +++ b/Vue/Fichebeneficiaire/index.php @@ -284,6 +284,14 @@ +Photo du bénéficiaire +
diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 75ef358..59108e5 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -53,6 +53,10 @@ function detectActiveMenu($activeLink, $menus, $gabary) { $menuData = detectActiveMenu($activeLink, $menus, $gabary); $activeParentId = $menuData['parent']; $activeChildId = $menuData['child']; + +$imgData = $_SESSION['photoAssureCrypte']; +$photoAssureCrypte = $_SESSION['photoAssureCrypte']; + ?> @@ -577,7 +581,26 @@ $activeChildId = $menuData['child'];
- + + +