Ѹ׿쳵<!--#empirecms.bq-phome.net#--!>дԸid<!--#empirecms.bq-phome.net#--!>user_echouniondown<!--#empirecms.bq-phome.net#--!>echouniondown<!--#empirecms.bq-phome.net#--!>[echouniondown]Ѹid,쳵id[/echouniondown]<!--#empirecms.bq-phome.net#--!>// by yingnt QQ 415204
// нģ嶨ƣοhttp://www.ecmsjz.cn
//Ѹ׼
function ThunderEncode($url) 
{
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$url.$thunderPosix);
return $thunderUrl;
}
//쳵
function FlashgetEncode($t_url,$uid) 
{
$prefix= "Flashget://";
$FlashgetURL=$prefix.base64_encode("[FLASHGET]".$t_url."[FLASHGET]")."&".$uid;
return $FlashgetURL;
}

function user_echouniondown($xlid=0,$kcid=0){
	global $empire,$public_r,$class_r,$navinfor,$dbtbpre;
	$path_r=explode("\r\n",$navinfor[downpath]);
	$pathid='0';
	$showdown_r=explode("::::::",$path_r[$pathid]);
	$urlid=$showdown_r[4];
	if($urlid!=='0'){
	$r=$empire->fetch1("select urlid,url from {$dbtbpre}enewsdownurlqz where urlid='".$urlid."' limit 1;");
	}
	$thunderUrl = ThunderEncode("".$r[url].$showdown_r[1].""); 
	
	$Url = $r[url].$showdown_r[1];
	$flashgetUrl = FlashgetEncode($Url,$kcid);
?>
<script>
	function ConvertURL2FG(url,fUrl,uid)
	{	
		try{
			FlashgetDown(url,uid);
		}catch(e){location.href = fUrl;}
	}
	function Flashget_SetHref(obj,uid){obj.href = obj.fg;}
</script>
<?
	echo '<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script><script src="http://ufile.kuaiche.com/Flashget_union.php?fg_uid='.$kcid.'"></script><A oncontextmenu=ThunderNetwork_SetHref(this) onclick="return OnDownloadClick_Simple(this,2,4)" href="#" thunderResTitle="'.$navinfor[title].'" thunderType="" thunderPid="'.$xlid.'" thunderHref="'.$thunderUrl.'">[Ѹרø]</A> <a href="#" onClick="ConvertURL2FG(\''.$flashgetUrl.'\',\'\','.$kcid.')" oncontextmenu="Flashget_SetHref(this)" fg="'.$flashgetUrl.'">[쳵רø]</a>';
}
