<?php include template('header');?>
<SCRIPT LANGUAGE="JavaScript" src="<?php echo STATIC_ROOT;?>/views/<?php echo TPL_DIR;?>/js/global.js"></SCRIPT>

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

<div class="ty1000">
	<div class="web_zd">
		<div class="web_a">
			<div class="tuanlogo"> <?php  $thumb=thumb($siteinfo['logo']); ?> <A HREF="<?php  echo  $siteinfo['siteurl'];  ?>" target="_blank"><img src="<?php  echo $thumb[0]; ?>"/></A> </div>
			<div class="web_zj">
				<h2 class="tuanName"> <?php  echo  $siteinfo['sitename'];  ?> </h2> <!-- <div class="gz"><a href="#">加关注</a></div> <div class="ygz" >已关注　 <a href="#" class="tyvzi">取消</a></div> -->
				<em><br />  <?php  if($siteinfo['tel']){ ?>   电话：<?php  echo  $siteinfo['tel'];  ?>  <?php }  ?> 　 <?php  if($siteinfo['email']){ ?>  Email：<?php  echo  $siteinfo['email'];  ?>  <?php  } ?>   <?php  if($siteinfo['qq']){ ?>  Email：<?php  echo  $siteinfo['qq'];  ?>  <?php  } ?><?php  if($siteinfo['msn']){ ?>  Email：<?php  echo  $siteinfo['msn'];  ?>  <?php  } ?>  </em>
			</div>	
			<div class="tuanLink tylzi"><a target="_blank" href="<?php echo url('index','sites',array('id'=>$siteinfo['siteid']));?>">进入站点 &raquo;</a></div>		
		</div>
		
		<div class="web_b">
			<h3><?php  echo  $siteinfo['sitename'];  ?>开通的团购城市 (<?php  echo $citynum; ?>)</h3> 
			<ul class="tylzi">

				<?php   foreach($citys AS $key => $val ){ ?>
				<?php  if($GLOBALS['city'][$val]){   ?>
				<li><a href="<?php echo url('index','groupsite',array('id'=>$siteinfo['id'],'cityid'=>$val));?>"><?php echo  $GLOBALS['city'][$val]['cityname'];  ?>站</a></li>
				<?php  } ?>
				<?php   }  ?>

			</ul>
		</div>
	</div>	
<div class="tk10"></div>
		<div class="web_c">
			<h3><?php  echo  $siteinfo['sitename'].$cityname;  ?>的历史团购</h3>
			<select class="select" onchange="oldgroupsite();" id="oldcity" > 
				<option  value="0">请选择</option>
				<?php  foreach($citys AS $key => $val ){  ?>				  	
				<option  value="<?php  echo $val;  ?>"  <?php    if($val == $cityid){  echo "selected"; }     ?>    ><?php echo  $GLOBALS['city'][$val]['cityname'];  ?></option>
				<?php   } ?>
            </select>		
		</div>
</div>

<script>

function oldgroupsite()
{
	var  city = $("#oldcity").val();
    var  id ='<?php echo  $siteinfo['id'];  ?>';
    var  type="old";
	if(city != "0")
	{
		location.href="index.php?con=index&act=groupsite&type="+type+"&cityid="+city+"&id="+id;
	}

}

</script>


<div class="tgxxlr">

	<?php  foreach($groups['data'] AS $key => $val ){  ?>
	<div class="xlr">
			<div class="xlr_btw"><h1><a target="_blank" href="<?php  echo $val['url']; ?>"><?php  echo $val['subject']; ?></a></h1></div>
			<div class="xlr_img">
				<div class="xbtime">
					<h1>
						<label class="xbcs" id="lasttime_<?php echo $val['id'];?>"></label>
						<SCRIPT LANGUAGE="JavaScript">
						<!--
							normal_time("<?php echo date('m/d/Y H:i:s',$val['lasttime']);?>","lasttime_<?php echo $val['id'];?>","团购已结束");
						//-->
						</SCRIPT><?php echo $val['cityname'];?>
					</h1>
			    </div>
				<a target="_blank" href="<?php echo url('index','group',array('id'=>$val['id']));?>" ><img src="<?php echo $val['thumb']; ?>" /></a>
			</div>
			<div class="xlr_jg"><h1><a target="_blank" href="<?php echo url('index','group',array('id'=>$val['id'])); ?>" > <?php  echo $val['nowprice'];  ?></a></h1><h2><a href="#"><font class="sc"><?php  echo $val['oldprice'];  ?></font> | <?php  echo $val['discount'];  ?>折 </a></h2></div>
			<div class="xlr_qt"><h1><font class="hz"><?php  echo $val['nowpeople'];  ?></font>人已关注</h1><h2 class="tylzi"><a href="#">+ 收藏</a></h2></div>
	</div>
	<?php  } ?>

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

</div>

</div>


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

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