<?php
	$GLOBALS["languages"]=array(
		"hu" => 1,
		"en" => 2,
		"de" => 3 );
	$GLOBALS["backlang"]=array(
		1 => "hu",
		2 => "en",
		3 => "de" );

	$GLOBALS["maintenance"]=array(
		"until" => "2011-01-05 14:00:00",
		"ips" => array(
			"192.168.100.51"	// lorika otthon
		)
	);

	$GLOBALS["fo3_freetext_google"]=false;

	// unset( $GLOBALS["maintenance"] );

	switch ($_SERVER["SERVER_NAME"]) {
	case "fv3.darkside.hu":
	case "80.98.15.167":
		$GLOBALS["language"]="hu";
		$GLOBALS["langcode"]=1;
		$GLOBALS["site_base"]="/var/www/html/fv3.darkside.hu/fordit_v3";
		$GLOBALS["site_root"]="/var/www/html/fv3.darkside.hu/fordit_v3/www";
		$GLOBALS["site_www"]="";

		$GLOBALS["recaptcha_public_key"]="6LcE7r0SAAAAAFd0N8I15sQfvDxzy3J8R6dvfN42";
		$GLOBALS["recaptcha_private_key"]="6LcE7r0SAAAAACdZVymHzlmMepV-vRgdoSwBH1vV";
		$GLOBALS["fo3_admin_email"]="lorenzo@fotonsoft.hu";
		$GLOBALS["testsite"]=true;

		unset( $GLOBALS["maintenance"] );
		break;
	case "fv3en.darkside.hu":
		$GLOBALS["language"]="en";
		$GLOBALS["langcode"]=2;
		$GLOBALS["site_base"]="/var/www/html/fv3.darkside.hu/fordit_v3";
		$GLOBALS["site_root"]="/var/www/html/fv3.darkside.hu/fordit_v3/www";
		$GLOBALS["site_www"]="";
		
		$GLOBALS["recaptcha_public_key"]="6LcE7r0SAAAAAFd0N8I15sQfvDxzy3J8R6dvfN42";
		$GLOBALS["recaptcha_private_key"]="6LcE7r0SAAAAACdZVymHzlmMepV-vRgdoSwBH1vV";
		$GLOBALS["fo3_admin_email"]="lorenzo@fotonsoft.hu";
		$GLOBALS["testsite"]=true;
		unset( $GLOBALS["maintenance"] );
		break;
	case "fv3de.darkside.hu":
		$GLOBALS["language"]="de";
		$GLOBALS["langcode"]=3;
		$GLOBALS["site_base"]="/var/www/html/fv3.darkside.hu/fordit_v3";
		$GLOBALS["site_root"]="/var/www/html/fv3.darkside.hu/fordit_v3/www";
		$GLOBALS["site_www"]="";

		$GLOBALS["recaptcha_public_key"]="6LcE7r0SAAAAAFd0N8I15sQfvDxzy3J8R6dvfN42";
		$GLOBALS["recaptcha_private_key"]="6LcE7r0SAAAAACdZVymHzlmMepV-vRgdoSwBH1vV";
		$GLOBALS["fo3_admin_email"]="lorenzo@fotonsoft.hu";
		$GLOBALS["testsite"]=true;
		unset( $GLOBALS["maintenance"] );
		break;
	case "fordit.hu":
	case "www.fordit.hu":
		$GLOBALS["language"]="hu";
		$GLOBALS["langcode"]=1;
		$GLOBALS["site_base"]="/var/www/html/fordit.hu/fordit_v3";
		$GLOBALS["site_root"]="/var/www/html/fordit.hu/fordit_v3/www";
		$GLOBALS["site_www"]="";

		$GLOBALS["recaptcha_public_key"]="6LcC7r0SAAAAAGjblb3ys-71db_2L9JFSpyH_Ce1";
		$GLOBALS["recaptcha_private_key"]="6LcC7r0SAAAAAAdbU3yZTV5CY4AO1VBfpg0vbXeG";
		$GLOBALS["fo3_admin_email"]="info@fordit.hu";
		unset( $GLOBALS["maintenance"] );
		break;
	case "hungarian-translator.eu":
	case "www.hungarian-translator.eu":
	case "hungarian-translation.hu":
	case "www.hungarian-translation.hu":
		$GLOBALS["language"]="en";
		$GLOBALS["langcode"]=2;
		$GLOBALS["site_base"]="/var/www/html/fordit.hu/fordit_v3";
		$GLOBALS["site_root"]="/var/www/html/fordit.hu/fordit_v3/www";
		$GLOBALS["site_www"]="";
		
		$GLOBALS["recaptcha_public_key"]="6LcD7r0SAAAAAKQpxktIiulc0lXQZMdnma1Em6LF";
		$GLOBALS["recaptcha_private_key"]="6LcD7r0SAAAAAOGOiZrkGs9OGbWpYkEDpVh3r9CC";
		$GLOBALS["fo3_admin_email"]="info@fordit.hu";
		break;
	default:
		// hackeles ellen
		printf( "unauthorized" );
		exit();
	}

	$GLOBALS["FNTH_page_language"]=$GLOBALS["language"];

	if (isset( $GLOBALS["maintenance"] )) {
		switch ($GLOBALS["language"]) {
		case "hu": $msg = "fordit.hu online közösség - megújulunk";break;
		case "en": $msg = "hungarian-translator.eu - renewal soon";break;
		}
		$GLOBALS["maintenance"]["message"]=$msg;
	}

	$GLOBALS["FNTH_root"]=$GLOBALS["site_root"]."/fanthom.php";
	$GLOBALS["FNTH_www"]=$GLOBALS["site_www"]."/fanthom.php";
	require_once( $GLOBALS["FNTH_root"] . "/www/fanthom_lib.php" );
	FNTH_class( "Log" );
	FNTHLog::setLogPath( $GLOBALS["site_root"]."/temp/fanthom.log" );

	FNTH_class( "Performance" );
	FNTH_class( "Page" );

	$s = substr( sprintf( "- %s " . str_repeat( "-" , 100 ) , $_SERVER["REQUEST_URI"] ) , 0 , 60 );
	FNTHLog::logMessage( $s );


	if (!FNTHPage::isDebugPage()) {
		require_once( $GLOBALS["site_root"]."/includes/widgets/base.inc.php" );
		$GLOBALS["FNTH_widget_top_include"]=$GLOBALS["site_root"]."/includes/widgets/base_top.inc.php";
	}

	FNTH_class( "Template" );
	FNTH_class( "Page" );
	FNTH_import( "database" );
	if (FNTHPage::isDebugPage())
		FNTH_db_set_debugging( true );

	require_once( $GLOBALS["site_root"]."/includes/globals.inc.php" );
?>
