php手机版页,phpcms手机内容页面添加上一篇和下一篇
发布日期:2021-06-24 15:51:18 浏览次数:3 分类:技术文章

本文共 769 字,大约阅读时间需要 2 分钟。

在phpcms\modules\wap\index.php里面,搜索下面这句

if(!$r || $r['status'] != 99) showmessage(L('info_does_not_exists'),'blank');

找到后,在它的下一行添加上

//上一页

$previous_page = $this->db->get_one("`catid` = '$catid' AND `id`

//下一页

$next_page = $this->db->get_one("`catid`= '$catid' AND `id`>'$id' AND `status`=99");

if(empty($previous_page)) {

$previous_page = array('title'=>L('first_page'), 'thumb'=>IMG_PATH.'nopic_small.gif', 'url'=>'javascript:alert(\''.L('first_page').'\');');

}

if(empty($next_page)) {

$next_page = array('title'=>L('last_page'), 'thumb'=>IMG_PATH.'nopic_small.gif', 'url'=>'javascript:alert(\''.L('last_page').'\');');

}

在模板中添加

上一页:

< a href="{WAP_SITEURL}&a=show&catid={$catid}&typeid=1&id={$previous_page[id]}" >{$previous_page[title]}

下一页:

以上所述就是本文的全部内容了,希望大家能够喜欢。

转载地址:https://blog.csdn.net/weixin_33642922/article/details/115506832 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:DZ php升级,php升级记录 - shawnplaying的个人页面 - OSCHINA - 中文开源技术交流社区...
下一篇:php sap,谈谈你对Zend SAPIs(Zend SAPI Internals)的理解

发表评论

最新留言

哈哈,博客排版真的漂亮呢~
[***.90.31.176]2024年04月26日 18时28分02秒