<?php
	require("§lib_inc.php");
?>
<HTML>
<BODY BGCOLOR=#FFFFFF FGCOLOR=0 background='fond.png'>
<?php
	echo "<CENTER><H1>";	
	display_lng_text("FAMILY_TITLE");
	echo "</H1><TABLE>";

//	set_time_limit(0);
	
	flush();

	$sql_query="select id_family, name FAMILY from oxg_family";
	$result = mysqli_query($_SESSION['dbh'],$sql_query) or mysqli_die();
	while($row = mysqli_fetch_array($_SESSION['dbh'],$result))
	{
		$result_cpt = mysqli_query($_SESSION['dbh'], "select count(*) as SOMME from oxg_individuals where id_family=$row[id_family]");
		$row_cpt = mysqli_fetch_array($_SESSION['dbh'],$result_cpt);
		echo "<tr><td><A HREF='§empty_database.php?FAMILY=$row[id_family]'><B>";
		echo "<B>$row[FAMILY]</B></A></td><td>$row_cpt[SOMME]</td></tr>";
	}
?>
</TABLE>
</CENTER>
<br><br>
<?php
	affiche_pied_page_admin(true);
?>
</BODY>
</HTML>