<?php
/**
 * 上：左：右 结构
 * Created on 2020/02/03
 * @package templates.manager
 */

// 顶部
if (!isset($layout_pages["header"])) {
	$layout_pages["header"] = "header.inc";
}
// 底部
if (!isset($layout_pages["footer"])) {
	$layout_pages["footer"] = "footer.inc";
}
// 左边菜单
if (!isset($layout_pages["left"])) {
	$layout_pages["left"] = "blank.inc";
}

// 右边操作区域
if (!isset($layout_pages["right"])) {
	$layout_pages["right"] = "blank.inc";
}

//顶部
require(MANAGER_TEMPLATE_DIR_PATH. "/" . $layout_pages["header"]);

?>
<style type="text/css">
#contentFrame {
	position:fixed;
	top:80px;
	left:210px;
	height:1200px;
	border:none;
	scrollbar-width: none; /* firefox */
	-ms-overflow-style: none; /* IE 10+ */
	overflow-x: hidden;
	overflow-y: auto;
}
</style>
<script>
	$(function(){
		var clientHeight = document.body.clientHeight - 80;
		$('.table').css('height',clientHeight)
		var width = document.body.clientWidth-220;
		$('.rightWidth').css('width',width);
		
		//设定宽度
		var w = document.documentElement.clientWidth || document.body.clientWidth;
		//设定iframe的宽度
		var iFrameWidth = w - 195;
		$('#contentFrame').css('width', iFrameWidth);
		
		//设定高度
		var h = document.documentElement.clientHeight || document.body.clientHeight;
		var iFrameHeight = h - 80;
		$('#contentFrame').css('height', iFrameHeight);
		
		//从cookie获取当前页面
		var defaultPage = getCookie("defaultPage");
		if(defaultPage) {
			$("#contentFrame").attr("src", defaultPage);
		}
		
	})


</script>
<table width="100%" height="100%;" class="table">
<tr>
	<td style="width:200px;height: 100%;background: #fff;float: left;">
		<div class="left_menu">
		<? require(MANAGER_TEMPLATE_DIR_PATH . "/" . $layout_pages["left"]); ?>
		</div>
	</td>
	<td class="rightWidth" style="position: relative;overflow-y: auto;overflow-x: hidden;">
		<div class="right_content">
			<iframe id="contentFrame" src="" scrolling="auto"/>
		</div>
	</td>
</tr>
</table>

<?
// 底部共同
require(MANAGER_TEMPLATE_DIR_PATH . "/" . $layout_pages["footer"]);

?>