46 lines
1.3 KiB
PHP
Executable File
46 lines
1.3 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Adherent.php';
|
|
require_once 'Modele/Collegepolice.php';
|
|
require_once 'Modele/Menuvueutilisateur.php';
|
|
require_once 'Modele/College_temp.php';
|
|
|
|
|
|
class ControleurChangercollege extends Controleur {
|
|
private $menuvue;
|
|
private $adherent;
|
|
private $college;
|
|
private $college_temp;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue('Changercollege');
|
|
|
|
$this->adherent = new Adherent();
|
|
$this->college = (new Collegepolice())->getListeToutes($_SESSION['idPolice_C']);
|
|
$this->college_temp = new College_temp();
|
|
}
|
|
|
|
public function index() {
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
$idAdherent = $_SESSION['idAdherent_C'];
|
|
$adherent = $this->adherent->getAdherentId($idAdherent);
|
|
$collegeTemp = $this->college_temp->init_changement_college($idAdherent);
|
|
|
|
$this->genererVue(array('adherent' => $adherent, 'college' => $this->college, 'collegeTemp' => $collegeTemp));
|
|
}
|
|
|
|
public function changercollege() {
|
|
$idAdherent = $_SESSION['idAdherent_C'];
|
|
$this->college_temp->changer_college($idAdherent);
|
|
$this->rediriger("Ficheadherent/".$idAdherent);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|