66 lines
1.4 KiB
PHP
Executable File
66 lines
1.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabtitre.php';
|
|
|
|
class ControleurAjaxtblistertitre extends Controleur {
|
|
private $titre;
|
|
|
|
public function __construct() {
|
|
$this->titre = new Tabtitre();
|
|
}
|
|
|
|
public function index() {
|
|
$tabtitre = $this->titre->getlistertitre();
|
|
$existeselection = $this->titre->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'titre' => $tabtitre,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
|
|
$this->titre->supprimertitre($id);
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$titredonnee = $this->titre->getid($id);
|
|
|
|
if($titredonnee['choix']=='0'){
|
|
$this->titre->selectionnerune($id);
|
|
}else{
|
|
$this->titre->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->titre->existeSelection();
|
|
if($existeselection){
|
|
$this->titre->deselectionnertoutes();
|
|
}else{
|
|
$this->titre->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->titre->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->titre->supprimerchoix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|