* @copyright Copyright (c) 2009-2011 Moc 10 Media, LLC. (http://www.moc10media.com) * @license https://phirecms.org/LICENSE.TXT New BSD License * @version 1.1 */ // If you change the system folder, make sure to change it for the 'bootstrap.php' require below as well. require_once 'phire/bootstrap.php'; // Check if the path constants is defined or not. if (!defined('BASE_PATH') || !defined('SYS_PATH') || !defined('CONTENT_PATH')) { print("You must set up the 'config.php' file correctly. Please refer to the INSTALL.TXT for help."); // Else, check the BASE_PATH. } else if (defined('BASE_PATH') && !file_exists($_SERVER['DOCUMENT_ROOT'] . BASE_PATH)) { print("The BASE_PATH you defined does not exist. Please check the settings in the 'config.php' file and refer to the INSTALL.TXT for help."); // Else, check the SYS_PATH. } else if (defined('SYS_PATH') && !file_exists($_SERVER['DOCUMENT_ROOT'] . BASE_PATH . SYS_PATH)) { print("The SYS_PATH you defined does not exist. Please check the settings in the 'config.php' file and refer to the INSTALL.TXT for help."); // Else, check the CONTENT_PATH. } else if (defined('CONTENT_PATH') && !file_exists($_SERVER['DOCUMENT_ROOT'] . BASE_PATH . CONTENT_PATH)) { print("The CONTENT_PATH you defined does not exist. Please check the settings in the 'config.php' file and refer to the INSTALL.TXT for help."); // Else, perform system check and process the URL. } else { require_once '.' . SYS_PATH . '/core/process/system.check.php'; // If the system is not properly configured or installed. if ($sys_check == false) { include_once '.' . SYS_PATH . '/core/includes/failed.php'; // Else, process the URL query. } else { // Get the query. if (isset($_GET['query'])) { $url_request = $_GET['query']; } else { $_GET['query'] = '/'; $url_request = '/'; } // Clean the URL query, if necessary. if (strpos($url_request, '?') !== false) { $_GET['query'] = substr($_GET['query'], 0, strpos($_GET['query'], '?')); $url_request = substr($url_request, 0, strpos($url_request, '?')); } Phire_Init::start($url_request); } } ?>