1.找到plus\download.php,查找:
复制代码代码如下:
$vname = '';
foreach($cu->ChannelFields as $k=>$v){
if($v['type']=='softlinks'){ $vname=$k; break; }
}
在上面这个代码前面添加如下代码:
复制代码代码如下:
$id = isset($id) && is_numeric($id) ? $id : 0;
$hash = md5($link);
$query = "select click from dede_archives where id='$aid'";
$row = $dsql->GetOne($query);
$query = "update dede_archives set click=click+1 where id='$aid'";
$dsql->ExecNoneQuery($query);
2.找到plus\disdls.php,用以下代码全部替换
复制代码代码如下:
<?php
require_once(dirname(__FILE__)."/../include/common.inc.php");
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
$row = $dsql->GetOne("Select click From `dede_archives` where id='$aid' ");
if(is_array($row))
{
echo "document.write('".$row['click']."');\r\n";
}
exit();
?>