-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontroller.action.php
86 lines (81 loc) · 1.85 KB
/
controller.action.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
session_start();
if(!empty($_SESSION) && !is_null($_SESSION))
{
$pathMenu = "html/menu_log.html.php";
$var = "bienvenue";
if(!empty($_GET['page']))
{
$var = $_GET['page'];
switch ($var)
{
case "Bienvenue":
$pathModule= "html/membre/bienvenue.html.php";
break;
case "forum":
$pathModule= "bundle/forum/index.php";
break;
case "concours":
$pathModule= "bundle/upload/index.php";
break;
case "evenement":
$pathModule= "bundle/event/index.php";
break;
case "compte":
$usr = UserRepository::getMembreById($_SESSION['userId']);
$pathModule= "html/membre/compte.html.php";
break;
case "candidature":
$pathModule= "html/membre/candidature.html.php";
break;
case "info":
$usr = UserRepository::getMembreById($_SESSION['userId']);
$pathModule= "html/membre/update.html.php";
break;
case "administration":
if($_GET['token'] == md5($_SERVER['REMOTE_ADDR']))
$pathModule= "bundle/adm/home.php";
else
$pathModule= "html/membre/bienvenue.html.php";
break;
default:
$pathModule= "html/membre/bienvenue.html.php";
} // switch
}
else
$pathModule= "html/membre/bienvenue.html.php";
}
else {
$pathMenu = "html/menu_non_log.html.php";
$var = "accueil";
if(!empty($_GET['page']))
{
$var = $_GET['page'];
switch ($var)
{
case "accueil":
$pathModule= "html/accueil.html.php";
break;
case "inscription":
$pathModule= "html/inscription.hml.php";
break;
case "contact":
$pathModule= "html/contact.html.php";
break;
case "qui-sommes-nous":
$pathModule= "html/nous.html.php";
break;
default:
$pathModule= "html/accueil.html.php";
} // switch
}
else
$pathModule= "html/accueil.html.php";
}
if(!empty($_GET['session']) && $_GET['session'] == "close")
{
session_destroy();
echo 'ok';
header("location:/");
}
?>