<?php
require 'inc.php';//初始化系统环境
$arr_model=array();
$str_sql="SELECT * FROM ".DB_PRE."sys_model order by model_sort";
$obj_result = $obj_db->query($str_sql);
$str_url="";
while($obj_rs = $obj_db->fetch_array($obj_result))
{
	if($obj_ctl_limit->chk_model($obj_rs["model_regkey"])){
		if($str_url=="") $str_url="menu.php?model_id=".$obj_rs["model_id"];;
		$arr_model[]=$obj_rs;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>后台管理</title>
<meta name="keywords" content="" />
<meta name="description" content=" 由克网站程序  - XXGO.NET" />
<meta name="generator" content="klkkdj! 2.0.0" />
<meta name="author" content="klkkdj!由克" />
<meta name="copyright" content="2009-2012 XXGO NET" />
<link rel="stylesheet" type="text/css" href="images/css.css" />
<link rel="stylesheet" type="text/css" href="images/css.css" />
<script src="<?php echo WEB_URL?>/images/js/common.js"></script>
<script src="<?php echo WEB_URL?>/images/js/ajax.js"></script>

<style>
body{background:url(images/bg.gif);color:#ffffff;margin:0px;padding:0px}
a:link {color: #ffffff; text-decoration:none;}
a:visited {color: #ffffff;text-decoration:none;}
a:hover {color:#ffffff; text-decoration:underline;}
a:active {color: #ffffff;}

.me_left{float:left}
.me_info{position:absolute; top:10px; right:30px;}
/*栏目*/
.me_menu,.nav .bg-left,.nav .bg-right,.nav li.current,.nav li,.nav-info{ background:url(images/nav.gif)}

.me_menu{float:left;height:31px; line-height:31px; background-position: 0 -31px;padding-left:10px}
.nav{ float:left;margin-top:27px;display:inline;clear:both}
.nav .bg-left{ float:left; width:5px; height:31px;font-size:0px}
.nav .bg-right{ float:left; width:5px; height:31px; background-position: -25px 0;;font-size:0px}
.nav li{ float:left; width:93px; height:31px; margin-right:1px; margin-left:-2px; text-align:center;font-size:14px; font-weight:bold; color:#FFF; cursor:pointer; background-position: 0 -93px;}
.nav li.current{ background-position: 0 -62px;color:#000;}
/*栏目说明*/
.nav-info{ position:absolute; top:65px; left:20px; padding-left:15px; color:#fff; background-position: -83px 0; background-repeat:no-repeat;}

</style>
<script>
function me_clear_cache(){
	yj_ajax_get("clear.cache.php?isajax=1&rnd="+Math.random(),function(data){
		var obj_data=get_json_obj(data);
		if(obj_data.isnull){
			alert(data);
			alert("系统繁忙");
		}else{
			alert(obj_data.msg);
		}
	});
}
</script>
</head>
<BODY>
<div class="me_left"><a href="<?php echo WEB_URL;?>" target="_blank"><img src="images/logo.gif" border=0></a></div>
<div style="float:left">
	<div class="me_info">
	<a href="<?php echo WEB_URL;?>" target="_blank">网站首页</a>&nbsp;&nbsp;<a href="javascript:me_clear_cache();">更新缓存</a>&nbsp;&nbsp;
		<?php
		if(defined("WEB_ADMIN_DOUBLE")&&WEB_ADMIN_DOUBLE!=1){
		?>
		当前用户：<font color="#ff8800"><?php echo $obj_ctl_user->uname;?></font>&nbsp;<a href="./login.php?act=exit&go_url=./" style="color:#ffffff" target="_top">退出系统</a>
		<?php 
		}else{ ?>
		当前用户：<a href="./admin_sys/mypwd.php" style="color:#ffffff" target="main"><font color="#ff8800"><?php echo $obj_ctl_user->uname;?></font> (修改密码)</a>&nbsp;<a href="./login.php?act=exit&go_url=./" style="color:#ffffff" target="_top">退出系统</a>
		<?php }?>
	</div>
	<div id="Nav" class="nav">
		<div class="bg-left"></div>
		<div class="me_menu">
		<?php 
		$ii=0;
		$str_default_menu="";
		foreach($arr_model as $item){
			if($ii==0) $str_default_menu=$item["model_regkey"];
			echo "<li onmouseover=\"me_mouseover('".$item["model_regkey"]."');\" onmouseout=\"me_mouseout('".$item["model_regkey"]."');\" onclick=\"me_click('".$item["model_regkey"]."');\" id='id_menu_".$item["model_regkey"]."'>".$item["model_name"]."</li>";
			$ii++;
		}	
		?>
		</div>
		<div class="bg-right"></div>
	</div>
</div>
<input type="hidden" name="folderids" value="">
<input type="hidden" name="fileids" value="">
<input type="hidden" name="act" value="">
<script>
var pub_default_menu="<?php echo $str_default_menu;?>";
function me_mouseover(msg_i){
	if(msg_i==pub_default_menu) return;
	var objx=document.getElementById("id_menu_"+msg_i);
	objx.className="current";
}
function me_mouseout(msg_i){
	if(msg_i==pub_default_menu) return;
	var objx=document.getElementById("id_menu_"+msg_i);
	objx.className="";
}
function me_click(msg_i,msg_x){
	if(!msg_x) window.open("menu.php?model_regkey="+msg_i+"&rnd="+Math.random(),"winmenu");
	var objx=document.getElementById("id_menu_"+pub_default_menu);
	objx.className="";
	pub_default_menu=msg_i;
	objx=document.getElementById("id_menu_"+pub_default_menu);
	objx.className="current";
}
var objdefault=document.getElementById("id_menu_"+pub_default_menu);
objdefault.className="current";
</script>
</BODY>
</HTML>

