66 lines
1.5 KiB
PHP
66 lines
1.5 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabbureau.php';
|
|
|
|
class ControleurAjaxtblisterbureau extends Controleur {
|
|
private $bureau;
|
|
|
|
public function __construct() {
|
|
$this->bureau = new Tabbureau();
|
|
}
|
|
|
|
public function index() {
|
|
$tabbureau = $this->bureau->getlisterbureau();
|
|
$existeselection = $this->bureau->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'bureau' => $tabbureau,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
|
|
$this->bureau->supprimerbureau($id);
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$bureaudonnee = $this->bureau->getid($id);
|
|
|
|
if($bureaudonnee['choix']=='0'){
|
|
$this->bureau->selectionnerune($id);
|
|
}else{
|
|
$this->bureau->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->bureau->existeSelection();
|
|
if($existeselection){
|
|
$this->bureau->deselectionnertoutes();
|
|
}else{
|
|
$this->bureau->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->bureau->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->bureau->supprimerchoix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|