<!--This is IE DTD patch , Don't delete this line.-->
<!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=utf-8" />
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.3)" />
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.3)" />
<title><?php echo $cfg_webname; ?> - QiFangWeb 管理中心</title>
<link href="templates/style/sframe.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/frame.js"></script>
<script type="text/javascript">
<?php

$fdir  = PHPMYWIND_DATA.'/cache/auth/';
$fname = 'auth_'.$cfg_auth_key.'.php';


		
if(file_exists($fdir.$fname))
{
	echo 'url = "'.$_SERVER['HTTP_HOST'].'";';


	//获取缓存时间
	$fMkTime = filemtime($fdir.$fname);


	//检测缓存最后更新时间
	if($fMkTime + 21600 < time())
	{
		echo 'GetAuth();';
	}
	else
	{
		//开始验证
		$jsonStr = json_decode(stripslashes(Readf($fdir.$fname)));

		if($jsonStr->doname != $_SERVER['HTTP_HOST'])
			echo 'GetAuth();';
		else if($jsonStr->status == 'OK')
			echo '$(function(){$(".authUser").show();})';
		else
			echo '$(function(){$(".authUser").hide();})';
	}
}
else
{
	echo 'url = "'.$_SERVER['HTTP_HOST'].'";';
	echo 'GetAuth();';
}

?>
</script>
<link href="templates/style/frame.css" rel="stylesheet" type="text/css" />
</head>

<body class="showmenu">
<div class="header">
	<div class="header_logo">
		<div class="header_info">
        <div style=" margin-top:25px; margin-left:0px; position:absolute;"><a href="http://www.qf580.com"><img src="templates/images/jszc.png" height="45" /></a></div>
        欢迎您：<span class="loginuser_info" title="登陆于：<?php echo GetDateTime($_SESSION['logintime']); ?>"><?php echo '<span>'.$_SESSION['admin'].'</span> [';$r = $dosql->GetOne("SELECT `groupname` FROM `#@__admingroup` WHERE `id`=".$_SESSION['adminlevel']);echo ($levelname = isset($r['groupname']) ? $r['groupname'] : '未启用的组'); ?>]</span> 
				<?php
				if(!empty($_SESSION['t_adminlevel']))
				{
					echo '<span class="privdown">[<a href="javascript:;" title="快速切换权限">切换</a>]<ul>';
					$dosql->Execute("SELECT * FROM `#@__admingroup` ORDER BY id ASC");
					while($row = $dosql->GetArray())
					{
						echo '<li><a href="javascript:;" onclick="SelPrivID('.$row['id'].');" title="切换到'.$row['groupname'].'身份">'.ReStrLen($row['groupname'],5).'</a></li>';
					}
				}
				?>
			</ul></span>&nbsp;[<a href="logout.php" title="快捷键Esc">退出</a>]<span class="line">&nbsp;</span><a href="../" target="_blank">网站首页</a><span class="line">&nbsp;</span><a href="javascript:;" onclick="lockscreen()" id="lockscreen" class="lockscreen">锁屏</a><span class="line">&nbsp;</span><a href="http://www.qf580.com/" target="_blank">官方网站</a><span class="line">&nbsp;</span><a href="http://www.qf580.com/bbs/" target="_blank" class="help">帮助</a></div>
	</div>
	<?php
	$dosql->Execute("SELECT * FROM `#@__site` ORDER BY id ASC");
	if($dosql->GetTotalRow() > 1)
	{
		echo '<div class="sitelist" style="right:20px;">';
		while($row = $dosql->GetArray())
		{
			if($_SESSION['siteid'] == $row['id'])
				$light = 'class="on"';
			else
				$light = '';
	
			echo '<a href="javascript:;" id="'.$row['sitekey'].'" onclick="SelSite(\''.$row['sitekey'].'\')" '.$light.' title="切换到'.$row['sitename'].'">'.$row['sitename'].'</a>';
		}
		echo '</div>';
	}
	?>
	<div class="tm"> <a href="javascript:;" class="togglemenu" title="隐藏菜单"></a></div>
</div>
<div class="left">
	<div class="menu">
		<iframe name="menu" id="menu" frameborder="0" src="left_menu_user.php" scrolling="no"></iframe>
	</div>
</div>
<div class="right">
	<div class="main">
		<iframe name="main" id="main" frameborder="0" src="home_user.php" <?php if(strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) echo 'scrolling="yes"'; ?>></iframe>
	</div>
</div>
</body>
</html>