青青久精品视频在线观看_久久国产精品久久国产品这里_亚洲综合色自拍一区首页_亚洲色偷国产一区二区三区

0712-2888027 189-8648-0214
微信公眾號

孝感風信網絡科技有限公司微信公眾號

當前位置:主頁 > 技術支持 > PHPCMS > phpcms模板中常用的GET標簽[熱點/評論/digg/相關新聞]

phpcms模板中常用的GET標簽[熱點/評論/digg/相關新聞]

時間:2015-11-11來源:風信官網 點擊: 669次

@7天內的點擊排行榜
<ol>
{get sql="SELECT * FROM `phpcms_content` c,`phpcms_content_count` n WHERE updatetime>'.TIME.'-7*86400 and c.contentid=n.contentid AND c.`status`=99 and catid='$catid' '.get_sql_catid($catid).' ORDER BY n.hits DESC" rows="8"}
<li><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{str_cut($r[title], 88)}</a></li>
{/get}
</ol>

@7天內的評論排行榜
<ol>
{get sql="SELECT * FROM `phpcms_content` c,`phpcms_content_count` n WHERE updatetime>'.TIME.'-7*86400 and c.contentid=n.contentid AND c.`status`=99 and catid='$catid' '.get_sql_catid($catid).' ORDER BY n.comments DESC" rows="8"}
<li><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{str_cut($r[title], 88)}</a></li>
{/get}
</ol>

@圖片推薦GET標簽(調用推薦ID為10的帶有縮略圖的信息)
{get sql="SELECT * FROM `phpcms_content` a, `phpcms_c_news` b WHERE a.contentid=b.contentid AND  `status`=99  AND  `thumb`!=''  AND  a.`contentid` IN(SELECT `contentid` FROM `phpcms_content_position` WHERE `posid`='10') ".get_sql_catid($catid)." ORDER BY a.contentid DESC" rows="3"}
<div class="col">
<div class="img" width="134"><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}"><img src="http://lanfeng898.blog.163.com/blog/{thumb($r[thumb], 130, 90)}" alt="{$r[title]}" border="0" /></a></div>
<h6><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{if $r[style]}<span class="{$r[style]}">{str_cut($r[title], 800,'')}</span>{else}{str_cut($r[title], 800,'')}{/if}</a></h6>
</div>
{/get}

@DIGG排行榜的GET標簽
<ol>
{get sql="SELECT * FROM phpcms_content c,phpcms_digg d WHERE c.contentid=d.contentid AND c.status=99 ORDER BY d.supports DESC" rows="8"}
<li><span>{$r[supports]}</span><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{str_cut($r[title], 88)}</a></li>
{/get}
</ol>

@只調用新聞模型且推薦ID為7的新聞
<ul>
{get sql="SELECT * FROM phpcms_content c,phpcms_c_news n,phpcms_content_position p WHERE c.contentid=n.contentid and c.contentid=p.contentid and posid=7 and `status`=99 ORDER BY inputtime DESC" rows="6"}
<li><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{str_cut($r[title], 88)}</a></li>
{/if}
</ul>

@調用相關新聞
{get sql="SELECT * FROM phpcms_content c,phpcms_content_tag t WHERE c.contentid!='$contentid' and c.contentid=t.contentid and c.status=99 AND t.tag IN('.get_sql_in($r[keywords]).')  ORDER BY c.contentid DESC" rows="6"}
<li><a href="http://lanfeng898.blog.163.com/blog/{$r[url]}">{str_cut($r[title], 88)}</a></li>
{/get}

欄目列表
推薦內容
熱點內容
展開