自动判断当前栏目是否二级栏目并高亮显示没有二级栏目则显示一级栏目
折叠展开PHP 代码
- <?php
- $tid=$GLOBALS['navclassid'];
- $bid=$class_r[$tid]['bclassid'];
- $sclass=$class_r[$GLOBALS['navclassid']]['sonclass'];
- if($sclass){$bid=$tid;}
- echo $bid;
- ?>
- [e:loop={"select * from {$dbtbpre}enewsclass where bclassid=$bid and showclass=0",0,24,0}]
- <?php
- $classurl=sys_ReturnBqClassname($bqr,9);
- $style="";
- if($bqr[classid]==$GLOBALS[navclassid])
- {
- $style="class='on'";
- }
- ?>
- <li <?=$style?>><a href="<?=$classurl?>"><?=$bqr['classname']?></a><本地图片,请重新上传>
- [/e:loop]