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

33 lines
1020 B
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Affection.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurTblisteaffection extends Controleur {
private $menuvue;
private $affection;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuGestionTatbles('affection');
$this->affection = new Affection();
}
public function index($codesearch="",$libellesearch="") {
if (isset($_POST['codesearch']))
{
$codesearch=$_POST['codesearch'];
$libellesearch=$_POST['libellesearch'];
}
$affections = $this->affection->getAffections($codesearch,$libellesearch);
$this->genererVue(array('affections' => $affections, 'codesearch' => $codesearch, 'libellesearch' => $libellesearch));
}
public function supprimer() {
$id = $this->requete->getParametre("id");
$this->affection->supprimer($id);
$this->rediriger("Tblisteaffection");
}
}