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.
28 lines
885 B
28 lines
885 B
<?php
|
|
|
|
class FrontControleur{
|
|
|
|
public function __construct(){
|
|
$liste_actions_utilisateur = array('deconnection','crerListePv','desinscription','changerInfos');
|
|
$liste_actions_visiteur = array('creerListe','suprrListe','connection','inscription','creerTache','cocherTache','supprTache');
|
|
global $rep,$vues;
|
|
require($rep.$vues['acceuil']);
|
|
try{
|
|
$utilisateur = UserModel::IsUtilisateur();
|
|
$action = $_REQUEST['action'];
|
|
|
|
if (in_array($action,$liste_actions_utilisateur)){
|
|
if($utilisateur == null){
|
|
new VisitorController();
|
|
} else {
|
|
new UserController();
|
|
}
|
|
} else{
|
|
new VisitorController();
|
|
}
|
|
} catch (Exception $e){require ($rep.$vues['erreur']);}
|
|
}
|
|
|
|
}
|
|
|
|
?>
|