forked from LouisSDev/HKdev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrooting.php
More file actions
33 lines (28 loc) · 742 Bytes
/
rooting.php
File metadata and controls
33 lines (28 loc) · 742 Bytes
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
<?php
include_once "utils/require.php";
$path = explode( "/", $_SERVER['REQUEST_URI']);
$globalPath = $path[2];
// Connection to the database
$dbConnector = new DatabaseConnection();
$db = $dbConnector -> getDatabase();
switch($globalPath){
case "home" :
require_once "homepage.php";
require_once "view/homepage.php";
break;
case "" :
require_once "homepage.php";
require_once "view/homepage.php";
break;
case "backoffice" :
require_once "adminpage.php";
break;
case "connection" :
require_once "view/connection.php";
break;
case "test" :
require_once "test.php";
break;
default :
require_once "404.php";
}