66 lines
1.5 KiB
PHP
Executable File
66 lines
1.5 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tabintermediaires.php';
|
|
|
|
class ControleurAjaxtblisterintermediaires extends Controleur {
|
|
private $inter;
|
|
|
|
public function __construct() {
|
|
$this->inter = new Tabintermediaires();
|
|
}
|
|
|
|
public function index() {
|
|
$tabinter = $this->inter->getlisterintermediaires();
|
|
$existeselection = $this->inter->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'intermediaire' => $tabinter,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
|
|
$this->inter->supprimerintermediaire($id);
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$interdonnee = $this->inter->getid($id);
|
|
|
|
if($interdonnee['choix']=='0'){
|
|
$this->inter->selectionnerune($id);
|
|
}else{
|
|
$this->inter->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->inter->existeSelection();
|
|
if($existeselection){
|
|
$this->inter->deselectionnertoutes();
|
|
}else{
|
|
$this->inter->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->inter->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->inter->supprimerchoix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|