<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=100% 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=100% 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>
		<table width=100% align=center border=0 cellspacing=1 cellpadding=0 bgcolor="#DBEAF5">
          <form action="" method=post onSubmit="return checkform(this);">
            <tr bgcolor=#CED4E8 align="center">
              <td width="11%" height=27>日期</td>
              <td width="12%">用户名</td>
              <td width="8%" bgcolor="#CED4E8">操作类型</td>
              <td width="9%" bgcolor="#CED4E8">额度</td>
              <td width="9%" bgcolor="#CED4E8">余额</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="#CED4E8">
		     &nbsp;&nbsp;&nbsp;&nbsp;
		  <? include tpl('page');?></td>
		  </tr>
        </form>
		</table>
		</td>
      </tr>
</table>
</body>
</html>