@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | foreach($spotter_array as $spotter_item) |
22 | 22 | { |
23 | 23 | $output .= '<url>'; |
24 | - $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>'; |
|
25 | - $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
26 | - $output .= '<changefreq>weekly</changefreq>'; |
|
24 | + $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>'; |
|
25 | + $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
26 | + $output .= '<changefreq>weekly</changefreq>'; |
|
27 | 27 | $output .= '</url>'; |
28 | 28 | } |
29 | 29 | $output .= '</urlset>'; |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | foreach($aircraft_types as $aircraft_item) |
39 | 39 | { |
40 | 40 | $output .= '<url>'; |
41 | - $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.urlencode($aircraft_item['aircraft_icao']).'</loc>'; |
|
42 | - $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
43 | - $output .= '<changefreq>daily</changefreq>'; |
|
41 | + $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.urlencode($aircraft_item['aircraft_icao']).'</loc>'; |
|
42 | + $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
43 | + $output .= '<changefreq>daily</changefreq>'; |
|
44 | 44 | $output .= '</url>'; |
45 | 45 | } |
46 | 46 | $output .= '</urlset>'; |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | foreach($aircraft_registrations as $aircraft_item) |
56 | 56 | { |
57 | 57 | $output .= '<url>'; |
58 | - $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.urlencode($aircraft_item['registration']).'</loc>'; |
|
59 | - $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
60 | - $output .= '<changefreq>daily</changefreq>'; |
|
58 | + $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.urlencode($aircraft_item['registration']).'</loc>'; |
|
59 | + $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
60 | + $output .= '<changefreq>daily</changefreq>'; |
|
61 | 61 | $output .= '</url>'; |
62 | 62 | } |
63 | 63 | $output .= '</urlset>'; |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | foreach($airline_names as $airline_item) |
72 | 72 | { |
73 | 73 | $output .= '<url>'; |
74 | - $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.urlencode($airline_item['airline_icao']).'</loc>'; |
|
75 | - $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
76 | - $output .= '<changefreq>daily</changefreq>'; |
|
74 | + $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.urlencode($airline_item['airline_icao']).'</loc>'; |
|
75 | + $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
76 | + $output .= '<changefreq>daily</changefreq>'; |
|
77 | 77 | $output .= '</url>'; |
78 | 78 | } |
79 | 79 | $output .= '</urlset>'; |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | foreach($airport_names as $airport_item) |
89 | 89 | { |
90 | 90 | $output .= '<url>'; |
91 | - $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>'; |
|
92 | - $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
93 | - $output .= '<changefreq>daily</changefreq>'; |
|
91 | + $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>'; |
|
92 | + $output .= '<lastmod>'.date("c", time()).'</lastmod>'; |
|
93 | + $output .= '<changefreq>daily</changefreq>'; |
|
94 | 94 | $output .= '</url>'; |
95 | 95 | } |
96 | 96 | $output .= '</urlset>'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
19 | 19 | |
20 | 20 | $spotter_array = $Spotter->getAllFlightsforSitemap(); |
21 | - foreach($spotter_array as $spotter_item) |
|
21 | + foreach ($spotter_array as $spotter_item) |
|
22 | 22 | { |
23 | 23 | $output .= '<url>'; |
24 | 24 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/flightid/'.$spotter_item['spotter_id'].'</loc>'; |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | $output .= '</urlset>'; |
30 | 30 | |
31 | 31 | |
32 | -} else if (isset($_GET['type']) && $_GET['type'] == "aircraft"){ |
|
32 | +} else if (isset($_GET['type']) && $_GET['type'] == "aircraft") { |
|
33 | 33 | |
34 | 34 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
35 | 35 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
36 | 36 | $aircraft_types = $Stats->getAllAircraftTypes(); |
37 | 37 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
38 | - foreach($aircraft_types as $aircraft_item) |
|
38 | + foreach ($aircraft_types as $aircraft_item) |
|
39 | 39 | { |
40 | 40 | $output .= '<url>'; |
41 | 41 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/aircraft/'.urlencode($aircraft_item['aircraft_icao']).'</loc>'; |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | $output .= '</urlset>'; |
47 | 47 | |
48 | 48 | |
49 | -} else if (isset($_GET['type']) && $_GET['type'] == "registration"){ |
|
49 | +} else if (isset($_GET['type']) && $_GET['type'] == "registration") { |
|
50 | 50 | |
51 | 51 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
52 | 52 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
53 | 53 | |
54 | 54 | $aircraft_registrations = $Spotter->getAllAircraftRegistrations(); |
55 | - foreach($aircraft_registrations as $aircraft_item) |
|
55 | + foreach ($aircraft_registrations as $aircraft_item) |
|
56 | 56 | { |
57 | 57 | $output .= '<url>'; |
58 | 58 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/registration/'.urlencode($aircraft_item['registration']).'</loc>'; |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | } |
63 | 63 | $output .= '</urlset>'; |
64 | 64 | |
65 | -} else if (isset($_GET['type']) && $_GET['type'] == "airline"){ |
|
65 | +} else if (isset($_GET['type']) && $_GET['type'] == "airline") { |
|
66 | 66 | |
67 | 67 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
68 | 68 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
69 | 69 | |
70 | 70 | $airline_names = $Stats->getAllAirlineNames(); |
71 | - foreach($airline_names as $airline_item) |
|
71 | + foreach ($airline_names as $airline_item) |
|
72 | 72 | { |
73 | 73 | $output .= '<url>'; |
74 | 74 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airline/'.urlencode($airline_item['airline_icao']).'</loc>'; |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | } |
79 | 79 | $output .= '</urlset>'; |
80 | 80 | |
81 | -} else if (isset($_GET['type']) && $_GET['type'] == "airport"){ |
|
81 | +} else if (isset($_GET['type']) && $_GET['type'] == "airport") { |
|
82 | 82 | |
83 | 83 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
84 | 84 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
85 | 85 | |
86 | 86 | $airport_names = $Stats->getAllAirportNames(); |
87 | 87 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
88 | - foreach($airport_names as $airport_item) |
|
88 | + foreach ($airport_names as $airport_item) |
|
89 | 89 | { |
90 | 90 | $output .= '<url>'; |
91 | 91 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/airport/'.$airport_item['airport_icao'].'</loc>'; |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | } |
96 | 96 | $output .= '</urlset>'; |
97 | 97 | |
98 | -} else if (isset($_GET['type']) && $_GET['type'] == "manufacturer"){ |
|
98 | +} else if (isset($_GET['type']) && $_GET['type'] == "manufacturer") { |
|
99 | 99 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
100 | 100 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
101 | 101 | $manufacturer_names = $Stats->getAllManufacturers(); |
102 | 102 | if (empty($manufacturer_names)) $manufacturer_names = $Spotter->getAllManufacturers(); |
103 | - foreach($manufacturer_names as $manufacturer_item) |
|
103 | + foreach ($manufacturer_names as $manufacturer_item) |
|
104 | 104 | { |
105 | 105 | $output .= '<url>'; |
106 | 106 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/manufacturer/'.urlencode(strtolower(str_replace(" ", "-", $manufacturer_item['aircraft_manufacturer']))).'</loc>'; |
@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | $output .= '</url>'; |
110 | 110 | } |
111 | 111 | $output .= '</urlset>'; |
112 | -} else if (isset($_GET['type']) && $_GET['type'] == "country"){ |
|
112 | +} else if (isset($_GET['type']) && $_GET['type'] == "country") { |
|
113 | 113 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
114 | 114 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
115 | 115 | $country_names = $Spotter->getAllCountries(); |
116 | - foreach($country_names as $country_item) |
|
116 | + foreach ($country_names as $country_item) |
|
117 | 117 | { |
118 | 118 | $output .= '<url>'; |
119 | 119 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/country/'.urlencode(strtolower(str_replace(" ", "-", $country_item['country']))).'</loc>'; |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | $output .= '</url>'; |
123 | 123 | } |
124 | 124 | $output .= '</urlset>'; |
125 | -} else if (isset($_GET['type']) && $_GET['type'] == "ident"){ |
|
125 | +} else if (isset($_GET['type']) && $_GET['type'] == "ident") { |
|
126 | 126 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
127 | 127 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
128 | 128 | $ident_names = $Spotter->getAllIdents(); |
129 | - foreach($ident_names as $ident_item) |
|
129 | + foreach ($ident_names as $ident_item) |
|
130 | 130 | { |
131 | 131 | if (ctype_alnum($ident_item['ident'])) { |
132 | 132 | $output .= '<url>'; |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | } |
138 | 138 | } |
139 | 139 | $output .= '</urlset>'; |
140 | -} else if (isset($_GET['type']) && $_GET['type'] == "marine-ident"){ |
|
140 | +} else if (isset($_GET['type']) && $_GET['type'] == "marine-ident") { |
|
141 | 141 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
142 | 142 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
143 | 143 | $ident_names = $Marine->getAllIdents(); |
144 | - foreach($ident_names as $ident_item) |
|
144 | + foreach ($ident_names as $ident_item) |
|
145 | 145 | { |
146 | 146 | if (ctype_alnum($ident_item['ident'])) { |
147 | 147 | $output .= '<url>'; |
@@ -152,11 +152,11 @@ discard block |
||
152 | 152 | } |
153 | 153 | } |
154 | 154 | $output .= '</urlset>'; |
155 | -} else if (isset($_GET['type']) && $_GET['type'] == "date"){ |
|
155 | +} else if (isset($_GET['type']) && $_GET['type'] == "date") { |
|
156 | 156 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
157 | 157 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
158 | 158 | $date_names = $Spotter->getAllDates(); |
159 | - foreach($date_names as $date_item) |
|
159 | + foreach ($date_names as $date_item) |
|
160 | 160 | { |
161 | 161 | $output .= '<url>'; |
162 | 162 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/date/'.date("Y-m-d", strtotime($date_item['date'])).'</loc>'; |
@@ -165,11 +165,11 @@ discard block |
||
165 | 165 | $output .= '</url>'; |
166 | 166 | } |
167 | 167 | $output .= '</urlset>'; |
168 | -} else if (isset($_GET['type']) && $_GET['type'] == "marine-date"){ |
|
168 | +} else if (isset($_GET['type']) && $_GET['type'] == "marine-date") { |
|
169 | 169 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
170 | 170 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
171 | 171 | $date_names = $Marine->getAllDates(); |
172 | - foreach($date_names as $date_item) |
|
172 | + foreach ($date_names as $date_item) |
|
173 | 173 | { |
174 | 174 | $output .= '<url>'; |
175 | 175 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/date/'.date("Y-m-d", strtotime($date_item['date'])).'</loc>'; |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | $output .= '</url>'; |
179 | 179 | } |
180 | 180 | $output .= '</urlset>'; |
181 | -} else if (isset($_GET['type']) && $_GET['type'] == "route"){ |
|
181 | +} else if (isset($_GET['type']) && $_GET['type'] == "route") { |
|
182 | 182 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
183 | 183 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
184 | 184 | $route_names = $Spotter->getAllRoutes(); |
185 | - foreach($route_names as $route_item) |
|
185 | + foreach ($route_names as $route_item) |
|
186 | 186 | { |
187 | 187 | $output .= '<url>'; |
188 | 188 | $output .= '<loc>'.'http://'.$_SERVER['HTTP_HOST'].$globalURL.'/route/'.$route_item['airport_departure_icao'].'/'.$route_item['airport_arrival_icao'].'</loc>'; |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $output .= '</url>'; |
192 | 192 | } |
193 | 193 | $output .= '</urlset>'; |
194 | -} else if (isset($_GET['type']) && $_GET['type'] == "static"){ |
|
194 | +} else if (isset($_GET['type']) && $_GET['type'] == "static") { |
|
195 | 195 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
196 | 196 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
197 | 197 | /* STATIC PAGES */ |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | $output .= '<changefreq>daily</changefreq>'; |
310 | 310 | $output .= '</url>'; |
311 | 311 | $output .= '</urlset>'; |
312 | -} else if (isset($_GET['type']) && $_GET['type'] == "marine-static"){ |
|
312 | +} else if (isset($_GET['type']) && $_GET['type'] == "marine-static") { |
|
313 | 313 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
314 | 314 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
315 | 315 | /* STATIC PAGES */ |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $output .= '<changefreq>daily</changefreq>'; |
336 | 336 | $output .= '</url>'; |
337 | 337 | $output .= '</urlset>'; |
338 | -} else if (isset($_GET['type']) && $_GET['type'] == "tracker-static"){ |
|
338 | +} else if (isset($_GET['type']) && $_GET['type'] == "tracker-static") { |
|
339 | 339 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
340 | 340 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
341 | 341 | /* STATIC PAGES */ |
@@ -34,7 +34,9 @@ discard block |
||
34 | 34 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
35 | 35 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
36 | 36 | $aircraft_types = $Stats->getAllAircraftTypes(); |
37 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
37 | + if (empty($aircraft_types)) { |
|
38 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
39 | + } |
|
38 | 40 | foreach($aircraft_types as $aircraft_item) |
39 | 41 | { |
40 | 42 | $output .= '<url>'; |
@@ -84,7 +86,9 @@ discard block |
||
84 | 86 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
85 | 87 | |
86 | 88 | $airport_names = $Stats->getAllAirportNames(); |
87 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
89 | + if (empty($airport_names)) { |
|
90 | + $airport_names = $Spotter->getAllAirportNames(); |
|
91 | + } |
|
88 | 92 | foreach($airport_names as $airport_item) |
89 | 93 | { |
90 | 94 | $output .= '<url>'; |
@@ -99,7 +103,9 @@ discard block |
||
99 | 103 | $output .= '<?xml version="1.0" encoding="UTF-8"?>'; |
100 | 104 | $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; |
101 | 105 | $manufacturer_names = $Stats->getAllManufacturers(); |
102 | - if (empty($manufacturer_names)) $manufacturer_names = $Spotter->getAllManufacturers(); |
|
106 | + if (empty($manufacturer_names)) { |
|
107 | + $manufacturer_names = $Spotter->getAllManufacturers(); |
|
108 | + } |
|
103 | 109 | foreach($manufacturer_names as $manufacturer_item) |
104 | 110 | { |
105 | 111 | $output .= '<url>'; |