<?php
	$acl=$_SESSION["acl"];
	if (strlen($acl)<1 || !strpos($acl,"<0011>")) {	//没有权限
		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">
<script language="javascript">
function checkall()
{
	for (i=0;i<document.form1.elements.length;i++) {
		if (document.form1.elements(i).type=="checkbox") {
			document.form1.elements(i).checked=true;
		}
	}
}
</script>
<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 name=form1 method="POST" action="addoper_result.php">
  <table border="1" bordercolor="#008080" cellspacing="0" cellpadding="0">
    <tr>
      <td width="173" align="center">操作员ID</td>
      <td width="241" align="center">
          <input type="text" name="operator" size="20">
        </td>
    </tr>
    <tr>
      <td width="173" align="center">操作员密码</td>
      <td width="241" align="center">
          <input type="password" name="password" size="20">
        </td>
    </tr>
  </center>
  <center>
    <tr>
      <td width="173" align="center">操作员姓名</td>
      <td width="241" align="center">
          <input type="text" name="opername" size="20">
        </td>
    </tr>
    <tr>
      <td width="173" align="center">操作员权限</td>
      <td width="241" align="left">
<?php
		$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 appcode,appname from module order by appcode",$db);
		while ($row = mysql_fetch_array($rs)) {
			echo("<input type=checkbox name=var".$row["appcode"]." value=on>".$row["appname"]."<br>");
		}
		mysql_free_result($rs);
		mysql_close($db);
?>
		<br><input type=button name=B2 value=全部选择 onclick='javascript:checkall();'>
		<p></p>
        </td>
    </tr>
    <tr>
      <td colspan="2" width="368" align="center" height="27"><input type="submit" value="提交" name="B1"></td>
    </tr>
  </table>
  </form>
  </center>
</div>

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

</body>

</html>
