<?php

	$acte = $_SESSION['s_top_acte'];
	$nbre = $_SESSION['s_top_nbre'];

	if ($acte=='b') {
		// $type ='BIRTH';
		// $date = "date_naissance";
		$sTitle=decode_lng_text("STATS_ARTICLE")." ". $nbre." ".decode_lng_text("STATS_TOP15_B");
	}
	elseif ($acte=='d') {
		// $type ='DEATH';
		// $date = "date_deces";
		$sTitle=decode_lng_text("STATS_ARTICLE")." ". $nbre." ".decode_lng_text("STATS_TOP15_D");
	}
	else {
		
		$sTitle=decode_lng_text("STATS_ARTICLE")." ". $nbre." ".decode_lng_text("STATS_TOP15_M");
	}
		
//var_dump($_SESSION['t_stats_10']);
	echo "<center><h1>".$sTitle."</h1></center></br>";
	echo "<table border=0>";

	echo "<div id=panel>";
	// tableau du filtrage
	echo "<br/>";
	echo "<br/>";
	echo "<form action='".Router::url('statistiques/top_date')."' method=post>";
	//echo "<input type=hidden name=FAMILY value=\"$FAMILY\">";
	//echo "<center>";
	echo "<table border=0 style='text-align:center;'><tr>";
	echo "<td>".decode_lng_text('STATS_TOP15_DATE_C')." ";

	echo "<select name=acte>";
		echo "<option ";
		if ($acte=="b") { echo "selected "; }
		echo "value='b'>".decode_lng_text('GEDTAG_BIRT');
		echo "</option>";
		echo "<option ";
		if ($acte=="w") { echo "selected "; }
		echo "value='w'>".decode_lng_text('GEDTAG_MARR');
		echo "</option>";
		echo "<option ";
		if ($acte=="d") { echo "selected "; }
		echo "value='d'>".decode_lng_text('GEDTAG_DEAT');
		echo "</option>";
	echo "</select></td>";

	
	echo "<td>".decode_lng_text('STATS_TOP15_DATE_L')." ";
	echo "<input type=text name=nbre value='".$nbre."' maxlength=3 size=3></td>\n<td>";
	echo "<td><input type=submit value=".decode_lng_text('PRIVATE_ENTER')."></td>";
	echo "</tr></table></form>";
	//echo "</center>";
	echo "</div></br>";
	
	/*
	*	Affichage des résultats
	*/

	
	echo "<table>";
	foreach ($_SESSION['t_stats_10'] as $ligne) {	

		echo $ligne."</br>";
	}