-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathindex.php
37 lines (33 loc) · 952 Bytes
/
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
<?php
//echo "TestBranch";
// PHP Ledger Starting Point
require_once('functions.php');
$include_file = "";
$path ="";
if (isset($_GET['route'])) {
$path = $_GET['route'];
} else {
if (isset($_POST['route'])) {
$path = $_POST['route'];
}
}
if($path <> "") { // Checks if file really exists before including it
$include_file = "./".$path.".php";
if(!file_exists($include_file)) {
$include_file = "includes/page-parts/content-404.php";
}
}
?>
<?php include_once('includes/page-parts/header.php'); ?>
<?php include_once('includes/page-parts/top-nav.php'); ?>
<?php include_once('includes/page-parts/sidebar.php'); ?>
<?php include_once('includes/page-parts/content-top.php'); ?>
<?php
if($include_file <> "") {
include($include_file);
} else {
include('includes/page-parts/content-default.php');
}
?>
<?php include_once('includes/page-parts/content-bottom.php'); ?>
<?php include_once('includes/page-parts/footer.php'); ?>