/** * The router file of chanzhiEPS. * * @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com) * @license ZPLV12 (http://zpl.pub/page/zplv12.html) * @author Chunsheng Wang * @package chanzhiEPS * @version $Id$ * @link http://www.chanzhi.org */ /* Turn off error reporting first. */ error_reporting(0); /* Start output buffer. */ ob_start(); /* Define the run mode as front. */ define('RUN_MODE', 'front'); /* Load the framework. */ include 'loader.php'; /* Instance the app and run it. */ $app = router::createApp('chanzhi', $systemRoot); $config = $app->config; /* Connect to db, load module. */ $common = $app->loadCommon(); $config->requestType = $common->loadModel('setting')->getRequestType(); $common->checkDomain(); /* Check the reqeust is getconfig or not. Check installed or not. */ if(isset($_GET['mode']) and $_GET['mode'] == 'getconfig') die($app->exportConfig()); if(!isset($config->installed) or !$config->installed) die(header('location: install.php')); /* Check site status. */ if($app->config->site->status == 'pause') { die("
" . htmlspecialchars_decode($app->config->site->pauseTip) . '
'); } $app->parseRequest(); $common->checkPriv(); $app->loadModule(); /* Flush the buffer. */ echo helper::removeUTF8Bom(ob_get_clean());