$tableauIni = parse_ini_file($data['address'] . "Regions/" . $FichierINIRegions, true);
 if ($tableauIni == FALSE && $data['name'] == $_SESSION['opensim_select']) {
     echo '<div class="alert alert-danger alert-anim" role="alert">';
     echo 'Probleme de lecture du fichier .ini <strong>' . $FichierINIRegions . '</strong> (' . $data['address'] . 'Regions/)';
     echo '</div>';
 }
 $cpt = 0;
 echo '<div class="row">';
 while (list($keyi, $vali) = each($tableauIni)) {
     $filename = $data['address'] . $FichierINIOpensim;
     if (!($fp = fopen($filename, "r"))) {
         echo '<div class="alert alert-danger alert-anim" role="alert">';
         echo "Echec d'ouverture du fichier <strong>" . $filename . "</strong>";
         echo '</div>';
     } else {
         $srvOS = RecupPortHTTP_Opensim($filename, "http_listener_port");
     }
     //Recuperation des images de regions
     $ImgMap = "http://" . $tableauIni[$keyi]['ExternalHostName'] . ":" . trim($srvOS) . "/index.php?method=regionImage" . str_replace("-", "", $tableauIni[$keyi]['RegionUUID']);
     if (Test_Url($ImgMap) == false) {
         $ImgMap = "img/offline.jpg";
     }
     $TD_Hypergrid = "";
     $TD_Hypergrid .= '<div class="col-sm-6 col-md-4">';
     $TD_Hypergrid .= '<div class="thumbnail">';
     $TD_Hypergrid .= '<img class=" btn3d btn btn-default img-rounded" alt="" src="' . $ImgMap . '">';
     $TD_Hypergrid .= '<div class="caption text-center">';
     $TD_Hypergrid .= '<h4>Region: <strong>' . $keyi . '</strong></h4>';
     $TD_Hypergrid .= '<p>Location: <strong>' . $tableauIni[$keyi]['Location'] . '</strong></p>';
     $TD_Hypergrid .= '<div class="btn-group" role="group" aria-label="...">';
     $TD_Hypergrid .= '<a class="btn btn-primary"	href="secondlife://' . $keyi . '/128/128/25">Grid</a>';
 // Parcours des serveur installes
 $db = mysql_connect($hostnameBDD, $userBDD, $passBDD);
 mysql_select_db($database, $db);
 $sql = 'SELECT * FROM moteurs';
 $req = mysql_query($sql) or die('Erreur SQL !<p>' . $sql . '</p>' . mysql_error());
 while ($data = mysql_fetch_assoc($req)) {
     // Pour chaque serveur
     $tableauIni = parse_ini_file($data['address'] . "Regions/Regions.ini", true);
     if ($tableauIni == FALSE) {
         echo 'Probleme Lecture Fichier .ini ' . $data['address'] . "Regions/Regions.ini" . '<br>';
     }
     // echo '<p>Serveur Name:'.$data['name'].' - Version:'.$data['version'].'</p>';
     // while (list($keyi, $vali) = each($tableauIni))
     while (list($keyi) = each($tableauIni)) {
         // *** Recuperation du port Http du Simulateur
         $srvOS = RecupPortHTTP_Opensim($data['address'] . $FichierINIOpensim, "http_listener_port");
         // Recuperation des valeurs ET enregistrement des valeurs dans le tableau
         // echo $key.$tableauIni[$key]['RegionUUID'].$tableauIni[$key]['Location'].$tableauIni[$key]['InternalPort'].'<br>';
         $location = explode(",", $tableauIni[$keyi]['Location']);
         $coordX = $location[0] - $px - $ox;
         $coordY = $location[1] - $py - $oy;
         $Matrice[$coordX][$coordY]['name'] = $keyi;
         $uuid = str_replace("-", "", $tableauIni[$keyi]['RegionUUID']);
         $ImgMap = "http://" . $tableauIni[$keyi]['ExternalHostName'] . ":" . trim($srvOS) . "/index.php?method=regionImage" . $uuid;
         $Matrice[$coordX][$coordY]['img'] = $ImgMap;
         $Matrice[$coordX][$coordY]['ip'] = $tableauIni[$keyi]['ExternalHostName'];
         $Matrice[$coordX][$coordY]['port'] = $tableauIni[$keyi]['InternalPort'];
         $Matrice[$coordX][$coordY]['uuid'] = $key . $tableauIni[$keyi]['RegionUUID'];
         $Matrice[$coordX][$coordY]['hypergrid'] = $data[hypergrid];
     }
 }
 }
 $tableauIni = parse_ini_file($filename, true);
 if ($tableauIni == FALSE) {
     echo '<p>Error: Reading ini file ' . $filename . '</p>';
 }
 // *** Lecture Fichier Regions.ini ***
 $filename2 = INI_Conf_Moteur($_SESSION['opensim_select'], "address") . "Regions/" . $FichierINIRegions;
 if (file_exists($filename2)) {
     $filename = $filename2;
 }
 $tableauIni = parse_ini_file($filename, true);
 if ($tableauIni == FALSE) {
     echo '<p>Error: Reading ini file ' . $filename . '</p>';
 }
 // *** Recuperation du port Http du Simulateur
 $srvOS = RecupPortHTTP_Opensim(INI_Conf_Moteur($_SESSION['opensim_select'], "address") . $FichierINIOpensim, "http_listener_port");
 echo '<p>Nombre total de regions <span class="badge">' . count($tableauIni) . '</span></p>';
 echo '<table class="table table-hover">';
 echo '<tr>';
 echo '<th>Name</th>';
 echo '<th>Image</th>';
 //   echo '<th>Uuid</th>';
 echo '<th>Location</th>';
 echo '<th>Public IP/Host</th>';
 echo '<th>Private IP/Host</th>';
 echo '<th>Port</th>';
 echo '<th>Format BMP</th>';
 echo '<th>Format RAW</th>';
 echo '</tr>';
 while (list($key, $val) = each($tableauIni)) {
     $uuid = str_replace("-", "", $tableauIni[$key]['RegionUUID']);