<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=uft-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta charset="uft-8">
    <title>{iMicms:$vote.title}</title>
    <meta name="description" content="{iMicms:$vote.title}">
    <link rel="stylesheet" href="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/touch.css">    
	<script type="text/javascript" src="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/jquery-2.1.3.min.js"></script>

                 <script type="text/javascript" src="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/app.js"></script>
                 <script type="text/javascript" src="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/jquery.masonry.min.js"></script>
  <style>
.slider{display:none;}
.focus span{width:5px;height:5px;margin-left:5px;border-radius:50%;background:#CDCDCD;font-size:0}
.focus span.current{background:red;}
</style>
                
    </head>
<body>
<header>
 <img src="{iMicms:$vote.wappicurl}" alt="shareImg" width="0px" height="0px"/>  

    <div class="m_head clearfix">
    	<notempty name="ggduotu">
        <div class="slider">
		<ul>
        <volist name="ggpic" id="li">  <!-- ggt为图片分组 -->
	    					<li><a href="#"><img src="{iMicms:$li.ggurl}"/></a></li>
      </volist>
				  	</ul>
		</div>
       <else/>
        	<img src="{iMicms:$ggpic[0]['ggurl']}" title="{iMicms:$vote.title}">
       </notempty>
        	     
         <div class="num_box">
            <if condition="$ishavezp eq 1"><a href="{iMicms::U('Vote/detail',array('token'=>$token,'id'=>$id,'zid'=>$havezpid))}" class="join_us">我的参赛</a>
			<else/>
			<if  condition="$istime eq 1"><a href="{iMicms::U('Vote/signup',array('token'=>$token,'id'=>$id))}" class="join_us">我要报名</a></if></if>          
            <ul class="num_box_ul">
                <li>
                    <span class="text">已报名</span>
                    <span>{iMicms:$rc}</span>
                </li>
                <li>
                    <span class="text">投票人次</span>
                    <span>{iMicms:$tpl}</span>
                </li>
                <li>
                    <span class="text">浏览量</span>
                    <span>{iMicms:$check}</span>
                </li>
            </ul>
            <img src="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/mw_004.jpg" />
        </div>
        <div class="search">
    <form action="{iMicms::U('Vote/search')}" id="search_form" method="post" accept-charset="utf-8">
    <input type="hidden" name="id" value="{iMicms:$id}" />
	<input type="hidden" name="token" value="{iMicms:$token}" />
        <div class="search_con">
            <div class="btn"><input type="submit" name="seachid" id="searchBtn" value="搜索"></div>
            <div class="text_box"><input type="search" id="searchText" value="" name="keyword" placeholder="请输入选手姓名或编号" autocomplete="off"></div>
        </div>
    </form>
</div>    </div>
</header>

<section class="content" id="get_info" data-rid="503" data-sort="" data-kw="" data-page="">
    <div class="text_a clearfix" id="sort">
        <a href="{iMicms::U('Vote/index',array('token'=>$token,'id'=>$id))}" >最新参赛</a>
        <a href="{iMicms::U('Vote/rank',array('token'=>$token,'id'=>$id))}" >投票排行</a>
    </div>
    <div class="blank20"></div>
    <style>
	 
	<if condition="$vote.moban eq 3">
    	.rank300{}
.rank300 li{ border-bottom:1px solid #147e61; padding:4px 0}
.rank300 li.rank-head {padding:6px 0; }
.rank300 li.rank-head span{ color:#147e61; font-weight:800}
.rank300 li span{display:inline-block;width:20%; text-align:center}
	
	<elseif condition="$vote.moban eq 4" />


    	.rank300{}
.rank300 li{ border-bottom:1px solid #047ab3; padding:4px 0}
.rank300 li.rank-head {padding:6px 0; }
.rank300 li.rank-head span{ color:#047ab3; font-weight:800}
.rank300 li span{display:inline-block;width:20%; text-align:center}
	<elseif condition="$vote.moban eq 1" />
    	.rank300{}
.rank300 li{ border-bottom:1px solid #EC6941; padding:4px 0}
.rank300 li.rank-head {padding:6px 0; }
.rank300 li.rank-head span{ color:#EC6941; font-weight:800}
.rank300 li span{display:inline-block;width:20%; text-align:center}
 <else />
 .rank300{}
.rank300 li{ border-bottom:1px solid #DAB96B; padding:4px 0}
.rank300 li.rank-head {padding:6px 0; }
.rank300 li.rank-head span{ color:#DAB96B; font-weight:800}
.rank300 li span{display:inline-block;width:20%; text-align:center}
	 </if>
    </style>
    <div class="rank300" id="top300">
<ul>
<li class="rank-head"><span style="width:18%;">排名</span><span style="width:12%;">编号</span><span style="display:inline-block;width:23%" >选手</span><span style="width:22%;">取消关注数</span><span style="width:25%;">最终票数</span></li>
<volist name="phlist" id="list">
 <a href="{iMicms::U('Vote/detail',array('token'=>$token,'id'=>$id,'zid'=>$list['id']))}" >
<li class="list"><span style="width:18%;">{iMicms:$i}</span><span style="width:12%;">{iMicms:$list['id']}</span><span style="display:inline-block;width:23%">{iMicms:$list['item']}</span><span style="width:22%;color:#f67685">{iMicms:$list['dcount']}</span><span style="width:25%;color:#f67685">{iMicms:$list['vcount']}</span></li></a>
</volist>
 
        </ul>
    </div>

    <div class="pagination pagination-centered" style="margin-top:20px"> 
<ul>
<li class="active"><a href="javascript:JumpPage(1);">1-100</a></li>
<li><a href="javascript:JumpPage(2);">101-200</a></li>
<li><a href="javascript:JumpPage(3);">201-300</a></li>
</ul></div>
</section>
<img class="bg" src="{iMicms::STATICS}/vote/index{iMicms:$vote['moban']}/mw_005.jpg" />
<section class="rules">
  <div class="text">
 <notempty name="vote.shumat">
            <div class="prize">{iMicms:$vote['shumat']}</div>
            <div class="neirong"><?php 
	echo html_entity_decode(htmlspecialchars_decode($vote['shuma']));  
	?></div>
    </notempty>
    <notempty name="vote.shumbt">
        <div class="prize">{iMicms:$vote['shumbt']}</div>
            <div class="neirong"><?php 
	echo html_entity_decode(htmlspecialchars_decode($vote['shumb']));  
	?></div>
   	 </notempty>
</div>
<div class="text">
  <notempty name="vote.shumct">
       <div class="prize">{iMicms:$vote['shumct']}</div>
            <div class="neirong"><?php 
	echo html_entity_decode(htmlspecialchars_decode($vote['shumc']));  
	?></div>
   </notempty>
</div>
    <div style=" height:60px; width:100%; display:block;"></div>

</section>

<section>
   <div class="pop" id="guanzhu"  style="display:none" >
        <div class="mengceng"></div>
        <div class="pop_up">
                        <p class="tit_p">{iMicms:$user.ydgzbt}</p> <!--  引导关注标题 -->
            <p class="tit_txt">{iMicms:$vote.ydgzts}</p> <!--  微信引导关注提示语 -->
            <a href="{iMicms:$vote.wxgzurl}" class="gz_btn">{iMicms:$user.ydgzan}</a> <!-- 引导用户关注按钮名称 -->
                    </div>   <!-- 投票引导关注链接 -->
    </div>
    <div class="pop" id="voted" style="display:none;">
        <div class="mengceng"></div>
        <div class="pop_up">
            <span class="closed close_pop_up" id="toupiaook">&nbsp;</span>
            <p class="tit_p" id="dia_title">投票成功!</p>
            <p class="tit_txt" id="content">恭喜您为您支持的作品投上了一票！</p>                   <!-- 投票奖励积分说明 -->
            <if condition="$user['tpjl']==1 && $user['tpjlnub'] gt 0"><p class="tit_txt" id="content">{iMicms:$user['tpjlsm']}</p></if>
            <if condition="$user['tpjl']==1 && $user['tpjlnub'] gt 0 && $user['jfxfurl'] neq null" > <a href="$user['jfxfurl']" class="gz_btn">{iMicms:$user['hjtp_jfxftitle']}</a></if>  <!-- 奖励积分消费活动链接  奖励积分消费活动说明 -->
            <p class="tit_txt" id="subcontent"></p>
        </div>
    </div>
    
    


    
    <div class="pop" id="voting" style="display:none;">
        <div class="mengceng"></div>
        <div class="pop_up">
            <span class="closed close_pop_up" id="toupiaook2">&nbsp;</span>
            <p class="tit_p" id="voting_title"></p>
            <p class="tit_txt" id="voting_content"></p>
        </div>
    </div>
 <eq name='user.yzm' value='1'>

 
    <div class="pop" id="validata" style="display:none">
        <div class="mengceng" onclick="document.getElementById('validata').style.display='none';"></div>
        <div class="pop_up" style="width:310px;">
            <script src="http://api.geetest.com/get.php?gt={iMicms:$user['yzmid']}&width=280" type="text/javascript"></script>
        </div>
    </div>
 </eq>
 
    <div class="share_overmask" style="display: none;">
        <div class="share_arrow"></div>
        <div class="share_words"></div>
    </div>
</section>

<link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/vote/index2/daohang.css">


<div class="bot_main">
  <ul>
    <li class="ico_1"><span class="ico"><img src="{iMicms::STATICS}/vote//index2/i1.png" /></span><span class="txt">首页</span></li>
    <li class="ico_2"><span class="ico"><img src="{iMicms::STATICS}/vote//index2/i3.png" /></span><span class="txt">排名</span></li>
    <li class="ico_3"><span class="ico"><img src="{iMicms::STATICS}/vote//index2/i11.png" /></span><span class="txt"><notempty name='ishavezp' >我的<else/>报名</notempty></span></li>
    <if condition="$user['tpjl']==1 && $user['tpjlnum'] gt 0 && $user['gldzpid'] neq 0" >
   <li class="ico_4"><span class="ico"><img src="{iMicms::STATICS}/vote/index2/i4.png" /></span><span class="txt">免费抽奖</span></li>
   <else/>
	<li class="ico_4"><span class="ico"><img src="{iMicms::STATICS}/vote/index2/i4.png" /></span><span class="txt">{iMicms:$user.dbdhm}</span></li>
	</if>
  </ul>
</div>


 
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
       appId: '{iMicms:$signPackage.appId}', // 必填，公众号的唯一标识
        timestamp: "{iMicms:$signPackage.timestamp}", // 必填，生成签名的时间戳
        nonceStr: '{iMicms:$signPackage.nonceStr}', // 必填，生成签名的随机串
        signature: '{iMicms:$signPackage.signature}',// 必填，签名，见附录1
        jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });

   wx.ready(function(){
        wx.error(function(res){
            console.log(res);
        });
        //朋友圈
        wx.onMenuShareTimeline({
            title: "{iMicms:$vote['title']}", // 分享标题
            link: "{iMicms::C('site_url')}{iMicms::U('Vote/index',array('token'=>$token,'id'=>$id))}", // 分享链接
            imgUrl: "{iMicms:$vote['wappicurl']}", // 分享图标
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });

        //分享给朋友
        wx.onMenuShareAppMessage({
            title: "{iMicms:$vote['title']}", // 分享标题
            desc: "{iMicms:$vote['fxms']}", // 分享描述
            link: "{iMicms::C('site_url')}{iMicms::U('Vote/index',array('token'=>$token,'id'=>$id))}", // 分享链接
            imgUrl: "{iMicms:$vote['wappicurl']}", // 分享图标
            type: '', // 分享类型,music、video或link，不填默认为link
            dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
            success: function () {
                // 用户确认分享后执行的回调函数
            },
            cancel: function () {
                // 用户取消分享后执行的回调函数
            }
        });
    });
</script>
 
<script type="text/javascript">

//分页开始
$(".rank300 .list:gt(99)").hide();
var current_page=100;//每页显示的数据
var current_num=1;//当前页数

function JumpPage(pageIndex){
$(".pagination ul li").removeClass("active").eq(pageIndex-1).addClass("active");
$.each($(".rank300 .list"),function(index){
var start = current_page* (pageIndex-1);//起始范围
var end = current_page * pageIndex;//结束范围
if(index >= start && index < end){//如果索引值是在start和end之间的元素就显示，否则就隐
$(this).show();
}else {
$(this).hide(); 
}
        });
}
$(function($){
	$("#search_form").submit(function(){
		var keyword = $("#searchText").val();
		if(keyword.length == 0){alert('请输入选手姓名或编号');return false;}
	});
});
    $(function(){
        $("#toupiaook").on('click',function(){
                window.location.href = "{iMicms::U('Vote/index',array('token'=>$token,'id'=>$id))}";
        });
    });
$('.ico_1').on('click', function(){
  location.href = "{iMicms::U('Vote/index',array('token'=>$token,'id'=>$id))}";
});
$('.ico_2').on('click', function(){
  location.href = "{iMicms::U('Vote/rank',array('token'=>$token,'id'=>$id))}";
});
$('.ico_3').on('click', function(){
 <notempty name="ishavezp">
  	location.href = "{iMicms::U('Vote/detail',array('token'=>$token,'id'=>$id,'zid'=>$havezpid))}";
  <else/>
  	<if condition="$vote['start_time'] lt time() && $vote['over_time'] gt time()">
  		location.href = "{iMicms::U('Vote/signup',array('token'=>$token,'id'=>$id))}";
  	<else/>
  		<if condition="$vote['start_time'] gt time()">
						$('#voting_title').html("<php>echo date('Y-m-d H:i:s',$vote['start_time']);</php>后才能报名");
						$('#voting_content').html('');
                        $('#voting').show();
  		<else/>
						$('#voting_title').html('报名已结束！');
						$('#voting_content').html('');
                        $('#voting').show();
  		</if>
  	</if>
  </notempty>
});
<if condition="$user['tpjl']==1 && $user['tpjlnum'] gt 0 && $user['gldzpid'] neq 0" >
$('.ico_4').on('click', function(){
 
 location.href = "{iMicms::U('Wap/Lottery/index',array('token'=>$token,'id'=>$user['gldzpid']))}";
 
});
<else/>
$('.ico_4').on('click', function(){
 
	location.href = "{iMicms:$user['dbdhurl']}";  //底部导航链接 
	
});
</if>

</script>

<script type="text/javascript">

    
</script>
<notempty name="ggduotu">  <!-- 判断首页幻灯片是否为多图  -->
  <script type="text/javascript" src="{iMicms::STATICS}/vote/slider/yxMobileSlider.js"></script>
<script type="text/javascript">
	$(".slider").yxMobileSlider({during:5000,height:{iMicms:$user['hdgd']}});   //height可以设置首页幻灯片高度
	var nowtime=new Date().getTime();
	function _fresh(){
		var endtime=new Date("2015/02/18 12:00:00");//这里设置的时间为2011年，您可以修改为其它时间。
		//var nowtime = new Date();
		var leftsecond=parseInt((endtime.getTime()-nowtime)/1000);
		if(leftsecond<0){leftsecond=0;}
			__d=parseInt(leftsecond/3600/24);
			__h=parseInt((leftsecond/3600)%24);
			__m=parseInt((leftsecond/60)%60);
			__s=parseInt(leftsecond%60);
		var sums=__d+__h+__m+__s;
		var if_Receive="";
		if(sums!=0){
			var d=document.getElementById("_d");
			var h=document.getElementById("_h");
			var m=document.getElementById("_m");
			var s=document.getElementById("_s");
			h.innerHTML=__h+__d*24;
			m.innerHTML=__m;
			s.innerHTML=__s;
		nowtime=nowtime+1000;
		setTimeout(_fresh,1000);
		}else if(!if_Receive){
			document.getElementById("msg").innerHTML="";
		}
	}
	_fresh();
</script>
</notempty>

<div style="display:none">
<?php 
	echo html_entity_decode(htmlspecialchars_decode($vote['cnzz']));  
	?>
	</div></body>
</html>