<?php

	$nb_ind_pays = $_SESSION['stats'] ['nb_ind_pays'];
	$prc_ind_pays = $_SESSION['stats'] ['prc_ind_pays'];
	$nb_birth_ind = $_SESSION['stats'] ['nb_birth'];
	$nb_wedding_ind = $_SESSION['stats'] ['nb_wedding'];
	$nb_death_ind = $_SESSION['stats'] ['nb_death'];
	$prc_birth_ind = $_SESSION['stats'] ['prc_birth_ind'];
	$prc_death_ind = $_SESSION['stats'] ['prc_death_ind'];
	$prc_birth = $_SESSION['stats'] ['prc_birth'];
	$prc_death = $_SESSION['stats'] ['prc_death'];
	$prc_wedding = $_SESSION['stats'] ['prc_wedding'];
	

	echo "<center><h1>".$_SESSION['stats'] ['libelle']."</h1></center>";

	echo $nb_ind_pays." ";
	if($nb_ind_pays>1) 	{
		echo  display_lng_text("CARTE_PERSONS_EVENTS");
	}
	else {
		echo display_lng_text("CARTE_PERSONS_EVENT");
	}
	
	echo " ".$prc_ind_pays."% ".decode_lng_text("CARTE_PERSONS_EVENTS_T")."<br>";
	
	echo $nb_birth_ind ." ";
	if($nb_birth_ind>1) {
		echo display_lng_text("CARTE_PERSONS_BIRTH");
	}
	else {
		echo display_lng_text("CARTE_PERSON_BIRTH");
	}
	
	echo " ".$prc_birth_ind."% ".decode_lng_text("CARTE_PERSONS_IND_T")." $prc_birth% ".decode_lng_text("CARTE_PERSONS_BIRTH_T")."<br>";
	
	echo "$nb_death_ind ";	
	if($nb_death_ind>1) {
		echo display_lng_text("CARTE_PERSONS_DEATH");
	}
	else {
		echo display_lng_text("CARTE_PERSON_DEATH");
	}
	
	echo " ".$prc_death_ind."% ".decode_lng_text("CARTE_PERSONS_IND_T")." $prc_death% ".decode_lng_text("CARTE_PERSONS_DEATH_T")."<br>";
	
	echo $nb_wedding_ind." ";
	if($nb_wedding_ind>1) {
		echo display_lng_text("CARTE_PERSONS_WEDDING");
	}
	else {
		echo display_lng_text("CARTE_PERSON_WEDDING");
	}
	
	echo " ".$prc_wedding."% ".decode_lng_text("CARTE_PERSONS_WEDDING_T")."<br>";

	// affichage de la carte demandée
	echo "<center><h3>";
	echo display_lng_text("CARTE_ZONE_SELECT");
	echo "</H3>";

	echo "<map name=carte>";

	foreach ($_SESSION['t_zones'] as $k => $row_zones) {

			echo "<area shape=poly ALT='".$row_zones[code]." : ".$row_zones[libelle]." (".$row_info_zone[somme].")'";
			echo " coords=".$row_zones[coord_zone];
			echo " href='".Router::url('lieux/detail_zone/'.$row_zones['pays'].'/'.$row_zones['id_dept'])."'>";
		
	}
	echo "</map>";
	
	$fic_name="map".$row_zones['pays']."00_51.jpg";
	$fic_cities = "map_".$_SESSION['FAMILY']."_".$row_zones['pays']."_cities.png";
	
	$rep_file=WEBROOT."/images/map/".$fic_cities;

	$file = @file($rep_file); 

		$this->carte_img($row_zones['pays']);
		
		echo "<table><tr><td><img src='".IMAGES."map/".$fic_cities."' useMap=#carte border=0></center>";
		
echo "</td><td>
<table ><tr>
<td  colspan=2><center>% events</td></tr>";
echo "<tr>	<td style='background-color:rgb(255,255,20);'></td>
<td><center><strong>60 - 100</strong></td></tr>";

$k=60;
for ($i=2;$i<14;$i++) {
	$k= $k-5 ;

	echo "<tr>	<td style='background-color:rgb(255,255,".($i*17).");'></td>
		<td><center><strong>".$k." - ".($k+4)."</strong></td></tr>";
}
echo "</table></td></tr></table>";

