Import initial du projet Production
This commit is contained in:
56
Controleur/ControleurAjaxtmadherent.php
Normal file
56
Controleur/ControleurAjaxtmadherent.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Adherent.php';
|
||||
|
||||
class ControleurAjaxtmadherent extends Controleur {
|
||||
private $adherent;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->adherent = new Adherent();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idAdherent = isset($_SESSION['idAdherent_C'])? $_SESSION['idAdherent_C']:"0";
|
||||
|
||||
if($idAdherent > "0")
|
||||
{
|
||||
$adh = $this->ad->trouverAdherentId($idAdherent);
|
||||
}
|
||||
|
||||
$tmadherent = $this->adherent->getTmadherent();
|
||||
|
||||
|
||||
$this->genererVueAjax(array('tmadherent' => $tmadherent));
|
||||
}
|
||||
|
||||
public function controle()
|
||||
{
|
||||
$idAdherent = $this->requete->getParametreFormulaire("idAdherent");
|
||||
|
||||
$maxDateEffetTmAdherent = $this->adherent->getMaxDateEffetTmAdherent($idAdherent);
|
||||
|
||||
$this->genererVueAjax(array('maxDateEffetTmAdherent' => $maxDateEffetTmAdherent));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function inserer()
|
||||
{
|
||||
$idAdherent = $this->requete->getParametreFormulaire("idAdherent");
|
||||
$dateEffet = $this->requete->getParametreDate("dateEffet");
|
||||
$tm = $this->requete->getParametreFormulaire("tm");
|
||||
|
||||
$this->adherent->insererTmadherent($idAdherent, $dateEffet, $tm);
|
||||
|
||||
}
|
||||
|
||||
public function supprimer()
|
||||
{
|
||||
$idTm = $this->requete->getParametreFormulaire("idTm");
|
||||
|
||||
$this->adherent->supprimerTmadherent($idTm);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user