<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * config hooks
 * @author		Jade Xia
 * @copyright	Copyright (c) 2010 - 2011 天夏网络.
 * @link		http://www.tianxianet.com
 */
class set_config
{
	function set_path()
	{
		global $URI,$CFG;
		$segment = $URI -> segment(1);
		if( $segment == 'shop_admin' )
		{
			define('CTL_FOLDER','shop_admin/');
			define('TPL_FOLDER','shop_admin/');
			define('TPL_PATH',ROOT_PATH.VIEW_PATH.TPL_FOLDER);
			include_once(APPPATH.'helpers/shop_common_helper'.EXT);
		}
		else
		{
			define('CTL_FOLDER','');
			define('TPL_FOLDER','default/');
			define('TPL_PATH',ROOT_PATH.VIEW_PATH.TPL_FOLDER);
			include_once(APPPATH.'helpers/shop_common_helper'.EXT);
			$CFG->load('shop_site_config');
		}
	}
}
?>