|
|
@ -94,35 +94,6 @@ class MembreControleur extends UtilisateurControleur
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function creerEvenement()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
global $twig;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($_FILES["image"])) {
|
|
|
|
|
|
|
|
$img = ImageSaver::SaveImage('image');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Validation::validerEvenement($_POST["titre"], $_POST["description"], $_POST["date"], $_POST["nbPlaceMax"], $img[1])) {
|
|
|
|
|
|
|
|
$mdl = new UtilisateurModele();
|
|
|
|
|
|
|
|
$mdl->ajouterEvenement($_POST["titre"], $_POST["description"], $_POST["date"], $_POST["nbPlaceMax"], $img[1]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->listerEvenement();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$dVueErreur[] ="Erreur lors de la création de l'évènement";
|
|
|
|
|
|
|
|
echo $twig->render("erreur.html",['dVueErreur' => $dVueErreur]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
echo $twig->render('creerEvenement.html', []);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function supprimerEvenement(?array $params)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$mdl = new UtilisateurModele();
|
|
|
|
|
|
|
|
$mdl->deleteEvenement($params["id"]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->listerEvenement();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected function proposerOffre()
|
|
|
|
protected function proposerOffre()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
//TODO
|
|
|
|