phpcms手机内容页面添加上一篇和下一篇
php  /  管理员 发布于 7年前   212
在phpcms\modules\wap\index.php里面,搜索下面这句 找到后,在它的下一行添加上 在模板中添加 上一页: 下一页: 以上所述就是本文的全部内容了,希望大家能够喜欢。 122 在 123 在 原梓番博客 在 博主 在 1111 在
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').'\');');
}
< a href="https:/article/{WAP_SITEURL}&a=show&catid={$catid}&typeid=1&id={$previous_page[id]}" >{$previous_page[title]}
{$next_page[title]}您可能感兴趣的文章:
上一条:
php查询whois信息的方法
下一条:
php比较相似字符串的方法
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号