DEDECMS 获取当前文档地址_dedecms_CMS教程_迪尔课堂

关键字描述:地址 文档 当前 获取 DEDECMS 2007 教程 方法b5r迪尔课堂自学网-|第二课堂|--(官网)
b5r迪尔课堂自学网-|第二课堂|--(官网)

  我是在DEDECMS2007下做的,不知道这篇文章是否多余,DEDECMS调用很方便,但是我找了很久没有b5r迪尔课堂自学网-|第二课堂|--(官网)
找到调用当前文档的方法,故做了以下教程:DEDECMS 获取当前文档地址。b5r迪尔课堂自学网-|第二课堂|--(官网)

修改方法如下:b5r迪尔课堂自学网-|第二课堂|--(官网)

修改include/inc_archives_view.phpb5r迪尔课堂自学网-|第二课堂|--(官网)

找到b5r迪尔课堂自学网-|第二课堂|--(官网)

//-------------------------- b5r迪尔课堂自学网-|第二课堂|--(官网)
//获取上一篇,下一篇链接 b5r迪尔课堂自学网-|第二课堂|--(官网)
//-------------------------- b5r迪尔课堂自学网-|第二课堂|--(官网)
function GetPreNext($gtype='') b5r迪尔课堂自学网-|第二课堂|--(官网)
{ b5r迪尔课堂自学网-|第二课堂|--(官网)
$rs = ""; b5r迪尔课堂自学网-|第二课堂|--(官网)
if(count($this->PreNext)<2) b5r迪尔课堂自学网-|第二课堂|--(官网)
{ b5r迪尔课堂自学网-|第二课堂|--(官网)
b5r迪尔课堂自学网-|第二课堂|--(官网)
$aid = $this->ArcID; b5r迪尔课堂自学网-|第二课堂|--(官网)
$next = " xkzzz_archives.ID>'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID asc "; b5r迪尔课堂自学网-|第二课堂|--(官网)
$pre = " xkzzz_archives.ID<'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID desc "; b5r迪尔课堂自学网-|第二课堂|--(官网)
$query = "Select xkzzz_archives.ID,xkzzz_archives.title, b5r迪尔课堂自学网-|第二课堂|--(官网)
xkzzz_archives.typeid,xkzzz_archives.ismake,xkzzz_archives.senddate,b5r迪尔课堂自学网-|第二课堂|--(官网)
xkzzz_archives.arcrank,xkzzz_archives.money, b5r迪尔课堂自学网-|第二课堂|--(官网)
xkzzz_arctype.typedir,xkzzz_arctype.typename,xkzzz_arctype.namerule,xkzzz_arctype.namerule2,b5r迪尔课堂自学网-|第二课堂|--(官网)
xkzzz_arctype.ispart, b5r迪尔课堂自学网-|第二课堂|--(官网)
xkzzz_arctype.moresite,xkzzz_arctype.siteurl b5r迪尔课堂自学网-|第二课堂|--(官网)
from xkzzz_archives left join xkzzz_arctype on xkzzz_archives.typeid=xkzzz_arctype.ID b5r迪尔课堂自学网-|第二课堂|--(官网)
where "; b5r迪尔课堂自学网-|第二课堂|--(官网)
$nextRow = $this->dsql->GetOne($query.$next); b5r迪尔课堂自学网-|第二课堂|--(官网)
$preRow = $this->dsql->GetOne($query.$pre); b5r迪尔课堂自学网-|第二课堂|--(官网)
if(is_array($preRow)){ b5r迪尔课堂自学网-|第二课堂|--(官网)
$mlink = GetFileUrl($preRow['ID'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],b5r迪尔课堂自学网-|第二课堂|--(官网)
$preRow['ismake'],$preRow['arcrank'],$preRow['namerule'],$preRow['typedir'],b5r迪尔课堂自学网-|第二课堂|--(官网)
$preRow['money'],true,$preRow['siteurl']); b5r迪尔课堂自学网-|第二课堂|--(官网)
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> "; b5r迪尔课堂自学网-|第二课堂|--(官网)
} b5r迪尔课堂自学网-|第二课堂|--(官网)
else{ b5r迪尔课堂自学网-|第二课堂|--(官网)
$this->PreNext['pre'] = "上一篇:没有了 "; b5r迪尔课堂自学网-|第二课堂|--(官网)
} b5r迪尔课堂自学网-|第二课堂|--(官网)
if(is_array($nextRow)){ b5r迪尔课堂自学网-|第二课堂|--(官网)
$mlink = GetFileUrl($nextRow['ID'],$nextRow['typeid'],$nextRow['senddate'],b5r迪尔课堂自学网-|第二课堂|--(官网)
$nextRow['title'],$nextRow['ismake'],b5r迪尔课堂自学网-|第二课堂|--(官网)
$nextRow['arcrank'],$nextRow['namerule'],$nextRow['typedir'],b5r迪尔课堂自学网-|第二课堂|--(官网)
$nextRow['money'],true,$nextRow['siteurl']); b5r迪尔课堂自学网-|第二课堂|--(官网)
$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> "; b5r迪尔课堂自学网-|第二课堂|--(官网)
} b5r迪尔课堂自学网-|第二课堂|--(官网)
else{ b5r迪尔课堂自学网-|第二课堂|--(官网)
$this->PreNext['next'] = "下一篇:没有了 "; b5r迪尔课堂自学网-|第二课堂|--(官网)
} b5r迪尔课堂自学网-|第二课堂|--(官网)
} b5r迪尔课堂自学网-|第二课堂|--(官网)
b5r迪尔课堂自学网-|第二课堂|--(官网)
if($gtype=='pre'){ b5r迪尔课堂自学网-|第二课堂|--(官网)

扫一扫手机访问