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

织梦教程 强烈建议 2024-02-06 14:27 134 0

  $temp=str_replace("~downloads~",$downloads,$temp);

  $downlinks .=$temp;

  }

  }

  return $downlinks;

  }

  第二步找到

  function ch_softlinks_all($fvalue,&$ctag,&$refObj,&$row)

  在其之前加入

  function ch_softlinksb($fvalue,&$ctag,&$refObj,$fname=”,$downloadpage=false)

  {

  global $dsql;

  $row=$dsql->GetOne("Select * From `2d30_softconfig` ");

  $phppath=$GLOBALS['cfg_phpurl'];

  $downlinks=”;

  if($row['downtype']!=’0′ && !$downloadpage)

  {

  $tempStr=GetSysTemplets("channel_downlinkpage.htm");

  $links=$phppath."/download.php?open=0&aid=".$refObj->ArcID."&cid=".$refObj->ChannelID;

  $downlinks=str_replace("~link~",$links,$tempStr);

  return $downlinks;

  }

  else

  {

  return ch_softlinks_allb($fvalue,$ctag,$refObj,$row);

  }

  }

  第三步

  打开plus\download.php

  找到

  $downlinks=ch_softlinks($row[$vname],$ctag,$cu,”,true);

  在其后面另起一行加入

  $myurl=ch_softlinksb($row[$vname],$ctag,$cu,”,true);

  第四步

  新建个文件 channel_downlinksb.htm,该文件保存于templets\system\channel_downlinksb.htm

  其内容如下:

  

  • ~link~
  •   第五步

      打开

      Quote:

      templets\plus\download_links_templet.htm

      找到

      

      替换为(注意把网站域名换成你自己的)

      

      第六步

      新建个 downloadcouter.php 存入于\plus目录下 与download.php同在一个目录

      其内容如下

      

      require_once(dirname(__FILE__)."/");

      require_once(DEDEINC."/channelunit.class.php");

      echo "感谢您支持本站,回到网站主页";

      $id=$_GET["aid"];

      $url=$_GET["myurl"];

      $hash=md5($url);

      $query="select count(*) as dd from 2d30_downloads where hash=’$hash’";

      $row=$dsql->GetOne($query);

      if($row['dd'] > 0)

      {

      $query="update 2d30_downloads set downloads=downloads+1 where hash=’$hash’";

      $dsql->ExecNoneQuery($query);

      }else {

      $query="insert into 2d30_downloads(hash,id,downloads) values(‘$hash’,’$id’,1)";

      $dsql->ExecNoneQuery($query);

      }

      ?>



    时间:(2024-02-06 14:27:24)
    本站资源均来自互联网或会员发布,如果不小心侵犯了您的权益请与我们联系。我们将立即删除!谢谢!