<?php
if($obj_ctl_limit->issuper){
	$str_where=" where page_model_id='".$obj_rs["model_id"]."' and page_ismenu=1";
	$obj_result_next = $obj_db->query("SELECT * FROM ".DB_PRE."sys_admin_page".$str_where." order by page_sort,page_id");
	while($obj_rs_next = $obj_db->fetch_array($obj_result_next))
	{
		if($obj_ctl_user->version!="xxgo.net" && $obj_rs["model_regkey"]=="sys" && $obj_rs_next["page_url"]=="user.php"){
			continue;
		}
		if(WEB_ADMIN_DOUBLE!="1" && $obj_rs["model_regkey"]=="sys" && $obj_rs_next["page_url"]=="mypwd.php"){
			continue;
		}
		if($obj_ctl_limit->chk_page($obj_rs["model_regkey"],$obj_rs_next["page_url"])){
			$str_url="admin_".$obj_rs["model_regkey"]."/".$obj_rs_next["page_url"];
			if(is_file($str_admin_path."/".$obj_rs_next["page_url"])) $str_url="model_admin.php?model_key=".$obj_rs["model_regkey"]."&model_page=".$obj_rs_next["page_url"];
			$arr_x= array("url"=>$str_url,"name"=>$obj_rs_next["page_name"],"filename"=>md5($str_url));
			$arr_menu[]=$arr_x;
			if($str_default_url=="") $str_default_url=$arr_x["url"];
		}

	}
	$obj_result_next = $obj_db->query("SELECT * FROM ".DB_PRE."article_channel order by channel_sort");
	while($obj_rs_next = $obj_db->fetch_array($obj_result_next))
	{
		$str_url="admin_".$obj_rs["model_regkey"]."/article.php?channel_id=".$obj_rs_next["channel_id"];
		$arr_x= array("url"=>$str_url,"name"=>$obj_rs_next["channel_name"],"filename"=>md5($str_url));
		$arr_menu[]=$arr_x;
		if($str_default_url=="") $str_default_url=$arr_x["url"];
	}
}else{
	$arr_folder_id=$obj_ctl_limit->get_folder_id();
	$str_ids=implode(",",$arr_folder_id);
	if($str_ids=="") $str_ids="0";
	$str_sql="select folder_id,folder_name,folder_pid,folder_channel_id from ".DB_PRE."article_folder where folder_id in(".$str_ids.")";
	$obj_result_next = $obj_db->query($str_sql);
	while($obj_rs_next = $obj_db->fetch_array($obj_result_next))
	{
		$str_url="admin_".$obj_rs["model_regkey"]."/article.php?channel_id=".$obj_rs_next["folder_channel_id"]."&me_folder_id=".$obj_rs_next["folder_id"];
		$arr_x= array("url"=>$str_url,"name"=>$obj_rs_next["folder_name"],"filename"=>md5($str_url));
		$arr_menu[]=$arr_x;
		if($str_default_url=="") $str_default_url=$arr_x["url"];
	}
}
?>