Comments: DEDECMS downloads show is always 0, the official free version of the previous upgrade, don't download channel download times show problems, amended in accordance with this method, and is not really just downloaded, open the download page clicks, just a matter of expediency, if you have other good methods please modify tell me!
1。
发现加 download.php,找到:
复制代码代码如下所示:
$vname = '';
foreach(合铜> channelfields达k = > $ V){
如果($ V {
类型} = = 'softlinks){ $ vname = $ K;break;}
}
在上面的代码前面添加以下代码:
复制代码代码如下所示:
$id = isset($id)is_numeric($id)身份证:0美元;
哈希= MD5($链接);
为
查询=选择单击从dnzsw04_archives id是美元的援助;
行=美元美元(美元DSQL ->办理查询);
美元=更新查询dnzsw04_archives
设置点击=点击+ 1的id是美元的援助;
DSQL -> execnonequery美元($查询);
2。发现加 disdls.php和取代它与下面的代码
复制代码代码如下所示:
< PHP
require_once(dirname(__file__)。 / / / ..包括常见。php );
美元的援助=(isset(美元援助)is_numeric(美元援助))援助:0美元;
行=美元美元DSQL -> GetOne(选择点击从` dnzsw04_archives ` id是美元的援助);
如果(is_array(合行))
{
回声document.write($行{一}。。;;
}
出口();
/ * -----------
如果要
显示下载的数量,请将下面的js调用放到
文档模板的适当
位置 ------------ * /
>