<?php			
	
	function _securePassword($val) 
	{
		return md5("%&!".md5($val)."#*^$");
	}
			
	function _secureSession($type,$intvl)
	{
		if($_POST)
		{		
			if(!isset($_SESSION[$type]))
			$_SESSION[$type] = strtotime(date("Y-m-d H:i:s"));
			else
			{
				$interval = (strtotime(date("Y-m-d H:i:s")) - $_SESSION[$type]);
				
				$_SESSION[$type] = strtotime(date("Y-m-d H:i:s"));				
				if($interval<$intvl)
				{
					header('HTTP/1.0 403 Forbidden');
					exit("Unauthorised access!");
				}
			}
		}			
	}	
?>
