generated from Templates_CodeFirst/templateHtmlCss
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.
30 lines
919 B
30 lines
919 B
<?php
|
|
|
|
class FrontController {
|
|
|
|
public function __construct(){
|
|
|
|
$liste_actions_utilisateur = array('viewPrivateList','ajouterListePrivee', 'deconnection');
|
|
$liste_actions_visiteur = array('goHome','accessSignUp','accessSignIn','signIn','signUp', 'supprimerListe', 'modifierListe', 'ajouterTache', 'supprimerTache', 'modifierTache');
|
|
|
|
global $rep,$vues,$bd,$dataView,$styles,$assets;
|
|
session_start();
|
|
try{
|
|
$user=$_SESSION??null;
|
|
$action = $_REQUEST['action'];
|
|
|
|
if (in_array($action,$liste_actions_utilisateur)){
|
|
if($user == null){
|
|
new VisitorController();
|
|
} else {
|
|
new UserController();
|
|
}
|
|
} else{
|
|
new VisitorController();
|
|
|
|
}
|
|
} catch (Exception $e){require ($rep.$vues['erreur']);}
|
|
}
|
|
}
|
|
|
|
?>
|