var nowpage=location+"";nowpage="/"+nowpage.substring(nowpage.indexOf("fenlei"));var dafenlei="";if(nowpage.indexOf("qq")!=-1){dafenlei="腾讯技术"}else if(nowpage.indexOf("hack")!=-1){dafenlei="黑客安全"}else if(nowpage.indexOf("biancheng")!=-1){dafenlei="编程技术"}else{dafenlei="其他分类"}getTop('d',10,dafenlei);function getTop(desc,num,cls){var ld=layer.load(1,{shade:[0.1,'#000']});$.ajax({url:"https://www.daohangtx.com/config/get_ph/getTop.php",data:{"desc":desc,"lmt":num,"class":cls},datatype:"json",success:function(data){$.each(data,function(i,v){var bq=$(".newmorepaihangul").children("li").get(i);$(bq).find(".newallchangk").attr("href",v.web_url);$(bq).find(".newallchangkxq").attr("href","/introduce/"+v.web_intro);$(bq).find(".newallchangkxq").attr("data-intro","/introduce/"+v.web_intro);$(bq).find(".newallchangkxq").attr("data-url",v.web_url);$(bq).find(".newwebtitle").html(v.web_name);$(bq).find(".newallchangk img").attr("src",v.web_ico);if(desc=="d"){var djstr='今日有<font color="red">'+castNum(v.d_click_count)+'</font>人点击该网站';$(bq).find(".newdianjil").html(djstr)}else if(desc=="w"){var djstr='本周点击<font color="red">'+castNum(v.w_click_count)+'</font>次';$(bq).find(".newdianjil").html(djstr)}else if(desc=="m"){var djstr='本月点击<font color="red">'+castNum(v.m_click_count)+'</font>次';$(bq).find(".newdianjil").html(djstr)}else if(desc=="all"){var djstr='总共被点击<font color="red">'+castNum(v.m_click_count)+'</font>次';$(bq).find(".newdianjil").html(djstr)}});layer.close(ld)},error:function(err){layer.msg("排行榜加载失败"+err.statusText)}})};getRand(1,18,nowpage);function getRand(page_index,page_num,wclass){var ld=layer.load(1,{shade:[0.1,'#000']});$.get("https://www.daohangtx.com/config/get_ph/get_info.php","type=1"+"&pageNum="+page_num+"&pageIndex="+page_index+"&wclass="+wclass,function(res){var ar=Math.ceil(res.allrow/page_num);if($('#fanyetools').html()==''){page(ar)}layer.closeAll();var li="";$.each(res.data_arr,function(i,e){var time=e.create_time/1000;li+='<li><p><i class="newicologozdy">'+ranName(e.web_name)+'</i><span class="newzdyptitle">'+e.web_name+'</span><img src="/Skins/mb/images/s'+e.stars+'.gif" height="14px" width="80px" /><span class="newsltime">收录时间：<font color="red">'+$.formatTime.UnixToDate(time)+'</font></span><b class="newmoreder">'+e.web_introduce+'</b><a data-intro="/introduce/'+e.web_intro+'" data-url="'+e.web_url+'" href="'+e.web_intro+'.htm"/*tpa=https://www.daohangtx.com/introduce/'+e.web_intro+'*/ target="_blank" class="newmoregengduoxq">网站详情</a></p></li>'});$(".newmoregengduolan ul").html(li);color();test()})}function page(pageNum){laypage({cont:'fanyetools',pages:pageNum,groups:5,skin:"",skip:true,last:pageNum,jump:function(obj,first){if(!first){getRand(obj.curr,18,nowpage);fy=layer.load(1,{shade:[0.1,'#000']})}}})}function color(){$(".newmoregengduolan ul li p").hover(function(e){$(this).animate({top:"-13px"})},function(e){$(this).animate({top:"5px"})});var arrColor=["#52C3DD","#F00","#09F","#9C6","#C63","#F09","#000","#DC143C","#EE82EE","#4B0082","#0000FF","#4169E1","#00FFFF","#008080","#00FA9A","#008000","#FFFF00","#DAA520","#F4A460","#FF4500","#CD5C5C","#009FAB","#008891","#44615E","#2E3161","#52090B","#948B53","#1A0A4A","#AB4B52","#041A13"];$(".newmoregengduolan .newicologozdy").each(function(index){if(arrColor.length>0){var clSub=Math.floor(Math.random()*arrColor.length);$(this).css("background",arrColor[clSub]);arrColor.splice(clSub,1)}else{return false}})}function ranName(name){for(var i=0;i<name.length;i++){var fi=name.substr(i,1);if(/[\u4e00-\u9fa5]/.test(fi)){return fi}else if(i+1==name.length){return'导'}}}$(".mrenck").live('click',function(e){chakanxiangqing()});$(".mrfw").live('click',function(e){zhijiefangwen()});function test(){if(getCookie('morenxlb')!='mrfw'||getCookie('morenxlb')==null){chakanxiangqing()}else{zhijiefangwen()}}function zhijiefangwen(){var topcount=$(".newmorepaihangul li").length;var obj=$(".newmorepaihangul li");for(var i=0;i<topcount;i++){obj.eq(i).find(".newallchangkxq").attr("href",obj.eq(i).find(".newallchangkxq").data("url"))}obj.find(".newallchangkxq").html("直接访问");var topcount=$(".newmoregengduolan ul li").length;var obj=$(".newmoregengduolan ul li");for(var i=0;i<topcount;i++){obj.eq(i).find(".newmoregengduoxq").attr("href",obj.eq(i).find(".newmoregengduoxq").data("url"))}obj.find(".newmoregengduoxq").html("直接访问")}function chakanxiangqing(){var topcount=$(".newmorepaihangul li").length;var obj=$(".newmorepaihangul li");for(var i=0;i<topcount;i++){obj.eq(i).find(".newallchangkxq").attr("href",obj.eq(i).find(".newallchangkxq").data("intro"))}obj.find(".newallchangkxq").html("查看详情");var topcount=$(".newmoregengduolan ul li").length;var obj=$(".newmoregengduolan ul li");for(var i=0;i<topcount;i++){obj.eq(i).find(".newmoregengduoxq").attr("href",obj.eq(i).find(".newmoregengduoxq").data("intro"))}obj.find(".newmoregengduoxq").html("网站详情")}