帝國CMS指定模型下的留言數量代碼:
- <?php
- $totalnum=(int)$_GET['totalnum'];
- $totalquery="select count(*) as total from ***_enewsgbook where bid=1 and checked=0";
- $num=$empire->gettotal($totalquery);//取得總條數
- echo $num;
- ?>
帝國CMS不指定模型留言數量代碼:
- <?php
- $totalnum=(int)$_GET['totalnum'];
- $totalquery="select count(*) as total from ***_enewsgbook";
- $num=$empire->gettotal($totalquery);//取得總條數
- echo $num;//開源軟件:Vevb.com
- ?>
帝國CMS搜索關鍵字帶點擊數效果:
1.建立一個自定義JS模板:模板內容如下:
[!--empirenews.listtemp--]<a href='/e/search/result/?searchid=[!--id--]'>[!--title--]([!--writer--])</a> [!--empirenews.listtemp--]
解釋:這里的writer字段本來是作者,但這里不需要,我們把他用來過度接收點擊數OnClick字段.
2.新建自定義JS,查詢SQL語句如下,記得將模板選為剛剛我們新建的模板:
select searchid as id,keyboard as title,onclick as writer from [!db.pre!]enewssearch where iskey=0 order by onclick desc limit 10
新聞熱點
疑難解答