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
1005 B
30 lines
1005 B
<?php
|
|
|
|
class FrontController {
|
|
|
|
public function __construct(){
|
|
|
|
$liste_actions_utilisateur = array('viewPrivateList','addPrivateList', 'accessAddListPrivee', 'deconnection', "accessModifyListPriv");
|
|
$liste_actions_visiteur = array('accessListInfos', 'goHome','accessSignUp','accessSignIn','signIn','signUp', 'addListVis', 'delList', 'accessAddListVis', 'accessAddTask', 'deleteTask', 'modifierTache', "addTask");
|
|
|
|
global $rep,$vues,$bd,$dataView,$styles,$assets;
|
|
session_start();
|
|
try{
|
|
$user=$_SESSION??null;
|
|
$action = $_REQUEST['action']??null;
|
|
|
|
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']);}
|
|
}
|
|
}
|
|
|
|
?>
|