64 lines
1.5 KiB
PHP
Executable File
64 lines
1.5 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Tablienparente.php';
|
|
|
|
class ControleurAjaxtblisterlienparente extends Controleur {
|
|
private $lienparente;
|
|
|
|
public function __construct() {
|
|
$this->lienparente = new Tablienparente();
|
|
}
|
|
|
|
public function index() {
|
|
$tablienparente = $this->lienparente->getlisterlienparente();
|
|
$existeselection = $this->lienparente->existeSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'lienparente' => $tablienparente,
|
|
'existeselection' => $existeselection
|
|
));
|
|
}
|
|
|
|
public function selectionneun(){
|
|
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$lienparentedonnee = $this->lienparente->getid($id);
|
|
|
|
if($lienparentedonnee['choix']=='0'){
|
|
$this->lienparente->selectionnerune($id);
|
|
}else{
|
|
$this->lienparente->deselectionnerune($id);
|
|
}
|
|
}
|
|
|
|
public function selectionnetout(){
|
|
$existeselection = $this->lienparente->existeSelection();
|
|
if($existeselection){
|
|
$this->lienparente->deselectionnertoutes();
|
|
}else{
|
|
$this->lienparente->selectionnertoutes();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function supprimer(){
|
|
$id = $this->requete->getParametreFormulaire('id');
|
|
$this->lienparente->supprimerlienparente($id);
|
|
}
|
|
|
|
public function supprimerTout(){
|
|
|
|
$this->lienparente->supprimertoutes();
|
|
|
|
}
|
|
|
|
public function supprimerChoix(){
|
|
|
|
$this->lienparente->supprimerchoix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|