45 lines
1.2 KiB
PHP
Executable File
45 lines
1.2 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailtarifmedicament.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
|
|
class ControleurAjaxlistemedicaments extends Controleur {
|
|
private $medicament;
|
|
|
|
public function __construct() {
|
|
$this->medicament = new Detailtarifmedicament();
|
|
}
|
|
|
|
public function index($nomsearch="")
|
|
{
|
|
if ($this->requete->existeParametre("valid"))
|
|
{
|
|
$nomsearch = $this->requete->getParametreFormulaire("nomsearch");
|
|
|
|
$mdedicaments_pop = $this->medicament->getmedicamentspossibles($nomsearch);
|
|
}
|
|
else
|
|
{
|
|
$mdedicaments_pop = $this->medicament->getmedicamentvide();
|
|
}
|
|
|
|
$this->genererVueAjax(array('mdedicaments_pop' => $mdedicaments_pop, 'nomsearch' => $nomsearch));
|
|
}
|
|
|
|
public function remplacement($nomsearch="")
|
|
{
|
|
if ($this->requete->existeParametre("valid"))
|
|
{
|
|
$nomsearch = $this->requete->getParametreFormulaire("nomsearch");
|
|
|
|
$mdedicaments_pop = $this->medicament->getmedicamentspossibles($nomsearch);
|
|
}
|
|
else
|
|
{
|
|
$mdedicaments_pop = $this->medicament->getmedicamentvide();
|
|
}
|
|
|
|
$this->genererVueAjax(array('mdedicaments_pop' => $mdedicaments_pop, 'nomsearch' => $nomsearch));
|
|
}
|
|
|
|
} |