<?php

// change the following paths if necessary
$yii=dirname(__FILE__).'/../yii-1.1.12.b600af/framework/yii.php';

require_once(dirname(__FILE__).'/protected/config/environment.php');
switch($_SERVER['HTTP_HOST'])
{
	case 'gs1.eu':
		header("Location:http://www.gs1.eu");exit;
		break;
	case 'gs1.local':	
	case 'gs1.gipszjakab.hu':
		$environment = new Environment(Environment::DEVELOPMENT) ;
		break;
	case 'gs12015.playhold.com':
		$yii=dirname(__FILE__).'/yii-core/framework/yii.php';
		$environment = new Environment(Environment::STAGE) ;
		break;
	case 'www.gs1.eu':
		$yii=dirname(__FILE__).'/../yii-core/framework/yii.php';
		$environment = new Environment(Environment::PRODUCTION) ;
		break;		
}

defined('YII_DEBUG') or define('YII_DEBUG',$environment->getDebug());
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', $environment->getTraceLevel());

require_once($yii);
Yii::createWebApplication($environment->getConfig())->run();
