collegetype = new collegetype(); } public function index(){ $this->genererVueAjax(); } public function ajouter(){ $codeCollegeType = strtoupper($this->requete->getParametreFormulaire("codeCollegeType")); if (est_anglophone()) { $libelle = strtoupper($this->requete->getParametreFormulaire("libelleEng")); } else{ $libelle = strtoupper($this->requete->getParametreFormulaire("libelle")); } if(empty($codeCollegeType) && empty($libelle)) { die(); } if (!($this->collegetype->existeLigne($codeCollegeType))) { $this->collegetype->ajouter($codeCollegeType,$libelle); } else{ echo 'Erreur: Le code saisi existe déjà! Veuillez saisir un autre./Error : The code entered, already exists! Please enter another.'; die(); } } public function enregistrermodif() { $idTable = $this->requete->getParametreFormulaire("idTable"); $libelle = strtoupper($this->requete->getParametreFormulaire("libelle")); $this->collegetype->enregistrermodif($idTable, $libelle); } public function supprimer() { $idTable = $this->requete->getParametreFormulaire("idTable"); $this->collegetype->supprimer($idTable); } }