Import initial du projet Production
This commit is contained in:
47
Controleur/ControleurChangercollege.php
Normal file
47
Controleur/ControleurChangercollege.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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);
|
||||
|
||||
$chemin = $this->menuvue->getChemin('Changercollege');
|
||||
|
||||
$this->genererVue(array('adherent' => $adherent, 'college' => $this->college, 'collegeTemp' => $collegeTemp, 'chemin' => $chemin));
|
||||
}
|
||||
|
||||
public function changercollege() {
|
||||
$idAdherent = $_SESSION['idAdherent_C'];
|
||||
$this->college_temp->changer_college($idAdherent);
|
||||
$this->rediriger("Ficheadherent/".$idAdherent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user