Portions created by the Initial Developer are Copyright (C) 2008-2012 the Initial Developer. All Rights Reserved. Contributor(s): Mark J. Crane */ include "root.php"; //if config.php file does not exist then redirect to the install page if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //do nothing } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) { //original directory } elseif (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) { //move config.php from the includes to resources directory. rename($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php", $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php"); } elseif (file_exists("/etc/fusionpbx/config.php")){ //linux } elseif (file_exists("/usr/local/etc/fusionpbx/config.php")){ //bsd } else { header("Location: ".PROJECT_PATH."/resources/install.php"); exit; } //adds multiple includes require_once "resources/require.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 "resources/require.php"; require_once "resources/header.php"; echo "

\n"; require_once "resources/footer.php"; } ?>