<!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=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<?php include(DDROOTPATH.'/cache/title/'.$pagetag.'_title.php');?>
<link href="/template/<?=MOBAN?>/css/tuangoujs.css" rel="stylesheet" type="text/css" />
<link href="/template/<?=MOBAN?>/css/tuangoufanli.css" rel="stylesheet" type="text/css" />
<LINK rel=stylesheet type=text/css href="/template/<?=MOBAN?>/css/common.css">
<script language="javascript" type="text/javascript" src="/template/<?=MOBAN?>/js/jquery.js"></script>
<script>
$(function(){
    $('.checkLogin').click(function(){
		url=$(this).attr('href');
		lay=$(this).attr('layer');
		$('#jumpbox .detail').hide();
		$('#layer_mall').show();
		var ddusername='<?=$_SESSION['duoduouser']?>';
		$('#jump_pic').attr('src','upload/<?=$arr['logo']?>');
		$('#jump_href').attr('href',url);
		$('.jump_price').html('<?=$arr['fan']?>');
		
	    if(ddusername!=''){
			window.open(url);
		}
		else{
		    $('.jumpbox').show();
		}
	return false;
	});
	
	$('#jump_href,#jumpclose').click(function(){
	    $('.jumpbox').hide();
	});
});

function clickDiv(div){
   div.style.display="block";
   var b = window.event?window.event:arguments.callee.caller.arguments[0];
   b.cancelBubble = true;
}
function open_city(id,evt){
    jQuery(".tuangouflsy_pf").show();
	jQuery("#select2").hide();
	var b = window.event?window.event:arguments.callee.caller.arguments[0]
    b.cancelBubble = true;
    changeCity("A");
 
}
function close_city(){
	jQuery(".tuangouflsy_pf").hide();
	jQuery("#select2").show();
	var b = window.event?window.event:arguments.callee.caller.arguments[0]
    b.cancelBubble = true;
}
function changeCity(id){
	$("div[id^=city_span_]").each(function(){
		$(this).css("display","none");
	});
	$("a[id^=city_a_]").each(function(){
		$(this).removeClass("sekuai");
	});
	$("#city_a_"+id).addClass("sekuai");
	$("#city_span_"+id).css("display","inline");
}
function countDown(maxtime, fn) {
    var timer = setInterval(function() {
        if (maxtime >= 0) {
		    d=parseInt(maxtime/3600/24);
            h=parseInt((maxtime/3600)%24);
            m=parseInt((maxtime/60)%60);
            s=parseInt(maxtime%60);
            msg = "还有" + d + "天" + h + "小时" + m + "分" + s + "秒结束";
            fn(msg);
            if (maxtime == 5 * 60) alert('注意，还有5分钟!'); --maxtime;
        } else {
            clearInterval(timer);
            fn("时间到，结束!");
        }
    },1000);
}
</script>
</head>
<body>


<?php
include("header.tpl.php");
?>
<?php
include("nav.tpl.php");
?>
<div style="width:950px; margin:auto;">
  <div class="tuangoujs_mianbaox" style="height:30px; text-align:left; margin-top:10px">
  <img align="absmiddle" class="pic" src="/template/<?=MOBAN?>/images/details_03.jpg">&nbsp;团购详细&nbsp;&nbsp;-&nbsp;<?=$arr['name']?>
  </div>
  <div class="white_top"><div class="white_top_left"></div><div class="white_top_middle"></div><div class="white_top_right"></div></div>
  <div style=" clear:both"></div>
  <div class="tuangoujs_content">
    <div class="tuangoujs_content_left">
      <div class="tuangoujs_content_tuijian">
         <div class="tuangoujs_content_tuijian_text"><a href="jump.php?mall_id=<?=$arr['mallid']?>" class="checkLogin" style="font-size:24px;font-family:'黑体'" target="_blank">【<?=$arr['name']?>】返利<?=$arr['fan']?> </a>【<?=$arr['city']?>】<?=$arr['title']?></div>
         <div class="tuangoujs_content_tuijian_content">
            <div class="tuangoujs_content_tuijian_pic">
			<img height="265" width="422" src="<?=$arr['image']?>" alt='<?=$arr['title']?>' />
			</div>
		<div class="tuangoujs_content_tuijian_jiage">
               <ul>
                 <li><span class="tuangoujs_content_tuijian_jiage_span1"><span class="tuangoujs_color1">￥</span><span class="tuangoujs_color2"><?=$arr['price']?></span></span>
                   <span class="tuangoujs_content_tuijian_jiage_jiantou">最高返<span class="tuangoujs_color3"><?=$arr['fan']?></span></span>
                 </li>
                 <li>原价：￥<?=$arr['value']?> &nbsp;&nbsp;折扣：<?=$arr['rebate']?>折</li>
                 <li><a href="jump.php?mall_id=<?=$arr['mallid']?>&url=<?=urlencode($arr['local'])?>" class="checkLogin" target="_blank"><img src="/template/<?=MOBAN?>/images/tuangoujs_23.jpg" width="217" height="61" /></a></li>
                 <li class="juzhong">已买：<strong><?=$arr['bought']?>人</strong>已买</li>
                 <li class="bj">
                   <p><img src="/template/<?=MOBAN?>/images/tuangoujs_31.jpg" width="17" height="18" style="position:relative;top:3px;"/>&nbsp;该团购倒计时</p>
                   <p id="time"></p>
                   <script>
			  countDown(<?=$arr['endTime']-time()?>,
      function(msg) {
        document.getElementById('time').innerHTML = msg;
      });
			  </script>
                 </li>
               </ul>
               <div style="clear:both"></div>
           </div>
            <div style="clear:both"></div>
         </div>
      </div>
      <div class="tuangoujs_content_bendanxq">

		<table cellpadding="0" cellspacing="0" width="667">
				<tr>
			<td>查看此产品详情，请【<a href="jump.php?mall_id=<?=$arr['mallid']?>&url=<?=urlencode($arr['local'])?>" class="checkLogin" target="_blank">点击</a>】</td>
		</tr>
		        </table>
      </div>
    </div>
    <div class="tuangoujs_content_right">
      <div class="tuangoujs_content_tuangousssc">
        <div class="tuangoujs_content_tuangousssc_h1">团购所属商城</div>
        <div class="tuangoujs_content_tuangousssc_content">
          <ul>
            <li><a href="jump.php?mall_id=<?=$arr['mallid']?>&url=<?=urlencode($arr['url'])?>" class="checkLogin" target="_blank"> <img width="120" src="<?=$arr['logo']?>" /></a></li>
            <li>
			<a href="jump.php?mall_id=<?=$arr['mallid']?>&url=<?=urlencode($arr['url'])?>" class="checkLogin" target="_blank">
			<img src="/template/<?=MOBAN?>/images/details_19.jpg" width="148" height="27" /></a>
			</li>        </ul>
          <div style="clear:both"></div>
        </div>
      </div>
      <div class="tuangoujs_content_tuangousssc">
        <div class="tuangoujs_content_shanghaijrtg_h1" style="margin-left:0px; font-family:'宋体'">[<?=$arr['name']?>]团购热销榜</div>
        <div class="tuangoujs_content_shanghaijrtg" style="margin-left:0px">
          <ul>
          <?php foreach($state_tuan as $row){?>
		    <li>
              <p class="gao"><a href="mall<?=$url_head_id?><?=$row['mallid']?><?=$url_end?>" style="color:#333;">[<?=$row['name']?>]</a><a href="tgview<?=$url_head_id?><?=$row['id']?><?=$url_end?>" target="_blank"><?=$row['title']?></a></p><p>
                <span class="tuangoujs_content_shanghaijrtg_span1">团购价：<span class="tuangoujs_color4"><?=$row['price']?></span></span>
                <span class="tuangoujs_content_shanghaijrtg_jiantou">最高返<span class="tuangoujs_color4"><?=$row['fan']?></span></span>
                <span style="clear:both;"></span>
              </p>
            </li>
            <?php }?>
            <div class="clear"></div>
          </ul>
        </div>
      </div>
      
    </div>
    <div style=" clear:both"></div>
  </div>
  <div class="white_bottomm"><div class="white_bottom_left"></div><div class="white_bottom_middle"></div><div class="white_bottom_right"></div>
</div>
  <div style="clear:both;"></div>
</div>
<div style="overflow:hidden; width:920px; margin:auto"></div>
<?php include('template/'.MOBAN.'/footer.tpl.php');?>
</body>
</html>
