<?php 
defined('IN_HS') or exit('Access Denied');
include admintpl('header');
?>
<body>

<table cellpadding="2" cellspacing="1" border="0" align=center class="tableBorder" >
  <tr>
    <td width="433" align="center" class="submenu"> 奖励记录查询 </td>
  </tr>
<form method="get" name="search">
  <tr>
    <td class="tablerow" align="center">
	<input type="hidden" name="mod" value="<?=$mod?>">
	<input type="hidden" name="file" value="<?=$file?>">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="25">
  <tr>
    <td width="70%" align="right">用户名： 
      <input name='username' type='text' value="<?=$username?>" size=20>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <input name='submit' type='submit' class='btn' value=' 查询 '></td>
  </tr>
</table>

	</td>
  </tr>
</form>
</table>

<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
  <tr>
    <td></td>
  </tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
  <tr>
    <th colspan=8><?=$year?>年奖励统计</th>
  </tr>
<form method="post" name="myform">
<tr align="center">
<td width="25%" class="tablerowhighlight">用户名</td>
<td width="25%" class="tablerowhighlight">奖励金额(元)</td>
<td width="25%" class="tablerowhighlight">发生时间</td>
<td width="25%" class="tablerowhighlight">被推广人</td>
</tr>
<?php
foreach($bills AS $bill)
{
?>
<tr align="center"   bgColor='#F1F3F5'>
<td><?=$bill['username']?></td>
<td><?=$bill['value']?></td>
<td><?=date('Y-m-d H:i:s',$bill['addtime'])?></td>
<td><?=$bill['tgname']?></td>
</tr>
<?php 
$points += $bill['points'];
$days += $bill['days'];
$money += $bill['money'];
}
?>
</table>
</form>
</body>
</html>