foreach ($lAdherentCompte as $lAdh) { if ($lAdh->getId() == $lAdherent->getCptIdAdherentPrincipal()) { $lSelected = 'selected="selected"'; } else { $lSelected = ''; } $lTemplate->assign_block_vars('adherent', array('id' => $lAdh->getId(), 'numero' => $lAdh->getNumero(), 'nom' => $lAdh->getNom(), 'prenom' => $lAdh->getPrenom(), 'selected' => $lSelected)); } } } $lTemplate->assign_var_from_handle('ADHERENT_PRINCIPAL', 'listeAdherent'); $lTemplate->assign_vars(array('nom' => $lAdherent->getAdhNom(), 'prenom' => $lAdherent->getAdhPrenom(), 'courrielPrincipal' => $lAdherent->getAdhCourrielPrincipal(), 'courrielSecondaire' => $lAdherent->getAdhCourrielSecondaire(), 'telephonePrincipal' => $lAdherent->getAdhTelephonePrincipal(), 'telephoneSecondaire' => $lAdherent->getAdhTelephoneSecondaire(), 'adresse' => $lAdherent->getAdhAdresse(), 'codePostal' => $lAdherent->getAdhCodePostal(), 'ville' => $lAdherent->getAdhVille(), 'commentaire' => $lAdherent->getAdhCommentaire())); InfobullesUtils::generer($lTemplate); // Messages d'erreur // Affichage des dates si elles ne sont pas nulle if (!StringUtils::dateEstNulle($lAdherent->getAdhDateNaissance())) { $lTemplate->assign_vars(array('dateNaissance' => StringUtils::dateDbToFr($lAdherent->getAdhDateNaissance()))); } // Pied de Page $lTemplate->set_filenames(array('piedPage' => COMMUN_TEMPLATE . 'PiedPage.html')); $lTemplate->assign_vars(array('PROP_NOM' => PROP_NOM, 'PROP_ADRESSE' => PROP_ADRESSE, 'PROP_CODE_POSTAL' => PROP_CODE_POSTAL, 'PROP_VILLE' => PROP_VILLE, 'PROP_TEL' => PROP_TEL, 'PROP_MEL' => PROP_MEL, 'ZEYBUX_TITRE_SITE' => ZEYBUX_TITRE_SITE)); $lTemplate->assign_var_from_handle('PIED_PAGE', 'piedPage'); // Affichage $lTemplate->pparse('body'); break; case "information": if (isset($_POST['idAdherentPrincipal']) && isset($_POST['nom']) && isset($_POST['prenom']) && isset($_POST['date_naissance']) && isset($_POST['commentaire']) && isset($_POST['courriel_principal']) && isset($_POST['courriel_secondaire']) && isset($_POST['telephone_principal']) && isset($_POST['telephone_secondaire']) && isset($_POST['adresse']) && isset($_POST['code_postal']) && isset($_POST['ville'])) { $lParam = array("id_adherent" => $_SESSION[DROIT_ID], "idAdherentPrincipal" => $_POST['idAdherentPrincipal'], "nom" => $_POST['nom'], "prenom" => $_POST['prenom'], "dateNaissance" => StringUtils::dateFrToDb($_POST['date_naissance']), "commentaire" => $_POST['commentaire'], "courrielPrincipal" => $_POST['courriel_principal'], "courrielSecondaire" => $_POST['courriel_secondaire'], "telephonePrincipal" => $_POST['telephone_principal'], "telephoneSecondaire" => $_POST['telephone_secondaire'], "adresse" => $_POST['adresse'], "codePostal" => $_POST['code_postal'], "ville" => $_POST['ville']); $lVr = $lControleur->modifierInformation($lParam); $lLogger->log("Modification des informations du compte de l'Adhérent : " . $_SESSION[ID_CONNEXION], PEAR_LOG_INFO); // Maj des logs
$lAdherent = $lCompte->getAdherent(); $lAdherentPrincipal = ''; if ($lAdherent->getAdhId() == $lAdherent->getCptIdAdherentPrincipal()) { $lAdherentPrincipal = 'Adhérent Principal'; } else { $lAdherentPrincipal = 'Adhérent Secondaire'; } $lTemplate->assign_vars(array('adhNumero' => $lAdherent->getAdhNumero(), 'adhNom' => $lAdherent->getAdhNom(), 'cptLabel' => $lAdherent->getCptLabel(), 'adhPrenom' => $lAdherent->getAdhPrenom(), 'adhCourrielPrincipal' => $lAdherent->getAdhCourrielPrincipal(), 'adhCourrielSecondaire' => $lAdherent->getAdhCourrielSecondaire(), 'adhTelephonePrincipal' => $lAdherent->getAdhTelephonePrincipal(), 'adhTelephoneSecondaire' => $lAdherent->getAdhTelephoneSecondaire(), 'adhAdresse' => $lAdherent->getAdhAdresse(), 'adhCodePostal' => $lAdherent->getAdhCodePostal(), 'adhVille' => $lAdherent->getAdhVille(), 'adhCommentaire' => $lAdherent->getAdhCommentaire(), 'adherentPrincipal' => $lAdherentPrincipal)); // Affichage des dates si elles ne sont pas nulle if (!StringUtils::dateEstNulle($lAdherent->getAdhDateNaissance())) { $lTemplate->assign_vars(array('adhDateNaissance' => StringUtils::dateDbToFr($lAdherent->getAdhDateNaissance()))); } if (!StringUtils::dateEstNulle($lAdherent->getAdhDateAdhesion())) { $lTemplate->assign_vars(array('adhDateAdhesion' => StringUtils::dateDbToFr($lAdherent->getAdhDateAdhesion()))); } if (!StringUtils::dateEstNulle($lAdherent->getAdhDateMaj())) { $lTemplate->assign_vars(array('adhDateMaj' => StringUtils::dateDbToFr($lAdherent->getAdhDateMaj()))); } if ($lCompte->getNbAdhesionEnCours() > 0) { $lTemplate->set_filenames(array('adhesion' => MOD_MON_COMPTE . '/' . 'AdhesionOK.html')); } else { $lTemplate->set_filenames(array('adhesion' => MOD_MON_COMPTE . '/' . 'AdhesionKO.html')); } $lTemplate->assign_var_from_handle('ADHESION', 'adhesion'); // Ajout des informations du compte dans le body $lTemplate->assign_var_from_handle('INFO_COMPTE_SOLDE_ADHERENT', 'infoAdherent'); $lTemplate->set_filenames(array('listeOperationAdherent' => MOD_MON_COMPTE . '/ListeOperationAdherent.html')); $lTemplate->assign_vars(array('sigleMonetaire' => SIGLE_MONETAIRE, 'cptSolde' => StringUtils::affichageMonetaireFr($lAdherent->getCptSolde()))); $lListeOperation = $lCompte->getOperationPassee(); // Pagination des opérations $lNombreDePages = ceil(count($lListeOperation) / NB_OPE_PAGE);