<?php

	$sexe =	$_SESSION['s_top_sexe'];
	$nbre = $_SESSION['s_top_nbre'];
	if ($sexe==0) {
		$titre_sexe = decode_lng_text('STATS_TOP15_FM');
	}
	else {
		$titre_sexe = decode_lng_text('STATS_TOP15_FF');
	}

		
	echo "<center><h1>".decode_lng_text('STATS_ARTICLE')." ".$nbre." ".$titre_sexe."</h1></center></br>";
	
	if($_SESSION['s_skin'] == 'BROWN_TOP_LEFT' ) {
		$color='#FAD278';
	}
	else {
		$color='lightblue';
	}
	echo "<center><table border=1><tr bgcolor='".$color."' align=center><td>";
	echo "#";
	echo "</td><td>";
	echo display_lng_text("STATS_PATRO");
	echo "</td><td>";
	echo display_lng_text("STATS_NB");
	echo "</td><td>";
	echo "%";
	echo "</td></tr>";

	foreach($_SESSION['t_prenoms'] as $ligne) {
	
		echo "<tr bgcolor=white align=right><td>".$ligne['rank']."</td><td align=left>".$ligne['link']."</td><td align=center>".$ligne['val']."</td><td>".$ligne['perc']."</td></tr>";
	}


	echo "</table></center>";


echo "<div id=panel>";
echo "<br/>";
echo "<br/>";
echo "<form action='".Router::url('statistiques/top_prenoms')."' method=post>";

echo "<center>";
echo "<table border=1><tr><td>";
echo decode_lng_text("STATS_TOP15_F_L");
echo " <input type=text name=nbre value='".$nbre."' maxlength=5 size=5></td>\n<td>";
echo "<td>".decode_lng_text("STATS_TOP15_F_C")." ";
echo "<select name=sexe><OPTION value='0'";
if ($sexe==0) {echo "selected";}
echo ">".decode_lng_text('STATS_SEXE_M')."</OPTION>";
echo "<OPTION value='1'";
if ($sexe==1) {echo "selected";}
echo ">".decode_lng_text('STATS_SEXE_F')."</OPTION>";
echo "</select></td>";
echo "<td><input type=submit value=".decode_lng_text('PRIVATE_ENTER')."></td>";
echo "</tr></table></form>";
echo "</center>";
echo "</div>";
