<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="keywords" content="<?php echo $keywords;?>" />
<meta name="description" content="<?php echo $description;?>" />
<base href="<?php echo $DIRCMS['site_url'];?>" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link href="template/<?php echo $DIRCMS['tpl_name'];?>/css/share.css" type="text/css" rel="stylesheet" />
<link href="template/<?php echo $DIRCMS['tpl_name'];?>/css/tg.css" type="text/css" rel="stylesheet" />
<script language="javascript" src="images/js/jquery.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="template/<?php echo $DIRCMS['tpl_name'];?>/images/site.js"></script>
<script language="javascript" type="text/javascript" src="template/<?php echo $DIRCMS['tpl_name'];?>/images/timeCountDown.js"></script>
<title><?php echo $title;?>-<?php echo $DIRCMS['site_name'];?></title>
</head>

<body>
	<!-- 头部开始 -->
	<?php include template('head');?>
	<!-- 头部结束 -->
	<!-- 正文开始 -->
	<div class="ads_960"><script language="javascript" src="<?php echo $DIRCMS[site_url];?>ads.js.php?id=14"></script></div>
	<div class="position"><?php echo $dir_postion;?></div>
	<div class="tg_top">
		<div class="tg_top_left">
			<div class="tg_top_left_content">
				<div class="tg_top_title">
				<?php echo $title;?>！<input type="button" onclick="window.location.href='<?php echo $DIRCMS['site_url'];?><?php echo $url;?>#bm';" class="yl_btn" value="立即报名" />
				</div>
				<div class="tg_top_pic">
					<div class="tg_top_pic_left">
						<div class="tg_top_pic_left_zk">
							<div class="tg_top_pic_left_zk_price">&yen;<span id="youhuijia">loading...</span></div>
							<div class="tg_top_pic_left_zk_zk"><?php echo $zhekou;?>折</div>
						</div>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
							<td>原价</td>
							<td>折扣</td>
							<td>节省</td>
						  </tr>
						  <tr>
							<th>&yen;<span id="yuanjia"><?php echo $yuanjia;?></span></th>
							<th><span id="zhekou"><?php echo $zhekou;?>折</span></th>
							<th style="color:#ff6600">&yen;<span id="jiesheng">loading...</span></font></th>
						  </tr>
						</table>
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
							<td>距离本次团购结束还有：</td>
						  </tr>
						  <tr>
							<td><font class="djs" id="day1">0</font>天<font class="djs" id="hour1">00</font>小时<font class="djs" id="mini1">00</font>分<font class="djs" id="sec1">00</font> 秒</td>
						  </tr>
						</table>
						<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:0px">
						  <tr>
							<td><font class="renshu"><?php echo getSign($id);?></font> 人已经购买 <a href="<?php echo $url;?>#bm"><font color="#FF3300"><b>抢!</b></font></a></td>
						  </tr>
						  <tr>
							<td><font class="zt" id="status">团购继续中</font></td>
						  </tr>
						  <tr>
						  	<td>
<font class="hui">
报名时间：<?php echo date('m月d日 H时i分',strtotime($kaishi));?>
<br />
截止时间：<?php echo date('m月d日 H时i分',strtotime($jiezhi));?>
</font>
							<script language="javascript">
								var yuanjia=parseFloat($('#yuanjia').html());
								var zhekou=parseFloat($('#zhekou').html());
								var youhuijia=parseFloat(yuanjia-yuanjia*zhekou/100).toFixed(2);
								var jiesheng=parseFloat(yuanjia*zhekou/100).toFixed(2);
								var now=new Date();
								var timestr=add_zero(now.getYear()).toString()+add_zero(now.getMonth()+1).toString()+add_zero(now.getDate()).toString()+add_zero(now.getHours()).toString()+add_zero(now.getMinutes()).toString()+add_zero(now.getSeconds()).toString();
								//var
								
								$('#youhuijia').html(youhuijia);
								$('#jiesheng').html(jiesheng);
								var zxx = {
									$: function(id){
										return document.getElementById(id);    
									},
									futureDate: Date.UTC(<?php echo date('Y',strtotime($jiezhi));?>, <?php echo date('m',(strtotime($jiezhi)-3600*24));?>, <?php echo date('d',strtotime($jiezhi));?>, <?php echo date('H',strtotime($jiezhi));?>),
									obj: function(){
										return {
											sec: zxx.$("sec1"),
											mini: zxx.$("mini1"),
											hour: zxx.$("hour1"),
											day: zxx.$("day1")
										}
									}
								};
								fnTimeCountDown(zxx.futureDate, zxx.obj());
								if(parseInt(timestr)><?php echo date('YmdHis',strtotime($jiezhi));?>)
								{
									$('#status').html('<font color="#ff6600"><b>团购已过期</b></font>');
								}
							</script>
							</td>
						  </tr>
						</table>
					</div>
					<div class="tg_top_pic_right">
						<?php if($pics) { ?>
						<?php $pic_array=getImages($pics);?>
						<?php $no=1;if(is_array($pic_array))foreach($pic_array as $r){?>
						<?php $focus_title[]=str_replace(array('"','\''),array('',''),$r['name']);?>
						<?php $focus_imgs[]=str_replace(array('"','\''),array('',''),$r['url']);?>
						<?php $focus_urls[]=str_replace(array('"','\''),array('',''),$r['url']);?>
						<?php $no++;}?>
						<script type="text/javascript">
						<!--
							var focus_width=480
							var focus_height=270
							var text_height=0
							var swf_height = focus_height+text_height
							
							var pics='<?php echo implode("|",$focus_imgs);?>'
							var links='<?php echo implode("|",$focus_urls);?>'
							var texts='<?php echo implode("|",$focus_title);?>'	
							document.write('<object ID="focus_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
							document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
							document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
							document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
							document.write('<embed ID="focus_flash" src="images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#Ffffff" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');		
							document.write('</object>');
						//-->
						</script>
						<!--焦点图结束-->
						<?php }else{ ?>
						<img src="<?php echo $thumb;?>" />
						<?php }?>
						<div class="tg_top_pic_right_desc">					
						<?php echo sub_string($description,220,'...');?>
						</div>
						<div class="tg_top_pic_right_share">
						分享到： 
						<script type="text/javascript" src="template/<?php echo $DIRCMS['tpl_name'];?>/images/share.js"></script>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="tg_top_right">
			<div class="tg_top_right_wrap" style="margin-top:0px">
				<Div class="tg_top_right_title">今日推荐团购</Div>
				<?php $dir_page="";$_DATA=get_tag_data($catid,'6','1',0,0,'1','id DESC',0,'0');foreach($_DATA as $no => $r)if(is_array($r)){?>
				<div class="tg_top_right_content">
					<a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><img src="<?php echo $r['thumb'];?>" width="215" height="150" /></a>
					<br />
					<a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank" class="tg_top_right_a_bt">参与这个团购</a>
				</div>
				<?php } $dir_page=$_DATA['pagestring'];unset($_DATA); ?>
			</div>
			<div class="tg_top_right_wrap">
				<Div class="tg_top_right_title">赞助商链接</Div>
				<div class="tg_top_right_content">
					<ul>
						<script type="text/javascript"><!--
google_ad_client = "pub-9442525253295629";
/* 200x200, 创建于 09-7-4 */
google_ad_slot = "9441498570";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>					</ul>
				</div>
			</div>
		</div>	
	</div>
	<div class="tg_content">
		<div class="tg_content_left">
			<div class="tg_content_content">	
			<?php echo $content;?>
			</div>
			<div class="tg_content_left_cytg">
				<a name="bm"></a>
				<table width="100%" border="0" cellpadding="0" cellspacing="8px">
				<form name="thisForm" method="post" action="plus/sign/index.php">
				<input type=hidden name="b[contentid]" value="<?php echo $id;?>">
				<input type=hidden name="b[title]" value="<?php echo $title;?>">
				  <tr>
					<td width="14%" align="right"><font class=F03>*</font> 您的姓名：</td>
					<td width="86%"><input type="text" name="b[username]" value="<?php echo $_username;?>" maxlength="30" /> <span id=Name1></span></td>
				  </tr>
				  <tr>
					<td align="right"><font class=F03>*</font> 性别：</td>
					<td><input type="radio" name="b[sex]" style="border:0px" value="1" checked />先生　<input type="radio" style="border:0px" name="b[sex]" value="0" />女士</td>
				  </tr>
				  <tr>
					<td align="right"><font class=F03>*</font> 联系电话：</td>
					<td><input type="text" name="b[tel]" maxlength="20" /> <span id=Tel1></span></td>
				  </tr>
				  <tr>
					<td align="right">Email：</td>
					<td><input type="text" name="b[email]" value="<?php echo $_email;?>" maxlength="50" /></td>
				  </tr>
				  <tr>
					<td align="right">联系QQ：</td>
					<td><input type="text" name="b[qq]" maxlength="30" /></td>
				  </tr>
				
				  <tr>
					<td align="right"><font class=F03>*</font> 报名人数：</td>
					<td><input type="text" name="b[num]" value="1" size=5 maxlength="5" onKeyUp="value=value.replace(/\D+/g,'')" /> 人</td>
				  </tr>
				  <tr>
					<td align="right" valign=top>简短附言：<br><span class=Remark>100字符　</span></td>
					<td><textarea name="b[msg]" style="width:350px;height:80px"></textarea></td>
				  </tr>
				  <tr>
					<td align="right"><font class=F03>*</font> 验 证 码：</td>
					<td><input type="text" name="chkcode" id="c_chkcode" size="6" />
						 <img src="<?php echo $DIRCMS['site_url'];?>checkcode.php" onclick="this.src='<?php echo $DIRCMS[site_url];?>checkcode.php?id='+Math.random()*5;" style="cursor:pointer;" align="middle" alt="验证码,看不清楚?请点击刷新验证码"/></td>
				  </tr>
				  <tr>
					<td colspan="2" valign="middle" height="60"><input type="button" class="yl_btn" onclick="window.open('<?php echo $DIRCMS[site_url];?>comment/index.php?contentid=<?php echo $id;?>');" value="参与讨论" /> &nbsp;&nbsp;<input type="button" class="yl_btn" onclick="this.form.submit();" value="立即报名" /></td>
				  </tr>
				  <tr>
					<td colspan="2">法律声明：本站只提供信息交流平台，各交易者自己审辨真假，如有损失，本站概不负责。<br>
				警方提示：网上买、卖商品要谨慎小心，以免上当受骗。</td>
				  </tr>
				</form>
				</table>
			</div>
		</div>
		<div class="tg_content_right">
			<div class="tg_top_right_wrap" style="margin-top:0px">
				<Div class="tg_top_right_title">报名信息</Div>
				<div class="tg_top_right_content">
					<ul>
						<li><strong>联 系 人</strong>：<?php echo $lianxiren;?></li>
						<li><strong>报名电话</strong>：<?php echo $tel;?></li>
						<li><strong>报名地址</strong>：<?php echo $dizhi;?> </li>
						<li><strong>交通线路</strong>：<?php echo $jiaotong;?></li>
						<?php if($map) { ?>
						<li id="myMap" style="text-align:center; width:210px; height:150px">
						
						<script language="javascript" src=" http://api.51ditu.com/js/maps.js "></script>
						<script language="javascript">
							var maps = new LTMaps( "myMap" );
							maps. centerAndZoom ( new LTPoint( <?php echo $map;?> ) , 4 );
							var control = new LTStandMapControl();
							maps.addControl( control );  // 缩放工具条
							var control = new LTZoomInControl();
							maps.addControl( control );
							var marker1 = new LTMarker( new LTPoint( <?php echo $map;?> ) );
							maps.addOverLay( marker1 );
						</script>}
						</li>
						<?php }?>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!-- 正文结束 -->
	<!-- 底部开始 -->
	<?php include template('footer');?>
	<!-- 底部结束 -->
	<script language="javascript" src="c.js.php?id=<?php echo $id;?>"></script>
</body>
</html>