星联网络专注帝国CMS二次功能插件开发-精品网站模板站长代码素材

  • 最近更新
  • 模板:33
  • 记录:12641|
  • 插件:52|
  • 工具:4|
  • 代码:8|
  • 评论:0

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

前言

本文主要讲解《dede下载统计fo链接到真实软件地址》的详细内容

织梦dedecms下载统计for链接到真实软件地址 : 将软件下载链接弄成显示真实地址时的下载统计 第一步 打开 Quote: \include\taglib\channel\softlinks.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("[\r\n]{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);

本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。

本文地址:http://www.xlkjgs.com/notes/web/7044.html

以上内容由本站整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

星联网络

星联网络是中国最具实战的互联网创业者的知识服务商,这里有互联网行业动态,网络推广,SEO优化,SEM优化,ESC配置,行业经验分型,互联网项目,微信营销、淘宝客赚钱、新媒体营销、京东运营、跨境电商等众多互联网营销知识分享

站长运营站长必备网站运营之道才能长久发展