<?php
require("session_check.php");
require("../foundation/fchange_exp.php");

//语言包引入
$li_langpackage=new limitlp;
if(get_argp('action')){
	$url="../configuration.php";
	$content=file_get_contents($url);
	$content=change_exp($content);
	$f_ref=fopen($url,"w+");
	$num=fwrite($f_ref,$content);
	if($num > 0){
		echo '<script type="text/javascript">alert("'.$li_langpackage->li_update_suc.'");window.history.go(-1);</script>';
	}
}

//限制访问的时间段
$guest_time_str=join("\n",$limit_guest_time);

//限制交互时间段
$action_time_str=join("\n",$limit_action_time);

//限制访问的ip列表
$ip_list_str=join("\n",$limit_ip_list);

?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/right.css">
</head>
<body>
	<form action="" method="post">
		
		<div class="container">
			<div class="rs_head"><?php echo $li_langpackage->li_refuse_ip;?></div>
		</div>
		<table class="main main_left">
			<tr>
				<td><textarea rows='5' name='limit_ip_list' value='<?php echo $ip_list_str;?>' style='width:100%'><?php echo $ip_list_str;?></textarea></td>
			</tr>
			<tr>
				<td><?php echo $li_langpackage->li_refuse_ip_info;?></td>
			</tr>
		</table>
		
		<div class="container">
			<div class="rs_head"><?php echo $li_langpackage->li_refuse_time;?></div>
		</div>
		<table class="main main_left">
			<tr>
				<td><textarea rows='5' name='limit_guest_time' value='<?php echo $guest_time_str;?>' style='width:100%'><?php echo $guest_time_str;?></textarea></td>
			</tr>
			<tr>
				<td><?php echo $li_langpackage->li_refuse_time_info;?>
</td>
			</tr>
		</table>
		
		<div class="container">
			<div class="rs_head"><?php echo $li_langpackage->li_refuse_action;?></div>
		</div>
		<table class="main main_left">
			<tr>
				<td><textarea rows='5' name='limit_action_time' value='<?php echo $action_time_str;?>' style='width:100%'><?php echo $action_time_str;?></textarea></td>
			</tr>
			<tr>
				<td><?php echo $li_langpackage->li_refuse_action_info;?></td>
			</tr>
		</table>
		
		<table class="main main_left">
			<tr>
				<td class="dotted_line" colspan="10" style="line-height:100%;">&nbsp</td>
			</tr>
			<tr>
				<td><input type='submit' name='action' value='<?php echo $li_langpackage->li_submit;?>' class='top_button' /></td>
			</tr>
		</table>
	
	</form>
</body>
</html>		