<?php
/*
+-----------------------------------------------------------------------
| 项目名称: Gatewei 建站引擎(Gatewei Web Engine) Version 2.0
+-----------------------------------------------------------------------
| Copyright (c) 2008-2009 彭景康 版权所有
| Author: Jack_Jack [ 彭景康 ]
+-----------------------------------------------------------------------
| Site: http://www.gatewei.com/
| Email: gatewei@gmail.com
+-----------------------------------------------------------------------
*/
define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
define('POSITION', 'siteback');
if($_GET['iframe']=="articlemanagement"){
		define('CURSCRIPT', 'article');
}elseif($_GET['iframe']=="productmanagement"){
		define('CURSCRIPT', 'product');
}elseif($_GET['iframe']=="threadmanagement"){
		define('CURSCRIPT', 'thread');
}else{
		define('CURSCRIPT', 'siteadmin');
}
require_once './engine/common.inc.php';
require_once './admin/global.func.php';
if(!$pervalue{18} || !$adminlogin){
	writelog($userid." 试图进入管理后台由于权限不足被阻止");
	showmsg("没有登陆后台的管理权限","index.php");
}
if(empty($iframe)) {
showiframe();
exit;
}
if($iframe == 'menu') {
	require_once GATEWEI_ROOT.'./admin/menu.php';
} elseif($iframe == 'top') {
	require_once GATEWEI_ROOT.'./admin/top.php';
} 
$iframeurl = '';
$iframeurl=$iframes[$iframe];


if($iframeurl) {
	showmainheader();
	require_once './admin/'.$iframeurl.'.php';
	showmaintail();
	} 
?>
<?php

function showiframe()
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>网站管理控制面板</title>
</head>
<body style="margin: 0px" scroll="no" >
<div style="position: absolute;top: 0px;left: 0px; z-index: 2;height: 65px;width: 100%">
<iframe frameborder="0" id="header" name="header" src="siteadmin.php?iframe=top" scrolling="no" style="height: 65px; visibility: inherit; width: 100%; z-index: 1;"></iframe>
</div>
<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%" style="table-layout: fixed;">
<tr><td width="153" height="65"></td><td></td></tr>
<tr>
<td><iframe frameborder="0" id="menu" name="menu" src="siteadmin.php?iframe=menu" scrolling="yes" style="height: 100%; visibility: inherit; width: 100%; z-index: 1;overflow: auto;"></iframe></td>
<td><iframe frameborder="0" id="main" name="main" src="siteadmin.php?iframe=main&ipost=systeminfo" scrolling="yes" style="height: 100%; visibility: inherit; width: 100%; z-index: 1;overflow: auto;"></iframe></td>
</tr></table>
</body>
</html>
<?
}

function showmainheader()
{
	global $iframe;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRansitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>表单页面</title>
<link href="./images/siteadmin/adminmain.css" rel="stylesheet" type="text/css">
<link href="./images/siteadmin/editor.css" rel="stylesheet" type="text/css">
<script language=javascript src="./engine/js/common.js"></script>
<script language=javascript src="./engine/js/product.js"></script>
<script language=javascript src="./engine/js/menu.js"></script>
<script language=javascript src="./engine/js/setting.js"></script>
<script language=javascript src="./engine/js/popwin.js"></script>

<script language=javascript src="./engine/js/editor.js"></script>
<script language=javascript src="./engine/js/attach.js"></script>
<?php if($iframe=='survey'){?>
<script language=javascript src="./engine/js/survey.js"></script>
<?php }?>
</head>
<body>
<?php } ?>

<?php
function showmaintail()
{
?>
</body>
</html>

<?php
}

?>
