<?php
/**
 * 商城板块初始化文件
 *
 * 商城板块初始化文件，引用框架初始化文件
 *
 *
 * @copyright  Copyright (c) 2007-2012 ShopNC Inc. (http://www.shopnc.net)
 * @license    http://www.shopnc.net
 * @link       http://www.shopnc.net
 * @since      File available since Release v1.1
 */

define('ProjectName','');

define('BasePath',dirname(__FILE__));

define('InShopNC',true);

//是否编译核心缓存
define('BUILDCORE',false);
//编译后的文件路径
define('RUNCOREPATH',BasePath.'/cache/~shopnc.php');
if (BUILDCORE === true && file_exists(BasePath.'/cache/setting.php')){
	if (!file_exists(RUNCOREPATH)){
		require_once(BasePath.'/config.ini.php');
		require_once(BasePath.'/framework/function/build.php');
		define('DBTYPE',$dbtype);
		define('LANG_TYPE',$lang_type);
		define('SiteUrl',$site_url);
		buildCore();
		header('Location: '.$site_url);exit();
	}else{
		require_once(RUNCOREPATH);exit();
	}
}

if(!file_exists(BasePath.'/global.php')) exit("global.php isn't exists!");
require_once('global.php');
if(!file_exists(BasePath.'/config.ini.php')) exit("config.ini.php isn't exists!");

require_once(BasePath.'/framework/core/runtime.php');