|
|
|
@ -11,10 +11,6 @@ class MembreControleur extends UtilisateurControleur
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
public function deconnexion()
|
|
|
|
|
{
|
|
|
|
|
global $twig;
|
|
|
|
|
|
|
|
|
|
protected function deconnexion()
|
|
|
|
|
{
|
|
|
|
|
session_unset();
|
|
|
|
|
session_destroy();
|
|
|
|
@ -22,6 +18,7 @@ class MembreControleur extends UtilisateurControleur
|
|
|
|
|
header("Location: /SAE_2A_FA-Reseau_ALICA/php/");
|
|
|
|
|
exit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function createOfferForm()
|
|
|
|
|
{
|
|
|
|
|
global $twig;
|
|
|
|
@ -104,7 +101,7 @@ class MembreControleur extends UtilisateurControleur
|
|
|
|
|
$MemberModel->deleteOffer($offre);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
$this->consultOffers();
|
|
|
|
|
$this->consultOffers(null);
|
|
|
|
|
|
|
|
|
|
/*$offre = $MemberModel->getOfferFromId($id);
|
|
|
|
|
|
|
|
|
@ -138,50 +135,44 @@ class MembreControleur extends UtilisateurControleur
|
|
|
|
|
public function displayExperience()
|
|
|
|
|
{
|
|
|
|
|
global $twig;
|
|
|
|
|
|
|
|
|
|
if (isset($_GET["id"]) && intval($_GET["id"]) != null)
|
|
|
|
|
{
|
|
|
|
|
$experienceModel = new MembreModele();
|
|
|
|
|
$exp = $experienceModel->getExperienceFromProfil(intval($_GET["id"]));
|
|
|
|
|
$exp = $experienceModel->getExperienceByProfil($_SESSION["id"]);
|
|
|
|
|
if($exp != NULL)
|
|
|
|
|
{
|
|
|
|
|
echo $twig->render("detailExperience.html",['experience' => $exp]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$dVueErreur[] = "Erreur, Expérience(s) introuvable";
|
|
|
|
|
echo $twig->render("erreur.html", ['dVueErreur' => $dVueErreur]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function experienceForm()
|
|
|
|
|
public function experienceForm()
|
|
|
|
|
{
|
|
|
|
|
global $twig;
|
|
|
|
|
echo $twig->render("CreerExperience.html", []);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function addExperience()
|
|
|
|
|
public function addExperience()
|
|
|
|
|
{
|
|
|
|
|
global $twig;
|
|
|
|
|
|
|
|
|
|
if (!Validation::validerExperience($_POST["intitule"], $_POST["dateDeb"], $_POST["dateFin"], $_POST["nomEntreprise"], $_POST["currentJob"])) {
|
|
|
|
|
if (!Validation::validerExperience($_SESSION["id"], $_POST["intitule"], $_POST["dateDeb"], $_POST["dateFin"], $_POST["nomEntreprise"], $_POST["currentJob"])) {
|
|
|
|
|
$modele = new MembreModele();
|
|
|
|
|
$modele->addExperience($_POST["intitule"], $_POST["dateDeb"], $_POST["dateFin"], $_POST["nomEntreprise"], $_POST["currentJob"]);
|
|
|
|
|
$modele->addExperience($_SESSION["id"], $_POST["intitule"], $_POST["dateDeb"], $_POST["dateFin"], $_POST["nomEntreprise"], $_POST["currentJob"]);
|
|
|
|
|
|
|
|
|
|
$this->listerExperience();
|
|
|
|
|
$this->displayExperience($_SESSION["id"]);
|
|
|
|
|
echo $twig->render('creerExperience.html', []);
|
|
|
|
|
} else {
|
|
|
|
|
$dVueErreur[] ="Erreur lors de la création de l'évènement";
|
|
|
|
|
echo $twig->render("erreur.html",['dVueErreur' => $dVueErreur]);
|
|
|
|
|
} else {
|
|
|
|
|
echo $twig->render('creerExperience.html', []);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function deleteEvenement()
|
|
|
|
|
|
|
|
|
|
public function deleteExperience(?array $params)
|
|
|
|
|
{
|
|
|
|
|
global $twing;
|
|
|
|
|
$mdl = new MembreModele();
|
|
|
|
|
$mdl->deleteEvenement($_GET["id"]);
|
|
|
|
|
|
|
|
|
|
$this->listerExperience();
|
|
|
|
|
$mdl->deleteExperience($params['id2']);
|
|
|
|
|
$this->displayExperience($_SESSION["id"]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|