本文整理自网络,侵删。
在phpcms\modules\wap\index.php里面,搜索下面这句
代码如下:
if(!$r || $r['status'] != 99) showmessage(L('info_does_not_exists'),'blank');
if(!$r || $r['status'] != 99) showmessage(L('info_does_not_exists'),'blank');
找到后,在它的下一行添加上
代码如下:
//上一页
$previous_page = $this->db->get_one("`catid` = '$catid' AND `id`<'$id' AND `status`=99",'*','id DESC');
//下一页
$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').'\');');
}
//上一页
$previous_page = $this->db->get_one("`catid` = '$catid' AND `id`<'$id' AND `status`=99",'*','id DESC');
//下一页
$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').'\');');
}
相关阅读 >>
如何给phpcms v9增加类似于phpcms 2008中的关键词表
完美整合phpcms v9和discuz x3.1实现同步登陆退出论坛免激活
phpcms缓存使用总结(memcached、eaccelerator、shm)
phpcms v9联动菜单的调用方法及get_linkage函数详解
更多相关阅读请进入《phpcms》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。