//日下載數(shù)
elseif($down==7)
{
$r=$empire->fetch1("select?DayHits?from?{$dbtbpre}ecms_".$cr['tbname']."?where?id='$id'?limit?1");
$shownum=$r['DayHits'];
}
//周下載數(shù)
elseif($down==8)
{
$r=$empire->fetch1("select?WeekHits?from?{$dbtbpre}ecms_".$cr['tbname']."?where?id='$id'?limit?1");
$shownum=$r['WeekHits'];
}
//月下載數(shù)
elseif($down==9)
{
$r=$empire->fetch1("select?MonthHits?from?{$dbtbpre}ecms_".$cr['tbname']."?where?id='$id'?limit?1");
$shownum=$r['MonthHits'];
}
第三步打開/e/class/DownSysFun.php 找到(//總下載數(shù)據(jù)增一)
$usql=$empire->query("update?{$dbtbpre}ecms_".$class_r[$classid][tbname]."?set?totaldown=totaldown+1where?id='$id'");
替換成:
$usql=$empire->query("update?{$dbtbpre}ecms_".$class_r[$classid][tbname]."?set?totaldown=totaldown+1,DayHits=DayHits+1,WeekHits=WeekHits+1,MonthHits=MonthHits+1?where?id='$id'");
第四步內(nèi)容頁(yè)調(diào)用
今日下載:
本周下載:
本月下載:
第五步
query("update?{$dbtbpre}ecms_download?set?DayHits=0");???//不同的數(shù)據(jù)表,自己修改下,我用的是下載模型。所以是?download
?>
再新增周下載清空
query("update?{$dbtbpre}ecms_download?set?WeekHits=0");??
?>
再新增月下載清空
query("update?{$dbtbpre}ecms_download?set?MonthHits=0");??
?>
完成! 版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 帝國(guó)CMS調(diào)用今日下載本月下載本周下載排行的實(shí)現(xiàn)方法