menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Modifieradherent'); $this->adherent = new Adherent(); $this->beneficiaire = new Beneficiaire(); $this->naturepiece = (new Naturepiece())->getListe(); $this->sexe = (new Sexe())->getListe(); $this->situationfamille = (new Situationfamille())->getListe(); // $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']); $this->pays = new Pays(); $this->groupesanguin = (new Groupesanguin())->getListe(); $this->tarif = new Tarif(); $this->college = (new Collegepolice())->getListeToutes($_SESSION['idPolice_C']); $this->ville = new Ville(); $this->localite = new Localite(); } public function index() { $idPolice = $_SESSION['idPolice_C']; $id = $this->requete->getParametre("id"); $adherent = $this->adherent->getAdherentIdConso($id); $codePays = $adherent['codePays']; $codeVille = $adherent['codeVille']; // $codeLocalite = $client['codeLocalite']; $pays = $this->pays->getListe($codePays); $ville = $this->ville->getListe($codePays); $localite = $this->localite->getListe($codePays, $codeVille); $this->genererVue(array('adherent' => $adherent, 'college' => $this->college, 'naturepiece' => $this->naturepiece, 'sexe' => $this->sexe, 'pays' => $pays, 'situationfamille' => $this->situationfamille, 'groupesanguin' => $this->groupesanguin, 'ville' => $ville, 'localite' => $localite)); } public function modifier($prenoms=null) { $id = $this->requete->getParametre("id"); // $idCollege = $this->requete->getParametre("idCollege"); $idPolice = $_SESSION['idPolice_C']; $nom = $this->requete->getParametre("nom"); $prenoms = $this->requete->getParametreFormulaire("prenoms"); $codeNaturePiece = $this->requete->getParametre("codeNaturePiece"); $numeroPiece = $this->requete->getParametreFormulaire("numeroPiece"); $sexe = $this->requete->getParametreFormulaire("sexe"); $dateNaissance = $this->requete->getParametreDate("dateNaissance"); $codeGroupeSanguin = $this->requete->getParametreFormulaire("codeGroupeSanguin"); $codeSituationFamille = $this->requete->getParametreFormulaire("codeSituationFamille"); $nombreEnfants = $this->requete->getParametreFormulaire("nombreEnfants"); $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); $adressePostale = $this->requete->getParametreFormulaire("adressePostale"); $codePays = $this->requete->getParametre("codePays"); $telephonFixe = $this->requete->getParametreFormulaire("telephonFixe"); $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); $email = $this->requete->getParametreFormulaire("email"); $dateEntree = $this->requete->getParametreDate("dateEntree"); $codeLocalite = $this->requete->getParametre("codeLocalite"); // echo "codeLocalite => $codeLocalite"; // exit(); $this->adherent->modifier($id, $nom, $prenoms, $codeNaturePiece, $numeroPiece, $sexe, $dateNaissance, $codeGroupeSanguin, $codeSituationFamille, $nombreEnfants, $adresseGeo, $adressePostale, $codePays, $telephonFixe, $telephonePortable, $email, $codeLocalite); $idAdherent = $id; // $this->rediriger("Ficheadherent/".$id); $codeTypeContrat = $_SESSION['codeTypeContrat']; if($codeTypeContrat=="F") { $this->rediriger("Ficheadherentfamiliale/".$idAdherent); exit(); } else { $this->rediriger("Ficheadherent/".$idAdherent); exit(); } } }