prestation/Controleur/ControleurAjaxlocaliseradherent.php
2025-12-01 18:54:33 +00:00

40 lines
1.1 KiB
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Adherent.php';
class ControleurAjaxlocaliseradherent extends Controleur
{
private $adherent;
public function __construct()
{
$this->adherent = new Adherent();
}
public function index()
{
$codeLocalite = $this->requete->getParametreFormulaire("codeLocalite");
$adherents_in = $this->adherent->getadherentlocalitein($codeLocalite);
$adherents_out = $this->adherent->getadherentlocaliteout($codeLocalite);
$this->genererVueAjax(array('adherents_in' => $adherents_in, 'adherents_out' => $adherents_out));
}
public function ajouteradherentlocalitetous()
{
$codeLocalite = $this->requete->getParametreFormulaire("codeLocalite");
$this->adherent->ajouteradherentlocalitetous($codeLocalite);
}
public function ajouterunadherentlocalite()
{
$codeLocalite = $this->requete->getParametreFormulaire("codeLocalite");
$idAherent = $this->requete->getParametreFormulaire("idAherent");
$this->adherent->ajouterunadherentlocalite($idAherent, $codeLocalite);
}
}