* "Powered by X2Engine". *****************************************************************************************/ // change the following paths if necessary $constants = __DIR__ . DIRECTORY_SEPARATOR . 'constants.php'; $yii = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'framework', 'yii.php')); require_once $constants; require_once $yii; Yii::$enableIncludePath = false; if (YII_DEBUG && X2_TRANSLATION_LOGGING) { exec('pwd', $output); preg_match('|/home/(.*?)/|', $output[0], $matches); $username = ''; if (isset($matches[1])) { $username = $matches[1]; } Yii::$systemuser = $username; } Yii::registerAutoloader(array('Yii', 'x2_autoload')); if (!empty($_SERVER['REMOTE_ADDR'])) { $matches = array(); $indexReq = preg_match('/(.+)index.php/', $_SERVER["REQUEST_URI"], $matches); $filename = 'install.php'; if (file_exists($filename)) { header('Location: ' . (!$indexReq ? $_SERVER['REQUEST_URI'] : $matches[1]) . $filename); exit; } $config = implode(DIRECTORY_SEPARATOR, array(__DIR__, 'protected', 'config', 'web.php')); Yii::createWebApplication($config)->run(); } function printR($obj, $die = false) {