Import initial du projet Production
This commit is contained in:
35
Controleur/ControleurAjaxtbajouterlocalite.php
Normal file
35
Controleur/ControleurAjaxtbajouterlocalite.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Tablocalite.php';
|
||||
|
||||
class ControleurAjaxtbajouterlocalite extends Controleur {
|
||||
private $local;
|
||||
|
||||
public function __construct() {
|
||||
$this->local = new Tablocalite();
|
||||
}
|
||||
|
||||
public function index() {
|
||||
|
||||
$tabpays = $this->local->getpayslocalite();
|
||||
$tabville = array();
|
||||
|
||||
$this->genererVueAjax(array(
|
||||
'pays' => $tabpays,
|
||||
'ville' => $tabville
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
public function ajouter(){
|
||||
|
||||
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
||||
$codePays = strtoupper($this->requete->getParametreFormulaire("codePays"));
|
||||
$codeVille = strtoupper($this->requete->getParametreFormulaire("codeVille"));
|
||||
$this->local->ajouterlocalite($codePays,$codeVille,$libelle);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user