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

<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">

<?php
		$timestr=strftime("%Y-%m-%d %H:%M:%S");
		$operator=$_REQUEST["operator"];
		$db=mysql_pconnect(get_cfg_var("SIPSERVER"),get_cfg_var("SIPUSER"),get_cfg_var("SIPPWD")); 
		mysql_select_db(get_cfg_var("SIPDB"),$db);
		$acl="";
		$rs = mysql_query("select appcode from module order by appcode",$db);
		while ($row = mysql_fetch_array($rs)) {
			if ($_REQUEST["var".$row["appcode"]]=="on") {
				$acl=$acl."1";
			}
			else {
				$acl=$acl."0";
			}
		}
		mysql_free_result($rs);
		mysql_query( "update operators set acl='".$acl."' where operator='".$operator."'",$db );
		mysql_query( "insert into operation values('".$_SESSION["operator"]."','".$timestr."','修改操作员权限：".$operator."')",$db );
		mysql_close($db);
?>

<p align="center">修改完成！</p>

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

</body>

</html>
