空闲网

帝国php根据栏目id对当前栏目导航加class

  <?

  if($GLOBALS[navclassid]==1){$all='class="hover"';}else{$all='';}

  if($GLOBALS[navclassid]==3){$dt='class="hover";}else{$dt='';}

  if($GLOBALS[navclassid]==6){$gl='class="hover";}else{$gl='';}

  if($GLOBALS[navclassid]==7){$wd='class="hover";}else{$wd='';}

  if($GLOBALS[navclassid]==34){$pc='class="hover";}else{$pc='';}

  if($GLOBALS[navclassid]==36){$zt='class="hover";}else{$zt='';}

  if($GLOBALS[navclassid]==56){$zz='class="hover";}else{$zz='';}

  ?> <a href="/news/" target="_blank" <?=$all?>>全部资讯</a>


帮你解决啦! ()
分享到:

相关推荐