<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<link href=images/style.css rel=stylesheet type=text/css>
<script language="JavaScript" src="js/common.js" type="text/javascript"></script>
<body>
<br />
<table width=96% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
	  <tr class=header>
        <td height=25>&nbsp;搜索</td>
      </tr>
<form method="post" name="search">
  <tr bgcolor=#FFFFFF >
    <td align="center" class="tablerow">
	类型：
	<select name="typeid">
	<option value="0">不限</option>
	<option value="1">增加</option>
	<option value="2">扣除</option>
	</select>
	&nbsp;&nbsp;日期：<input type="text" name="fromdate" size="10" value="<?=$fromdate?>"> - <input type="text" name="todate" size="10" value="<?=$todate?>">&nbsp;&nbsp;用户名：<input type="text" name="username" size="8" value="<?=$username?>">&nbsp;&nbsp;关键词：<input type="text" name="keywords" size="8" value="<?=$keywords?>">&nbsp;&nbsp;<input type="submit" name="search" value="查 询"></td>
  </tr>
  </form>
</table><br />
<table width=96% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
	  <tr class=header>
        <td height=25>&nbsp;财务流水账</td>
      </tr>
	  
      <tr>
        <td bgcolor=#FFFFFF align=center style="padding:10px;">
		<table width=96% align=center border=0 cellspacing=2 cellpadding=2 bgcolor="#DBEAF5">
          <form action="" method=post onSubmit="return checkform(this);">
            <tr bgcolor=#e7f5f9 align="center">
              <td width="11%" height=27>日期</td>
              <td width="12%">用户名</td>
              <td width="8%" bgcolor="#e7f5f9">操作类型</td>
              <td width="9%" bgcolor="#e7f5f9">额度</td>
              <td width="9%" bgcolor="#e7f5f9">余额</td>
              <td width="43%">备注</td>
              <td width="8%">操作</td>
            </tr>
<?php
foreach($pays AS $row)
{
?>
            <tr bgcolor=#FFFFFF align=center>
              <td align=left>&nbsp;&nbsp;<?=$row['date']?></td>
			  <td><?=$row['username']?></a></td>
              <td><?=$row[paytype]?></td>
              <td><?=$row['amount']?></td>
              <td><?=$row['balance']?></td>
			  <td><?=$row['note']?></td>
              <td><a href="pay.php?act=delete&id=<?=$row[payid]?>" onClick="if(!confirm('确定要删除吗？\n\n此操作不可以恢复！'))return false;"> 删除</a></td>
            </tr>
<?}?>			
          <tr bgcolor=#FFFFFF align=left>
		  <td height="26" colspan="8" bgcolor="#e7f5f9">
		     &nbsp;&nbsp;&nbsp;&nbsp;
		  <? include tpl('page');?></td>
		  </tr>
        </form>
		</table>
		</td>
      </tr>
</table>
</body>
</html>