加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

织梦地区联动在当前页面title加入选择的地区名方法

发布时间:2020-12-14 04:53:14 所属栏目:Dedecms 来源:网络整理
导读:打开 includearc.sglistview.class.php 搜索 $this-Fields['typeid'] = $this-TypeID; 在它下面加入代码 $this-Fields['nativeplace'] = $this-searchArr['nativeplace']; 打开 includeextend.func.php 在最下面增加个方法 if ( ! function_exists('GetS

打开 includearc.sglistview.class.php 搜索

$this->Fields['typeid'] = $this->TypeID;

在它下面加入代码

$this->Fields['nativeplace'] = $this->searchArr['nativeplace'];

打开 includeextend.func.php 在最下面增加个方法

if ( ! function_exists('GetSysEnum'))
{
function GetSysEnum($evalue,$egroup)
{
global $dsql;
$egroup = isset($egroup) ? $egroup : 'nativeplace';
if($evalue % 500 == 0)
{
$rowtop = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".$evalue."'");
return $rowtop['ename'];
}
else
{
(preg_match("#.#",$evalue)) ? $rowre = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".( floor($evalue-($evalue%500))+1 )."'") : $rowre['ename'] = '';
$rowtop = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".( floor($evalue-($evalue%500)) )."'");
$rowson = $dsql->GetOne("select ename from `dede_sys_enum` where egroup='".$egroup."' and evalue='".$evalue."'");
if(is_array($rowson))
{
return $rowtop['ename'].$rowre['ename'].$rowson['ename'];
}
}
}
}



(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读