<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>
<script type="text/javascript" src="../include/calendar.php"></script>
<link rel="stylesheet" rev="stylesheet" href="../include/calendar/calendar.css" type="text/css" media="all" />
<body>
<table width=100% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
<form method="get" name="search">
  <tr bgcolor=#FFFFFF >
    <td align="center" class="tablerow">
    订单号：<input name='orderid' type='text' value="<?=$orderid?>" size=12>
    &nbsp;&nbsp;
	用户ID：<input name='userid' type='text' value="<?=$userid?>" size=12>
	&nbsp;&nbsp;
    商户ID：<input name='comid' type='text' value="<?=$comid?>" size=12>
	&nbsp;&nbsp;
    <?=$CFG['cardname']?>：<input name='cardnum' type='text' value="<?=$cardnum?>" size=12>
    &nbsp;&nbsp;
	<select name="payid">
	<option value="">支付方式</option> 
	<option value="0" <?=($payid == '0') ? 'selected' : ''?>>扫码</option>
	<option value="1" <?=($payid == '1') ? 'selected' : ''?>>店内</option> 
	</select>&nbsp;&nbsp;开始日期：<input name="begindate" type="text" id="begindate" size="12" value="<?=$begindate?>" onClick="return showCalendar('begindate', '%Y-%m-%d', false, false, 'begindate');" />&nbsp;&nbsp;截止日期：<input name="enddate" type="text" id="enddate" size="12" value="<?=$enddate?>" onClick="return showCalendar('enddate', '%Y-%m-%d', false, false, 'enddate');" />&nbsp;&nbsp;<input type="submit" name="search" value="查 询"></td>
  </tr>
  </form>
</table>
<table width=100% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
          <form action="" method=post onSubmit="return checkform(this);">
            <tr class="bgs">
                <td height=25>订单号</td>
                <td>用户ID</td>
                <td>商户ID</td>
                <td>卡号</td>
				<td>商品价</td>
                <td>折扣</td>
                <td>积分</td>
                <td>首减</td>
                <td><?=$CFG[lejuan]?></td>
                <td>实收</td>
                <td>付款方式</td>
                <td>服务费</td>
                <td>帐户入帐</td>
                <td>时间</td>
                <td>备注</td>
                <td>IP</td>
            </tr>
			<?php
			foreach($exchanges AS $row)
			{
			?>
            <tr>             
            <td><?=$row[orderid]?></td>
            <td><a href="member.php?act=edit&id=<?=$row['userid']?>" target="_blank"><?=$row['userid']?></a></td>
            <td><a href="../com.php?act=view&id=<?=$row['comid']?>" target="_blank"><?=$row['comid']?></a></td>
            <td><?=$row[cardnum]?></td>
            <td>￥<?=$row[yjia]?></td>
            <td><?=$row[zekou]?></td>
            <td><?=$row[jifen]?></td>
            <td><?=$row[soj]?></td>
            <td><?=$row[lej]?></td>
            <td>￥<?=$row[value]?></td>
            <td><?=$row[payid]?></td>
            <td>￥<?=$row[fc]?></td>
			<td class="fe43">￥<?=$row[siso]?></td>
            <td><?=$row[addtime]?></td>
            <td><?=$row[note]?></td>
            <td><?=$row[ip]?></td>
            </tr>
			<?}?>			
          <tr bgcolor=#FFFFFF align=left>
		  <td height="26" colspan="16">
		     &nbsp;&nbsp;&nbsp;&nbsp;
		  <? include tpl('page');?></td>
		  </tr>
        </form>
		</table>
		</body>
</html>