-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
40 lines (29 loc) · 802 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
<?php
require_once('./config/configuration.php');
require_once(PATH_TEXTES.'lang.php');
session_name('session');
session_start();
if(isset($_GET['page']))
{
$page = htmlspecialchars($_GET['page']); // http://.../index.php?page=toto
if(is_file(PATH_CONTROLLERS_P.$_GET['page'].".php"))
{
if($_GET['page']=='accueilAdmin'){
$page = 'accueilAdmin';
}
elseif($_GET['page']=='generation'){
$page = 'generation';
}
require_once(PATH_CONTROLLERS_P.$page.'.php');
}
elseif(is_file(PATH_CONTROLLERS_B.$_GET['page'].".php")){
$page = 'achat';
require_once(PATH_CONTROLLERS_B.$page.'.php');
}
}
else{
$page='accueil'; //page d'accueil du site - http://.../index.php
require_once(PATH_CONTROLLERS_P.$page.'.php');
}
//appel du controller
?>