栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP > php开源框架 > dedecms

dede下载统计for链接到真实软件地址

dedecms 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

dede下载统计for链接到真实软件地址

织梦dedecms下载统计for链接到真实软件地址 : 将软件下载链接弄成显示真实地址时的下载统计 第一步 打开 Quote: includetaglibchannelsoftlinks.lib.php 找到 function getDownloads($url)   在它之前加入 function ch_softlinks_allb($fvalue,&$ctag,&$refObj,&$row) {     global $dsql;       //引入权限判断     require_once(DEDEINC."/memberlogin.class.php");     $cfg_ml = new MemberLogin(-1);     $query = "select daccess from ".$refObj->ChannelInfos['addtable']." where aid=’".$refObj->ArcID."’";     $daccess = $dsql->GetOne($query);     if($cfg_ml->M_Rank < $daccess['daccess'])     {         return ‘你的权限不足或者未登录, 不能下载! 请登陆或者升级等级‘;     }     $phppath = $GLOBALS['cfg_phpurl'];     $downlinks = ”;     $dtp = new DedeTagParse();     $dtp->LoadSource($fvalue);     if(!is_array($dtp->CTags))     {         $dtp->Clear();         return "无链接信息!";     }     $tempStr = GetSysTemplets(‘channel_downlinksb.htm’);     foreach($dtp->CTags as $ctag)     {         if($ctag->GetName()==’link’)         {             $links = trim($ctag->GetInnerText());             $serverName = trim($ctag->GetAtt(‘text’));             $islocal = trim($ctag->GetAtt(‘islocal’));             if(!isset($firstlink) && $islocal==1)             {                 $firstlink = $links;             }             if($islocal==1 && $row['islocal']!=1)             {                 continue;             }             else             {                 //支持http,迅雷下载,ftp,flashget                 if(!eregi(‘^http://|^thunder://|^ftp://|^flashget://’,$links))                 {                     $links = $GLOBALS['cfg_mainsite'].$links;                 }                 $downloads = getDownloads($links);                 if($row['gotojump']==1)                 {                     $links = $phppath."/download.php?open=1&id=".$refObj->ArcID."&link=".urlencode(base64_encode($links));                 }                 $temp = str_replace("~link~",$links,$tempStr);                 $downlinks .= $temp;             }         }     }     $dtp->Clear();     //启用镜像功能的情况     if($row['ismoresite']==1 && !empty($row['sites']) && isset($firstlink))     {         $firstlink = @eregi_replace($GLOBALS['cfg_basehost'],”,$firstlink);         $row['sites'] = ereg_replace("[rn]{1,}","n",$row['sites']);         $sites = explode("n",trim($row['sites']));         foreach($sites as $site)         {             if(trim($site)==”)             {                 continue;             }             list($link,$serverName) = explode(‘|’,$site);             $link = trim($link).$firstlink;             $downloads = getDownloads($link);             if($row['gotojump']==1)             {                 $link = $phppath."/download.php?open=1&link=".urlencode(base64_encode($link));             }             $temp = str_replace("~link~",$link,$tempStr);             $temp = str_replace("~server~",$serverName,$temp);             $temp = str_replace("~downloads~",$downloads,$temp);
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/4448.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号