You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
61 lines
1.3 KiB
<?php
|
|
|
|
namespace controleur;
|
|
|
|
use config\Validation;
|
|
|
|
class UtilisateurControleur
|
|
{
|
|
public function __construct()
|
|
{
|
|
global $twig;
|
|
if (!isset($_REQUEST["action"])) {
|
|
$action = NULL;
|
|
} else {
|
|
$action = Validation::nettoyerString($_REQUEST["action"]);
|
|
}
|
|
switch ($action) {
|
|
case NULL:
|
|
case "accueil":
|
|
$this->accueil();
|
|
break;
|
|
case "connection":
|
|
$this->connection();
|
|
break;
|
|
case "inscription":
|
|
$this->inscription();
|
|
break;
|
|
case "consulterProfilLimite":
|
|
$this->consulterProfilLimite();
|
|
break;
|
|
default:
|
|
$dVueErreur[] ="Action inconnue ou non autorisée";
|
|
echo $twig->render("erreur.html",['dVueEreur' => $dVueErreur]);
|
|
|
|
}
|
|
}
|
|
|
|
protected function connection()
|
|
{
|
|
global $twig;
|
|
echo $twig->render('connection.html', []);
|
|
}
|
|
|
|
protected function inscription()
|
|
{
|
|
global $twig;
|
|
echo $twig->render('inscription.html', []);
|
|
}
|
|
|
|
protected function accueil()
|
|
{
|
|
global $twig;
|
|
echo $twig->render('accueil.html', []);
|
|
}
|
|
|
|
protected function consulterProfilLimite()
|
|
{
|
|
//TODO
|
|
}
|
|
|
|
} |