{x2;if:!$userhash}
{x2;include:header}
<body>
{x2;include:nav}
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span2">
			{x2;include:menu}
		</div>
		<div class="span10" id="datacontent">
{x2;endif}
			<ul class="breadcrumb">
				<li><a href="index.php?{x2;$_app}-master">{x2;$apps[$_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>
							{x2;tree:$coupons['data'],coupon,cid}
							<tr>
								<td>{x2;v:coupon['couponsn']}</td>
								<td>{x2;v:coupon['couponvalue']}</td>
								<td>{x2;date:v:coupon['couponaddtime'],'Y-m-d'}</td>
								<td>{x2;date:v:coupon['couponendtime'],'Y-m-d'}</td>
								<td>
						        	{x2;if:v:coupon['couponstatus']}已使用{x2;else}未使用{x2;endif}
						        </td>
							</tr>
							{x2;endtree}
						</tbody>
					</table>
					<div class="pagination pagination-right">
						<ul>{x2;$coupons['pages']}</ul>
					</div>
				</fieldset>
			</form>
{x2;if:!$userhash}
		</div>
	</div>
</div>
</body>
</html>
{x2;endif}