注册地址------登录地址
当前位置:主页 > 教程 > cms教程 >

解决phpcms v9 wap手机门户中的show.html内容页面添加上一篇和下
栏目分类:cms教程   发布日期:2015-09-02   浏览次数:

if(!$r || $r[& 39;status& 39;] != 99) showmessage(L(& 39;info_does_not_exists& 39;),& 39;blank& 39;);在phpcms modules wap index php里面,搜索上面这句找到后,在它的下一行添加上 上一页$previou
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

上一篇:没有了
Copyright © 2002-2011 摩臣2注册帐号 版权所有   粤ICP备00000000号-1   关于我们 | 广告合作 | 版权声明 | 意见反馈 | 联系方式 | 原创投稿 | 网站地图 |
特效 教程 资源 资讯