<?php include $this->admin_tpl('meta');?>
<title>管理中心 - YzmCMS内容管理系统</title>
<meta name="keywords" content="YzmCMS,YzmPHP,YzmCMS内容管理系统">
<meta name="description" content="YzmCMS内容管理系统。">
</head>
<body>
<?php include $this->admin_tpl('header');?>
<?php include $this->admin_tpl('menu');?>
<div class="lock-desktop" id="lock_desktop" style="<?php if(!isset($_SESSION['yzm_lock_screen']) || $_SESSION['yzm_lock_screen']==0) echo 'display:none';?>">
    <form action="" class="lock-box" onsubmit="return yzm_unlock_screen()">
    	<div class="lockuser"><img src="<?php echo STATIC_URL;?>admin/yzm_admin/images/lockuser.png" alt="管理员"></div>
    	<!-- <h5><i class="Hui-iconfont">&#xe60e;</i> 锁屏状态，请输入密码解锁</h5> -->
    	<p class="lock-user"><?php echo $_SESSION['adminname'];?></p>
    	<div class="input-box">
    	    <input type="password" id="lock_password" class="lock-text" placeholder="锁屏状态，请输入密码">
    	    <button class="lock-submit" type="button" onclick="yzm_unlock_screen()" title="提交"><i class="Hui-iconfont">&#xe67a;</i></button>
    	</div>
    </form>
</div>
<section class="Hui-article-box">
	<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
		<div class="Hui-tabNav-wp">
			<ul id="min_title_list" class="acrossTab cl">
				<li class="active"><span title="我的桌面" data-href="<?php echo U('public_home');?>">我的桌面</span><em></em></li>
			</ul>
		</div>
		<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
	</div>
	<div id="iframe_box" class="Hui-article">
		<div class="show_iframe">
			<div style="display:none" class="loading"></div>
			<iframe scrolling="yes" frameborder="0" src="<?php echo U('public_home');?>"></iframe>
		</div>
	</div>
</section>
<div class="contextMenu" id="Huiadminmenu">
	<ul>
		<li id="closethis">关闭当前 </li>
		<li id="closeall">关闭全部 </li>
	</ul>
</div>
<?php include $this->admin_tpl('footer');?>
<script type="text/javascript" src="<?php echo STATIC_URL;?>plugin/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">
	$(function(){
		$('.menu_dropdown a').bind('click', function(){
			$('.menu_dropdown a').removeClass('curmenu');
			$(this).addClass('curmenu');
		});
	})

	function yzm_clear() {
		$.ajax({
			type: 'GET',
			url: '<?php echo U('clear_cache/public_clear');?>',
			dataType: "json",
			success: function(msg) {
				if (msg.status == 1) {
					layer.msg(msg.message, {icon:1, time: 1500, shade:0.1});
				} else {
					layer.msg(msg.message);
				}
			}
		})
	}

	function yzm_lock_screen() {
		$.get("<?php echo U('public_lock_screen');?>");
		$('#lock_desktop').css('display','');
	}

	function yzm_unlock_screen() {
		var lock_password = $("#lock_password").val();
		if(lock_password == ''){
			layer.msg('请输入您的密码！', {icon:2});
			return false;
		}
		$.ajax({
			type: 'POST',
			url: '<?php echo U('public_unlock_screen');?>',
			data: "password="+lock_password,
			dataType: "json",
			success: function(msg) {
				if (msg.status == 1) {
					$('#lock_password').val('');
					$('#lock_desktop').css('display','none');
				} else {
					layer.msg(msg.message, {icon:2});
				}
			}
		})
		return false;
	}
</script>
</body>
</html>