@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airline'])) { |
| 6 | - header('Location: '.$globalURL.'/airline'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airline'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -4,55 +4,55 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if (isset($_GET['start_date'])) { |
| 7 | - //for the date manipulation into the query |
|
| 8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | - $start_date = $_GET['start_date'].":00"; |
|
| 10 | - $end_date = $_GET['end_date'].":00"; |
|
| 11 | - $sql_date = $start_date.",".$end_date; |
|
| 12 | - } else if($_GET['start_date'] != ""){ |
|
| 13 | - $start_date = $_GET['start_date'].":00"; |
|
| 14 | - $sql_date = $start_date; |
|
| 15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | - $sql_date = $end_date; |
|
| 18 | - } else $sql_date = ''; |
|
| 7 | + //for the date manipulation into the query |
|
| 8 | + if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | + $start_date = $_GET['start_date'].":00"; |
|
| 10 | + $end_date = $_GET['end_date'].":00"; |
|
| 11 | + $sql_date = $start_date.",".$end_date; |
|
| 12 | + } else if($_GET['start_date'] != ""){ |
|
| 13 | + $start_date = $_GET['start_date'].":00"; |
|
| 14 | + $sql_date = $start_date; |
|
| 15 | + } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | + $sql_date = $end_date; |
|
| 18 | + } else $sql_date = ''; |
|
| 19 | 19 | } else $sql_date = ''; |
| 20 | 20 | |
| 21 | 21 | if (isset($_GET['highest_altitude'])) { |
| 22 | - //for altitude manipulation |
|
| 23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | - $end_altitude = $_GET['highest_altitude']; |
|
| 25 | - $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | - $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | - $end_altitude = $_GET['highest_altitude']; |
|
| 29 | - $sql_altitude = $end_altitude; |
|
| 30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | - $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | - $sql_altitude = $start_altitude; |
|
| 33 | - } else $sql_altitude = ''; |
|
| 22 | + //for altitude manipulation |
|
| 23 | + if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | + $end_altitude = $_GET['highest_altitude']; |
|
| 25 | + $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | + $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | + } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | + $end_altitude = $_GET['highest_altitude']; |
|
| 29 | + $sql_altitude = $end_altitude; |
|
| 30 | + } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | + $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | + $sql_altitude = $start_altitude; |
|
| 33 | + } else $sql_altitude = ''; |
|
| 34 | 34 | } else $sql_altitude = ''; |
| 35 | 35 | |
| 36 | 36 | //calculuation for the pagination |
| 37 | 37 | if(!isset($_GET['limit'])) |
| 38 | 38 | { |
| 39 | - if (!isset($_GET['number_results'])) |
|
| 40 | - { |
|
| 41 | - $limit_start = 0; |
|
| 42 | - $limit_end = 25; |
|
| 43 | - $absolute_difference = 25; |
|
| 44 | - } else { |
|
| 45 | - if ($_GET['number_results'] > 1000){ |
|
| 46 | - $_GET['number_results'] = 1000; |
|
| 47 | - } |
|
| 48 | - $limit_start = 0; |
|
| 49 | - $limit_end = $_GET['number_results']; |
|
| 50 | - $absolute_difference = $_GET['number_results']; |
|
| 51 | - } |
|
| 39 | + if (!isset($_GET['number_results'])) |
|
| 40 | + { |
|
| 41 | + $limit_start = 0; |
|
| 42 | + $limit_end = 25; |
|
| 43 | + $absolute_difference = 25; |
|
| 44 | + } else { |
|
| 45 | + if ($_GET['number_results'] > 1000){ |
|
| 46 | + $_GET['number_results'] = 1000; |
|
| 47 | + } |
|
| 48 | + $limit_start = 0; |
|
| 49 | + $limit_end = $_GET['number_results']; |
|
| 50 | + $absolute_difference = $_GET['number_results']; |
|
| 51 | + } |
|
| 52 | 52 | } else { |
| 53 | - $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | - $limit_start = $limit_explode[0]; |
|
| 55 | - $limit_end = $limit_explode[1]; |
|
| 53 | + $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | + $limit_start = $limit_explode[0]; |
|
| 55 | + $limit_end = $limit_explode[1]; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $absolute_difference = abs($limit_start - $limit_end); |
@@ -90,22 +90,22 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $output = '<?xml version="1.0" encoding="UTF-8"?>'; |
| 92 | 92 | $output .= '<kml xmlns="http://www.opengis.net/kml/2.2">'; |
| 93 | - $output .= '<Document>'; |
|
| 94 | - $output .= '<Style id="departureAirport">'; |
|
| 95 | - $output .= '<IconStyle>'; |
|
| 96 | - $output .= '<Icon>'; |
|
| 97 | - $output .= '<href>http://www.flightairmap.fr/images/kml_departure_airport.png</href>'; |
|
| 98 | - $output .= '</Icon>'; |
|
| 99 | - $output .= '</IconStyle>'; |
|
| 100 | - $output .= '</Style>'; |
|
| 101 | - $output .= '<Style id="arrivalAirport">'; |
|
| 102 | - $output .= '<IconStyle>'; |
|
| 103 | - $output .= '<Icon>'; |
|
| 104 | - $output .= '<href>http://www.flightairmap.fr/images/kml_arrival_airport.png</href>'; |
|
| 105 | - $output .= '</Icon>'; |
|
| 106 | - $output .= '</IconStyle>'; |
|
| 107 | - $output .= '</Style>'; |
|
| 108 | - $output .= '<Style id="route">'; |
|
| 93 | + $output .= '<Document>'; |
|
| 94 | + $output .= '<Style id="departureAirport">'; |
|
| 95 | + $output .= '<IconStyle>'; |
|
| 96 | + $output .= '<Icon>'; |
|
| 97 | + $output .= '<href>http://www.flightairmap.fr/images/kml_departure_airport.png</href>'; |
|
| 98 | + $output .= '</Icon>'; |
|
| 99 | + $output .= '</IconStyle>'; |
|
| 100 | + $output .= '</Style>'; |
|
| 101 | + $output .= '<Style id="arrivalAirport">'; |
|
| 102 | + $output .= '<IconStyle>'; |
|
| 103 | + $output .= '<Icon>'; |
|
| 104 | + $output .= '<href>http://www.flightairmap.fr/images/kml_arrival_airport.png</href>'; |
|
| 105 | + $output .= '</Icon>'; |
|
| 106 | + $output .= '</IconStyle>'; |
|
| 107 | + $output .= '</Style>'; |
|
| 108 | + $output .= '<Style id="route">'; |
|
| 109 | 109 | $output .= '<LineStyle>'; |
| 110 | 110 | $output .= '<color>7f0000ff</color>'; |
| 111 | 111 | $output .= '<width>2</width>'; |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | $output .= '</LineStyle>'; |
| 114 | 114 | $output .= '</Style>'; |
| 115 | 115 | |
| 116 | - if (!empty($spotter_array)) |
|
| 116 | + if (!empty($spotter_array)) |
|
| 117 | 117 | { |
| 118 | - foreach($spotter_array as $spotter_item) |
|
| 119 | - { |
|
| 118 | + foreach($spotter_array as $spotter_item) |
|
| 119 | + { |
|
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | $altitude = $spotter_item['altitude'].'00'; |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | $output .= '<styleUrl>#route</styleUrl>'; |
| 128 | 128 | $output .= '<LineString>'; |
| 129 | 129 | $output .= '<coordinates>'; |
| 130 | - $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
|
| 130 | + $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
|
| 131 | 131 | $waypoint_pieces = array_chunk($waypoint_pieces, 2); |
| 132 | 132 | |
| 133 | 133 | foreach ($waypoint_pieces as $waypoint_coordinate) |
| 134 | 134 | { |
| 135 | - $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 135 | + $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 136 | 136 | |
| 137 | 137 | } |
| 138 | 138 | $output .= '</coordinates>'; |
@@ -144,38 +144,38 @@ discard block |
||
| 144 | 144 | //departure airport |
| 145 | 145 | $output .= '<Placemark>'; |
| 146 | 146 | $output .= '<name>'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</name>'; |
| 147 | - $output .= '<description><![CDATA[ '; |
|
| 148 | - $output .= '<div class="ge-balloon">'; |
|
| 149 | - $output .= '<div class="ge-row">'; |
|
| 150 | - $output .= '<span>Name</span>'; |
|
| 151 | - $output .= $spotter_item['departure_airport_name']; |
|
| 152 | - $output .= '</div>'; |
|
| 153 | - $output .= '<div class="ge-row">'; |
|
| 154 | - $output .= '<span>City</span>'; |
|
| 155 | - $output .= $spotter_item['departure_airport_city']; |
|
| 156 | - $output .= '</div>'; |
|
| 157 | - $output .= '<div class="ge-row">'; |
|
| 158 | - $output .= '<span>Country</span>'; |
|
| 159 | - $output .= $spotter_item['departure_airport_country']; |
|
| 160 | - $output .= '</div>'; |
|
| 161 | - $output .= '<div class="ge-row">'; |
|
| 162 | - $output .= '<span>ICAO</span>'; |
|
| 163 | - $output .= $spotter_item['departure_airport_icao']; |
|
| 164 | - $output .= '</div>'; |
|
| 165 | - $output .= '<div class="ge-row">'; |
|
| 166 | - $output .= '<span>IATA</span>'; |
|
| 167 | - $output .= $spotter_item['departure_airport_iata']; |
|
| 168 | - $output .= '</div>'; |
|
| 169 | - $output .= '<div class="ge-row">'; |
|
| 170 | - $output .= '<span>Coordinates</span>'; |
|
| 171 | - $output .= $spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_longitude']; |
|
| 172 | - $output .= '</div>'; |
|
| 173 | - $output .= '<div class="ge-row">'; |
|
| 174 | - $output .= '<span>Altitude</span>'; |
|
| 175 | - $output .= $spotter_item['departure_airport_altitude']; |
|
| 176 | - $output .= '</div>'; |
|
| 177 | - $output .= '</div>'; |
|
| 178 | - $output .= ' ]]></description>'; |
|
| 147 | + $output .= '<description><![CDATA[ '; |
|
| 148 | + $output .= '<div class="ge-balloon">'; |
|
| 149 | + $output .= '<div class="ge-row">'; |
|
| 150 | + $output .= '<span>Name</span>'; |
|
| 151 | + $output .= $spotter_item['departure_airport_name']; |
|
| 152 | + $output .= '</div>'; |
|
| 153 | + $output .= '<div class="ge-row">'; |
|
| 154 | + $output .= '<span>City</span>'; |
|
| 155 | + $output .= $spotter_item['departure_airport_city']; |
|
| 156 | + $output .= '</div>'; |
|
| 157 | + $output .= '<div class="ge-row">'; |
|
| 158 | + $output .= '<span>Country</span>'; |
|
| 159 | + $output .= $spotter_item['departure_airport_country']; |
|
| 160 | + $output .= '</div>'; |
|
| 161 | + $output .= '<div class="ge-row">'; |
|
| 162 | + $output .= '<span>ICAO</span>'; |
|
| 163 | + $output .= $spotter_item['departure_airport_icao']; |
|
| 164 | + $output .= '</div>'; |
|
| 165 | + $output .= '<div class="ge-row">'; |
|
| 166 | + $output .= '<span>IATA</span>'; |
|
| 167 | + $output .= $spotter_item['departure_airport_iata']; |
|
| 168 | + $output .= '</div>'; |
|
| 169 | + $output .= '<div class="ge-row">'; |
|
| 170 | + $output .= '<span>Coordinates</span>'; |
|
| 171 | + $output .= $spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_longitude']; |
|
| 172 | + $output .= '</div>'; |
|
| 173 | + $output .= '<div class="ge-row">'; |
|
| 174 | + $output .= '<span>Altitude</span>'; |
|
| 175 | + $output .= $spotter_item['departure_airport_altitude']; |
|
| 176 | + $output .= '</div>'; |
|
| 177 | + $output .= '</div>'; |
|
| 178 | + $output .= ' ]]></description>'; |
|
| 179 | 179 | $output .= '<styleUrl>#departureAirport</styleUrl>'; |
| 180 | 180 | $output .= '<Point>'; |
| 181 | 181 | $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
@@ -186,38 +186,38 @@ discard block |
||
| 186 | 186 | //arrival airport |
| 187 | 187 | $output .= '<Placemark>'; |
| 188 | 188 | $output .= '<name>'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</name>'; |
| 189 | - $output .= '<description><![CDATA[ '; |
|
| 190 | - $output .= '<div class="ge-balloon">'; |
|
| 191 | - $output .= '<div class="ge-row">'; |
|
| 192 | - $output .= '<span>Name</span>'; |
|
| 193 | - $output .= $spotter_item['arrival_airport_name']; |
|
| 194 | - $output .= '</div>'; |
|
| 195 | - $output .= '<div class="ge-row">'; |
|
| 196 | - $output .= '<span>City</span>'; |
|
| 197 | - $output .= $spotter_item['arrival_airport_city']; |
|
| 198 | - $output .= '</div>'; |
|
| 199 | - $output .= '<div class="ge-row">'; |
|
| 200 | - $output .= '<span>Country</span>'; |
|
| 201 | - $output .= $spotter_item['arrival_airport_country']; |
|
| 202 | - $output .= '</div>'; |
|
| 203 | - $output .= '<div class="ge-row">'; |
|
| 204 | - $output .= '<span>ICAO</span>'; |
|
| 205 | - $output .= $spotter_item['arrival_airport_icao']; |
|
| 206 | - $output .= '</div>'; |
|
| 207 | - $output .= '<div class="ge-row">'; |
|
| 208 | - $output .= '<span>IATA</span>'; |
|
| 209 | - $output .= $spotter_item['arrival_airport_iata']; |
|
| 210 | - $output .= '</div>'; |
|
| 211 | - $output .= '<div class="ge-row">'; |
|
| 212 | - $output .= '<span>Coordinates</span>'; |
|
| 213 | - $output .= $spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_longitude']; |
|
| 214 | - $output .= '</div>'; |
|
| 215 | - $output .= '<div class="ge-row">'; |
|
| 216 | - $output .= '<span>Altitude</span>'; |
|
| 217 | - $output .= $spotter_item['arrival_airport_altitude']; |
|
| 218 | - $output .= '</div>'; |
|
| 219 | - $output .= '</div>'; |
|
| 220 | - $output .= ' ]]></description>'; |
|
| 189 | + $output .= '<description><![CDATA[ '; |
|
| 190 | + $output .= '<div class="ge-balloon">'; |
|
| 191 | + $output .= '<div class="ge-row">'; |
|
| 192 | + $output .= '<span>Name</span>'; |
|
| 193 | + $output .= $spotter_item['arrival_airport_name']; |
|
| 194 | + $output .= '</div>'; |
|
| 195 | + $output .= '<div class="ge-row">'; |
|
| 196 | + $output .= '<span>City</span>'; |
|
| 197 | + $output .= $spotter_item['arrival_airport_city']; |
|
| 198 | + $output .= '</div>'; |
|
| 199 | + $output .= '<div class="ge-row">'; |
|
| 200 | + $output .= '<span>Country</span>'; |
|
| 201 | + $output .= $spotter_item['arrival_airport_country']; |
|
| 202 | + $output .= '</div>'; |
|
| 203 | + $output .= '<div class="ge-row">'; |
|
| 204 | + $output .= '<span>ICAO</span>'; |
|
| 205 | + $output .= $spotter_item['arrival_airport_icao']; |
|
| 206 | + $output .= '</div>'; |
|
| 207 | + $output .= '<div class="ge-row">'; |
|
| 208 | + $output .= '<span>IATA</span>'; |
|
| 209 | + $output .= $spotter_item['arrival_airport_iata']; |
|
| 210 | + $output .= '</div>'; |
|
| 211 | + $output .= '<div class="ge-row">'; |
|
| 212 | + $output .= '<span>Coordinates</span>'; |
|
| 213 | + $output .= $spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_longitude']; |
|
| 214 | + $output .= '</div>'; |
|
| 215 | + $output .= '<div class="ge-row">'; |
|
| 216 | + $output .= '<span>Altitude</span>'; |
|
| 217 | + $output .= $spotter_item['arrival_airport_altitude']; |
|
| 218 | + $output .= '</div>'; |
|
| 219 | + $output .= '</div>'; |
|
| 220 | + $output .= ' ]]></description>'; |
|
| 221 | 221 | $output .= '<styleUrl>#arrivalAirport</styleUrl>'; |
| 222 | 222 | $output .= '<Point>'; |
| 223 | 223 | $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
@@ -230,41 +230,41 @@ discard block |
||
| 230 | 230 | $output .= '<Placemark>'; |
| 231 | 231 | $output .= '<name>'.$spotter_item['ident'].' - '.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'</name>'; |
| 232 | 232 | $output .= '<description><![CDATA[ '; |
| 233 | - $output .= '<div class="ge-balloon">'; |
|
| 234 | - if ($spotter_item['image_thumbnail'] != "") |
|
| 235 | - { |
|
| 236 | - $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click on image to see Flight profile" title="Click on image to see Flight profile" class="ge-image" /></a>'; |
|
| 237 | - } |
|
| 238 | - $output .= '<div class="ge-row">'; |
|
| 239 | - $output .= '<span>Ident</span>'; |
|
| 240 | - $output .= '<a href="'.$globalURL.'/ident/'.$spotter_item['ident'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
|
| 241 | - $output .= '</div>'; |
|
| 242 | - $output .= '<div class="ge-row">'; |
|
| 243 | - $output .= '<span>Registration</span>'; |
|
| 244 | - $output .= '<a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a>'; |
|
| 245 | - $output .= '</div>'; |
|
| 246 | - $output .= '<div class="ge-row">'; |
|
| 247 | - $output .= '<span>Aircraft</span>'; |
|
| 248 | - $output .= '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" target="_blank">'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 249 | - $output .= '</div>'; |
|
| 250 | - $output .= '<div class="ge-row">'; |
|
| 251 | - $output .= '<span>Airline</span>'; |
|
| 252 | - $output .= '<a href="'.$globalURL.'/airline/'.$spotter_item['airline_icao'].'" target="_blank">'.$spotter_item['airline_name'].'</a>'; |
|
| 253 | - $output .= '</div>'; |
|
| 254 | - $output .= '<div class="ge-row">'; |
|
| 255 | - $output .= '<span>Departure Airport</span>'; |
|
| 256 | - $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</a>'; |
|
| 257 | - $output .= '</div>'; |
|
| 258 | - $output .= '<div class="ge-row">'; |
|
| 259 | - $output .= '<span>Arrival Airport</span>'; |
|
| 260 | - $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a>'; |
|
| 261 | - $output .= '</div>'; |
|
| 233 | + $output .= '<div class="ge-balloon">'; |
|
| 234 | + if ($spotter_item['image_thumbnail'] != "") |
|
| 235 | + { |
|
| 236 | + $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click on image to see Flight profile" title="Click on image to see Flight profile" class="ge-image" /></a>'; |
|
| 237 | + } |
|
| 238 | + $output .= '<div class="ge-row">'; |
|
| 239 | + $output .= '<span>Ident</span>'; |
|
| 240 | + $output .= '<a href="'.$globalURL.'/ident/'.$spotter_item['ident'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
|
| 241 | + $output .= '</div>'; |
|
| 242 | + $output .= '<div class="ge-row">'; |
|
| 243 | + $output .= '<span>Registration</span>'; |
|
| 244 | + $output .= '<a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a>'; |
|
| 245 | + $output .= '</div>'; |
|
| 246 | + $output .= '<div class="ge-row">'; |
|
| 247 | + $output .= '<span>Aircraft</span>'; |
|
| 248 | + $output .= '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" target="_blank">'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
| 249 | + $output .= '</div>'; |
|
| 250 | + $output .= '<div class="ge-row">'; |
|
| 251 | + $output .= '<span>Airline</span>'; |
|
| 252 | + $output .= '<a href="'.$globalURL.'/airline/'.$spotter_item['airline_icao'].'" target="_blank">'.$spotter_item['airline_name'].'</a>'; |
|
| 253 | + $output .= '</div>'; |
|
| 254 | + $output .= '<div class="ge-row">'; |
|
| 255 | + $output .= '<span>Departure Airport</span>'; |
|
| 256 | + $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].')</a>'; |
|
| 257 | + $output .= '</div>'; |
|
| 258 | + $output .= '<div class="ge-row">'; |
|
| 259 | + $output .= '<span>Arrival Airport</span>'; |
|
| 260 | + $output .= '<a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a>'; |
|
| 261 | + $output .= '</div>'; |
|
| 262 | 262 | $output .= '<div class="ge-row">'; |
| 263 | - $output .= '<span>Date</span>'; |
|
| 264 | - $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank">'.date("D M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</a>'; |
|
| 265 | - $output .= '</div>'; |
|
| 266 | - $output .= '</div>'; |
|
| 267 | - $output .= ' ]]></description>'; |
|
| 263 | + $output .= '<span>Date</span>'; |
|
| 264 | + $output .= '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'" target="_blank">'.date("D M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</a>'; |
|
| 265 | + $output .= '</div>'; |
|
| 266 | + $output .= '</div>'; |
|
| 267 | + $output .= ' ]]></description>'; |
|
| 268 | 268 | $output .= '<styleUrl>#aircraft_'.$spotter_item['spotter_id'].'</styleUrl>'; |
| 269 | 269 | $output .= '<Point>'; |
| 270 | 270 | $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
@@ -273,14 +273,14 @@ discard block |
||
| 273 | 273 | $output .= '</Placemark>'; |
| 274 | 274 | |
| 275 | 275 | $output .= '<Style id="aircraft_'.$spotter_item['spotter_id'].'">'; |
| 276 | - $output .= '<IconStyle>'; |
|
| 277 | - $output .= '<Icon>'; |
|
| 278 | - $output .= '<href>http://www.flightairmap.fr/images/kml_aircraft.png</href>'; |
|
| 279 | - $output .= '</Icon>'; |
|
| 280 | - $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
| 281 | - $output .= '</IconStyle>'; |
|
| 282 | - $output .= '</Style>'; |
|
| 283 | - } |
|
| 276 | + $output .= '<IconStyle>'; |
|
| 277 | + $output .= '<Icon>'; |
|
| 278 | + $output .= '<href>http://www.flightairmap.fr/images/kml_aircraft.png</href>'; |
|
| 279 | + $output .= '</Icon>'; |
|
| 280 | + $output .= '<heading>'.$spotter_item['heading'].'</heading>'; |
|
| 281 | + $output .= '</IconStyle>'; |
|
| 282 | + $output .= '</Style>'; |
|
| 283 | + } |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | $output .= '</Document>'; |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airline'])) { |
| 6 | - header('Location: '.$globalURL.'/airline'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airline'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | function drawChart() { |
| 70 | 70 | var data = google.visualization.arrayToDataTable([ |
| 71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
| 72 | - $country_data = ''; |
|
| 72 | + $country_data = ''; |
|
| 73 | 73 | foreach($airport_country_array as $airport_item) |
| 74 | 74 | { |
| 75 | 75 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_type'])) { |
| 6 | - header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | function drawChart() { |
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 64 | - $hour_data = ''; |
|
| 64 | + $hour_data = ''; |
|
| 65 | 65 | foreach($hour_array as $hour_item) |
| 66 | 66 | { |
| 67 | 67 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 68 | 68 | } |
| 69 | 69 | $hour_data = substr($hour_data, 0, -1); |
| 70 | 70 | print $hour_data; |
| 71 | - print ']); |
|
| 71 | + print ']); |
|
| 72 | 72 | |
| 73 | 73 | var options = { |
| 74 | 74 | legend: {position: "none"}, |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_type'])) { |
| 6 | - header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | date_default_timezone_set('UTC'); |
| 29 | 29 | //waypoint plotting |
| 30 | 30 | $output .= '{"type": "Feature",'; |
| 31 | - $output .= '"properties": {'; |
|
| 31 | + $output .= '"properties": {'; |
|
| 32 | 32 | $output .= '"name": "'.$spotter_item['name'].'",'; |
| 33 | 33 | $output .= '"city": "'.$spotter_item['city'].'",'; |
| 34 | 34 | $output .= '"country": "'.$spotter_item['country'].'",'; |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | $output .= '"icon": "'.$globalURL.'/images/antenna.png",'; |
| 38 | 38 | $output .= '"type": "'.$spotter_item['type'].'",'; |
| 39 | 39 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
| 40 | - $output .= '},'; |
|
| 41 | - $output .= '"geometry": {'; |
|
| 40 | + $output .= '},'; |
|
| 41 | + $output .= '"geometry": {'; |
|
| 42 | 42 | $output .= '"type": "Point",'; |
| 43 | 43 | $output .= '"coordinates": ['; |
| 44 | - $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
| 44 | + $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
| 45 | 45 | $output .= ']'; |
| 46 | - $output .= '}'; |
|
| 46 | + $output .= '}'; |
|
| 47 | 47 | $output .= '},'; |
| 48 | 48 | } |
| 49 | 49 | $output = substr($output, 0, -1); |
@@ -4,55 +4,55 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if (isset($_GET['start_date'])) { |
| 7 | - //for the date manipulation into the query |
|
| 8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | - $start_date = $_GET['start_date'].":00"; |
|
| 10 | - $end_date = $_GET['end_date'].":00"; |
|
| 11 | - $sql_date = $start_date.",".$end_date; |
|
| 12 | - } else if($_GET['start_date'] != ""){ |
|
| 13 | - $start_date = $_GET['start_date'].":00"; |
|
| 14 | - $sql_date = $start_date; |
|
| 15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | - $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | - $sql_date = $end_date; |
|
| 18 | - } else $sql_date = ''; |
|
| 7 | + //for the date manipulation into the query |
|
| 8 | + if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 9 | + $start_date = $_GET['start_date'].":00"; |
|
| 10 | + $end_date = $_GET['end_date'].":00"; |
|
| 11 | + $sql_date = $start_date.",".$end_date; |
|
| 12 | + } else if($_GET['start_date'] != ""){ |
|
| 13 | + $start_date = $_GET['start_date'].":00"; |
|
| 14 | + $sql_date = $start_date; |
|
| 15 | + } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 16 | + $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
|
| 17 | + $sql_date = $end_date; |
|
| 18 | + } else $sql_date = ''; |
|
| 19 | 19 | } else $sql_date = ''; |
| 20 | 20 | |
| 21 | 21 | if (isset($_GET['highest_altitude'])) { |
| 22 | - //for altitude manipulation |
|
| 23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | - $end_altitude = $_GET['highest_altitude']; |
|
| 25 | - $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | - $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | - $end_altitude = $_GET['highest_altitude']; |
|
| 29 | - $sql_altitude = $end_altitude; |
|
| 30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | - $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | - $sql_altitude = $start_altitude; |
|
| 33 | - } else $sql_altitude = ''; |
|
| 22 | + //for altitude manipulation |
|
| 23 | + if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 24 | + $end_altitude = $_GET['highest_altitude']; |
|
| 25 | + $start_altitude = $_GET['lowest_altitude']; |
|
| 26 | + $sql_altitude = $start_altitude.",".$end_altitude; |
|
| 27 | + } else if($_GET['highest_altitude'] != ""){ |
|
| 28 | + $end_altitude = $_GET['highest_altitude']; |
|
| 29 | + $sql_altitude = $end_altitude; |
|
| 30 | + } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 31 | + $start_altitude = $_GET['lowest_altitude'].",60000"; |
|
| 32 | + $sql_altitude = $start_altitude; |
|
| 33 | + } else $sql_altitude = ''; |
|
| 34 | 34 | } else $sql_altitude = ''; |
| 35 | 35 | |
| 36 | 36 | //calculuation for the pagination |
| 37 | 37 | if(!isset($_GET['limit'])) |
| 38 | 38 | { |
| 39 | - if (!isset($_GET['number_results'])) |
|
| 40 | - { |
|
| 41 | - $limit_start = 0; |
|
| 42 | - $limit_end = 25; |
|
| 43 | - $absolute_difference = 25; |
|
| 44 | - } else { |
|
| 45 | - if ($_GET['number_results'] > 1000){ |
|
| 46 | - $_GET['number_results'] = 1000; |
|
| 47 | - } |
|
| 48 | - $limit_start = 0; |
|
| 49 | - $limit_end = $_GET['number_results']; |
|
| 50 | - $absolute_difference = $_GET['number_results']; |
|
| 51 | - } |
|
| 39 | + if (!isset($_GET['number_results'])) |
|
| 40 | + { |
|
| 41 | + $limit_start = 0; |
|
| 42 | + $limit_end = 25; |
|
| 43 | + $absolute_difference = 25; |
|
| 44 | + } else { |
|
| 45 | + if ($_GET['number_results'] > 1000){ |
|
| 46 | + $_GET['number_results'] = 1000; |
|
| 47 | + } |
|
| 48 | + $limit_start = 0; |
|
| 49 | + $limit_end = $_GET['number_results']; |
|
| 50 | + $absolute_difference = $_GET['number_results']; |
|
| 51 | + } |
|
| 52 | 52 | } else { |
| 53 | - $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | - $limit_start = $limit_explode[0]; |
|
| 55 | - $limit_end = $limit_explode[1]; |
|
| 53 | + $limit_explode = explode(",", $_GET['limit']); |
|
| 54 | + $limit_start = $limit_explode[0]; |
|
| 55 | + $limit_end = $limit_explode[1]; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $absolute_difference = abs($limit_start - $limit_end); |
@@ -102,16 +102,16 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | if (!empty($spotter_array)) |
| 104 | 104 | { |
| 105 | - foreach($spotter_array as $spotter_item) |
|
| 106 | - { |
|
| 105 | + foreach($spotter_array as $spotter_item) |
|
| 106 | + { |
|
| 107 | 107 | |
| 108 | 108 | |
| 109 | 109 | print '<item>'; |
| 110 | - print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>'; |
|
| 111 | - print '<link>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</link>'; |
|
| 112 | - print '<guid isPermaLink="false">http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</guid>'; |
|
| 113 | - print '<description>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</description>'; |
|
| 114 | - print '<pubDate>'.$date.'</pubDate>'; |
|
| 110 | + print '<title>'.$spotter_item['ident'].' '.$spotter_item['airline_name'].' | '.$spotter_item['registration'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | '.$spotter_item['departure_airport'].' - '.$spotter_item['arrival_airport'].'</title>'; |
|
| 111 | + print '<link>http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</link>'; |
|
| 112 | + print '<guid isPermaLink="false">http://www.flightairmap.fr/flightid/'.$spotter_item['spotter_id'].'</guid>'; |
|
| 113 | + print '<description>Ident: '.$spotter_item['ident'].' | Registration: '.$spotter_item['registration'].' | Aircraft: '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].') | Airline: '.$spotter_item['airline_name'].' | Coming From: '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country'].' ('.$spotter_item['departure_airport'].') | Flying to: '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].') | Flew nearby on: '.date("M j, Y, g:i a T", strtotime($spotter_item['date_iso_8601'])).'</description>'; |
|
| 114 | + print '<pubDate>'.$date.'</pubDate>'; |
|
| 115 | 115 | print '</item>'; |
| 116 | 116 | |
| 117 | 117 | } |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |