<?php

  if($_SESSION['login_as'] == 'advisor')
  {
	  
	  
	  $time_to_loggout = 900;
	  
	  
	  if($loginStatusData['login_status'] == 'break') {
		  
		  
		  if($loginStatusData['login_status_type'] == 'lunch') { 
		  
		  
		  $time_to_loggout = 1800;
		  
		  
		  }

		  
	  
	  }
	  
	if(time() - $_SESSION['timestamp'] > $time_to_loggout) { 
	  
		  header('Location: logout.php');
	  
		}
		else {
			
		$_SESSION['timestamp'] = time();  
		
		}
		
		
  }
	 
?>