36 lines
1.1 KiB
PHP
Executable File
36 lines
1.1 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabtypeaffection.php';
|
|
require_once 'Modele/Ouinon.php';
|
|
|
|
class ControleurAjaxtbajoutertypeaffection extends Controleur {
|
|
private $typea;
|
|
|
|
public function __construct() {
|
|
$this->typea = new Tabtypeaffection();
|
|
$this->ouinonoptionnelle = (new Ouinon())->getListe();
|
|
$this->ouinonplafondmodifiable = (new Ouinon())->getListe();
|
|
}
|
|
|
|
public function index() {
|
|
|
|
$this->genererVueAjax(array(
|
|
'ouinonoptionnelle' => $this->ouinonoptionnelle,
|
|
'ouinonplafondmodifiable' => $this->ouinonplafondmodifiable,
|
|
));
|
|
}
|
|
|
|
public function ajouter(){
|
|
|
|
$libelle = strtoupper($this->requete->getParametreFormulaire("libelle"));
|
|
$libelleEng = strtoupper($this->requete->getParametreFormulaire("libelleEng"));
|
|
$maladieChronique = $this->requete->getParametreFormulaire("maladieChronique");
|
|
|
|
$this->typea->ajoutertypeaffection($libelle,$libelleEng,$maladieChronique);
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|