<?php

		session_start();
		
		//print_r($_SESSION);
		
		//echo '<br>';
		//echo '<br>';
		//echo '<br>';
		//echo '<br>';
		
		/*if(!isset($_SESSION['logged']))
	    {
			
			// on se deloggue
			echo "0";
	    }*/
		
		if( isset($_SESSION['verrou']) && $_SESSION['verrou'] == 'ok' )
		{   $current = time();
		    $diff = $current - $_SESSION['start_session'];
			//$_SESSION['compte'] = $diff;
		    if($diff > $_SESSION['delai'])
			{
				echo "0";
			}
		
		else { echo "1";
		     }
		}	 
		
		if( !isset($_SESSION['verrou'] ) )
		   { echo "1";
		   }
		
		/*if( isset($_SESSION['login']) && $_SESSION['login']== "no" )
	    {
			
			//$tmp = $_SESSION['page_active'];
			//$tab = explode(".", $tmp);
			//$page = $tmp;
			//echo '0_' .$page;
			echo "0";
	    }
		
		if( isset($_SESSION['logged'])  && $_SESSION['logged']== "ok" )
	    {
			/*$current = time();
		    $diff = $current - $_SESSION['start_session'];
		    if($diff > $_SESSION['delai'])
			{
				echo "1";
			}*/
		/*	echo "1";
	    }*/


		


?>