<?

session_start();
session_register("egoMemberID");		
session_register("egoMemberName");		
session_register("egoMemberCard");		
session_register("egoMemberEmail");
session_register("egoLang");


mysql_connect("localhost","crmsepang_ivc","0126544983") or	die("could not connect to database");
mysql_select_db("crmsepang_ivc") or	die("could not select to database");

$result=mysql_query("select configuration_key as cfgKey, configuration_value as cfgValue from configuration") or die(mysql_error());				
while($configuration=MySQL_fetch_array($result,MYSQL_ASSOC)){
	define($configuration['cfgKey'], $configuration['cfgValue']);
}

if(!isset($_SESSION["egoMemberID"])){
	print("<script type='text/javascript'>location.href='../login.php'</script>");
}

if(isset($lang))$_SESSION["egoLang"]=$lang;

$lang=$_SESSION["egoLang"];
require_once ("includes/$lang/general.php");

?>