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

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

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

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

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

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

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

扫一扫手机访问