<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>
</head>
<body>
<h3><span><a href="tools.php?act=add_juan">添加代金券</a></span></h3>
<table width=100% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
            <tr class="bgs">
			  <td width="5%" height=25>编号</td>
              <td width="6%">金额</td>
              <td width="10%">可获取会员</td>
              <td width="8%">可领次数</td>
			  <td width="13%">赠送条件</td>
              <td width="13%">使用条件</td>
              <td width="7%">有效期</td>
			  <td width="8%">特定商家</td>
              <td width="8%">剩余券数</td>
              <td width="8%">已发放</td>
              <td width="10%">操作</td>
            </tr>
<?
foreach($juans AS $row)
{
?>
            <tr<? if($row[nums]==0){ ?> style="color:#999;"<? } ?>>
              <td><?=$row[id]?></td>
              <td>￥<?=$row[money]?></td>
              <td><?=$row[mid]?></td>
              <td><?=$row[klc]?></td>
              <td><?=$row[ssid]?></td>
              <td>消费满￥<?=$row[xfmy]?></td>
              <td><?=$row[yxday]?>天</td>
			  <td><? if($row[comid]){ ?><a href="../com.php?act=view&id=<?=$row[comid]?>" target="_blank"><?=$row[comid]?></a><? } ?></td>
              <td><?=$row[nums]?></td>
              <td><?=$row[sendnum]?></td>
              <td class="tda"><a href="tools.php?act=edit_juan&id=<?=$row[id]?>">编辑</a><? if($row[nums]!=0){ ?><a href="tools.php?act=close_juan&id=<?=$row[id]?>">关闭</a><?}?></td>
            </tr>
<?
}
?>
        
	<tr align=center>
		<td colspan="11" align="left" >
			<? include tpl('page');?>
		</td>
	</tr>
</table>

</body>
</html>