-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.php
38 lines (34 loc) · 1.02 KB
/
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
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("Controller/route.php");
$header="HeaderIndex";
$model="";
$controleur = "ControllerMain";
$vue = "IndexMain";
$js = "JsMain";
if(isset($_GET['page'])) {
$page = $_GET['page'];
if(isset($routes[$page]) && $routes[$page]['active'] == true) {
$header = $routes[$page]['header'];
$model = $routes[$page]['model'];
$controleur = $routes[$page]['controleur'];
$vue = $routes[$page]['vue'];
$js = $routes[$page]['js'];
}
}
?>
<!DOCTYPE html>
<html>
<head>
<?php include("Controller/Head.php"); ?>
<?php include("Model/BDD.php"); ?>
<?php if($controleur != null) include("Controller/" . $controleur . ".php"); ?>
<?php if($model != null) include("Model/" . $model . ".php"); ?>
<?php if($header != null) include("View/Header/" . $header . ".php"); ?>
</head>
<body>
<?php if($vue != null) include("View/Navigation/" . $vue . ".php"); ?>
<?php if($js != null) include("Js/" . $js . ".php"); ?>
</body>
</html>