<?php 
error_reporting(0); 
header("Content-Type: text/html; charset=UTF-8");
include './admin/config.php';$rewrite=$config['rewrite'];
include './admin/global.php';
function is_HTTPS(){  
    if(!isset($_SERVER['HTTPS']))  return FALSE;  
    if($_SERVER['HTTPS'] === 1){  //Apache  
        return TRUE;  
    }elseif($_SERVER['HTTPS'] === 'on'){ //IIS  
        return TRUE;  
    }elseif($_SERVER['SERVER_PORT'] == 443){ //其他  
        return TRUE;  
    }  
    return FALSE;  
}


$gets=geturl();if(empty($gets['sort']) and $gets[by]!=='search'){$gets['sort']='index';}
if($gets['sort']=='bf'){$urlt=file_get_contents('./data/id/'.$gets['id'][0]);
$urlt=explode("|||",$urlt);$urls=json_decode(gzinflate($urlt[2]));$keys=$urlt[1].'播放';}else{if($gets['sort']=="index" or $gets['sort']=="list"){$keys='视频大全';}else{$keys='搜索'.urldecode($gets['id'][0]);}}
$config['bt']=str_replace('yk[key]',$keys,$config['bt']);
$config['key']=str_replace('yk[key]',$keys,$config['key']);
$config['ms']=str_replace('yk[key]',$keys,$config['ms']);$gxsj=$config['hcgx'];//更新间隔，双倍更新时间前的文件将自动删除
$guanggao=explode('|||',$config['js']);
hcgx($gxsj);?><html>
<head>
<meta charset="utf-8">

<title><?php echo $config['bt'];?></title>
<meta name="keywords" content="<?php echo $config['key'];?>" />
<meta name="description" content="<?php echo $config['ms'];?>" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<base href="<?php echo $config['siteurl'];
?>/" />
<link href="./moban/styles.css" rel="stylesheet" type="text/css"></head><body>
<script type="text/javascript">
function nofind(){
var img=event.srcElement;
img.src="./moban/nocover.jpg";
img.onerror=null;
}
</script>
<div id="width" style="margin:auto;">
<div align="center"><br><form action="index.php" method="get"> <input type="text" name="key" style="width:75%; height:35px;border-radius:5px;border:1px solid #ccc;"><input type="hidden"  name="by" value="search"><input type="submit"  style="width:25%;height:35px;text-align:center;border:1px solid #aeaeae;border-radius:10px;text-align:center;color:#fff; font-size:18px;background:#298eff;" value="搜索"></form><br></div>
<?php 
if($gets['sort']=='search' or $gets['sort']=='bf'){
echo '<div align="center" style="font-weight:bold;font-size:20px;margin:0px 5% 0px 5%;"><a href="'.ykurl('index').'">首页</a>&nbsp; <a href="'.ykurl('list','dianshi','all').'">更多电视剧</a>&nbsp; <a href="'.ykurl('list','dianying','all').'">更多电影</a>&nbsp; <a href="'.ykurl('list','zongyi','all').'">更多综艺</a>&nbsp; <a href="'.ykurl('list','dongman','all').'">更多动漫</a></div><div style="clear:both;"></div>
<br>';}else{echo '<link rel="stylesheet" href="./moban/css1.css" /><link rel="stylesheet" href="./moban/css2.css" />';}
?><div align="center"  style="font-weight:bold;margin:0px 5% 0px 5%;"><?php echo $config['gonggao'].'<br>'.$guanggao[0];;?></div><br><hr>
<?php
$jkjk=explode('|||',$config['url']);
		$config['link']=explode('|||',$config['link']);
		for($i=0;$i<count($config['link']);$i++){$config['link'][$i]=explode(',',$config['link'][$i]);$yqlj.=' <a href="'.$config['link'][$i][1].'">'.$config['link'][$i][0].'</a> ';}

$foot='
    <div class="clearfloat"></div>
<footer> 
    <p>
        Copyright &copy; <a href="'.$config['siteurl'].'">'.$config['siteurl'].'</a> | Collect Form <a href="'.$config['siteurl'].'" title="'.$config['sitename'].'">'.$config['sitename'].'</a> | '.$config['tongji'].' | 友情链接：'.$yqlj.'
    </p>
</footer></div>
<script type="text/javascript">  
function widdd() {
var k=document.body.clientWidth;var s=window.screen.width;
if(k>s){k=s;}
k=k+15;
k=Math.floor(k/170);if(k<=2){k=2;}k=k*170-15;
document.getElementById("width").style.width=k+"px";
document.getElementById("wrap").style.width=k+"px";
}
widdd();
window.onresize=widdd();
</script>

</body>
</html>
';

function qlj($str){$str=preg_replace('#href="(.*?)"#','',$str);return $str;}
function urlcl($str){
    if(strstr($str,'&url=')){$strs=explode('&url=',$str);$str=$strs[1];}
    if(strstr($str,'.html?')){$strs=explode('.html?',$str);$str=$strs[0].'.html';}return $str;}

if($gets['sort']=='bf'){
echo '<div align="center" style="font-weight:bold;margin:0px 5% 0px 5%;color:red;"><br>播放页使用说明：解析源为网友共享VIP账号，如某个解析源无法播放，可点击切换其他解析源。来源站为视频所在原站点，如某原站点播放失败，可点击切换其他来源站。</div><br><hr><div class="menu" id="mulu"> <ul><li style="float:left;"><a href="javascript:history.back();" style="color:red;background:#ADF3AD;">返回</a></li><li style="float:left;"><a style="color:red;background:#ADF3AD;">解析源：</a></li>';
for($k=0;$k<count($jkjk);$k++){$suzi=$k+1;echo '<li style="float:left;"><a href="javascript:jxy('.$k.')"  style="color:white;background:black;">源'.$suzi.'</a></li>';}
echo '</ul><div style="clear:both;"></div><hr><ul>';
if($gets[id][0]=='zdy'){$urls=json_decode(gzinflate(base64_decode(str_replace('imjh','+',$gets[mbz][0]))));$url=$urls->url;$ly=$urls->ly;$ly2=$urls->ly2;
  for($ys=0;$ys<count($url);$ys++){$yss=$ys+1;echo '<li style="float:left;"><a href="javascript:bfy('.$ys.')">第'.$yss.'集</a></li>';  }
    
    
}else{
$url=$urls->url;$ly=$urls->ly;$ly2=$urls->ly2;
echo '<li style="float:left;width:100px;"><a style="color:red;background:#ADF3AD;">来源站：</a></li>';
for($i=0;$i<count($ly);$i++){
	echo '<li style="float:left;width:100px;"><a href="'.ykurl('bf',$gets[id][0],$i).'"  style="color:white;background:black;">'.$ly[$i].'</a></li>';
}
echo '</ul><div style="clear:both;"></div><hr><ul>';
if(empty($gets[ly][0])){$gets[ly][0]="0";}
if($urlt[0]=='dy'){urlcl($url[$gets[ly][0]]);
if(strstr($ly[$gets[ly][0]],'[vip]') or strstr($ly[$gets[ly][0]],'土豆')){echo '<li style="float:left;"><a href="javascript:bfy(0)">第1集</a></li>';}else{echo '<li style="float:left;"><a href="javascript:bfys(0)">第1集</a></li>';}
	}else{
$lys=explode('_',$ly2[$gets[ly][0]]);
if($urlt[0]=='zy'){
$urllist='http://www.360kan.com/cover/zongyilist?id='.$lys[1].'&site='.$lys[2].'&do=switchsite&isByTime=false';
mkdir('./data');mkdir('./data/bf');$gxpd=time()-filemtime('./data/bf/'.md5($urllist));
		if($gxpd>$gxsj*60*60){
$fcon=curlgets($urllist);file_put_contents('./data/bf/'.md5($urllist),gzdeflate($fcon));    
		}
$fcon=gzinflate(file_get_contents('./data/bf/'.md5($urllist)));	
$gd=json_decode($fcon);
$urls=prma('<li  title=\'yk[name]\'yk[*]<a href=\'yk[url]\' data-daochu=to=>yk[*]<span class=\'w-newfigure-hint\'>yk[js]</span>',$gd->data);
for($s=0;$s<count($urls[url]);$s++){if(strstr($ly[$gets[ly][0]],'土豆')){echo '<li style="float:left;width:200px;"><a href="javascript:bfy(\''.$s.'\')">'.$urls[js][$s].':'.$urls[name][$s].'</a></li>';}else{echo '<li style="float:left;width:200px;"><a href="javascript:bfys(\''.$s.'\')">'.$urls[js][$s].':'.$urls[name][$s].'</a></li>';}}	
}else{
$data='s=[{"cat_id":"'.$lys[0].'","ent_id":"'.$lys[1].'","site":"'.$lys[2].'"}]';
mkdir('./data');mkdir('./data/bf');$gxpd=time()-filemtime('./data/bf/'.md5($data));
		if($gxpd>$gxsj*60*60){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://so.360kan.com/episodes');
curl_setopt($curl, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$r = curl_exec($curl);
curl_close($curl);
file_put_contents('./data/bf/'.md5($data),gzdeflate($r));    
		}
$r=gzinflate(file_get_contents('./data/bf/'.md5($data)));
$gd=json_decode($r);
if(strstr($gd[0]->seriesHTML,'<textarea')){$gd[0]->seriesHTML=cut('<textarea','</textarea>',$gd[0]->seriesHTML);}
//$gd[0]->seriesHTML=str_replace('<span class="new-ico-jiao"></span><span class=\'new-ico-fufei\'></span><span class=\'new-ico-fufeitext js-fufeitext\'></span>','',$gd[0]->seriesHTML);
$urls=prma('<a href="yk[url]"yk[*]>yk[js]<yk[pd]/a>',$gd[0]->seriesHTML);
for($s=0;$s<count($urls[url]);$s++){
    if(strstr($urls[pd][$s],'fufei') or strstr($ly[$gets[ly][0]],'土豆')){
    echo '<li style="float:left;"><a href="javascript:bfy('.$s.')" >第'.$urls[js][$s].'集</a></li>';}
    else{echo '<li style="float:left;"><a href="javascript:bfys('.$s.')" >第'.$urls[js][$s].'集</a></li>';}
    
}}
	}}


	
	
	
echo '</ul></div> <script type="text/javascript">
var jxydz="0";var spydz="0";var juji=null;
var jxym=new Array(';
for($jksl=0;$jksl<count($jkjk);$jksl++){echo '"'.$jkjk[$jksl].'"';if($jksl!==count($jkjk)-1){echo ',';}}
echo ');
var jtdz=new Array(';
if($urlt[0]=='dy'){echo '"'.urlcl($url[$gets[ly][0]]).'"';}elseif($gets[id][0]=='zdy'){
    for($jksl=0;$jksl<count($url);$jksl++){echo '"'.urlcl($url[$jksl]).'"';if($jksl!==count($url)-1){echo ',';}}}else{
for($jksl=0;$jksl<count($urls[url]);$jksl++){echo '"'.urlcl($urls[url][$jksl]).'"';if($jksl!==count($urls[url])-1){echo ',';}}}
echo ');
function minevideo(jx,dz){
    if(jx.indexOf("minevideo") > 0 ){
        if(dz.indexOf("www.le.com") > 0 ){bsfh="letv";}
        else if(dz.indexOf("youku") > 0 ){bsfh="youku";}
        else if(dz.indexOf("sohu") > 0 ){bsfh="sohu";}
        else if(dz.indexOf("iqiyi") > 0 ){bsfh="iqiyi";}
        else if(dz.indexOf("qq") > 0 ){bsfh="qq";}
        else if(dz.indexOf("mgtv") > 0 ){bsfh="mgtv";}
        else if(dz.indexOf("=") > 0 ){bsfh="youkuyun";}
        str="http://minevideo.sxl.me/"+bsfh+".php?vid="+dz+"&h=460&p=1";
        return str;
    }else{str=jx+dz;return str;}
}
 function bfy(num) {
juji=num; 
document.getElementById("myframe").src=minevideo(jxym[jxydz],jtdz[juji]); 
document.getElementById("anchor_scroll").click();
 }
 function bfys(num) {
juji=num; 
document.getElementById("myframe").src=minevideo(jxym[jxydz],jtdz[juji]); 
document.getElementById("anchor_scroll").click();
 }
 function jxy(num){
 jxydz=num;
if(!juji && typeof(juji)!="undefined" && juji!=0){}else{
document.getElementById("myframe").src=minevideo(jxym[jxydz],jtdz[juji]); 
document.getElementById("anchor_scroll").click();}}
 </script><a id="anchor_scroll" href="'.$_SERVER['REQUEST_URI'].'#pos" style="display:none"></a><div class="clearfloat"></div>
<div id="pos" align="center"><p><a href="'.$_SERVER['REQUEST_URI'].'#mulu" style="color:red;">&#8593;&#8593;&#8593;&#8593;&#8593;手机访问或官网播放不全的点击返回顶部选择解析源即可正常观看&#8593;&#8593;&#8593;&#8593;&#8593;</a></p><iframe width="100%" height="90%" frameborder="0" scrolling="no" name="myframe" id="myframe" ></iframe><p><a href="'.$_SERVER['REQUEST_URI'].'#mulu" style="color:red;">&#8593;&#8593;&#8593;&#8593;&#8593;向上滑动或点击返回剧集列表&#8593;&#8593;&#8593;&#8593;&#8593;<br>温馨提示：如播放失败，请返回顶部切换解析源和目标源！</a></p></div>'.$foot;
	exit;}//播放页到此结束
	elseif($gets['sort']=='list' or $gets['sort']=='index'){
		if($gets[cs][0]=='all'){$gets[cs][0]='';}$gets[cs][0]=unhuanh($gets[cs][0]);if(empty($gets[id][0])){$gets[id][0]='dianshi';}$urllist='http://www.360kan.com/'.$gets[id][0].'/list.php?rank=createtime&'.$gets[cs][0];mkdir('./data');mkdir('./data/list');$gxpd=time()-filemtime('./data/list/'.md5($urllist));
		if($gxpd>$gxsj*60*60){
		$fcon=file_get_contents($urllist);$fcon=str_replace("\r",'',$fcon);$fcon=str_replace("\n",'',$fcon);
		$fcon=preg_replace('#<!DOCTYPE html>(.*?)</form>#','',$fcon);
		//$fcon=preg_replace('#</head>(.*?)</form>#','',$fcon);
		//$fcon=preg_replace('#<link rel=\'stylesheet\'(.*?)\' />#','',$fcon);
		$fcon=preg_replace('#<div class="content-wrap p-ad g-clear">(.*?)</html>#','',$fcon);
		$fcon=preg_replace('#<div class="tab-line g-clear">(.*?)手机观看</a>            </div>#','',$fcon);
		$fcon=preg_replace('#class="js-tongjip" href="http://www.360kan.com/(.*?)/list.php\?(.*?)"#','class="js-tongjip" href="libaqz/$1/$2.html"',$fcon);
		            $fcon=preg_replace('#<a target="_self" href="/(.*?)/list"#','<a target="_self" href="libaqz/$1/all.html"',$fcon);
		            $fcon=preg_replace('#<a href=\'http:\/\/www.360kan.com\/(.*?)\/list.php\?rank=createtime&(.*?)\'#','<a href=\'libaqz/$1/$2.html\'',$fcon);
		            
		            for($th=1;$th<=4;$th++){$fcon=preg_replace('#libaqz/([^&].*?)&([^&].*?).html#','libaqz/$1-$2.html',$fcon);}
		if($rewrite!=='on'){
		    $fcon=preg_replace('#libaqz/([^>].*?)/([^>].*?).html#','index.php?sort=list&id=$1&cs=$2',$fcon);
		    $fcon=preg_replace('#<a class="js-tongjic" href="(.*?)">(.*?)<span class="s1">(.*?)</span>#','<a class="js-tongjic" href="index.php?sort=search&id=$3">$2<span class="s1">$3</span>',$fcon);
		}else{$fcon=preg_replace('#<a class="js-tongjic" href="(.*?)">(.*?)<span class="s1">(.*?)</span>#','<a class="js-tongjic" href="$3.html">$2<span class="s1">$3</span>',$fcon);}
		$fcon=preg_replace('#<img (.*?)>#','<img $1  onerror="nofind();">',$fcon);

		$fcon=preg_replace('#<dl class="b-listfilter-item js-listfilter">            <dt class="type">明星:</dt>(.*?)</dl>#','',$fcon);
		

		$fcon=preg_replace('#<span class="s2">(.*?)</span>#','',$fcon);
		$fcon=preg_replace('#<span class="pay">(.*?)</span>#','',$fcon);
		$fcon=str_replace('<div class="g-wrap">','<div class="g-wrap" id="wrap">',$fcon);
		
		$fcon=str_replace('libaqz/','',$fcon);
		preg_match_all('#<a class="js-tongjic" href="(.*?).html">#',$fcon,$match);
		for($k=0;$k<count($match[0]);$k++){$fcon=str_replace($match[0][$k],'<a class="js-tongjic" href="'.ykurl('search',urlencode($match[1][$k])).'">',$fcon);}
		if(strlen($fcon)>=100){file_put_contents('./data/list/'.md5($urllist),gzdeflate($fcon));    }
		}
		$fcon=gzinflate(file_get_contents('./data/list/'.md5($urllist)));
		echo $fcon;
		
		
		
		
		echo $foot;
		
		
		
		
		
		
		
		
		
		exit;}
	
//搜索页开式

if(strstr($gets['key'],'http') or strstr($gets['key'],'=')){$urls[url][0]=$gets['key'];$urls[ly][0]='自定义';
	$mbz=base64_encode(gzdeflate(json_encode($urls)));$mbz=str_replace('+','imjh',$mbz);header("Location:index.php?sort=bf&id=zdy&mbz=".$mbz); exit;}
if($gets[by]=="search"){header("Location:".ykurl('search',urlencode($gets['key']))); exit;}	

if(1>2){
$youyun=file_get_contents('./data/cj2.txt');
$youyun=explode('|&|',$youyun);$youyunjs='0';
for($i=count($youyun);$i>=0;$i--){if($youyunjs<=1){if(strstr($youyun[$i],urldecode($gets[id][0]))){$youyunjs=$youyunjs+1;
$youyun[$i]=explode(',',$youyun[$i]);$youyun[$i][1]=explode('/',$youyun[$i][1]);
	mkdir('./data');mkdir('./data/youyun');$gxpd=time()-filemtime('./data/youyun/'.$youyun[$i][1][1]);
		if($gxpd>$gxsj*60*60){
$youy=file_get_contents('http://yikdom.free2.tx333.cc/cj.php?1='.$youyun[$i][1][0].'&2='.$youyun[$i][1][1]);		    
//$youy=file_get_contents('http://www.ppypp.com/'.$youyun[$i][1][0].'/'.$youyun[$i][1][1].'/play-1-0.html');
$youy=cut('<div class="player">','</script>',$youy);$youy=str_replace('$','!',$youy);
file_put_contents('./data/youyun/'.$youyun[$i][1][1],gzdeflate($youy));}
$youy=gzinflate(file_get_contents('./data/youyun/'.$youyun[$i][1][1]));
if(strstr($youy,'优酷云!')){
$youy=cut('优酷云!!','!!!',$youy);
$youyc=prma('!Cyk[c]!ykyun',$youy);
for($X=0;$X<count($youyc[c]);$X++){$urls[url][$X]='C'.$youyc[c][$X].'=';}
$urls[ly][0]='自定义';$mbz=base64_encode(gzdeflate(json_encode($urls)));$mbz=str_replace('+','imjh',$mbz);
    echo '<br><div style="float:left;margin-right:10px;"><img src="'.$youyun[$i][2].'"  onerror="nofind();"  style="height:180px;"/><p><a href="'.ykurl('bf','zdy',$mbz).'"></div><div>'.$youyun[$i][0].'(来源：自有资源1【速度快，有效性高，如失效请选择公共资源】)</a></p><span class="playtype'.qlj($youysj[jj][0]).'<br>'.$youyun[$i][3].'</div><div style="clear:both;"></div><br><hr>';}
}}}

}
$youyun=file_get_contents('./data/cj.txt');
$youyun=explode('|&|',$youyun);$youyunjs='0';
for($i=count($youyun);$i>=0;$i--){if($youyunjs<=1){if(strstr($youyun[$i],urldecode($gets[id][0]))){$youyunjs=$youyunjs+1;
$youyun[$i]=explode(',',$youyun[$i]);
	mkdir('./data');mkdir('./data/youyun');$gxpd=time()-filemtime('./data/youyun/'.$youyun[$i][1]);
		if($gxpd>$gxsj*60*60){
$youy=file_get_contents('http://www.cziyuan.cc/?m=vod-detail-id-'.$youyun[$i][1].'.html');
$youy=preg_replace('#<li class="sm">总播放量：<span>(.*?)</span></li>#','',$youy);
file_put_contents('./data/youyun/'.$youyun[$i][1],gzdeflate($youy));}
$youy=gzinflate(file_get_contents('./data/youyun/'.$youyun[$i][1]));
$youysj=prma('img class="lazy" src="yk[img]" alt="yk[*]<h2>yk[name]</h2>yk[*]<div class="vodinfobox">yk[jj]</div>yk[*]<div class="playBar liketitle">yk[*]<div class="vodplayinfo">yk[jiesao]</div>',$youy);
$youyc=prma('<li><input type="checkbox" name="copy_sel" value="yk[c]"',$youy);
if(!empty($youyc[c][0])){
$urls[url]=$youyc[c];$urls[ly][0]='自定义';$mbz=base64_encode(gzdeflate(json_encode($urls)));$mbz=str_replace('+','imjh',$mbz);
    echo '<br><div style="float:left;margin-right:10px;"><img src="'.$youysj[img][0].'"  onerror="nofind();"  style="height:180px;"/><p><a href="'.ykurl('bf','zdy',$mbz).'"></div><div>'.$youysj[name][0].'(来源：自有资源2【速度快，有效性高，如失效请选择公共资源】)</a></p><span class="playtype'.qlj($youysj[jj][0]).'<br>'.$youysj[jiesao][0].'</div><div style="clear:both;"></div><br><hr>';}
}}}


	$urllist='http://so.360kan.com/index.php?kw='.urldecode($gets[id][0]);
	mkdir('./data');mkdir('./data/search');mkdir('./data/id');$gxpd=time()-filemtime('./data/search/'.md5($urllist));
		if($gxpd>$gxsj*60*60){
$header=head('y');
$fcon=curlgets($urllist,$header);
$fcon=cut('<div class="a-engine-body js-logger">','<iframe',$fcon);
$fcon=str_replace('<span class="b-source-pay">[付费]</span>','[vip]',$fcon);
$fcon=str_replace('?ptag=360kan.movie.free','',$fcon);
$fcon=str_replace('</a>','</a> ',$fcon);
$fcon=str_replace("\r",'',$fcon);$fcon=str_replace("\n",'',$fcon);$fcon=str_replace("   ",'  ',$fcon);$fcon=str_replace("  data-logger=",' data-logger=',$fcon);
for($d=1;$d<=20;$d++){$fcon=str_replace('</div> ','</div>',$fcon);}
$fcon=str_replace('(付费)','[vip]',$fcon);if(strlen($fcon)>=100){file_put_contents('./data/search/'.md5($urllist),gzdeflate($fcon));}}
$fcon=gzinflate(file_get_contents('./data/search/'.md5($urllist)));
$sj1=prma('<div class="index-yk[lx,m]  g-clear" data-logger="hidstat=yk[*,s]&cat_id=yk[*,s]&ent_id=yk[ids,s]&pos=yk[*,s]&quality=yk[*,s]">yk[nr]</div></div></div>',$fcon);
for($i=0;$i<count($sj1[lx]);$i++){
	$sj=prma('<img src="yk[fm]" alt="yk[name]" />yk[*]<span class="playtypeyk[jj]<dl class="yk[*]data-full="yk[jiesao]">',$sj1[nr][$i]);
	if(!strstr($sj1[nr][$i],'暂无播放资源')){
	if(strstr($sj1[lx][$i],'dianying')){
	$url=explode('<!--来源-->',$sj1[nr][$i]);
	$urls=prma('<ayk[*]ref="yk[url]"yk[*]>yk[ly]</a>',$url[1]);
	$mbz='dy|||'.$sj[name][0].'|||'.gzdeflate(json_encode($urls));
	file_put_contents('./data/id/'.$sj1[ids][$i],$mbz);
	echo '<br><div style="float:left;margin-right:10px;"><img src="'.$sj[fm][0].'"  onerror="nofind();"  style="height:180px;"/><p><a href="'.ykurl('bf',$sj1[ids][$i]).'"></div><div>'.$sj[name][0].'(来源：'.$urls[ly][0].'【公共资源】)</a></p><span class="playtype'.qlj($sj[jj][0]).'<br>'.$sj[jiesao][0].'</div><div style="clear:both;"></div><br><hr>';
	}else{
	$urls=prma('<a href=yk[*]data-tab="yk[*,m]_yk[ly2]"yk[*]">yk[ly]</a>',$sj1[nr][$i]);
	if(strstr($sj1[nr][$i],'view-item-zongyi')){$leixin='zy';}else{$leixin='dsj';}
	$mbz=$leixin.'|||'.$sj[name][0].'|||'.gzdeflate(json_encode($urls));
	file_put_contents('./data/id/'.$sj1[ids][$i],$mbz);
	echo '<br><div style="float:left;margin-right:10px;"><img src="'.$sj[fm][0].'"  onerror="nofind();"  style="height:180px;"/><p><a href="'.ykurl('bf',$sj1[ids][$i]).'"></div><div>'.$sj[name][0].'(来源：'.$urls[ly][0].'【公共资源】)</a></p><span class="playtype'.qlj($sj[jj][0]).'<br>'.$sj[jiesao][0].'</div><div style="clear:both;"></div><br><hr>';		
	}}
	}
echo $foot;		


?>