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.
Scripted/WEB/Controller/FrontController.php

36 lines
1012 B

<?php
class FrontController
{
// function __construct()
// {
// global $rep, $vues, $error;
// session_start();
// // $role=$_SESSION['role'];
// // $action=$_REQUEST['action'];
// echo "frontController";
// try {
// new UserController();
// } catch (Exception $e) {
// $error = $e->getMessage();
// require ($rep . $vues['erreur']);
// }
// }
private Connection $con;
function __construct() {
try{
global $dsn, $rep, $vues, $error;
echo "FrontController";
$this->con=new Connection ($dsn);
echo "FCconection";
$action=$_REQUEST['action'];
switch($action) {
case NULL:
require ($rep.$vues['main']);
break;
}
} catch (Exception $e) {
$error = $e->getMessage();
require ($rep . $vues['erreur']);
}
}
}