<?php

	$sPage  = "zoom_prenom";
	require("admin/§lib_inc.php");

	$FAMILY=isset($_REQUEST["FAMILY"])?$_REQUEST["FAMILY"] : -1; 
	$FIRSTNAME=isset($_REQUEST["FIRSTNAME"])?$_REQUEST["FIRSTNAME"] : 0; 

	require("§menu.php");

	$sTitle = "Liste des personnes dont le prénom contient ".$FIRSTNAME;
	echo "<center><h1>".$sTitle."</h1></center>";


	//set_time_limit(0);

	
	flush();

	if($bSessionOk==false)
	{
		$sReqCont="and contemporary=1";
	}
	if($FAMILY==-1)
	{
		$result = mysql_query( "select * from oxg_individuals where first_name = \"$FIRSTNAME\" or first_name LIKE \"$FIRSTNAME %\" or first_name LIKE \"% $FIRSTNAME %\" or first_name LIKE \"% $FIRSTNAME\" $sReqCont");
	}
	else
	{
		$result = mysql_query( "select * from oxg_individuals where first_name = \"$FIRSTNAME\" or first_name LIKE \"$FIRSTNAME %\" or first_name LIKE \"% $FIRSTNAME %\" or first_name LIKE \"% $FIRSTNAME\" $sReqCont and id_family=$FAMILY");
	}
	while($row = mysql_fetch_array($result))
	{
		if ($row['sex']==1) { $flag="female.png"; }
		if ($row['sex']==0) { $flag="male.png"; }
		echo "  <IMG SRC=$flag> ";
		echo affiche_lien_individu($row['id_family'], $row['id_individual'], true, true);
		echo "</A><BR>";
	}
	affiche_pied_page(true);

?>
