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