码迷,mamicode.com
首页 > 其他好文 > 详细

织梦dedecms分类信息模型上一页下一页失效办法

时间:2014-11-24 14:54:03      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:style   blog   ar   color   os   sp   文件   on   div   

修改文件/include/arc.archives.class

将一下代码

       $next = (is_array($nextR) ? " where arc.id={$nextR[‘id‘]} " : ‘ where 1>2 ‘);
       $pre = (is_array($preR) ? " where arc.id={$preR[‘id‘]} " : ‘ where 1>2 ‘);
       $query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,        t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
                        from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id  ";

修改为

            if($this->ChannelUnit->ChannelInfos[‘issystem‘]!=-1){
                $next = (is_array($nextR) ? " where arc.id={$nextR[‘id‘]} " : ‘ where 1>2 ‘);
                $pre = (is_array($preR) ? " where arc.id={$preR[‘id‘]} " : ‘ where 1>2 ‘);
                $query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,
                        t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
                        from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id  ";
            }else{
                $next = (is_array($nextR) ? " where arc.aid={$nextR[‘id‘]} " : ‘ where 1>2 ‘);
                $pre = (is_array($preR) ? " where arc.aid={$preR[‘id‘]} " : ‘ where 1>2 ‘);
                $query = "Select arc.aid,arc.title,arc.typeid,arc.senddate,arc.arcrank,arc.litpic, t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
                        from `".$this->ChannelUnit->ChannelInfos[‘addtable‘]."` arc left join #@__arctype t on arc.typeid=t.id  ";
            }

 

织梦dedecms分类信息模型上一页下一页失效办法

标签:style   blog   ar   color   os   sp   文件   on   div   

原文地址:http://www.cnblogs.com/whlives/p/4118519.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!