本文共 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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!