<?php handleRewritten404Uri(); define('REQUESTED_HOST', getHost()); if (!defined('APP_ID')) { die('APP_ID is not defined in' . $_SERVER['SCRIPT_FILENAME']); } setDebugMode(array('127.0.0.1', $_SERVER['REMOTE_ADDR'])); if (($resolver = resolveFramework()) === true) { $resolver = resolveInditionSettings(); } if ($resolver !== true) { echo $resolver; die; header('location:/diagnostics.php'); die; } $config = configureApplication(APP_ID, $resolver); if (empty($config) && !YII_DEBUG) { header('location:/maintenance.html'); die; } ////////////////////////////// Supporting functions ///////////////////////////////// /** * Load the environment file and Yii config file for the application * The Yii config file must be named as main-APP_ID where APP_ID is defined in the index.php * * @return array */ function configureApplication($appId, $resolver) {
<?php /* @title Site Engine * @author AngryBSOD * @email AngryBSOD@gmail.com * @created 14.11.2015 */ include_once __DIR__ . "/engine/class.loader.php"; setDebugMode(true); $_APPLICATION['MAIN']['Modularity'] = new Modularity(); #Set modularity class $_APPLICATION['MAIN']['Modularity']->loadModules(); #Load modules by work directory $mainModule = $_APPLICATION['MAIN']['Modularity']->getModuleHandler("MainModule")->moduleClass; $mainModule->init();