<?php
	$acl=$_SESSION["acl"];
	if (strlen($acl)<1 || !strpos($acl,"<2038>")) {	//没有权限
		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">
<p>　</p>
<div align="center">
  <center>
  <form method="GET" action="querycash_result.php">
  <table border="1" width="431" height="209" bordercolor="#008080" cellspacing="0" cellpadding="0">
    <tr>
      <td width="128" align="center" height="43">经手操作员</td>
      <td width="303" align="left" height="43">&nbsp&nbsp       
      <?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 operator from operators",$db);
        if ($row = mysql_fetch_array($rs)) {
           echo("<select name=operator size=1>");
           echo("<option selected value=''>全部操作员</option>");
           while ($row) {
              echo("<option value=".$row["operator"].">".$row["operator"]."</option>");
              $row = mysql_fetch_array($rs);
           }
           echo("</select>");
        }
        mysql_free_result($rs);
		mysql_close($db);
       ?>
       </td>
    </tr>
    <tr>
      <td width="128" align="center" height="43">查询资金类型</td>
      <td width="303" align="left" height="43">&nbsp;&nbsp; <select size="1" name="cashflag">
          <option selected value="">全部</option>
          <option value="1">购买款</option>
          <option value="2">押金款</option>
          <option value="3">结帐款</option>
          <option value="4">押金转结帐款</option>
          <option value="5">退购买款</option>
          <option value="6">退押金款</option>
        </select>
       </td>
    </tr>
    <tr>
      <td width="128" align="center" height="43">查询起始时间</td>
      <td width="303" align="left" height="43">
          &nbsp &nbsp<input name="year1" size="4" maxlength="4">年<input name="month1" size="2" maxlength="2">月<input name="day1" size="2" maxlength="2">日<p align="left"><font size="2">为空则查询起始时间为2004年1月1日0时</font></p>    
      </td>
    </tr>
    <tr>
      <td width="128" align="center" height="44">查询截止时间</td>
      <td width="303" align="left" height="44">
          &nbsp &nbsp<input name="year2" size="4" maxlength="4">年<input name="month2" size="2" maxlength="2">月<input name="day2" size="2" maxlength="2">日<p align="left"><font size="2">为空则截止时间为当前时间</font></p>    
      </td>
    </tr>
    <tr>
      <td colspan="2" width="431" align="center" height="36"><input type="submit" value="提交" name="B1"><input type="reset" value="全部重写" name="B2"></td>
    </tr>
  </table>
  </form>
  </center>
</div>

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

</body>

</html>
