pv = new Tabpointvente(); $this->loc = new Tablocalite(); } public function index() { $typepv = $this->pv->gettypepointvente(); $pays = $this->loc->getpayslocalite(); $ville = array(); $localite = array(); $this->genererVueAjax(array( 'typepointvente' => $typepv, 'pays' => $pays, 'ville' => $ville, 'localite' => $localite, )); } public function ajouter(){ $codePointVente = strtoupper($this->requete->getParametreFormulaire("codePointVente")); if (!$this->pv->existeligne($codePointVente)){ $libelle = strtoupper($this->requete->getParametreFormulaire("libelle")); $codeTypePointVente = strtoupper($this->requete->getParametreFormulaire("codeTypePointVente")); $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); $adressePost = $this->requete->getParametreFormulaire("adressePost"); $telephone = $this->requete->getParametreFormulaire("telephone"); $fax = $this->requete->getParametreFormulaire("fax"); $email = $this->requete->getParametreFormulaire("email"); $codePays = strtoupper($this->requete->getParametreFormulaire("codePays")); $codeVille = strtoupper($this->requete->getParametreFormulaire("codeVille")); $codeLocalite = strtoupper($this->requete->getParametreFormulaire("codeLocalite")); $this->pv->ajouterpointvente($codePointVente,$libelle,$codeTypePointVente,$adresseGeo, $adressePost,$telephone,$fax,$email,$codePays,$codeVille,$codeLocalite); }else{ echo 'Erreur: Le code saisi existe déjà! Veuillez entrer un autre./Error : The code entered already exists! Please enter another.'; die(); } } }