@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | if (isset($_POST['admin'])) { |
6 | 6 | \core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator", 0); |
7 | - } |
|
8 | - else { |
|
7 | + } else { |
|
9 | 8 | \core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php", 0); |
10 | 9 | } |
11 | 10 | \ No newline at end of file |
@@ -35,8 +35,7 @@ discard block |
||
35 | 35 | if ((isset($_GET['page'])) && ($_GET['page'] != null)) { |
36 | 36 | $page = $_GET['page']; |
37 | 37 | $contenu->getHeadPage(0, $page); |
38 | - } |
|
39 | - else { |
|
38 | + } else { |
|
40 | 39 | $contenu->getHeadPage(1); |
41 | 40 | } |
42 | 41 | |
@@ -70,17 +69,14 @@ discard block |
||
70 | 69 | //si c'est un controleur de base on va cerhcer dans core/admin |
71 | 70 | if ($core !== false) { |
72 | 71 | require_once(ROOT.$lien.".php"); |
73 | - } |
|
74 | - else if ($module !== false) { |
|
72 | + } else if ($module !== false) { |
|
75 | 73 | $explode = explode("/", $lien, 3); |
76 | 74 | |
77 | 75 | require_once(ROOT.$explode[0]."/".$explode[1]."/app/controller/".$explode[2].".php"); |
78 | - } |
|
79 | - else { |
|
76 | + } else { |
|
80 | 77 | require_once("app/controller/".$lien.".php"); |
81 | 78 | } |
82 | - } |
|
83 | - else { |
|
79 | + } else { |
|
84 | 80 | $cache = new \core\Cache($page); |
85 | 81 | |
86 | 82 | $router_module = new RouterModule(); |
@@ -95,8 +91,7 @@ discard block |
||
95 | 91 | $twig = new Twig_Environment($loader); |
96 | 92 | |
97 | 93 | $page = $router_module->getPage(); |
98 | - } |
|
99 | - else { |
|
94 | + } else { |
|
100 | 95 | $contenu->getContenuPage(); |
101 | 96 | $contenu_page = $contenu->getContenu(); |
102 | 97 | |
@@ -119,8 +114,7 @@ discard block |
||
119 | 114 | } |
120 | 115 | $cache->setEnd(); |
121 | 116 | } |
122 | - } |
|
123 | - else { |
|
117 | + } else { |
|
124 | 118 | header("location:".WEBROOT."bataille"); |
125 | 119 | } |
126 | 120 | //--------------------------------------------- FIN ROUTING -------------------------------------------------------// |
127 | 121 | \ No newline at end of file |