<?php
	$acl=$_SESSION["acl"];
	if (strlen($acl)<1 || !strpos($acl,"<0015>")) {	//没有权限
		ob_clean();
		header("Location: accesserror.html");
		exit;
	}
?>

<?php
	$ipaddr=$_REQUEST["ipaddr"];
	if ($ipaddr!="") {
		$db=mysql_pconnect(get_cfg_var("SIPSERVER"),get_cfg_var("SIPUSER"),get_cfg_var("SIPPWD"));
		mysql_select_db(get_cfg_var("SIPDB"),$db);
		$rs=mysql_query("select ipaddr from logout where ipaddr='".$ipaddr."'",$db);
		if (($row = mysql_fetch_array($rs))==FALSE) {
			mysql_free_result($rs);
			mysql_query("insert into logout values('".$ipaddr."')",$db);
		} else {
			mysql_free_result($rs);
		}
		mysql_close($db);
	}
?>

<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>换房处理</title>
</head>

<body background="bkg.bmp">

<p align="center"><font size="5"><b>换房处理</b></font></p>
<hr color="#999966">
<p> </p>
<div align="center">
  <center>
  <form method="POST" action="shutdown_result1.php">
  <input type=hidden name=ipaddr value=<?php echo $ipaddr; ?>>
  <table border="0" width="505">
    <tr>
      <td align="center" width="497">该客人上网已经被停止！
        <p>稍候10秒后可以进行换房处理！</p>
      </td>
    </tr>
  </table>
  </form>
  </center>
</div>

<p>　</p>
<hr>
<p align="center">SIP酒店上网计费管理系统</p>
<p align="center">作者：<b>深圳市飞沃软件有限公司</b></p>

</body>

</html>
