40 lines
1.3 KiB
PHP
Executable File
40 lines
1.3 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tablocalite.php';
|
|
|
|
class ControleurAjaxtbmodifierlocalite extends Controleur {
|
|
private $local;
|
|
|
|
public function __construct() {
|
|
$this->local = new Tablocalite();
|
|
}
|
|
|
|
public function index() {
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$local = $this->local->getlocalite($id);
|
|
$tabpays = $this->local->getpayslocalite();
|
|
$tabville = $this->local->getvillelocalite($local['codePays']);
|
|
|
|
$this->genererVueAjax(array(
|
|
'localite' => $local,
|
|
'pays' => $tabpays,
|
|
'ville' => $tabville
|
|
));
|
|
}
|
|
|
|
public function modifier(){
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$codePays = strtoupper($this->requete->getParametreFormulaire("codePays"));
|
|
$codeVille = strtoupper($this->requete->getParametreFormulaire("codeVille"));
|
|
$codeLocalite = strtoupper($this->requete->getParametreFormulaire("codeLocalite"));
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
|
|
$this->local->modifierlocalite($codePays,$codeVille,$codeLocalite,$libelle,$id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|