1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<?php
mysql_connect("****","****","****") ;
mysql_select_db("****") ;
mysql_query("SET NAMES 'utf8'");
header('Content-type: application/vnd.google-earth.kml+xml');
header("Content-Disposition: attachment; filename=location.kml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>
<![CDATA[]]>
</name>
<Style id="marqueurGeolocaliser">
<IconStyle>
<Icon>
<href><![CDATA[http://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png]]></href>
</Icon>
</IconStyle>
</Style>
<Style id="marqueurNonGeolocaliser">
<IconStyle>
<Icon>
<href><![CDATA[http://www.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png]]></href>
</Icon>
</IconStyle>
</Style>
<Style id="contourCantal">
<LineStyle>
<color>ff494a44</color>
<width>3</width>
</LineStyle>
<PolyStyle>
<fill>0</fill>
<outline>1</outline>
<color>00ffffff</color>
</PolyStyle>
</Style>
<Placemark id="cantal">
<name></name>
<description>Cantal</description>
<styleUrl>#contourCantal</styleUrl>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>2.2304214,45.16192182000001,250 2.231357,45.16471132000001,250 2.23301786,45.16732159000001,250 2.20201775,45.18211283000001,250 2.19851585,45.19900220000001,250 2.1912134,45.20351764000002,250 2.19248176,45.21974833,250 2.19116205,45.22305611000001,250 2.1988789,45.22183357,250 2.20306345,45.22316106000001,250 2.20230414,45.22657849,250 2.22113411,45.23755648,250 2.22532331,45.24374982000001,250 2.23857304,45.24720771,250 2.23902075,45.26047682,250 2.2441964,45.26634651,250 2.25356831,45.26813511,250 2.26000774,45.2729435,250 2.2617392,45.28322689,250 2.26792727,45.28718907,250 2.26969537,45.2898889,250 2.2732513,45.2896751,250 2.27613315,45.28818341000002,250 2.29032969,45.28847816,250 2.3052808,45.30654710000001,250 2.30614573,45.31001076,250 2.3169272,45.32142093,250 2.33503429,45.32642358,250 2.33986756,45.32581184000001,250 2.35341201,45.32979589,250 2.35880898,45.33552538,250 2.35855522,45.33898886,250 2.351517610000001,45.34765309000002,250 2.36443203,45.35775317000001,250 2.36463181,45.3746836,250 2.36348573,45.38030639,250 2.36879929,45.38600851,250 2.36384929,45.39571655,250 2.35378975,45.40312227,250 2.35111045,45.41302734,250 2.35513578,45.41503290000001,250 2.36171395,45.41498577,250 2.3769774,45.41432556,250 2.38100028,45.41354139,250 2.39360195,45.40851591,250 2.39645601,45.40216319000001,250 2.40412591,45.39802965000001,250 2.41829879,45.39735454,250 2.42312491,45.39696499,250 2.43525625,45.39018904,250 2.43785778,45.38782076,250 2.43997305,45.38633448000001,250 2.44155272,45.38453381,250 2.46839587,45.38281421,250 2.47637305,45.37157748,250 2.48020862,45.36969245000001,250 2.485580600000001,45.37879842,250 2.50844656,45.38013396,250 2.52067673,45.38433277,250 2.52337379,45.38154851000001,250 2.5235124,45.38480486,250 2.52726055,45.39075394000001,250 2.52223139,45.40260126,250 2.51746632,45.40206929,250 2.48753835,45.41817170000001,250 2.49228109,45.4240217,250 2.49605555,45.44383406,250 2.4968831,45.44717137,250 2.5008362,45.44848809000001,250 2.49970823,45.46043671000001,250 2.50370052,45.4616903,250 2.50841872,45.47850526000001,250 2.52136022,45.48239895,250 2.53927859,45.47925527000001,250 2.5439708,45.4789858,250 2.5366027,45.46063783,250 2.53577327,45.45749962,250 2.56115128,45.46472868,250 2.56590775,45.46486389,250 2.57436152,45.45663268,250 2.59141182,45.45063067,250 2.60120382,45.45092371,250 2.61634001,45.46415549000001,250 2.62273325,45.46433725,250 2.6254826,45.44729127,250 2.62454479,45.44390211,250 2.63821671,45.44577329,250 2.64689401,45.44361655,250 2.65137611,45.44275029,250 2.66044151,45.43478973,250 2.67417244,45.43812272,250 2.68846899,45.43769181,250 2.69002783,45.43185823,250 2.68329991,45.42459055000001,250 2.67994227,45.42269461000001,250 2.68174838,45.40910478,250 2.69954665,45.3984599,250 2.70457896,45.38900647,250 2.71453719,45.38147043,250 2.72828051,45.38977153,250 2.74585688,45.39262329,250 2.75003488,45.39128546,250 2.76210083,45.38649917000001,250 2.77617388,45.3868495,250 2.78056873,45.38563562000001,250 2.78515619,45.38458273,250 2.78973556,45.39052873,250 2.815356270000001,45.40039868000002,250 2.82808039,45.39075342,250 2.84742327,45.39209703,250 2.85237961,45.39234414,250 2.85799987,45.38307889000001,250 2.86874605,45.37612808,250 2.87353822,45.37537644,250 2.88062166,45.38310591,250 2.88894933,45.3809599,250 2.89298005,45.3792396,250 2.90514685,45.36955231,250 2.918290890000001,45.36693864000001,250 2.92273185,45.36811191000001,250 2.920910580000001,45.36483783000001,250 2.92424905,45.35110104000001,250 2.92453118,45.34642152,250 2.93208405,45.32992742,250 2.94800359,45.31256865,250 2.94862738,45.3091287,250 2.96799205,45.30688053,250 2.999200590000001,45.29072943000001,250 3.0136108,45.28827773,250 3.01831143,45.28706968,250 3.023858,45.29553790000001,250 3.03224907,45.29779786,250 3.03673972,45.29820156,250 3.05558213,45.30529658,250 3.05940123,45.30683723000001,250 3.05689032,45.30983124,250 3.0657519,45.31774433,250 3.063177190000001,45.33136353,250 3.0700524,45.33623052,250 3.08839139,45.33973394000001,250 3.093851270000001,45.34908921,250 3.09645617,45.35204031000001,250 3.10045614,45.3524988,250 3.10350606,45.35437611,250 3.11133647,45.3503366,250 3.11401834,45.33048991,250 3.11342107,45.32709345,250 3.09916359,45.3280915,250 3.09166346,45.32427411000001,250 3.1006953,45.31614289,250 3.11345672,45.31142159,250 3.11035598,45.30483987,250 3.10275054,45.30061017000001,250 3.0978337,45.30087776,250 3.08541251,45.29671567000001,250 3.0867135,45.29017475,250 3.10110106,45.2909865,250 3.11240985,45.28487186000001,250 3.131608500000001,45.28612105,250 3.14521755,45.28784127,250 3.15585958,45.29477167000001,250 3.1606745,45.29541898,250 3.161359210000001,45.28917137,250 3.16903138,45.28150344,250 3.164246460000001,45.26911611,250 3.18504689,45.27632669000001,250 3.18561904,45.27957900000001,250 3.20929543,45.2812223,250 3.22205947,45.27214322,250 3.22685966,45.27194302,250 3.22858548,45.26516396,250 3.22277125,45.24560652,250 3.23280575,45.23853698000001,250 3.23559715,45.2213946,250 3.24216193,45.2164834,250 3.24693331,45.21559883,250 3.251612660000001,45.21609122,250 3.27223547,45.20946041,250 3.27196229,45.20600725,250 3.27097916,45.19226119000002,250 3.2629626,45.18379087000001,250 3.2613285,45.17349398000001,250 3.267972920000001,45.15406178000001,250 3.28161182,45.15161667,250 3.27600693,45.14268609000001,250 3.2880329,45.12042649,250 3.2922941,45.12217113,250 3.30153827,45.12399838000001,250 3.31372353,45.11814428,250 3.31397761,45.11814205,250 3.33034589,45.11118589,250 3.34948323,45.11142772000001,250 3.35185318,45.10483805,250 3.36145752,45.10419207,250 3.32858112,45.09484689000001,250 3.32409348,45.09603838000001,250 3.30670939,45.10134633,250 3.30076599,45.10655279,250 3.29620354,45.10643938,250 3.28364093,45.10275992,250 3.28662545,45.0967701,250 3.285733350000001,45.09361116000001,250 3.29198474,45.08925748000001,250 3.308957390000001,45.08612347,250 3.31202849,45.08086089,250 3.29981439,45.05513138,250 3.303180740000001,45.04513472,250 3.29822076,45.03566028,250 3.30564162,45.02683381000001,250 3.30745048,45.02362449,250 3.31141371,45.02177258,250 3.33296576,45.02691553,250 3.33717579,45.02534833,250 3.32705992,45.01008248000001,250 3.34522019,45.01284327,250 3.35479153,45.00222174,250 3.36841907,45.00479446,250 3.37146481,45.00219327,250 3.36323003,44.99017147,250 3.34589938,44.98526518,250 3.34807425,44.97510723,250 3.35663902,44.97219508,250 3.36135166,44.97141394000001,250 3.35523159,44.9582648,250 3.35453542,44.95482588,250 3.35037114,44.955035,250 3.337945990000001,44.95591355,250 3.33408308,44.95385154,250 3.31824886,44.94601399,250 3.31433855,44.93978771,250 3.30088202,44.93937499,250 3.2853849,44.9262586,250 3.26713084,44.92959701000001,250 3.26255173,44.93524043,250 3.26569814,44.94167278,250 3.25617244,44.94160836,250 3.25216929,44.94078787,250 3.24841216,44.93951364,250 3.250200710000001,44.93658439,250 3.24456315,44.93171929,250 3.24969088,44.91624111,250 3.23116339,44.91112116000001,250 3.22642352,44.90998099,250 3.22828649,44.90694359,250 3.227762,44.89707104,250 3.23492788,44.88858368,250 3.22567734,44.88209283,250 3.214823,44.87500141,250 3.1959668,44.87208219,250 3.19026769,44.86252859,250 3.18162405,44.86469082,250 3.17988905,44.86781635000001,250 3.16466641,44.87518138000001,250 3.16027434,44.8844701,250 3.15754807,44.88664918,250 3.15148079,44.89393419,250 3.14794589,44.89634567,250 3.142855640000001,44.90229177,250 3.12838214,44.90358362,250 3.1195183,44.89154738,250 3.10312508,44.88463883000001,250 3.10526265,44.88182565,250 3.104972950000001,44.86626633,250 3.10318573,44.86322045,250 3.09484602,44.85548833,250 3.100177860000001,44.84392918,250 3.097681500000001,44.84156276,250 3.09915542,44.83291755,250 3.093849080000001,44.83312492,250 3.08933175,44.83278789,250 3.07217337,44.83626655000001,250 3.07698294,44.82428036000001,250 3.07269093,44.82275293,250 3.06403878,44.82023682,250 3.04792023,44.80391021,250 3.04624456,44.79730002,250 3.04871167,44.79461274,250 3.04996438,44.78188627,250 3.04946821,44.77862354,250 3.044049440000001,44.77353239,250 3.04823851,44.76433105,250 3.04224237,44.75938657,250 3.03134057,44.74964275000001,250 3.028739260000001,44.73319033,250 3.02731469,44.73022212,250 3.034896240000001,44.72705336,250 3.03912331,44.7150011,250 3.034286240000001,44.71554447,250 3.01602211,44.71252844,250 3.00162821,44.68683873,250 2.99972885,44.67654198,250 2.98562606,44.65824202,250 2.98167732,44.64468517,250 2.97721783,44.64471118,250 2.97025324,44.64825999,250 2.96763266,44.65050464,250 2.9618684,44.65446876,250 2.962523360000001,44.65783689,250 2.95536439,44.66227539,250 2.947418480000001,44.67441668,250 2.93934752,44.67758293,250 2.94141794,44.68723035,250 2.93418864,44.6962288,250 2.93088634,44.71303786,250 2.92936832,44.71620299,250 2.92326701,44.72864765,250 2.93132046,44.73721208,250 2.93351913,44.74721179,250 2.93011695,44.75357924,250 2.91701675,44.7574445,250 2.91429407,44.76028301,250 2.91411486,44.7637198,250 2.917774150000001,44.7659672,250 2.92696883,44.76388569,250 2.93444205,44.76736231,250 2.935724630000001,44.77750109,250 2.93377558,44.78065071,250 2.93181417,44.78372751,250 2.92019037,44.79431398,250 2.91673104,44.7920476,250 2.90691259,44.78546078,250 2.897866200000001,44.78512035,250 2.88965071,44.78833682,250 2.87944939,44.80310239,250 2.86987238,44.82958401,250 2.86154547,44.83796186,250 2.86354341,44.84742372,250 2.85551246,44.85128442,250 2.85952823,44.87102689,250 2.85967427,44.87447119,250 2.85492783,44.87431363,250 2.851529290000001,44.87189192,250 2.81462311,44.86945802,250 2.80759029,44.87410246,250 2.80279506,44.87383493000001,250 2.78476015,44.86322374,250 2.78164982,44.85697601,250 2.772287470000001,44.85641063,250 2.76770719,44.86593591,250 2.76995973,44.87573132000001,250 2.77859023,44.88749828,250 2.77589165,44.89027041,250 2.77223485,44.90002619,250 2.77609571,44.90964348,250 2.755909400000001,44.93214681,250 2.74208034,44.93198239,250 2.73825925,44.94122597,250 2.73768321,44.94037264000001,250 2.73392041,44.93839832,250 2.72457349,44.92734975,250 2.71677127,44.92883396,250 2.70637122,44.9070927,250 2.70256244,44.90531539,250 2.68946564,44.9037748,250 2.68186729,44.90735167,250 2.67938249,44.9044271,250 2.65862114,44.88580737,250 2.65622807,44.87242036,250 2.65305081,44.86977697,250 2.62908191,44.87226332,250 2.6266249,44.8692287,250 2.61804344,44.85298056,250 2.6041628,44.84310211,250 2.61133187,44.83060921,250 2.59841989,44.82077361,250 2.60012621,44.79366954,250 2.59013676,44.78629058,250 2.5865662,44.78399617,250 2.578251970000001,44.7859574,250 2.56449158,44.77809864,250 2.56345506,44.77471893,250 2.56068437,44.7610444,250 2.55367791,44.75742383,250 2.55273544,44.74213656,250 2.55423828,44.73915657,250 2.5541426,44.73400225000001,250 2.5521266,44.73146178,250 2.5493906,44.72865194,250 2.55622903,44.72223482,250 2.53639909,44.71196532,250 2.52014642,44.70205518,250 2.51888817,44.6990353,250 2.5166209,44.69589115,250 2.50049684,44.68881105,250 2.48917377,44.66926568,250 2.48952325,44.6587245,250 2.48469355,44.65259825,250 2.4763092,44.65034185,250 2.47196655,44.65202908,250 2.46803941,44.64289622,250 2.45011108,44.64808743,250 2.43564583,44.6397462,250 2.40476758,44.64718925,250 2.40127581,44.64541958,250 2.39713315,44.64619537,250 2.3926709,44.64494759,250 2.38088295,44.64968357,250 2.36528151,44.64185517,250 2.350983530000001,44.64124632,250 2.33504795,44.64884681,250 2.33661009,44.65877588,250 2.33221182,44.66460371,250 2.32980579,44.66654623,250 2.32413268,44.66916288,250 2.30621391,44.6634033,250 2.287282840000001,44.66655315,250 2.27445919,44.66122229,250 2.27004941,44.66059013,250 2.26521013,44.66084789,250 2.250543,44.65205046000001,250 2.22711661,44.65404412,250 2.20841647,44.64385196,250 2.21761431,44.62480483,250 2.22056817,44.62203797,250 2.21662831,44.62126028,250 2.207474120000001,44.61553895,250 2.20486098,44.6183958,250 2.17655572,44.63548195,250 2.17233522,44.63579049,250 2.169419,44.63798953,250 2.16954237,44.64771188,250 2.17374672,44.65325833,250 2.16902902,44.65883633,250 2.16600986,44.66129597,250 2.1762499,44.67184313,250 2.17915406,44.67445553,250 2.15854828,44.69735838,250 2.15467053,44.69937566,250 2.1429501,44.69370745,250 2.13828771,44.69288968,250 2.13287549,44.69719685,250 2.13006834,44.69930608,250 2.1332852,44.70935741,250 2.14809708,44.72285771,250 2.15278776,44.74654612000001,250 2.15349822,44.75311301000001,250 2.14890987,44.7662997,250 2.14915093,44.76970891,250 2.15098064,44.77002681,250 2.15525589,44.77156385,250 2.164672,44.77260342,250 2.16850763,44.78193636,250 2.16988864,44.78466371,250 2.1716402,44.79026078,250 2.16911861,44.79295526000001,250 2.1660559,44.79903069,250 2.16629396,44.81208183,250 2.14440761,44.82353161,250 2.13980627,44.82382929,250 2.13677705,44.82625232,250 2.1276738,44.84063553,250 2.1271444,44.84358471,250 2.11721413,44.84826051,250 2.09741943,44.87057977,250 2.09351574,44.87238005,250 2.0845257,44.88837839000001,250 2.08544042,44.89878732,250 2.10810806,44.91060168000001,250 2.10512216,44.91332086,250 2.10234749,44.91992614,250 2.07635038,44.93479026,250 2.0807054,44.95158483,250 2.07597721,44.95770829,250 2.06291216,44.97651208,250 2.08473081,44.98299538,250 2.08912235,44.9844436,250 2.093565610000001,44.98571366,250 2.10620723,44.98151311,250 2.13330135,44.98574897,250 2.13989944,45.00200589,250 2.14090045,45.00541769,250 2.137835,45.00813681,250 2.11693442,45.02196764000001,250 2.11027141,45.03861316,250 2.09516294,45.05604086,250 2.09838333,45.05943004000001,250 2.10021255,45.06203358,250 2.1021158,45.06217256000001,250 2.13331776,45.08181697,250 2.13810577,45.08144787,250 2.14339605,45.08631469,250 2.161023,45.08515670000001,250 2.16814728,45.08107494000001,250 2.17278094,45.0812798,250 2.17937146,45.09437751000001,250 2.17887203,45.10476729,250 2.18793462,45.11671578,250 2.18110401,45.13321293000001,250 2.17879497,45.13630409,250 2.19309448,45.1356669,250 2.20141039,45.13915861,250 2.21041615,45.14715721,250 2.21136482,45.16047159,250 2.22578114,45.16091876,250 2.2304214,45.16192182000001,250</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<?php
$r1 = "
SELECT
a.id, a.vid_assmat, a.sexe_assmat, a.nom_assmat, a.prenom_assmat, a.adresse_assmat, a.adresse2_assmat, a.cp_assmat, a.ville_assmat, a.num_assmat, a.lat_assmat, a.lng_assmat, ag.nb_agr, ag.ageMini_agr, ag.ageMaxi_agr, ag.debut_agr, ag.fin_agr
FROM assmat a, agrement ag
WHERE ( a.lat_assmat != 0 AND a.lng_assmat != 0 AND a.lat_assmat BETWEEN 44.52112 AND 45.600347 AND a.lng_assmat BETWEEN 1.927414 AND 3.738556 ) AND a.vid_assmat = ag.id_assmat LIMIT 0,30
";
$q1 = mysql_query( $r1 ) ;
$resQ1 = mysql_num_rows( $q1 );
while ( $data1 = mysql_fetch_assoc( $q1 ) ){
?>
<Placemark id="marqueur<?=$data1["id"]?>">
<name><![CDATA[<?=$data1["prenom_assmat"]?>]]></name>
<description><![CDATA[]]></description>
<styleUrl>#marqueurGeolocaliser</styleUrl>
<Point>
<coordinates><?=$data1["lng_assmat"]?>,<?=$data1["lat_assmat"]?></coordinates>
</Point>
</Placemark>
<?php
}
?>
<?php
$r2 = "
SELECT
a.id, a.vid_assmat, a.sexe_assmat, a.nom_assmat, a.prenom_assmat, a.adresse_assmat, a.adresse2_assmat, a.cp_assmat, a.ville_assmat, a.num_assmat, c.Lat, c.Lon, ag.nb_agr, ag.ageMini_agr, ag.ageMaxi_agr, ag.debut_agr, ag.fin_agr
FROM assmat a, com_co c, agrement ag
WHERE a.lat_assmat = 0 AND a.lng_assmat = 0 AND a.ville_assmat = c.nom AND a.vid_assmat = ag.id_assmat LIMIT 0,30
";
$q2 = mysql_query( $r2 );
$resQ2 = mysql_num_rows( $q2 ) ;
while ( $data2 = mysql_fetch_assoc( $q2 ) ){
?>
<Placemark id="marqueur<?=$data2["id"]?>">
<name><![CDATA[<?=$data2["prenom_assmat"]?>]]></name>
<description><![CDATA[]]></description>
<styleUrl>#marqueurNonGeolocaliser</styleUrl>
<Point>
<coordinates><?=$data2["Lon"]?>,<?=$data2["Lat"]?></coordinates>
</Point>
</Placemark>
<?php
}
?>
</Document>
</kml> |
Partager