<?php
require "Run.php";
require "include/getmkurl.fun.php";
if($admin != 1 && $admin!=2)
{
	ehtml('您好!您不具有相应的操作权限!');
	exit();
}
	$gro=$_GET['cid'];
	if($gro == NULL)
	{
		$gro=0;
	}
//获取相应网站栏目
	$mysql = new D("class");
	$listarr = $mysql->where(array('gro'=>$gro,'siteid'=>WAPID))->order('xuhao ASC')->select();
	if($listarr){
	   $i          =       0; 
	foreach($listarr as $list)
	{
	   $html .=  $list['q'].'【<a href="admin/mod.php?mod=mod_q&cid='.$list['cid'].'">插</a>.<a href="admin/mod_class.php?cid='.$list['cid'].'">修</a>】<a href="?cid='.$list['cid'].'">'.$list['cn'].'</a>';
	}
	$class_list = 1;
	}else{
	$class_list = 0;
	}		 
mysql_free_result($classcon);
//获取栏目信息
	$classinfo = lm_info($_GET['cid']);
	if($_GET['cid'] == NULL || $_GET['cid'] == 0){
		$sitetitle   =   user('stitle','id',WAPID);
		$wapTop      =   $cfginfo['index_top'];
		$wapBottom   =   $cfginfo['index_bottom'];
		}else{
		$sitetitle   =   $classinfo['cn'];
		$wapTop  	 =   $classinfo['top'];
		$wapBottom   =   $classinfo['bottom'];
			if(get_mkurl($url) != 'NULL' && $class_list == 0)
			{
				$html = '<div class="content">提示！<br>您好，此页面为模块栏目，浏览本页会显示模块内容，继续添加栏目会显示下级栏目。[推荐修改为空白栏目后再添加下级栏目！]</div>';
	        
			}
	    }
	echo head($sitetitle);
    echo '<div class="subtitle">';
	echo '【<a href="admin/wap_admin.php?">返回管理后台</a>|<a href="../CssSelect.php?action=admin&cid='.$_GET['cid'].'">CSS 编辑</a>】';
	echo  '<br>';
	echo '【<a href="admin/class.php?cid='.$_GET['cid'].'">添加本页栏目</a>|<a href="admin/autolist.php?cid='.$_GET['cid'].'">自动排版</a>】';
	echo '<br>';
	echo '【<a href="admin/mod.php?mod=mod_t&cid='.$_GET['cid'].'">顶部内容排版</a>|<a href="index.php?cid='.$_GET['cid'].'">浏览本页</a>】';
	echo '</div>';
	echo UBB($wapTop.$html.$wapBottom); 
	echo '<div class="subtitle">【<a href="admin/mod.php?mod=mod_b&cid='.$_GET['cid'].'">底部内容排版</a>】<br><a href="indexAdmin.php?cid='.$classinfo['gro'].'">上级排版</a>|<a href="indexAdmin.php?cid=0&">首页排版</a></div>';
	echo footer(1);