|
|
|
@ -18,7 +18,7 @@ class UtilisateurControleur
|
|
|
|
|
global $twig;
|
|
|
|
|
if (!isset($_REQUEST["action"])) {
|
|
|
|
|
//$action = NULL;
|
|
|
|
|
$action = "creerOffre";
|
|
|
|
|
$action = "consultOffers";
|
|
|
|
|
} else {
|
|
|
|
|
$action = \App\config\Validation::nettoyerString($_REQUEST["action"]);
|
|
|
|
|
}
|
|
|
|
@ -33,8 +33,8 @@ class UtilisateurControleur
|
|
|
|
|
case "inscription":
|
|
|
|
|
$this->inscription();
|
|
|
|
|
break;
|
|
|
|
|
case "consulterOffres":
|
|
|
|
|
$this->consulterOffres();
|
|
|
|
|
case "consultOffers":
|
|
|
|
|
$this->consultOffers();
|
|
|
|
|
break;
|
|
|
|
|
case "consulterProfilLimite":
|
|
|
|
|
$this->consulterProfilLimite();
|
|
|
|
@ -103,15 +103,15 @@ class UtilisateurControleur
|
|
|
|
|
//TODO
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function consulterOffres()
|
|
|
|
|
protected function consultOffers()
|
|
|
|
|
{
|
|
|
|
|
$offreMdl = new OffreModele();
|
|
|
|
|
$offerMdl = new OffreModele();
|
|
|
|
|
global $twig;
|
|
|
|
|
$twig->addExtension(new TwigExtensions()); // Ajouter l'extension personnalisée à l'environnement Twig
|
|
|
|
|
|
|
|
|
|
$offres = $offreMdl->getOffers();
|
|
|
|
|
echo $twig->render('offreDetail.html', []);
|
|
|
|
|
//echo $twig->render('offres.html', ['offres' => $offres]);
|
|
|
|
|
$offers = $offerMdl->getOffers();
|
|
|
|
|
|
|
|
|
|
echo $twig->render('offres.html', ['offres' => $offers]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function creerOffre()
|
|
|
|
@ -129,7 +129,7 @@ class UtilisateurControleur
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (isset($_FILES['image'])) {
|
|
|
|
|
$typesMime = array('image/jpeg', 'image/png', 'image/gif', 'image/bmp');
|
|
|
|
|
$typesMime = array('image/jpeg', 'image/png', 'image/gif', 'image/bmp','image/webp');
|
|
|
|
|
|
|
|
|
|
$file = $_FILES['image']['tmp_name'];
|
|
|
|
|
|
|
|
|
@ -178,6 +178,7 @@ class UtilisateurControleur
|
|
|
|
|
if($offre != NULL)
|
|
|
|
|
{
|
|
|
|
|
echo $twig->render("OffreDetailTest.html",['offre' => $offre]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|