query("select count(*) FROM 1liste WHERE ville = '$villem' and pays = '$pays'")->fetch()); if ( $marees == '1' ) { $Res=$bdd->query("SELECT * FROM 1liste WHERE ville = '$villem' and pays = '$pays'"); $Repp = $Res->fetch(PDO::FETCH_ASSOC); $port = utf8_encode ($Repp['port']); $conjv = $Repp['conjv']; if ( !ereg("'",$conjv )) { $conjv = $conjv." "; } } $bdd = new PDO('mysql:host=localhost;dbname=villes', 'villes', 'poussygogo'); $villeloc = ""; $Nbp=current($bdd->query("select count(*) FROM pays WHERE pays = '$pays'")->fetch()); if ( $Nbp >= '1' ) { $Res=$bdd->query("SELECT * FROM pays WHERE pays = '$pays'"); $Repp = $Res->fetch(PDO::FETCH_ASSOC); $nopa = $Repp['No']; $liste = $Repp['liste']; $conj = $Repp['conj']; $conj2 = $Repp['conj2']; $decoup = utf8_encode($Repp['decoup']); $drap = $Repp['drap']; $langue = $Repp['langue']; $pop = $Repp['pop']; $alt = $Repp['alt']; $cpp = $Repp['cp']; $ville4 = $Repp['ville4']; $ete = $Repp['ete']; $km = $Repp['km']; $affpays = utf8_encode($Repp['affpays']); if ( $affpays != '') { $paysm = str_replace("_"," ",$affpays); } else { $paysm = str_replace("_"," ",$pays); } $paysm = ucwords("$paysm"); $paysm = str_replace(" Du "," du ",$paysm); if ( $paysm == 'Cote Ivoire') { $paysm = "Côte d'Ivoire"; } $decoupm = ucwords("$decoup"); $gmt = $Repp['fuseauhoraire']; if ( $conj2 == 'a' ) { $conj2 = "à"; } $ville5 = str_replace("-"," ",$ville); $ville5 = str_replace("_","\'",$ville5); $reg5 = str_replace("-"," ",$reg); $reg5 = str_replace("_","\'",$reg5); if ( strlen($reg5) == '1') { $reg5 = "00"; } $cp = ""; $Nb=current($bdd->query("select count(*) FROM $pays WHERE ville = '$ville5' and region1 = '$reg5'")->fetch()); if ( $Nb >= '1') { $Res=$bdd->query("SELECT * FROM $pays WHERE ville = '$ville5' and region1 = '$reg5'"); $Rep = $Res->fetch(PDO::FETCH_ASSOC); $No = $Rep['No']; $suiv = $No + 1; $ville = $Rep['ville']; $lat = $Rep['lat']; $lon = $Rep['lon']; $region = $Rep['region1']; $UFI = $Rep['UFI']; $time = $Rep['time']; $proxi = $Rep['prox']; if ( $pays != 'usa' ) { $UNI = $Rep['UNI']; $JOG = $Rep['JOG']; $MGRS = $Rep['MGRS']; } else { $UNI = ""; $JOG = ""; $MGRS = ""; } if ( $pays == 'usa' ) { $conte = $Rep['region2']; } if ( isset($ville4) ) { if ( $ville4 == "oui") { $villeloc = $Rep['ville4']; $villefin = $villeloc; }} else {$villeloc = "";} if ( $pop == 'oui' ) { $population = $Rep['population']; } if ( $alt == 'oui' ) { $altitude = $Rep['altitude']; } if ( $cpp == 'oui' ) { $cp = $Rep['cp']; } } } if ( $Nb < '1' || $Nbp < '1') { header("HTTP/1.1 410 Not Found"); header("Status: 410 Not Found"); } $desc = $ville; if ( $ville4 != '' && $villeloc != $ville && $villeloc != '') { $desc .=" ( ".$villeloc." )"; } $desc .= " ".$conj2." ".$paysm; if ( $cp != '' && $cpp == 'oui') { $desc .= ", ".$cp; } if ( $region != '00' ) { $desc .= ", ".$decoup." de ".$region; } $descrip = "Quelle heure est-il à ".$desc." ? Sa Longitude et Latitude, Altitude, Carte, etc..."; If( ceil(($No+1)/9) == ($No+1)/9 ) { $descrip = "Informations sur la ville de ".$desc." : Heure locale, coordonnées Gps, carte satellite, etc..."; } If( ceil(($No+2)/9) == ($No+2)/9 ) { $descrip = "Tout sur la ville de ".$desc." : Décalage Horaire, Altitude, coordonnées Gps, Plan satellite, etc..."; } If( ceil(($No+3)/9) == ($No+3)/9 ) { $descrip = "Latitude et Longitude de ".$desc." : carte satellite, Heure locale, Altitude, etc..."; } If( ceil(($No+4)/9) == ($No+4)/9 ) { $descrip = "Carte Satellite de ".$desc." : Fuseau Horaire, coordonnées Gps, Altitude, etc..."; } If( ceil(($No+5)/9) == ($No+5)/9 ) { $descrip = "Altitude de ".$desc." : Heure locale, coordonnées Gps, carte satellite, Time Zone etc..."; } If( ceil(($No+6)/9) == ($No+6)/9 ) { $descrip = "Ephémérides et informations sur la ville de ".$desc." : Levé et couché du Soleil, etc.."; } If( ceil(($No+7)/9) == ($No+7)/9 ) { $descrip = "Ville de ".$desc." : infos, Ephémérides, coefficient de marée, cycle de lune, etc..."; } If( ceil(($No+8)/9) == ($No+8)/9 ) { $descrip = $desc." : Carte, infos, Ephémérides, Lune, Soleil, Marée, Météo, etc..."; } date_default_timezone_set($time); $veille = date('y-m-d', time() - 3600*24); $sun_info = date_sun_info ( strtotime ( date('Y-m-d') ), $lat , $lon ); $sun_veille = date_sun_info ( strtotime ( $veille ), $lat , $lon ); ?> <? if ( $ville4 != '' && $villeloc != $ville && $villeloc != '') { echo $villeloc." - "; } echo "Ville de ".$ville; if ( $region != '00' ) { echo ", ".$decoup." de ".$region; } echo " ".$conj2." ".$paysm; ?> "> = '1' && $urlbad == '0') { $hor = "1"; } $ico= $pays; $niv="3"; include("../haut.php"); echo "

".$ville."

"; if ( $Nb < '1' || $Nbp < '1' || $urlbad == '1') { echo "

Cette ville ou pays n'est pas répertoriée.


"; include("moteur.php"); } else { if ( $mob == '0' ) { echo "
"; echo "
"; } else { echo "
"; echo "
"; } echo $ville; If( ceil($No/3) == $No/3 ) { echo " est une ville ".$conj; if(!ereg("'",$conj)) {echo " ";} } If( ceil(($No+1)/3) == ($No+1)/3 ) { echo " est situé ".$conj2." "; } If( ceil(($No+2)/3) == ($No+2)/3 ) { echo " se situe ".$conj2." "; } echo $paysm; echo "   ".$ville.""; if ( $ville4 == 'oui' && $villeloc != $ville && $villeloc != '') { If( ceil($No/2) == $No/2 ) { echo "

Orthographe locale : ".$villeloc.""; } else { if ( ereg("Français",$langue)) { $langue = "Français"; } if ( ereg("Mandarin",$langue)) { $langue = "Chinois"; } if ( ereg("Chinois",$langue)) { $langue = "Chinois"; } if ( ereg("Arabe",$langue)) { $langue = "Arabe"; } if ( ereg("Hindi",$langue)) { $langue = "hindi"; } if ( ereg("Persan",$langue)) { $langue = "Persan"; } if ( ereg("Finnois",$langue)) { $langue = "Finnois"; } if ( ereg("Grec",$langue)) { $langue = "Grec"; } if ( ereg("Tchèque",$langue)) { $langue = "Tchèque"; } if ( ereg("Russe",$langue)) { $langue = "Russe"; } if ( ereg("Serbe",$langue)) { $langue = "Serbe"; } $langue = utf8_encode ($langue); echo "

".$ville." en ".$langue." : ".$villeloc.""; } } echo "
"; if ( $mob == '0' ) { echo "Heure Locale à ".$ville." -->
"; } $fu = date('O'); $fus = chunk_split("$fu","3","h"); $fuse = explode("h",$fus); $fuseau = $fuse[0]." h ".$fuse[1]; $fuseau = str_replace("-","- ","$fuseau"); $fuseau = str_replace("+","+ ","$fuseau"); If( ceil($No/2) == $No/2 ) { echo "Fuseau Horaire :"; } If( ceil(($No+1)/2) == ($No+1)/2 ) { echo "Décalage Horaire :"; } echo " Gmt ".$fuseau."
"; echo "Time Zone : ".$time.""; if ( date('I') == '1' ) { If( ceil($No/3) == $No/3 ) { echo "
Actuellement à l'Heure d'été"; } If( ceil(($No+1)/3) == ($No+1)/3 ) { echo "
Heure d'été activée"; } If( ceil(($No+2)/3) == ($No+2)/3 ) { echo "
En ce moment à l'Heure d'été"; } } if ( $marees == '0' ) { $bdd = new PDO('mysql:host=localhost;dbname=marees;charset=UTF8', 'marees', 'poussygogo'); $jour = date("d"); $moi = date("m"); $annee = date("Y"); $ete = date("I", mktime(0, 0, 0, $moi, $jour, $annee)); $Nbd=current($bdd->query("select count(*) FROM brest WHERE annee = '$annee' and mois = '$moi' and jour = '$jour'")->fetch()); if ( $Nbd >= '1' ) { $Res=$bdd->query("SELECT * FROM brest WHERE annee = '$annee' and mois = '$moi' and jour = '$jour'"); $Repp = $Res->fetch(PDO::FETCH_ASSOC); $cm = $Repp['cm']; $cs = $Repp['cs'];; echo "
Coefficient de Marée : "; echo "      ".$cm; if ( $cs != '' ) { echo "/".$cs; } echo ""; } } if ( $mob == '0' ) { echo "
"; } else { echo "

Heure Locale à ".$ville."

"; } if ( date('I') == '1' && $mob == '0') { echo "
"; } echo "
"; echo date("H")." h "; echo date("i")." m "; echo date("s")." s"; echo "
"; $jour = date("l"); if ( $jour == 'Monday' ) { $affjour = "Lundi"; } if ( $jour == 'Tuesday' ) { $affjour = "Mardi"; } if ( $jour == 'Wednesday' ) { $affjour = "Mercredi"; } if ( $jour == 'Thursday' ) { $affjour = "Jeudi"; } if ( $jour == 'Friday' ) { $affjour = "Vendredi"; } if ( $jour == 'Saturday' ) { $affjour = "Samedi"; } if ( $jour == 'Sunday' ) { $affjour = "Dimanche"; } $mois = date("F"); if ( $mois == 'January' ) { $affmois = "Janvier"; } if ( $mois == 'February' ) { $affmois = "Février"; } if ( $mois == 'March' ) { $affmois = "Mars"; } if ( $mois == 'April' ) { $affmois = "Avril"; } if ( $mois == 'May' ) { $affmois = "Mai"; } if ( $mois == 'June' ) { $affmois = "Juin"; } if ( $mois == 'July' ) { $affmois = "Juillet"; } if ( $mois == 'August' ) { $affmois = "Août"; } if ( $mois == 'September' ) { $affmois = "Septembre"; } if ( $mois == 'October' ) { $affmois = "Octobre"; } if ( $mois == 'November' ) { $affmois = "Novembre"; } if ( $mois == 'December' ) { $affmois = "Décembre"; } echo "".$affjour." "; echo date("j")." "; echo $affmois." "; echo date("Y").""; if ( $mob == '0' ) { echo "

"; } else { echo "
"; } include_once 'solunar.php'; $today = getdate(); $underlong = $lon; $UT = 0.0; $year = $today[year]; $month = $today[mon]; $day = $today[mday]; $tz = $fu/100; $JD = get_Julian_Date ($year, $month, $day, $UT); $date = ($JD - 2400000.5 - ($tz/24.0)); get_rst (1, $date, 0.0 - $underlong , $lat, $sunrise, $sunset, $suntransit); get_rst (0, $date, 0.0 - $underlong, $lat, $moonrise, $moonset, $moontransit); $moonunder = get_underfoot($date, $underlong); $moonage = get_moon_phase ($JD, $PhaseName, $illumin); $phasedayscale = phase_day_scale ($moonage); $soldayscale = sol_get_dayscale ($moonrise, $moonset, $moontransit, $sunrise, $sunset); $h1= date("H" ,$sun_info[sunset])*60 + date("i" ,$sun_info[sunset]); $h2= date("H" ,$sun_info[sunrise])*60 + date("i" ,$sun_info[sunrise]); $h3 = ($h1-$h2)/60; $h3 = round($h3,2); $dur = explode(".",$h3); if ( strlen($dur[1]) == '1' ) { $dur[1] = $dur[1]."0"; } $durr = round($dur[1]*0.60); if ( $dur[0] <= '9' ) { $dur[0] = "0".$dur[0]; } if ( $durr <= '9' ) { $durr = "0".$durr; } $duree = $dur[0]."h".$durr; $h1v= date("H" ,$sun_veille[sunset])*60 + date("i" ,$sun_veille[sunset]); $h2v= date("H" ,$sun_veille[sunrise])*60 + date("i" ,$sun_veille[sunrise]); $h3v = ($h1v-$h2v)/60; $h3v = round($h3v,2); $durv = explode(".",$h3v); if ( strlen($durv[1]) == '1' ) { $durv[1] = $durv[1]."0"; } $durrv = round($durv[1]*0.60); if ( $durv[0] <= '9' ) { $durv[0] = "0".$durv[0]; } if ( $durrv <= '9' ) { $durrv = "0".$durrv; } $dureev = $durv[0]."h".$durrv; $plus = $durr - $durrv + ($dur[0]-$durv[0])*60; if ( $plus >= '0' ) { $plus = "+".$plus; } if ( $plus <= '-2' || $plus >= '2' ) { $ss = "s"; } else { $ss = ""; } $afflune = ceil(round($moonage, 1)); if ( $lat <= '0' ) { if ( ceil(round($moonage, 1)) == '1' ) { $afflune = "29"; } if ( ceil(round($moonage, 1)) == '2' ) { $afflune = "28"; } if ( ceil(round($moonage, 1)) == '3' ) { $afflune = "27"; } if ( ceil(round($moonage, 1)) == '4' ) { $afflune = "26"; } if ( ceil(round($moonage, 1)) == '5' ) { $afflune = "25"; } if ( ceil(round($moonage, 1)) == '6' ) { $afflune = "24"; } if ( ceil(round($moonage, 1)) == '7' ) { $afflune = "23"; } if ( ceil(round($moonage, 1)) == '8' ) { $afflune = "22"; } if ( ceil(round($moonage, 1)) == '9' ) { $afflune = "21"; } if ( ceil(round($moonage, 1)) == '10' ) { $afflune = "20"; } if ( ceil(round($moonage, 1)) == '11' ) { $afflune = "19"; } if ( ceil(round($moonage, 1)) == '12' ) { $afflune = "18"; } if ( ceil(round($moonage, 1)) == '13' ) { $afflune = "17"; } if ( ceil(round($moonage, 1)) == '14' ) { $afflune = "16"; } if ( ceil(round($moonage, 1)) == '16' ) { $afflune = "14"; } if ( ceil(round($moonage, 1)) == '17' ) { $afflune = "13"; } if ( ceil(round($moonage, 1)) == '18' ) { $afflune = "12"; } if ( ceil(round($moonage, 1)) == '19' ) { $afflune = "11"; } if ( ceil(round($moonage, 1)) == '20' ) { $afflune = "10"; } if ( ceil(round($moonage, 1)) == '21' ) { $afflune = "9"; } if ( ceil(round($moonage, 1)) == '22' ) { $afflune = "8"; } if ( ceil(round($moonage, 1)) == '23' ) { $afflune = "7"; } if ( ceil(round($moonage, 1)) == '24' ) { $afflune = "6"; } if ( ceil(round($moonage, 1)) == '25' ) { $afflune = "5"; } if ( ceil(round($moonage, 1)) == '26' ) { $afflune = "4"; } if ( ceil(round($moonage, 1)) == '27' ) { $afflune = "3"; } if ( ceil(round($moonage, 1)) == '28' ) { $afflune = "2"; } if ( ceil(round($moonage, 1)) == '29' ) { $afflune = "1"; } } if ( $mob == '0' ) { ?>
   Durée du Jour :

Zénit
minute de Soleil     Jour de Lune :
Lever:
Coucher:

%


Aurore


Lever


Coucher


Crépuscule
Durée du Jour :
minute de Soleil


Aurore



Lever



Zénit

Coucher

Crépuscule

Jour de Lune :
Lever:
Coucher:

%

"; $bdd = new PDO('mysql:host=localhost;dbname=marees;charset=UTF8', 'marees', 'poussygogo'); $ete = date("I", mktime(0, 0, 0, $moi, $jour, $annee)); $jour = date("d"); $moi = date("m"); $annee = date("Y"); $villemm = str_replace("-","_",$villem); $Nbd=current($bdd->query("select count(*) FROM $villemm WHERE annee = '$annee' and mois = '$moi' and jour = '$jour'")->fetch()); if ( $Nbd >= '1' ) { $Res=$bdd->query("SELECT * FROM $villemm WHERE annee = '$annee' and mois = '$moi' and jour = '$jour'"); $Rep = $Res->fetch(PDO::FETCH_ASSOC); $h0 = $Rep['h0']; $m0 = $Rep['m0']; $h1 = $Rep['h1']; $m1 = $Rep['m1']; $h2 = $Rep['h2']; $m2 = $Rep['m2']; $h3 = $Rep['h3']; $m3 = $Rep['m3']; $h4 = $Rep['h4']; $m4 = $Rep['m4']; $h5 = $Rep['h5']; $m5 = $Rep['m5']; $cm = $Rep['cm']; $cs = $Rep['cs']; $Nosuiv = $Rep['No']; if ( $ete == '1' ) { $hh0 = explode("h",$h0); $hh0[0] = $hh0[0]+1; if ( $hh0[0] <= '9' ) { $hh0[0] = "0".$hh0[0]; } if ( $hh0[0] == '24' ) { $hh0[0] = "00"; } $h0 = $hh0[0]."h".$hh0[1]; $hh1 = explode("h",$h1); $hh1[0] = $hh1[0]+1; if ( $hh1[0] <= '9' ) { $hh1[0] = "0".$hh1[0]; } $h1 = $hh1[0]."h".$hh1[1]; $hh2 = explode("h",$h2); $hh2[0] = $hh2[0]+1; if ( $hh2[0] <= '9' ) { $hh2[0] = "0".$hh2[0]; } $h2 = $hh2[0]."h".$hh2[1]; if ( $h3 != '' ) { $hh3 = explode("h",$h3); $hh3[0] = $hh3[0]+1; if ( $hh3[0] <= '9' ) { $hh3[0] = "0".$hh3[0]; } $h3 = $hh3[0]."h".$hh3[1]; } if ( $h4 != '' ) { $hh4 = explode("h",$h4); $hh4[0] = $hh4[0]+1; if ( $hh4[0] <= '9' ) { $hh4[0] = "0".$hh4[0]; } $h4 = $hh4[0]."h".$hh4[1]; } $hh5 = explode("h",$h5); $hh5[0] = $hh5[0]+1; if ( $hh5[0] <= '9' ) { $hh5[0] = "0".$hh5[0]; } $h5 = $hh5[0]."h".$hh5[1]; if ( $hh4[0] == '24' ) { $h5 = "00h".$hh4[1]; $m5 = $m4; $h4 = ""; } if ( $hh0[0] == '00' ) { $h4 = $h3; $m4 = $m3; $h3 = $h2; $m3 = $m2; $h2 = $h1; $m2 = $m1; $h1 = $h0; $m1 = $m0; } } echo "
Marées ".$conjv."".$port." Aujourd'hui      Coefficient"; echo "      ".$cm; if ( $h3 != '' ) { echo "/".$cs; } echo ""; if ( $h3 == '' ) { $h3 = $h2; $m3 = $m2; } if ( $h4 == '' ) { $h4 = $h3; $m4 = $m3; } echo "\"Cliquez"; echo "
Attention: Ces Valeurs de marées ne sont données qu'à titre indicatif et peuvent comporter certaines imprécisions.
Nous ne pourrons être en aucune façon tenu pour responsable de l'utilisation faite des ces informations de marées.

"; } } ?>
"; if ( $mob == '1') { echo ""; } echo "
"; if ( $region != '00' ) { echo $decoupm." : ".$region; if ( $pays == 'usa' ) { if ( $region == 'Alabama' ) { echo "   AL   AL"; } if ( $region == 'Alaska' ) { echo "   AK   AK"; } if ( $region == 'Arizona' ) { echo "   AZ   AZ"; } if ( $region == 'Arkansas' ) { echo "   AR   AR"; } if ( $region == 'Californie' ) { echo "   CA   CA"; } if ( $region == 'Caroline du Nord' ) { echo "   NC   NC"; } if ( $region == 'Caroline du Sud' ) { echo "   SC   SC"; } if ( $region == 'Colorado' ) { echo "   CO   CO"; } if ( $region == 'Connecticut' ) { echo "   CT   CT"; } if ( $region == 'Dakota du Nord' ) { echo "   ND   ND"; } if ( $region == 'Dakota du Sud' ) { echo "   SD   SD"; } if ( $region == 'Delaware' ) { echo "   DE   DE"; } if ( $region == 'Floride' ) { echo "   FL   FL"; } if ( $region == 'Georgie' ) { echo "   GA   GA"; } if ( $region == 'Hawaii' ) { echo "   HI   HI"; } if ( $region == 'Idaho' ) { echo "   ID   ID"; } if ( $region == 'Illinois' ) { echo "   IL   IL"; } if ( $region == 'Indiana' ) { echo "   IN   IN"; } if ( $region == 'Iowa' ) { echo "   IA   IA"; } if ( $region == 'Kansas' ) { echo "   KS   KS"; } if ( $region == 'Kentucky' ) { echo "   KY   KY"; } if ( $region == 'Louisiane' ) { echo "   LA   LA"; } if ( $region == 'Maine' ) { echo "   ME   ME"; } if ( $region == 'Maryland' ) { echo "   MD   MD"; } if ( $region == 'Massachusetts' ) { echo "   MA   MA"; } if ( $region == 'Michigan' ) { echo "   MI   MI"; } if ( $region == 'Minnesota' ) { echo "   MN   MN"; } if ( $region == 'Mississippi' ) { echo "   MS   MS"; } if ( $region == 'Missouri' ) { echo "   MO   MO"; } if ( $region == 'Montana' ) { echo "   MT   MT"; } if ( $region == 'Nebraska' ) { echo "   NE   NE"; } if ( $region == 'Nevada' ) { echo "   NV   NV"; } if ( $region == 'New Jersey' ) { echo "   NJ   NJ"; } if ( $region == 'Nouveau Mexique' ) { echo "   NM   NM"; } if ( $region == 'New York' ) { echo "   NY   NY"; } if ( $region == 'Ohio' ) { echo "   OH   OH"; } if ( $region == 'Oklahoma' ) { echo "   OK   OK"; } if ( $region == 'Oregon' ) { echo "   OR   OR"; } if ( $region == 'Pennsylvanie' ) { echo "   PA   PA"; } if ( $region == 'Rhode Island' ) { echo "   RI   RI"; } if ( $region == 'Tennessee' ) { echo "   TN   TN"; } if ( $region == 'Texas' ) { echo "   TX   TX"; } if ( $region == 'Utah' ) { echo "   UT   UT"; } if ( $region == 'Vermont' ) { echo "   VT   VT"; } if ( $region == 'Virginie' ) { echo "   VA   VA"; } if ( $region == 'Virginie Occidentale' ) { echo "   WV   wv"; } if ( $region == 'Washington' ) { echo "   WA   WA"; } if ( $region == 'Wisconsin' ) { echo "   WI   WI"; } if ( $region == 'Wyoming' ) { echo "   WY   WY"; } if ( $region == 'New Hampshire' ) { echo "   NH   NH"; } } echo "

"; } $decpos=strpos($lat,'.'); $whole_part=substr($lat,0,$decpos); $decimal_part=abs($lat-$whole_part); $minutes=intval($decimal_part*60); $seconds=intval((($decimal_part*60)-$minutes)*60); if ($whole_part<0) { $whole_part=($whole_part*(-1)); $L='S'; } else { $L='N'; } $latdeg=$whole_part.'°'.$minutes.'‘'.$seconds.'"'.$L; $decpos=strpos($lon,'.'); $whole_part=substr($lon,0,$decpos); $decimal_part=abs($lon-$whole_part); $minutes=intval($decimal_part*60); $seconds=intval((($decimal_part*60)-$minutes)*60); if ($whole_part<0) { $whole_part=($whole_part*(-1)); $L='W'; } else { $L='E'; } $londeg=$whole_part.'°'.$minutes.'‘'.$seconds.'"'.$L; echo "
"; echo "Latitude :

".$lat."
".$latdeg."

"; echo "Longitude :".$lon."
".$londeg.""; echo "
"; echo "
"; if ( $pays == 'usa' ) { echo "Conté :    ".$conte."

"; } if ( $cpp == 'oui' ) { if ( $cp != '') { If( ceil($No/2) == $No/2 ) { echo "Code Postal : "; } else { echo "Cp :               "; } echo "   ".$cp."
"; } } if ( $pop == 'oui' ) { if ( $population ) { echo "Population :     ".$population." Habitants
"; }} if ( $alt == 'oui' ) { if ( $altitude != '' ) { $pied = ceil(3.2808*$altitude); If( ceil($No/2) == $No/2 ) { echo "Altitude :      ".$altitude." mètres - ".$pied." pieds
"; } else { echo "Altitude :      ".$altitude." mètres - ".$pied." feet
"; } } } if ( $cpp == 'oui' || $pop == 'oui' || $alt == 'oui' ) { echo "
"; } if ( $UFI != '') { echo "UFI :      ".$UFI."
"; if ( $mob == '1' ) { echo "
"; } } if ( $UNI != '') { echo "UNI :     ".$UNI."
"; if ( $mob == '1' ) { echo "
"; } } if ( $MGRS != '') { echo "MGRS : ".$MGRS."
"; if ( $mob == '1' ) { echo "
"; } } if ( $JOG != '') { echo "JOG :     ".$JOG."
"; } echo "
"; echo "
"; ?>

= '1' ) { ?>
Changement de Vue
Carte Satellite
= 1 ) { $pr = explode("|",$proxi); $Nbaa = $nbp/2; $Nbaa =ceil($Nbaa); if ( $nbp > '1' ) { $es = "s"; $con = "les"; $deb = "Les ".$upt;} else { $es = ""; $con = "la"; $deb = "La";} echo "
".$deb." ville".$es." ".$con." plus proche".$es." :

"; if ( $mob == '0') { echo "
"; } else { echo "
"; } $i = "0"; while ($i < $Nbaa) { $proxy = explode("-",$pr[$i]); if ( $proxy[1] < '1' ) { $dist = $proxy[1]*1000; $distance = $dist." m"; } else { $distance = $proxy[1]." Km"; } $Resp=$bdd->query("SELECT ville,region1 FROM $pays WHERE No = '$proxy[0]'"); $Reppr = $Resp->fetch(PDO::FETCH_ASSOC); $villep = $Reppr['ville']; $regi = $Reppr['region1']; $ville2 = str_replace(" ","-",$villep); $ville2 = str_replace("'","_",$ville2); $ville2 = strtolower("$ville2"); $regi2 = str_replace(" ","-",$regi); $regi2 = str_replace("'","_",$regi2); $regi2 = strtolower("$regi2"); if ( $regi == '00' ) { $ini = chunk_split("$ville2","1","/"); $init = explode("/",$ini); $regi2 = $init[0]; } echo "".$villep."    ".$distance."
"; if ( $mob == '1' ) { echo "
"; } $i++; } if ( $mob == '0' ) { echo "
"; } while ($Nbaa < $nbp) { $proxy = explode("-",$pr[$Nbaa]); if ( $proxy[1] < '1' ) { $dist = $proxy[1]*1000; $distance = $dist." m"; } else { $distance = $proxy[1]." Km"; } $Resp=$bdd->query("SELECT ville,region1 FROM $pays WHERE No = '$proxy[0]'"); $Reppr = $Resp->fetch(PDO::FETCH_ASSOC); $villep = $Reppr['ville']; $regi = $Reppr['region1']; $ville2 = str_replace(" ","-",$villep); $ville2 = str_replace("'","_",$ville2); $ville2 = strtolower("$ville2"); $regi2 = str_replace(" ","-",$regi); $regi2 = str_replace("'","_",$regi2); $regi2 = strtolower("$regi2"); if ( $regi == '00' ) { $ini = chunk_split("$ville2","1","/"); $init = explode("/",$ini); $regi2 = $init[0]; } echo "".$villep."    ".$distance."
"; if ( $mob == '1' ) { echo "
"; } $Nbaa++; } echo "
"; } echo "
"; echo "
"; $bdd = new PDO('mysql:host=localhost;dbname=villes;charset=UTF8', 'villes', 'poussygogo'); $Nbs=current($bdd->query("select count(*) FROM $pays WHERE No = '$suiv'")->fetch()); if ( $Nbs == '0' ) { $Ress=$bdd->query("SELECT * FROM pays "); } else { $Ress=$bdd->query("SELECT * FROM $pays WHERE No = '$suiv'"); } $Reps = $Ress->fetch(PDO::FETCH_ASSOC); $villep = $Reps['ville']; $regi = $Reps['region1']; $ville2 = str_replace(" ","-",$villep); $ville2 = str_replace("'","_",$ville2); $ville2 = strtolower("$ville2"); $regi2 = str_replace(" ","-",$regi); $regi2 = str_replace("'","_",$regi2); $regi2 = strtolower("$regi2"); if ( $regi == '00' ) { $ini = chunk_split("$ville2","1","/"); $init = explode("/",$ini); $regi2 = $init[0]; } echo "Ville suivante : ".$villep.""; } ?>