帝国cms根据栏目id调取栏目列表php代码
<?php
/******参数配置开始******/
//参数留空则调用全部
$classid = "";
/******参数配置结束******/
if(empty($classid)){
$where = "islast = 1";
}else{
$where = "classid in($classid)";
}
$tabid = 1;
$classidObj=$empire->query("select classname,classid,sonclass,classpath from {$dbtbpre}enewsclass where $where order by myorder,classid");
while($r=$empire->fetch($classidObj)){
$checked = $tabid==1?"checked":'';
$tab_list.= '<input id="tab'.$tabid.'" type="radio" name="tabs" '.$checked.'><label for="tab'.$tabid.'">'.$r[classname].'</label>';
$newObj = $empire->query("select * from {$dbtbpre}ecms_news where classid=$r[classid] order by `newstime` desc");
while($r2=$empire->fetch($newObj)){
$list.='列表样式';
}
$session_list.='<section id="content'.$tabid.'">'.$list.'</section>';
$list='';
$tabid++;
}
?>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容