<?php
/*
 * design/LoadConfig.class.php
 * 
 * CopyRight(C) 2010 Shopformer Development Team. All Right Reserved
 * URL: http://sourceforge.jp/projects/shopformer/
 * 
 * 
 * Mail: m_nakashima@users.sourceforge.jp
 * Auther: Masanori Nakashima
 * Last Update: 2010-06-18
 */
require_once( dirname(dirname(__FILE__))
	.DIRECTORY_SEPARATOR.'system'
	.DIRECTORY_SEPARATOR.'login'
	.DIRECTORY_SEPARATOR.'ModuleBase.class.php');
require_once( dirname(__FILE__)
	.DIRECTORY_SEPARATOR.'PackageConfig.class.php');
require_once( dirname(__FILE__)
	.DIRECTORY_SEPARATOR.'package_define.inc.php');
class design_LoadConfig extends system_login_ModuleBase {
	function design_LoadConfig() {
	}
	function execute( & $request ) {
		$designDefFilePath	= DIR_PATH_DATA.DIRECTORY_SEPARATOR.'design.define.inc.php';
		$isSetup	= false;
		if( file_exists($designDefFilePath) ) {
			$isSetup	= true;
			require_once($designDefFilePath);
			$uri			= DESIGN_URI;
			$request->setAttribute('design.uri',	$uri);
			$baseUri		= preg_replace('/\\/$/','',SPIDER_URI_BASE).DESIGN_URI;
			$request->setAttribute('design.base_uri',	$baseUri);
		}
		$request->setAttribute('design.is_setup',			$isSetup);
	}
}
?>