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

33 lines
968 B
PHP

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Titre.php';
require_once 'Modele/Menuvueutilisateur.php';
class ControleurTblistetitre extends Controleur {
private $menuvue;
private $titre;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuGestionTatbles('titre');
$this->titre = new titre();
}
public function index($codesearch="",$libellesearch="") {
if (isset($_POST['codesearch']))
{
$codesearch=$_POST['codesearch'];
$libellesearch=$_POST['libellesearch'];
}
$titres = $this->titre->getTitres($codesearch,$libellesearch);
$this->genererVue(array('titres' => $titres, 'codesearch' => $codesearch, 'libellesearch' => $libellesearch));
}
public function supprimer() {
$id = $this->requete->getParametre("id");
$this->titre->supprimer($id);
$this->rediriger("Tblistetitre");
}
}