<?php include template('header');?>
<SCRIPT LANGUAGE="JavaScript" src="<?php echo STATIC_ROOT;?>/views/<?php echo TPL_DIR;?>/js/global.js"></SCRIPT>
<div class="subnav">
	<ul>
		<li <?php if(empty($_REQUEST['cateid'])){?>class="subxz"<?php }?>><a href="index.php">首页</a></li><li><a href="index.php">今日全部</a><span class="slhz">(<?php echo intval($totals);?>)</span></li>
		<?php foreach($GLOBALS['cate'] as $k=>$v){?>
		<li <?php if($_REQUEST['cateid']==$k){?>class="subxz"<?php }?>><a href="<?php echo url('index','groups',array('cateid'=>$k));?>"><?php echo $v['catename'];?></a><span class="slhz">(<?php echo intval($count[$k]);?>)</span></li>
		
		<?php }?>
	</ul>
</div>
<div class="tk15"></div>

<!--第一种形式-->
<div class="xzwz ty1000 tylzi"><a href="index.php">首页</a> &gt;&gt; <a href="index.php"><?php echo $GLOBALS['nowcity'];?>团购</a> &gt;&gt; <?php echo $GLOBALS['cate'][$bigcateid]['catename'];?></div>

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

<div class="tk15"></div>

<div class="zydh_bt">
	<div class="bta">
		<?php echo $GLOBALS['nowcity'];?><?php echo $GLOBALS['cate'][$bigcateid]['catename'];?>团购
	</div>
	<?php
	$parem=array('biz'=>$bizid,'smallcatelist'=>$small_catelist,'cateid'=>$bigcateid,'biz'=>$bizid,'desctype'=>$_REQUEST['desctype']=='asc'?'desc':'asc');
	?>
	<div class="btd">
		<div class="btb tylzi">
			<li <?php if(empty($_REQUEST['field'])){?> class="xz"<?php }?>> <a href="<?php echo url('index','groups',$parem);?>">默认排序</a></li>
			<li <?php if($_REQUEST['field']=='price'){?> class="xz"<?php }?>> <a href="<?php echo url('index','groups',array_merge(array('field'=>'price'),$parem));?>">价格排序</a></li>
			<li <?php if($_REQUEST['field']=='discount'){?> class="xz"<?php }?>> <a href="<?php echo url('index','groups',array_merge(array('field'=>'discount'),$parem));?>">折扣排序</a></li>
			<li <?php if($_REQUEST['field']=='time'){?> class="xz"<?php }?>> <a href="<?php echo url('index','groups',array_merge(array('field'=>'time'),$parem));?>">时间排序</a></li>		</div>
		
		<div class="btc"><h1 class="tylzi"><a href="<?php echo $groups['page']->parseurl($groups['page']->prevPage);?>">上一页</a></h1><h2><?php echo $groups['page']->absolutePage+1;?>/<?php echo $groups['page']->total;?></h2><h3 class="tylzi"><a href="<?php echo $groups['page']->parseurl($groups['page']->nextPage);?>">下一页</a></h3></div>
	</div>
</div>

<div class="tk10"></div>

<div class="tgxxlr">

	<?php if($groups['data']){foreach($groups['data'] as $k=>$v){?>
	<div class="xlr">
			<?php if($v['starttime']>=time()-86400 && $v['starttime']<=time()){?>
			<div class="xlr_news"></div>
			<div class="xlr_bt">
			<?php } else{?>
			<div class="xlr_btw">
			<?php }?><h1><font class="tylzi"><a  target="_blank" href="<?php echo url('index','site',array('id'=>$v['siteid']));?>"><?php echo $v['groupsite'];?></a></font> | <a  target="_blank"  href="<?php echo url('index','group',array('id'=>$v['id']));?>"><?php echo $v['subject'];?></a></h1>
			</div>
			<div class="xlr_img">
			<div class="xbtime">
					<h1>
						<label class="xbcs" id="lasttime_<?php echo $v['id'];?>"></label>
						<SCRIPT LANGUAGE="JavaScript">
						<!--
							normal_time("<?php echo date('m/d/Y H:i:s',$v['lasttime']);?>","lasttime_<?php echo $v['id'];?>","团购已结束");
						//-->
						</SCRIPT><?php echo $v['cityname'];?>
					</h1>
				</div>
			<A  target="_blank"  HREF="<?php echo url('index','group',array('id'=>$v['id']));?>" title="<?php echo $v['subject'];?>"><img src="<?php echo $v['thumb'];?>" /></A></div>
			<div class="xlr_jg"><h1><a  target="_blank"  href="<?php echo url('index','group',array('id'=>$v['id']));?>"><?php echo $v['nowprice'];?></a></h1><h2><a target="_blank" href="<?php echo url('index','group',array('id'=>$v['id']));?>"><font class="sc">￥<?php echo $v['oldprice'];?></font> | <?php echo $v['discount'];?>折 </a></h2></div>
			<div class="xlr_qt"><h1><font class="hz"><?php echo $v['hits']>0?$v['hits']:$v['nowpeople'];?></font>人已关注</h1><h2 class="tylzi"><a href="#"></a></h2></div>
	</div>	
	<?php }}?>
		
</div>

<div class="tk15"></div>

<div class="pagination">
	<div class="pg">
	<?php echo $groups['pageinfo'];?>
	</div>

</div>

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