From 3af809eb98e4b909d3cd18bc0c92570d5d6613d8 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Mon, 11 Feb 2013 15:11:51 +0000 Subject: [PATCH] Add a little additional formating for the index.php. --- index.php | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/index.php b/index.php index b2e7f7e267..a8531d56a4 100644 --- a/index.php +++ b/index.php @@ -24,18 +24,24 @@ Mark J Crane */ include "root.php"; -if (!file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){ - header("Location: ".PROJECT_PATH."/resources/install.php"); - exit; -} -if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/index.php")){ - require_once "themes/".$_SESSION['domain']['template']['name']."/index.php"; -} -else { +//if config.php file does not exist then redirect to the install page + if (!file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")){ + header("Location: ".PROJECT_PATH."/resources/install.php"); + exit; + } + +//adds multiple includes require_once "includes/require.php"; - require_once "includes/header.php"; - echo "

\n"; - require_once "includes/footer.php"; -} + +//show the index page + if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/themes/".$_SESSION['domain']['template']['name']."/index.php")){ + require_once "themes/".$_SESSION['domain']['template']['name']."/index.php"; + } + else { + require_once "includes/require.php"; + require_once "includes/header.php"; + echo "

\n"; + require_once "includes/footer.php"; + } ?> \ No newline at end of file