test
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent 82b617df35
commit cfbb8cbfb4

@ -7,13 +7,16 @@ class FrontController
global $error, $view, $rep;
session_start();
// Check role permissions
echo "FrontController1\n";
if (isset($_SESSION['role'])) {
$role = $_SESSION['role'];
} else {
$role = "visitor";
}
// Check if action exists
echo "FrontController2\n";
$action = $_REQUEST['action'];
echo $action . "\n";
if ($role == "user") {
if ($action == NULL) {
new UserController();
@ -25,6 +28,7 @@ class FrontController
new UserController();
}
} else {
echo "FrontController3\n";
new VisitorController();
}
} catch (Exception $e) {

@ -7,6 +7,7 @@ class VisitorController
function __construct()
{
try {
echo "VisitorController1\n";
global $dsn, $rep, $vues, $error;
$model = new VisitorModel();
$action = $_REQUEST['action'];

Loading…
Cancel
Save