-
Notifications
You must be signed in to change notification settings - Fork 1
/
gestion-documents.php
54 lines (47 loc) · 2.01 KB
/
gestion-documents.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
ob_start();
require_once "Utilitaires/ModelBinding.php";
require_once "Models/Donnees/Utilisateur.php";
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (isset($_SESSION["utilisateurCourant"])) {
ob_end_clean();
$strFichier = $_SESSION["utilisateurCourant"]->statutAdmin ? "module-admin.php" : "gestion-documents.php";
$strController = isset($_GET["controller"]) ? "?controller=" . $_GET["controller"] : "";
$strAction = isset($_GET["action"]) ? "action=" . $_GET["action"] : "";
if (!$strController || $strController == "") {
$strAction = "?$strAction";
} else {
$strAction = "&$strAction";
}
$strParamsGet = $_SERVER['QUERY_STRING'];
if (!(empty($_SERVER['QUERY_STRING']) && strpos($_SERVER['REQUEST_URI'], "?") === false))
$strParamsGet = "?" . $_SERVER['QUERY_STRING'];
if ($_SESSION["utilisateurCourant"]->statutAdmin) {
header("Location: $strFichier$strParamsGet");
http_response_code(302);
die();
}
}
require_once "Utilitaires/libraries-communes-2018-03-28.php";
require_once "Utilitaires/classe-mysql-2018-03-18.php";
require_once "sqlConnection.php";
require_once "Utilitaires/View.php";
require_once "Utilitaires/JSONView.php";
require_once "Utilitaires/ModelState.php";
require_once "Controllers/ModuleUtilisateurBase.php";
require_once "Controllers/ModuleAdminBase.php";
require_once "Utilitaires/ValidationPr3.php";
require_once "Utilitaires/Utilitaires-ProjetFinal.php";
require_once "Models/EditReferences/CoursSessionIJModel.php";
const UPLOAD_DIR = "./televersements";
$objBD = mysql::getBD();
if (isset($_GET['controller']) && isset($_GET['action'])) {
$controller = $_GET['controller'];
$action = $_GET['action'];
} else {
$controller = 'Login';
$action = 'Login';
}
require_once "routes.php";