<?php
$contentID = $_GET['c'];
$i = $_GET['i'];
$id = $_GET['id'];

if ($id == "")
{
	$id = $i;
}

require_once ('../login/includes/config.inc.php'); 
include('includes/settings.php');

include('includes/mysql_connect.php');
global $dbc;

include('includes/session.php');

$currentPage = $_SERVER['REQUEST_URI'];
$currentPage2 = $_SERVER['PHP_SELF'];
// echo $currentPage;
// echo $currentPage2;

if (time( ) < $_SESSION['timeout']+1800)
{
	$_SESSION['timeout'] = time();
	// echo "welcome old user";
	// echo "less";
}

else
{
	// echo "more";
	session_destroy();

	header("Location: ../login/logout.php");
// session_start();
// $_SESSION['time'] = time();
// echo "welcome new user";
}


$_SESSION['lastvisitpage'] = $currentPage;

include('includes/funcs.php');
$strValidation = "";
$boolValidate = 1;
$originalsFolder = "../uploads/";
$displayFolder = "../images/";
$thumbs = "../uploads/thumbs/";

?>

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<title><?php echo $page_title;?></title>
	<?php 
    include('css.php');
    include('js.php');  
    ?> 
   
</head>
<?php
	
?>
<body>
<header id="logoWrap">
	<div class="body indent">
		<img src="../assets/images/logo-dt.png" alt="Digital Tea Content Management System" class="floatL" />
		<?php
		if ((isset($_SESSION['strFirstName'])) || ($loggedIn == 1) )
		{
			echo '<h1 class="col-5 textRight margin20T">Welcome ' . $_SESSION['strFirstName'].'</h1>';
		}
		?>
	</div>
</header>

<div id="adminContent" class=""> 
	<nav id="adminNav">
		<?php
			$adminNav = getAdminNav();
			echo $adminNav;
			$log = getLogNav();
			echo $log;
		?>
	</nav>
	<div id="listing">