//打开系统文件织梦 /include/arc.archives.class.php 找到GetPreNext函数
 function GetPreNext($gtype='')
{
$rs = '';
if(count($this->PreNext)<2)
{
$aid = $this->ArcID;
$preR = $this->dsql->GetOne("Select id From `#@__arctiny` where id<$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id desc");
$nextR = $this->dsql->GetOne("Select id From `#@__arctiny` where id>$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id asc");
$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 ";
$nextRow = $this->dsql->GetOne($query.$next);
$preRow = $this->dsql->GetOne($query.$pre);
if(is_array($preRow))
{
$mlink = GetFileUrl($preRow['id'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],$preRow['ismake'],$preRow['arcrank'],
$preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
$this->PreNext['preurl']=$mlink;
$this->PreNext['preimg'] = "<a href='$mlink'><img src=\"{$preRow['litpic']}\" alt=\"{$preRow['title']}\"/></a> ";
}
else
{
$this->PreNext['pre'] = "上一篇:没有了 ";
$this->PreNext['preurl'] = "javascript:void:";
$this->PreNext['preimg'] ="<img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有上一图集了。\"/>";
}
if(is_array($nextRow))
{
$mlink = GetFileUrl($nextRow['id'],$nextRow['typeid'],$nextRow['senddate'],$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'],
$nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],$nextRow['filename'],$nextRow['moresite'],$nextRow['siteurl'],$nextRow['sitepath']);
$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
$this->PreNext['nexturl']=$mlink;
$this->PreNext['nextimg'] = "<a href='$mlink'><img src=\"{$nextRow['litpic']}\" alt=\"{$nextRow['title']}\"/></a> ";
}
else
{
$this->PreNext['next'] = "下一篇:没有了 ";
$this->PreNext['nexturl'] = "javascript:void:";
$this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有下一图集了! \"/></a>";
}
}
if($gtype=='pre')
{
$rs = $this->PreNext['pre'];
}
else if($gtype=='preimg'){ $rs = $this->PreNext['preimg'];
}
else if($gtype=='next')
{
$rs = $this->PreNext['next'];
}
else if($gtype=='nextimg'){ $rs = $this->PreNext['nextimg'];
}
else if($gtype=='preurl'){
$rs = $this->PreNext['preurl'];
}else if($gtype=='nexturl'){
$rs = $this->PreNext['nexturl'];
} else{
$rs = $this->PreNext['pre']."   ".$this->PreNext['next'];
}
return $rs;
}

调用方法

<li><a href="{dede:prenext get='preurl'/}" class="pr"><</a></li>
<li><a href="{dede:prenext get='nexturl'/}" class="pr">></a></li>

preurl是上一页链接

nexturl这是下一个链接

空的javascript:void;

版权声明:本文博客原创文章。博客,未经同意,不得转载。

织梦不仅是链接到其他调用next的更多相关文章

  1. advancedsearch.php织梦高级自定义模型字段无法调用解决方案

    advancedsearch.php织梦dedecms 高级自定义模型字段无法调用解决方案 ,具体步骤如下: 1  打开修改puls/advancedsearch.php文件,找到复制代码(不同版本可 ...

  2. 织梦DedeCMS给栏目添加缩略图调用的方法

    织梦DedeCMS的栏目调用仅仅只有文字调用,没有栏目缩略图调用,而我们有时候又需要给栏目添加缩略图,并能够在前台调用,就可以试试通过下面的方法,给栏目添加缩略图. 首先要给栏目数据库表添加一个存储缩 ...

  3. DedeCMS织梦系统head.htm里无法调用栏目描述

    {dede:channel type='top'} [field:description/] {/dede:channel} channel 这个标签没有description属性你需要自己把这个属性 ...

  4. 织梦dedecms文章发布日期时间调用标签大全

    dedecms首页时间标签: 1.12-27 样式 [field:pubdate function='strftime("%m-%d",@me)'/] 2.May 15, 2012 ...

  5. 织梦DEDEcms5.7解决arclist标签调用副栏目文章

    使用arclist标签调用文章的时候才发现,根本无法调用相关文章. 下面给出解决办法,希望帮到需要的人. 找到/include/taglib/arclist.lib.php文件然后打开.然后在大约30 ...

  6. 织梦DeDeCMS友情链接文字显示不全

    文件:/include/taglib/flink.lib.php 把下面代码中的24改为合适的值 $attlist=”type|textall,row|24,titlelen|24,linktype| ...

  7. 织梦DedeCms用SQL语句调用数据库任意内容方法

    织梦DedeCms给我们提供了大量调用标签,供我们调用各种数据,但提供再多的标签,也有满足不了我们的时候,这时我们可以用SQL语句,灵活调用我们需要的内容. 如何任意调用数据库中的内容呢?先举个例子: ...

  8. 织梦DedeCms调用全站相关文章方法

    织梦DedeCms 有个标签可以调用相关文章,通过下面的修改可以调用全站的相关文章,文章页内显示相关文章内容,可以提高关键词密度,还是挺不错的. 模板调用代码 <div>     < ...

  9. 织梦文章页调用当前栏目名称和url地址的方法

    其实织梦本身有这2个调用标签,可能大家没怎么注意,下面的代码就是织梦文章页调用当前栏目名称和url地址的方法: {dede:field name='typeurl' function=”GetType ...

随机推荐

  1. leaflet开源地图库源码 浏览器&移动设备判断(browser.js)备份

    <script> var isIe = !-[1,]; // alert('ie9 之前'+isIe); var ie = 'ActiveXObject' in window; //ale ...

  2. 《Effective C++》:规定44-规定45

    规定44分离的不依赖参数代码templates 条款45运用成员函数模板接受全部兼容类型 Templates和泛型编程 条款44:将与參数无关的代码抽离templates Templates能够节省时 ...

  3. java NIO中的Reactor相关知识汇总 (转)

    一.引子 nio是java的IO框架里边十分重要的一部分内容,其最核心的就是提供了非阻塞IO的处理方式,最典型的应用场景就是处理网络连接.很多同学提起nio都能说起一二,但是细究其背后的原理.思想往往 ...

  4. 【iOS发展-28】制造业UITabBarController标记控制器、定制UITabBarItem文字图像6途径和More评论

    一个.一个简单的制作过程(实际工程中不建议这样的方式,不要只展示所用原理的理解) 在AppDelegate.m在: - (BOOL)application:(UIApplication *)appli ...

  5. apache 提示You don't have permission to access /test.php on this server.怎样解决

    原文:apache 提示You don't have permission to access /test.php on this server.怎样解决 关键字: Apache   403  For ...

  6. i++与++i哪个效率更高

    简单的比较前缀自增运算符和后缀自增运算符的效率是片面的, 因为存在很多因素影响这个问题的答案. 首先考虑内建数据类型的情况: 如果自增运算表达式的结果没有被使用, 而是仅仅简单地用于增加一元操作数, ...

  7. cocos2d-x 3.0游戏实例学习笔记《卡牌塔防》第六步---炮台&amp;点击炮台加入英雄&amp;英雄升级

    /* 说明: **1.本次游戏实例是<cocos2d-x游戏开发之旅>上的最后一个游戏,这里用3.0重写并做下笔记 **2.我也问过木头本人啦,他说:随便写,第一别全然照搬代码:第二能够说 ...

  8. windows server 2008见安装IIS方法(解决)

    windows server 2008见安装IIS方法(解决) 刚开始有点蒙,后来才知道原来如此.! . 右键点击[我的电脑]--[管理]--[字符]--[加入角色]--仅落后win7像.啊! 版权声 ...

  9. FFmpeg 协议初步学习

    typedef struct URLContext { const AVClass *av_class; /**< information for av_log(). Set by url_op ...

  10. ASP.NET MVC+EF框架+EasyUI实现权限管理系列(9)-TT模板的学习

    原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列(9)-TT模板的学习 ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇)   (1):框架搭建    (2): ...