/**
* 获得当前栏目链接与当前分页链接
*
* @access public
* @return string
* @return {dede:itemcururl/}
*/
function GetItemsCurUrlDM()
{
global $cfg_basehost,$cfg_multi_site;
$purl = $this->GetCurUrl();
// 如果开启为静态,则对规则进行替换
if($cfg_rewrite == 'Y')
{
$nowurls = preg_replace("/-/", ".php?", $purl);
$nowurls = explode("?", $nowurls);
$purl = $nowurls[0];
}
if($this->PageNo==1)
{
$geturl = "tid=".$this->TypeID;
$purl .= '?'.$geturl;
}
else
{
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$purl .= '?'.$geturl."PageNo=".$this->PageNo;
}
$cururl = ($cfg_multi_site=='Y') ? $purl : $cfg_basehost.$purl;
return $cururl;
}
function GetItemsCurUrlST()
{
global $cfg_basehost;
$tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']);
$tnamerule = preg_replace("/^(.*)\//", '', $tnamerule);
$cfg_basehost = preg_replace('#/$#','',$cfg_basehost);
$tnamerule = MfTypedir($this->Fields['typedir']).'/'.$tnamerule;
if($this->PageNo==1)
{
$purl = MfTypedir($this->Fields['typedir']).'/';
}
else
{
$purl = str_replace("{page}",$this->PageNo,$tnamerule);
}
$cururl = ($cfg_multi_site=='Y') ? $purl : $cfg_basehost.$purl;
return $cururl;
}
|