<?php

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


require_once(dirname(__FILE__).'/protected/config/environment.php');
switch($_SERVER['HTTP_HOST'])
{
	case 'exaingatlan.hu':
		header("Location:http://www.exaingatlan.hu");exit;
		break;
	case 'ingatlan.local':
	default:
		$environment = new Environment(Environment::DEVELOPMENT) ;		
		break;	
	case 'exaingatlan.gipszjakab.hu':
	case 'teszt.exaingatlan.hu':
		$environment = new Environment(Environment::DEVELOPMENT) ;
		break;
	case 'www.exaingatlan.hu':
		$yii='/var/www/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();
