国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS教程 > 帝國Empire > 正文

帝國CMS上一篇,下一篇標題鏈接字數(shù)截取調(diào)用靈動標簽sql當前欄目

2024-04-25 20:53:12
字體:
供稿:網(wǎng)友

一: 動態(tài)調(diào)用上一篇下一篇鏈接 

<a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=pre">上一篇</a>   動態(tài)調(diào)用上一篇鏈接 
<a href="[!--news.url--]e/public/GotoNext?classid=[!--classid--]&id=[!--id--]&enews=next">下一篇</a> 動態(tài)調(diào)用下一篇鏈接 

二: 運用靈動標簽和SQl語句調(diào)用(感謝 平凡妹子) 

上一篇鏈接: 
[e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_".$class_r[$navinfor[classid]]['tbname']." where id<".$navinfor[id]." and  classid=".$navinfor[classid]." and checked=1 order by id desc limit 1",1,24,0}] 
<?php 
$titleurl=sys_ReturnBqTitleLink($bqr); 
echo $titleurl; 
[/e:loop] 

下一篇鏈接:(把小于號改成大于號) 
[e:loop={"select id,classid,newspath,filename,groupid,titleurl from [!db.pre!]ecms_".$class_r[$navinfor[classid]]['tbname']." where id>".$navinfor[id]." and  classid=".$navinfor[classid]." and checked=1 order by id desc limit 1",1,24,0}] 
<?php 
$titleurl=sys_ReturnBqTitleLink($bqr); 
echo $titleurl; 
[/e:loop] 

三: 運用靈動標簽調(diào)用,比較簡潔的方式(感謝 落木蕭蕭) 

<!--上一篇--> 
[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}] 
<a href="<?php 
echo $bqsr[titleurl]; 
$pre='true'; 
?>">上一篇:<?=$bqr[title]?> 
</a> 
[/e:loop] 
<?php 
if(empty($pre)){ 
echo "上一篇:很抱歉沒有了"; 
} 
?> 

<!--下一篇--> 
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}] 
<a href="<?php 
echo $bqsr[titleurl]; 
$next='true'; 
?>">下一篇:<?=$bqr[title]?> 
</a> 
[/e:loop] 
<?php 
if(empty($next)){ 
echo "下一篇:很抱歉沒有了"; 
} 
?> 

四: 控制上一篇下一篇標題字數(shù)截取30個字符為例 

運用:<?=esub($bqr[title],30)?> 

<!--上一篇--> 
[e:loop={'selfinfo',1,0,0,'id<'.$navinfor[id].'','id desc'}] 
<a href="<?php 
echo $bqsr[titleurl]; 
$pre='true'; 
?>">上一篇: <?=esub($bqr[title],30)?></a> 
[/e:loop] 
<?php 
if(empty($pre)){ 
echo "上一篇:很抱歉沒有了"; 
} 
?> 

<!--下一篇--> 
[e:loop={'selfinfo',1,0,0,'id>'.$navinfor[id].'','id asc'}] 
<a href="<?php 
echo $bqsr[titleurl]; 
$next='true'; 
?>">下一篇:<?=esub($bqr[title],30)?> 
</a> 
[/e:loop] 
<?php 
if(empty($next)){ 
echo "下一篇:很抱歉沒有了"; 
} 
?> 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表

圖片精選

主站蜘蛛池模板: 西藏| 昆明市| 赤壁市| 铜梁县| 常熟市| 沙湾县| 自贡市| 南岸区| 梁山县| 淮南市| 乌鲁木齐市| 莫力| 禹州市| 铁力市| 肥西县| 延川县| 临澧县| 巴塘县| 平遥县| 胶南市| 马山县| 合江县| 宜章县| 蒙自县| 安顺市| 陕西省| 富源县| 紫云| 张家界市| 郧西县| 大田县| 晋城| 凭祥市| 仪征市| 乌兰县| 五大连池市| 抚州市| 永顺县| 扶绥县| 岳西县| 汾西县|