<?php
if($_POST["ac"]=="save")
{
	$baseconfig="";
	if($_POST["autologin"]=="true")
	{
		$baseconfig=$baseconfig . "IsAutoLoginMode=true;\r\n";
	}else
	{	
		$baseconfig=$baseconfig . "IsAutoLoginMode=false;\r\n";
	}
	if($_POST["autologinserver"]=="")
	{
		$baseconfig="AutoLoginServer='';";
	}else
	{
		$baseconfig="AutoLoginServer='" . $_POST["autologinserver"] . "';";
	}
	if($_POST["autologinport"]=="")
	{
		$baseconfig="AutoLoginServer=20001;";
	}else
	{
		$baseconfig="AutoLoginServer='" . $_POST["autologinport"] . "';";
	}
	if($_POST["autogeturl"]=="true")
	{
		$baseconfig=$baseconfig . "AutoReadIpFromIeURL=true;\r\n";
	}else
	{	
		$baseconfig=$baseconfig . "AutoReadIpFromIeURL=false;\r\n";
	}
	if($_POST["defaultenglish"]=="true")
	{
		$baseconfig=$baseconfig . "__isenglish=true;\r\n";
	}else
	{	
		$baseconfig=$baseconfig . "__isenglish=false;\r\n";
	}
	$f=fopen("autologin.js","w");
	$fwrite($baseconfig,strlen($baseconfig),$f);
	$fclose($f);
}
?>

<form action="?" >
<input type="" />
</form>
