正在载入...

第一步将获取顶级栏目高亮的代码 复制到\e\class\userfun.php

代码如下:

function currentPage($classid,$thisid){
global $class_r;
$fr=explode('|',$class_r[$classid][featherclass]);
$topbclassid=$fr[1]?$fr[1]:$classid;
if ($topbclassid==$thisid) {
echo "on";
}
else {
}
}

第二步:修改以下代码然后替换header变量!

<li class="mv">
<dl>
<dt><a href="[!--news.url--]">
<table>
<tr>
<td>首页<img src="[!--news.url--]css/img.gif" /></td>
</tr>
</table>
</a></dt>
</dl>
</li>
<?php
$ecms_bq_sql=sys_ReturnEcmsLoopBq('select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder limit 8',20,24,0);    $bqno=0;
while($bqr=$empire->fetch($ecms_bq_sql))
{
$bqsr=sys_ReturnEcmsLoopStext($bqr);
$bqno++;
?>
<li>
<dl>
<dt><a title="<?=$bqr[classname]?>" href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" class="<?=currentPage($GLOBALS[navclassid],$bqr[classid])?>">
<table>
<tr>
<td><?=$bqr[classname]?>
<img src="[!--news.url--]css/img.gif" /></td>
</tr>
</table>
</a></dt>
<dd>
<?php
$ecms_bq_sql2=sys_ReturnEcmsLoopBq("select classid,classname,classpath from [!db.pre!]enewsclass where bclassid='$bqr[classid]' order by myorder limit 5",20,24,0);
$bqno2=0;
while($bqr2=$empire->fetch($ecms_bq_sql2))
{
$bqsr2=sys_ReturnEcmsLoopStext($bqr2);
$bqno2++;
?>
<a href="/<?=$bqr2[classpath]?>" ><img src="[!--news.url--]css/m_tag.png" />
<?=$bqr2[classname]?>
</a>
<?php
}
?>
</dd>
</dl>
</li>
<?php
}
?>

本文链接:

关键词:互联网, 代码, 函数, 帝国cms, 高亮显示,

(全文完        )

Comments

哈哈,沙发有木有?!!!抢沙发快速评论