-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·48 lines (35 loc) · 923 Bytes
/
index.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
<?php
define('_BASE_URL', "");
//config des parametres
include_once('config/config.php');
//chargement du core secu_session_start
include_once('core/secu_session_start.php');
//test secu session start
if (!secu_session_start(SESSION_NANE)) {
die("Problème session !");
}
// connexion à la BD
include_once('modele/param.inc.php');
// appel du controleur du module demande
if (!isset($_GET['module'])) {
$module = DEFAULT_MODULE;
} else {
$module = $_GET['module'];
};
if (!isset($_GET['action'])) {
$action = DEFAULT_ACTION;
} else {
$action = $_GET["action"];
};
$_SESSION['module'] = $module;
$_SESSION['action'] = $action;
$url = 'controleur/' . $module . '/' . $action . '.php';
//echo $url;
if (file_exists($url)) {
// echo "existe";
include_once($url);
} else {
// echo "existe pas";
//pas de module trouvé, erreur 404
include_once('vue/404.php');
}