设为首页 - 加入收藏
广告 1000x90
您的当前位置:主页 > 教程 > cms教程 > 正文

解决phpcms v9 wap手机门户中的show.html内容页面添加上一篇和下

来源:未知 编辑:admin 时间:2015-09-02
if(!$r || $r['status'] != 99) showmessage(L('info_does_not_exists'),'blank');

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

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

 //上一页
 $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').'\');');
                    }


在模板中添加
上一页:
< a href="{WAP_SITEURL}&a=show&catid={$catid}&typeid=1&id={$previous_page[id]}" >{$previous_page[title]}</a>
下一页:
<a href="{WAP_SITEURL}&a=show&catid={$catid}&typeid=1&id={$next_page[id]}" >{$next_page[title]}</a>
上一篇:没有了
下一篇:解决phpcms V9缩略图模糊的办法

网友评论:

发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片

模板天下 www.mobantianxia.com 联系QQ:498872301 邮箱:498872301@qq.com

Copyright © 2002-2011 DEDECMS. 织梦科技 版权所有 Power by DedeCms

Top