文章的上一篇,下一篇:

ninini
ninini 这家伙很懒,还没有设置简介

2 人点赞了该文章 · 2799 浏览

+-------------------------------------------------------------------------- |   WeCenter [#免费开发#] |   ======================================== |   by Jerry--wcenter user {ninini} |   http://www.5ihelp.com |   ======================================== |   如果有兴趣可以加群{个人兴趣群} 485114585 |                                  {官方用户群} 20712399 |   ======================================== |    更改插件记得先备份,先备份,先备份,先备份 |   ======================================== |    wecenter 版本 3.1.9 |   ======================================== |    开发索引贴地址:http://wenda.wecenter.com/article/1453 +--------------------------------------------------------------------------- 以下为以前写的上一篇,下一篇现帖出来,如果有想法或者问题,欢迎评论 文章 1,改程序文件 找开app/article/main.php

 在$article_info['message'] = FORMAT::parse_attachs(nl2br(FORMAT::parse_bbcode($article_info['message'])));后面加上 // 上一页         $last_pagesdb = $this->model('article')->lastpages();         //下一页         $next_pagesdb =$this->model('article')->nextpages();

找到models/article.php  加上后面两句

// 上一页     public function lastpages(){         // $this->dao->where("catid=$data[catid] and id<$id")->order('id desc')->find();          $id = intval($_GET['id']);         $sql = "SELECT id,title FROM " . get_table('article')." WHERE id< ".$id." ORDER BY id DESC LIMIT 1";         $result = $this->query_all($sql);         if($result){             return $result;         }else{             return $result=false;         }     }     // 下一页     public function nextpages(){          $id = intval($_GET['id']);         $sql = "SELECT id,title FROM " . get_table('article')." WHERE id> ".$id." ORDER BY id ASC LIMIT 1";         $result = $this->query_all($sql);         if($result){             return $result;         }else{             return $result=false;         }     }  

导航帖地址 http://wenda.wecenter.com/article/1453

发布于 2016-10-27 17:41

免责声明:

本文由 ninini 原创发布于 WeCenter ,著作权归作者所有。

登录一下,更多精彩内容等你发现,贡献精彩回答,参与评论互动

登录! 还没有账号?去注册

本尊略吊
2016-10-29 14:56
确实,感谢人不能带上人家的祖宗,感谢人一个就可以了,实在无法表达感谢的话,请拿出统一的口号:楼主好人一生平安
本尊略吊
2016-10-29 08:40
好的 谢谢大神 666
哦买噶
2016-10-28 21:13
omaiga.wang/gaoxiao/573 弄好了。再次谢谢楼主。
a0NET
2016-10-28 16:12
好人 赞一个6666
思路well
2016-10-28 15:01
这是由衷的赞美
ninini
2016-10-28 14:58
....怎么感觉在骂人。。。。XXX
思路well
2016-10-28 14:37
www.siluway.cn楼主真是个大好人,感谢你八辈祖宗,www.chuangbuluo.cn
风见雨下
2016-10-28 10:07
好啊 我最近想建站 然后再自己站上发布一些东西
ninini
2016-10-28 09:57
欢迎整理了,发布出来
风见雨下
2016-10-28 09:53
直接在代码里面到处改的。。。