-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
45 lines (37 loc) · 1.12 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
39
40
41
42
43
44
45
<?php
// Call Functions File
if(file_exists('functions/function.php')){
require_once('functions/function.php');
}
// Call Necessary functions
get_header();
// view the specific page
if(isset($_GET['page'])){
get_breadcrumb();
$view = $_GET['page'];
switch ($view) {
case $view:
if(file_exists('contents/'.$view.'.php')){
require_once('contents/'.$view.'.php');
}else{
if(file_exists('contents/_404.php')){
require_once('contents/_404.php');
}
}
break;
default:
if(file_exists('contents/_404.php')){
require_once('contents/_404.php');
}
break;
}
}
// if it is the main page or $view was null
else{
if(file_exists('contents/index.php')){
require_once('contents/index.php');
}
}
// Call the footer
get_footer();
require_once('includes/footer.php'); ?>