<?php if (!isset($_SESSION['FirstName'])) {
	session_start();
}
//echo "Brand: ".$_SESSION['admin_brand'];
	if($_GET['skey']=="p987gjkjtyedghnbdd3421scdzx"){
		$_SESSION['iframed']=1;
	}
    include ('includes/db1config.php'); //db connection config file
    include ('../includes/mysql_connect.php'); //connect using selected db config file
	include_once 'includes/admin-config.php';	//get site options	
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<?php 
include('title.php'); 
echo'<link href="css/'.$stylesheet.'" rel="stylesheet" type="text/css" media="screen" />';	
echo'<link href="css/print_style.css" rel="stylesheet" type="text/css" media="print" />';
?>
<script type="text/javascript">
function setFocus()
{
document.getElementById("username").focus();
}
</script>

<!-- for popup windows -->
<link href="css/popup-style.css" rel="stylesheet" type="text/css" media="all" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="../js/jquery.popupoverlay.js"></script>
 <!-- end popup script-->

<script type="text/javascript" src="js/jquery.nestable.js"></script>
<link rel="stylesheet" type="text/css" href="css/nestable.css" />

</head>

<body>


<div id="wrapper">

<!-- start header -->
<?php include('includes/header.inc.php'); ?>
<!-- end header-->
<?php
if(isset($_GET['admin-page'])){
	$query = "select * from admin_pages where pageID=".$_GET['admin-page'];
	$rt=mysql_query($query);   
	while($nt=mysql_fetch_array($rt)){
		$page_name = $nt['page_name'];
		$includes_file = $nt['includes_file'];
		$full_width = $nt['full_width'];		
	}
}

?>
<?php
if($full_width=="1"){
	$bg="-nobg";
	$col="-one-column";
}
?>

<!-- start page -->
<div id="page-container<?php echo $bg;?>">
<div id="page-bg-top">


<!-- start content -->
<div id="content<?php echo $col;?>">
<?php
if($full_width!="1"){
?>
<div id="main-content">
<?php
}
?>   
		<div class="post">
		  <div class="entry">
          
<br />
<?php
echo"<p><strong>Site Admin Page:</strong>";


if(empty($_GET['admin-page'])){
	echo " &bull; Home</p><br /><h1>Site Admin: " ; 
	include('seotitle.php');
	echo"</h1>";
	include('login.php'); 
} else {
	//$query = "select * from admin_pages where pageID=".$_GET['admin-page'];
	//$rt=mysql_query($query);   
	//while($nt=mysql_fetch_array($rt)){
		echo " &bull; $page_name</p><br />" ;
		include($includes_file);
	//}
}
?>

<br />

</div><!-- end entry-->

<br />

</div><!-- end post-->
<?php
if($full_width!="1"){
?>
</div><!-- end main-content-->
<?php
}
?> 
</div><!-- end content -->
    
<!-- start sidebar -->
<?php 
if($full_width!="1"){
	include('includes/admin-sidebar.inc.php');
}
?>
<!--sidebar-->


<div style="clear: both;">&nbsp;</div>

<div id="page-bg-btm">
</div><!-- end page-bg-btm div -->
</div><!-- end page-bg-top div -->
</div><!-- end page-container -->



</div><!-- end wrapper div-->

<!-- end page -->


<!--footer-->



</body>
</html>
