<?php if(!$this->tpl_var['userhash']){ ?>
<?php $this->_compileInclude('header'); ?>
<body>
<?php $this->_compileInclude('nav'); ?>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2">
			<?php $this->_compileInclude('menu'); ?>
		</div>
		<div class="span10" id="datacontent">
<?php } ?>
			<ul class="breadcrumb">
				<li><a href="index.php?<?php echo $this->tpl_var['_app']; ?>-master"><?php echo $this->tpl_var['apps'][$this->tpl_var['_app']]['appname']; ?></a> <span class="divider">/</span></li>
				<li class="active">激活码管理</li>
			</ul>
			<ul class="nav nav-tabs">
				<li class="active">
					<a href="#">激活码列表</a>
				</li>
				<li class="dropdown pull-right">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">操作<strong class="caret"></strong></a>
					<ul class="dropdown-menu">
						<li><a href="index.php?bank-master-coupon-batadd">添加激活码</a></li>
						<li><a href="index.php?bank-master-coupon-outcoupon">导出激活码</a></li>
					</ul>
				</li>
			</ul>
			<form action="index.php?bank-master-coupon" method="post">
				<fieldset>
					<table class="table table-hover">
						<thead>
							<tr>
								<th>券码</th>
								<th>兑换积分</th>
								<th>生成时间</th>
								<th>过期时间</th>
								<th>状态</th>
							</tr>
						</thead>
						<tbody>
							<?php $cid = 0;
 foreach($this->tpl_var['coupons']['data'] as $key => $coupon){ 
 $cid++; ?>
							<tr>
								<td><?php echo $coupon['couponsn']; ?></td>
								<td><?php echo $coupon['couponvalue']; ?></td>
								<td><?php echo date('Y-m-d',$coupon['couponaddtime']); ?></td>
								<td><?php echo date('Y-m-d',$coupon['couponendtime']); ?></td>
								<td>
						        	<?php if($coupon['couponstatus']){ ?>已使用<?php } else { ?>未使用<?php } ?>
						        </td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
					<div class="pagination pagination-right">
						<ul><?php echo $this->tpl_var['coupons']['pages']; ?></ul>
					</div>
				</fieldset>
			</form>
<?php if(!$this->tpl_var['userhash']){ ?>
		</div>
	</div>
</div>
</body>
</html>
<?php } ?>