<?php
	$server_protocol = $_SERVER["SERVER_PROTOCOL"];
  	$server_software = $_SERVER["SERVER_SOFTWARE"];
	$_method = $_SERVER['REQUEST_METHOD'];
	if($_method == "GET")	$_request = $_GET;
	else if($_method == "POST")	$_request = $_POST;
	else {
 	  header("Server: ".$server_software);			
 	  header($server_protocol." 405 Method Not Allowed");					
   	  header("Status: 400 Bad Request");
   	  header("Allow: GET, POST, HEAD");
	  exit(0);					
	}
	while(list($_key,$_value)=each($_request)) {
		${trim(htmlentities($_key, ENT_QUOTES, "UTF-8"))} = trim(htmlentities($_value, ENT_QUOTES, "UTF-8"));
	}
	reset($_request);
	session_start();
	if($action == "verify") {
		require_once("try.inc");
	}
	if(isset($openid_claimed_id)) require_once("auth.inc"); 
	// if needs login 
		if($_SESSION['isSession'] == "true") {
			if($_SESSION['sessionTime'] >= (time()-3600)) {
				$_SESSION['sessionTime'] = time();
			} else {			
					unset($_SESSION['isSession']);
					unset($_SESSION['sessionTime']);
					unset($_SESSION['userIdentity']);
					$_SESSION = array();
					session_destroy();
					$app = "session_timeout";
		} // End check session time 
			if(intval($_SESSION['userIdentity']) < 1)  $app = "login";	// Login
		} else { 
				$app = "login";
		} // End check isSession 
phpinfo();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- Creation date: 01/25/2005  -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<meta name="description" content="Osmio Authentication Test Site">
<meta name="keywords" content="Own,Your,Privacy">
<meta name="authors" content="Eddy Nigg, StartCom Ltd.">
<meta http-equiv="P3P" content="CP='NOI DSP LAW NID IND'">
<style type="text/css" media="screen">        
  <!--
	.alert { width: 99%; color: #FFFF00; font: 20px 'Bitstream Vera Sans',Verdana,Arial,Serif; font-weight: bold; text-align: center; }
	.error { width: 99%; color: #FF0000; font: 20px 'Bitstream Vera Sans',Verdana,Arial,Serif; font-weight: bold; text-align: center; }
	.success { width: 99%; color: #00DC00; font: 20px 'Bitstream Vera Sans',Verdana,Arial,Serif; font-weight: bold; text-align: center; }
  -->
</style>
<body>

<?php
									$has_result = false;
									if(file_exists($app.".inc")) {
										require($app.".inc");	
										$has_result = true;
									}
									if(!$has_result){
											require("default.inc");	// Your own default includes...
									} 
?>

</body>
</html>