<?php
	require("§lib_inc.php");
?>
<HTML>
<BODY BGCOLOR=#FFFFFF FGCOLOR=0 background='fond.png'>
<?php
	echo "<CENTER><H1>";	
	display_lng_text("PLACES_TITLE");
	echo "</H1><TABLE cellspacing=0 border=1><tr><td>";
	display_lng_text("PLACES_TABLE_TITLE");

//	set_time_limit(0);
	
	flush();

	$sql_query="select libelle, id_country from oxg_countries";
	$result_countries = mysqli_query($_SESSION['dbh'],$sql_query) or mysqli_die();
	while($row_country = mysqli_fetch_array($_SESSION['dbh'],$result_countries))
	{
		$result_zones = mysqli_query($_SESSION['dbh'], "select libelle, id_zone from oxg_zones where id_country=$row_country[id_country]");
		while($row_zone = mysqli_fetch_array($_SESSION['dbh'],$result_zones))
		{
			echo "<tr bgcolor=#AAFFEE><td>$row_country[libelle]<td>$row_country[id_country]<td>$row_zone[libelle]<td>$row_zone[id_zone]<td><td>";
			$result_cities = mysqli_query($_SESSION['dbh'], "select libelle, code, id_city from oxg_cities where id_country=$row_country[id_country] and id_zone=$row_zone[id_zone]");
			while($row_city = mysqli_fetch_array($_SESSION['dbh'],$result_cities))
			{
				echo "<tr><td><td><td><td><td>$row_city[code] : $row_city[libelle]<td>$row_city[id_city]</tr>";
			}
		}
	}
?>
</TABLE>
</CENTER>
<br><br>
<?php
	affiche_pied_page_admin(true);
?>
</BODY>
</HTML>