<?php


	$jour = intval($_POST["jour"]); 
	$mois = intval($_POST["mois"]); 
	$annee = intval($_POST["annee"]); 
	$timestamp = $_POST["timestamp"]; 
	$option_date = $_POST["option_date"]; 
	
	$timestamp_insert = mktime (0, 0, 0, $mois, $jour, $annee);
	
	
	if($option_date == "avant")
	{
			if($timestamp_insert > $timestamp)
			{
				echo 2;
			}
			else
			{
				echo 1;
			}
			
	}
	
	if($option_date == "apres")
	{
			if($timestamp_insert < $timestamp)
			{
				echo 3;
			}
			else
			{
				echo 1;
			}
			
	}
	
	//echo "<p>";
	//echo $_POST["jour"] ." " .$_POST["mois"] ." " .$_POST["annee"] ." " .$_POST["timestamp"] ." " .$_POST["option_date"] ;
	//echo $jour ." " .$mois ." " .$annee ." " .$timestamp ." " .$option_date;
	//echo "</p>";
	
	
	
	
					
		
	
?>	