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
881 B
30 lines
881 B
<?php
|
|
|
|
class frontController {
|
|
|
|
function __construct() {
|
|
global $rep, $vues;
|
|
session_start();
|
|
$dVueErreur = array();
|
|
$listActionUser=array('delete', 'update', 'ajouterListeU', 'supprimerListeU', 'modifierListeU', 'ajouterTacheU', 'supprimerTacheU', 'modifierTacheU'); // actions à rajouter
|
|
try{
|
|
$user = new mdlUser();
|
|
if (isset($_REQUEST['action'])){
|
|
$action = $_REQUEST['action'];
|
|
Validation::val_form($action, $dVueErreur);
|
|
}
|
|
if(in_array($action, $listActionUser)) {
|
|
new userController();
|
|
}
|
|
else {
|
|
new visitorController();
|
|
}
|
|
}
|
|
catch (Exception $e){
|
|
$dVueErreur[] = "Erreur FrontController";
|
|
require $rep.$vues['erreur'];
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|