<?php
session_start();

//////////////////////
// expire time logic	

define('SESSION_EXPIRE_TIME_ADMIN', '3600'); // session_expire_time in seconds, 1200 = 60*20 = 20 mins

if (microtime_float() - $_SESSION['Logged_Time'] > SESSION_EXPIRE_TIME_ADMIN){
	// remove all the session variables 
	session_destroy(); 
		
	header("Location: login.php");
	// Redirect to login
} else {
	// update current time as login time
	$_SESSION['Logged_Time'] = microtime_float();
}

if (@$_SESSION[SessionAdmin] != "True"){
	header("Location: require_login.html");
	exit();
}
?>