<?php include template('header');?>
<div class="tk15"></div>
<div class="xzwz ty1000 tylzi"><a href="<?php  echo SITE_ROOT; ?>">首页</a> >> 电子优惠劵</div>

<div class="web_nav">
	<ul>
		<li  <?php if(!$_REQUEST['cateid']){ ?> class="xz" <?php  } ?> ><a href="<?php echo url('index','index',array('pluginid'=>'coupon'));?>"><?php $tagcatename = '全部优惠劵';   ?> 全部优惠劵</a></li>
		<?php if($cates){foreach($cates as $k=>$v){?>
		<li  <?php if($_REQUEST['cateid'] == $v['id']){ ?> class="xz" <?php  $tagcatename = $v['catename'];  } ?>>
			<a href="<?php  echo url('index','index',array('pluginid'=>'coupon','cateid'=>$v['id'])); ?>" >
			 <?php  echo $v['catename']; ?>
			</a>
		</li>
		<?php }}?>
	</ul>
</div>
<div class="tk15"></div>

<div class="zydh_bt">
	<div class="bta">
		<?php  echo $tagcatename; ?>优惠券
	</div>
	<div class="btd">		
		<div class="btc"><h1 class="tylzi"><a href="<?php echo $coupons['page']->parseurl($coupons['page']->prevPage);?>">上一页</a></h1><h2><?php echo $coupons['page']->absolutePage+1;?>/<?php echo $coupons['page']->total;?></h2><h3 class="tylzi"><a href="<?php echo $coupons['page']->parseurl($coupons['page']->nextPage);?>">下一页</a></h3></div>
	</div>
</div>

<div class="tk15"></div>
<div class="yhj_warp yahei">
<?php if($coupons['data']){foreach($coupons['data'] as $k=>$v){?>
	<div class="yhj_xh">
		<div class="pic"><a href="<?php echo $v['goods_url'];?>" target="_blank"><img src="<?php echo $v['img_url'];?>" alt="<?php echo $v['title'];?>" border="0" /></a></div>
		<div class="info">
			<h2 class="tylzi"><a href="<?php echo $v['goods_url'];?>" target="_blank" title="<?php echo $v['title'];?>"><?php echo $v['title'];?></a></h2>
			<p>价　格：<span class="jgtext02">￥0.20</span><br />商家：<?php echo $v['merchant_name'];?><br />有效期：<?php echo date('Y-m-d',$v['start_time']);?>至<?php echo date('Y-m-d',$v['close_time']);?></p>
		</div>	
		<div class="lingq"><h3>己有<span class="text02"><?php echo $v['sales_num'];?></span>人领取</h3><h4><a href="<?php echo $v['goods_url'];?>" target="_blank"><img src="<?php echo STATIC_ROOT;?>/plugins/coupon/views/default/img/lyan.png" border="0" /></a></h4>
		</div>
	</div>
<?php }}?>

</div>

	<div class="tk10"></div>
	<div class="pagination">
		<div class="pg" convert="true"><?php echo $coupons['pageinfo'];?></div>
	</div>

<div class="tk30"></div>

<?php include template('footer');?>