fix bug css/media pas visibles sur pages

php
Anthony RICHARD 2 years ago
parent 837fd0bd7b
commit 84d23f0478

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before

Width:  |  Height:  |  Size: 882 KiB

After

Width:  |  Height:  |  Size: 882 KiB

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

@ -8,7 +8,11 @@ $rep = __DIR__ . '/../';
//$dConfig['includes']= array('controleur/Validation.php');
//BD
global $dsn;
$dsn = 'mysql:host=localhost;dbname=dbanrichard7';
global $login;
$login = 'anrichard7';
global $password;
$password = 'achanger';

@ -13,8 +13,6 @@ class AdminController
global $twig;
session_start();
$dVueEreur = [];
try {
$action = $_REQUEST['action'] ?? null;
@ -39,15 +37,19 @@ class AdminController
case 'removeUser':
$this->removeUser();
break;
case 'showAllGroups':
$this->showAllGroups();
break;
case 'showGroupDetails':
$this->showGroupDetails();
break;
case 'removeUserFromGroup':
$this->removeUserFromGroup();
break;
case 'removeGroup':
$this->removeGroup();
break;

@ -2,7 +2,57 @@
namespace controller;
use mysql_xdevapi\Exception;
class FrontController
{
private array $adminActions = array(
'showAllUsers',
'showAllAdmins',
'showAllTeachers',
'showAllStudents',
'removeUser',
'showAllGroups',
'showGroupDetails',
'removeUserFromGroup',
'removeGroup',
'addGroup',
'addUserToGroup'
);
private array $teacherActions = array(
);
private array $studentActions = array(
);
public function __construct()
{
global $twig;
session_start();
$dVueEreur = array();
try {
$action = $_REQUEST['action'] ?? null;
switch ($action) {
case null:
echo $twig->render('home.html');
break;
default :
if (in_array($this->adminActions,$action)) new AdminController();
else if (in_array($this->teacherActions, $action)) new TeacherController();
else if (in_array($this->studentActions, $action)) new StudentController();
else throw new Exception("invalid Action");
break;
}
}
catch (\PDOException $e) {
$dVueEreur[] = 'Erreur inattendue!!! ';
} catch (\Exception $e2) {
$dVueEreur[] = $e2->getMessage().'Erreur inattendue!!! ';
echo $twig->render('erreur.html', ['dVueEreur' => $dVueEreur]);
}
}
}

@ -5,7 +5,7 @@ require_once __DIR__ . '/config/config.php';
require __DIR__ . '/vendor/autoload.php';
use controller\AdminController;
use controller\FrontController;
//twig
$loader = new \Twig\Loader\FilesystemLoader('templates');
@ -13,4 +13,4 @@ $twig = new \Twig\Environment($loader, [
'cache' => false,
]);
$ctrl = new AdminController();
$ctrl = new FrontController();
Loading…
Cancel
Save