作者:mobiledu2502891657 | 来源:互联网 | 2018-07-17 03:02
dedecms ajax 下载统计代码
require_once (dirname(__FILE__) . "/include/common.inc.php");
require_once(DEDEINC."/channelunit.class.php");
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
$rand =mt_rand(10,80);
$query = "select count(*) as dd from #@__downloads where id='$aid'";
$row = $dsql->GetOne($query);
if($row['dd'] > 0)
{
$query = "update #@__downloads set downloads=downloads+$rand where id='$aid'";
$dsql->ExecNoneQuery($query);
}else {
$query = "insert into #@__downloads(hash,id,downloads) values('null$aid','$aid',1)";
$dsql->ExecNoneQuery($query);
}
下面是实例方法。
软件名称:绿色版Apache+Php+Mysql V1.3 自动安装版
网站版权信息及免责声明
Copyright down.111cn.net © 2004-2008 Inc.