@@ -9,15 +9,15 @@ discard block |
||
9 | 9 | die(); |
10 | 10 | } |
11 | 11 | |
12 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
12 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
13 | 13 | |
14 | 14 | $Spotter = new Spotter(); |
15 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
15 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
16 | 16 | |
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Arrival Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
20 | + $title = sprintf(_("Most Common Arrival Airports for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="select-item">'; |
23 | 23 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | $Stats = new Stats(); |
27 | 27 | $aircraft_types = $Stats->getAllAircraftTypes(); |
28 | 28 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
29 | - foreach($aircraft_types as $aircrafttype) |
|
29 | + foreach ($aircraft_types as $aircrafttype) |
|
30 | 30 | { |
31 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
31 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
32 | 32 | { |
33 | 33 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
34 | 34 | } else { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | include('aircraft-sub-menu.php'); |
56 | 56 | print '<div class="column">'; |
57 | 57 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
58 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
58 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
59 | 59 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAircraft($aircraft_type); |
60 | 60 | ?> |
61 | 61 | <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ["<?php echo _("Airport"); ?>", "<?php echo _("# of times"); ?>"], |
72 | 72 | <?php |
73 | 73 | $airport_data = ''; |
74 | - foreach($airport_airport_array as $airport_item) |
|
74 | + foreach ($airport_airport_array as $airport_item) |
|
75 | 75 | { |
76 | 76 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
77 | 77 | $name = str_replace("'", "", $name); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | print '</thead>'; |
111 | 111 | print '<tbody>'; |
112 | 112 | $i = 1; |
113 | - foreach($airport_airport_array as $airport_item) |
|
113 | + foreach ($airport_airport_array as $airport_item) |
|
114 | 114 | { |
115 | 115 | print '<tr>'; |
116 | 116 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | require_once(dirname(__FILE__).'/settings.php'); |
3 | 3 | |
4 | -class Connection{ |
|
4 | +class Connection { |
|
5 | 5 | public $db = null; |
6 | 6 | public $dbs = array(); |
7 | 7 | public $latest_schema = 26; |
8 | 8 | |
9 | - public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
|
9 | + public function __construct($dbc = null, $dbname = null, $user = null, $pass = null) { |
|
10 | 10 | global $globalDBdriver; |
11 | 11 | if ($dbc === null) { |
12 | 12 | if ($this->db === null && $dbname === null) { |
13 | 13 | if ($user === null && $pass === null) { |
14 | 14 | $this->createDBConnection(); |
15 | 15 | } else { |
16 | - $this->createDBConnection(null,$user,$pass); |
|
16 | + $this->createDBConnection(null, $user, $pass); |
|
17 | 17 | } |
18 | 18 | } else { |
19 | 19 | $this->createDBConnection($dbname); |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | while (true) { |
92 | 92 | try { |
93 | 93 | if ($globalDBSdriver == 'mysql') { |
94 | - $this->dbs[$DBname] = new PDO("$globalDBSdriver:host=$globalDBShost;port=$globalDBSport;dbname=$globalDBSname;charset=utf8", $globalDBSuser, $globalDBSpass); |
|
94 | + $this->dbs[$DBname] = new PDO("$globalDBSdriver:host=$globalDBShost;port=$globalDBSport;dbname=$globalDBSname;charset=utf8", $globalDBSuser, $globalDBSpass); |
|
95 | 95 | $this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'"); |
96 | 96 | $this->dbs[$DBname]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
97 | - $this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER); |
|
98 | - if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,500); |
|
99 | - else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut); |
|
100 | - if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true); |
|
101 | - else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent); |
|
97 | + $this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); |
|
98 | + if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT, 500); |
|
99 | + else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT, $globalDBTimeOut); |
|
100 | + if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT, true); |
|
101 | + else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT, $globalDBPersistent); |
|
102 | 102 | $this->dbs[$DBname]->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); |
103 | 103 | $this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); |
104 | 104 | // Workaround against "ONLY_FULL_GROUP_BY" mode |
@@ -108,18 +108,18 @@ discard block |
||
108 | 108 | $this->dbs[$DBname]->exec('SET SESSION time_zone = "+00:00"'); |
109 | 109 | //$this->dbs[$DBname]->exec('SET @@session.time_zone = "+00:00"'); |
110 | 110 | } else { |
111 | - $this->dbs[$DBname] = new PDO("$globalDBSdriver:host=$globalDBShost;port=$globalDBSport;dbname=$globalDBSname;options='--client_encoding=utf8'", $globalDBSuser, $globalDBSpass); |
|
111 | + $this->dbs[$DBname] = new PDO("$globalDBSdriver:host=$globalDBShost;port=$globalDBSport;dbname=$globalDBSname;options='--client_encoding=utf8'", $globalDBSuser, $globalDBSpass); |
|
112 | 112 | //$this->dbs[$DBname]->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'"); |
113 | 113 | $this->dbs[$DBname]->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
114 | - $this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER); |
|
115 | - if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,200); |
|
116 | - else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT,$globalDBTimeOut); |
|
117 | - if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,true); |
|
118 | - else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT,$globalDBPersistent); |
|
114 | + $this->dbs[$DBname]->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); |
|
115 | + if (!isset($globalDBTimeOut)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT, 200); |
|
116 | + else $this->dbs[$DBname]->setAttribute(PDO::ATTR_TIMEOUT, $globalDBTimeOut); |
|
117 | + if (!isset($globalDBPersistent)) $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT, true); |
|
118 | + else $this->dbs[$DBname]->setAttribute(PDO::ATTR_PERSISTENT, $globalDBPersistent); |
|
119 | 119 | $this->dbs[$DBname]->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); |
120 | 120 | } |
121 | 121 | break; |
122 | - } catch(PDOException $e) { |
|
122 | + } catch (PDOException $e) { |
|
123 | 123 | $i++; |
124 | 124 | if (isset($globalDebug) && $globalDebug) echo $e->getMessage()."\n"; |
125 | 125 | //exit; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | try { |
144 | 144 | //$Connection = new Connection(); |
145 | 145 | $results = $this->db->query($query); |
146 | - } catch(PDOException $e) { |
|
146 | + } catch (PDOException $e) { |
|
147 | 147 | return false; |
148 | 148 | } |
149 | - if($results->rowCount()>0) { |
|
149 | + if ($results->rowCount() > 0) { |
|
150 | 150 | return true; |
151 | 151 | } |
152 | 152 | else return false; |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | return false; |
168 | 168 | } |
169 | 169 | |
170 | - } catch(PDOException $e) { |
|
171 | - if($e->getCode() != 'HY000' || !stristr($e->getMessage(), 'server has gone away')) { |
|
170 | + } catch (PDOException $e) { |
|
171 | + if ($e->getCode() != 'HY000' || !stristr($e->getMessage(), 'server has gone away')) { |
|
172 | 172 | throw $e; |
173 | 173 | } |
174 | 174 | //echo 'error ! '.$e->getMessage(); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | /* |
181 | 181 | * Check if index exist |
182 | 182 | */ |
183 | - public function indexExists($table,$index) |
|
183 | + public function indexExists($table, $index) |
|
184 | 184 | { |
185 | 185 | global $globalDBdriver, $globalDBname; |
186 | 186 | if ($globalDBdriver == 'mysql') { |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | try { |
192 | 192 | //$Connection = new Connection(); |
193 | 193 | $results = $this->db->query($query); |
194 | - } catch(PDOException $e) { |
|
194 | + } catch (PDOException $e) { |
|
195 | 195 | return false; |
196 | 196 | } |
197 | 197 | $nb = $results->fetchAll(PDO::FETCH_ASSOC); |
198 | - if($nb[0]['nb'] > 0) { |
|
198 | + if ($nb[0]['nb'] > 0) { |
|
199 | 199 | return true; |
200 | 200 | } |
201 | 201 | else return false; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $query = "SELECT * FROM ".$table." LIMIT 0"; |
211 | 211 | try { |
212 | 212 | $results = $this->db->query($query); |
213 | - } catch(PDOException $e) { |
|
213 | + } catch (PDOException $e) { |
|
214 | 214 | return "error : ".$e->getMessage()."\n"; |
215 | 215 | } |
216 | 216 | $columns = array(); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * Check if a column name exist in a table |
227 | 227 | * @return Boolean column exist or not |
228 | 228 | */ |
229 | - public function checkColumnName($table,$name) |
|
229 | + public function checkColumnName($table, $name) |
|
230 | 230 | { |
231 | 231 | global $globalDBdriver, $globalDBname; |
232 | 232 | if ($globalDBdriver == 'mysql') { |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | } |
237 | 237 | try { |
238 | 238 | $sth = $this->db()->prepare($query); |
239 | - $sth->execute(array(':database' => $globalDBname,':table' => $table,':name' => $name)); |
|
240 | - } catch(PDOException $e) { |
|
239 | + $sth->execute(array(':database' => $globalDBname, ':table' => $table, ':name' => $name)); |
|
240 | + } catch (PDOException $e) { |
|
241 | 241 | echo "error : ".$e->getMessage()."\n"; |
242 | 242 | } |
243 | 243 | $result = $sth->fetch(PDO::FETCH_ASSOC); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | try { |
277 | 277 | $sth = $this->db->prepare($query); |
278 | 278 | $sth->execute(); |
279 | - } catch(PDOException $e) { |
|
279 | + } catch (PDOException $e) { |
|
280 | 280 | return "error : ".$e->getMessage()."\n"; |
281 | 281 | } |
282 | 282 | $result = $sth->fetch(PDO::FETCH_ASSOC); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | header('Content-disposition: attachment; filename="atc.geojson"'); |
8 | 8 | } |
9 | 9 | header('Content-Type: text/javascript'); |
10 | -$ATC=new ATC(); |
|
10 | +$ATC = new ATC(); |
|
11 | 11 | if (isset($_GET['coord'])) |
12 | 12 | { |
13 | 13 | //$coords = explode(',',$_GET['coord']); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $output = '{"type": "FeatureCollection","features": ['; |
20 | 20 | if (!empty($spotter_array)) |
21 | 21 | { |
22 | - foreach($spotter_array as $spotter_item) |
|
22 | + foreach ($spotter_array as $spotter_item) |
|
23 | 23 | { |
24 | 24 | date_default_timezone_set('UTC'); |
25 | 25 | //waypoint plotting |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | if (isset($_GET['start_date'])) { |
18 | 18 | //for the date manipulation into the query |
19 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
19 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
20 | 20 | $start_date = $_GET['start_date']." 00:00:00"; |
21 | 21 | $end_date = $_GET['end_date']." 00:00:00"; |
22 | 22 | $sql_date = $start_date.",".$end_date; |
23 | - } else if($_GET['start_date'] != ""){ |
|
23 | + } else if ($_GET['start_date'] != "") { |
|
24 | 24 | $start_date = $_GET['start_date']." 00:00:00"; |
25 | 25 | $sql_date = $start_date; |
26 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
26 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
27 | 27 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
28 | 28 | $sql_date = $end_date; |
29 | 29 | } else $sql_date = ''; |
@@ -31,21 +31,21 @@ discard block |
||
31 | 31 | |
32 | 32 | if (isset($_GET['highest_altitude'])) { |
33 | 33 | //for altitude manipulation |
34 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
34 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
35 | 35 | $end_altitude = $_GET['highest_altitude']; |
36 | 36 | $start_altitude = $_GET['lowest_altitude']; |
37 | 37 | $sql_altitude = $start_altitude.",".$end_altitude; |
38 | - } else if($_GET['highest_altitude'] != ""){ |
|
38 | + } else if ($_GET['highest_altitude'] != "") { |
|
39 | 39 | $end_altitude = $_GET['highest_altitude']; |
40 | 40 | $sql_altitude = $end_altitude; |
41 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
41 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
42 | 42 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
43 | 43 | $sql_altitude = $start_altitude; |
44 | 44 | } else $sql_altitude = ''; |
45 | 45 | } else $sql_altitude = ''; |
46 | 46 | |
47 | 47 | //calculuation for the pagination |
48 | -if(!isset($_GET['limit'])) |
|
48 | +if (!isset($_GET['limit'])) |
|
49 | 49 | { |
50 | 50 | if (!isset($_GET['number_results'])) |
51 | 51 | { |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | $limit_end = 25; |
54 | 54 | $absolute_difference = 25; |
55 | 55 | } else { |
56 | - if ($_GET['number_results'] > 1000){ |
|
56 | + if ($_GET['number_results'] > 1000) { |
|
57 | 57 | $_GET['number_results'] = 1000; |
58 | 58 | } |
59 | 59 | $limit_start = 0; |
60 | 60 | $limit_end = $_GET['number_results']; |
61 | 61 | $absolute_difference = $_GET['number_results']; |
62 | 62 | } |
63 | -} else { |
|
63 | +} else { |
|
64 | 64 | $limit_explode = explode(",", $_GET['limit']); |
65 | 65 | $limit_start = $limit_explode[0]; |
66 | 66 | $limit_end = $limit_explode[1]; |
@@ -70,28 +70,28 @@ discard block |
||
70 | 70 | $limit_previous_1 = $limit_start - $absolute_difference; |
71 | 71 | $limit_previous_2 = $limit_end - $absolute_difference; |
72 | 72 | |
73 | -if (!empty($_GET)){ |
|
74 | - $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
|
75 | - $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
|
76 | - $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
|
77 | - $manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING); |
|
78 | - $highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING); |
|
79 | - $airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING); |
|
80 | - $airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING); |
|
81 | - $airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING); |
|
82 | - $airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING); |
|
83 | - $airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING); |
|
84 | - $callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING); |
|
85 | - $owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING); |
|
86 | - $pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING); |
|
87 | - $pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING); |
|
88 | - $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING); |
|
89 | - $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
90 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
91 | - $archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT); |
|
92 | - $origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_STRING); |
|
93 | - $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING); |
|
94 | - $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
|
73 | +if (!empty($_GET)) { |
|
74 | + $q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
75 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
76 | + $aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
77 | + $manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
78 | + $highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
79 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
80 | + $airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
81 | + $airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
82 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
83 | + $airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
84 | + $callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
85 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
86 | + $pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
87 | + $pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
88 | + $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
89 | + $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
90 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
91 | + $archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT); |
|
92 | + $origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_STRING); |
|
93 | + $origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_STRING); |
|
94 | + $dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT); |
|
95 | 95 | if ($dist != '') { |
96 | 96 | if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
97 | 97 | elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | if (!isset($sql_date)) $sql_date = ''; |
100 | 100 | if ($archive == 1) { |
101 | 101 | $SpotterArchive = new SpotterArchive(); |
102 | - $spotter_array = $SpotterArchive->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
102 | + $spotter_array = $SpotterArchive->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
103 | 103 | } else { |
104 | - $spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist); |
|
104 | + $spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | print '<span class="sub-menu-statistic column mobile">'; |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | //remove 3D=true parameter |
135 | 135 | $no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']); |
136 | 136 | $kmlURL = str_replace("http://", "kml://", $globalURL); |
137 | - if (!isset($_GET['3D'])){ |
|
137 | + if (!isset($_GET['3D'])) { |
|
138 | 138 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>'; |
139 | 139 | } else { |
140 | 140 | print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>'; |
141 | 141 | } |
142 | - if (isset($_GET['3D'])){ |
|
142 | + if (isset($_GET['3D'])) { |
|
143 | 143 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>'; |
144 | 144 | } else { |
145 | 145 | print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>'; |
@@ -160,30 +160,30 @@ discard block |
||
160 | 160 | print '<div class="column">'; |
161 | 161 | print '<div class="info">'; |
162 | 162 | print '<h1>'._("Search Results for").' '; |
163 | - if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$_GET['q'].'</span> '; } |
|
164 | - if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; } |
|
165 | - if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; } |
|
166 | - if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$_GET['registration'].'</span> '; } |
|
167 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; } |
|
168 | - if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; } |
|
169 | - if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; } |
|
170 | - if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; } |
|
171 | - if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$_GET['airport'].'</span> '; } |
|
172 | - if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; } |
|
173 | - if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; } |
|
174 | - if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$_GET['owner'].'</span> '; } |
|
175 | - if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; } |
|
176 | - if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; } |
|
177 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; } |
|
178 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
179 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
180 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; } |
|
181 | - if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; } |
|
182 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; } |
|
183 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; } |
|
184 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
185 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
186 | - if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; } |
|
163 | + if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$_GET['q'].'</span> '; } |
|
164 | + if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; } |
|
165 | + if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; } |
|
166 | + if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$_GET['registration'].'</span> '; } |
|
167 | + if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; } |
|
168 | + if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$_GET['airline'].'</span> '; } |
|
169 | + if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; } |
|
170 | + if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; } |
|
171 | + if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$_GET['airport'].'</span> '; } |
|
172 | + if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; } |
|
173 | + if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; } |
|
174 | + if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$_GET['owner'].'</span> '; } |
|
175 | + if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; } |
|
176 | + if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; } |
|
177 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; } |
|
178 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
179 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
180 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; } |
|
181 | + if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; } |
|
182 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; } |
|
183 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; } |
|
184 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
185 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
186 | + if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; } |
|
187 | 187 | print '</h1>'; |
188 | 188 | print '</div>'; |
189 | 189 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | </select> |
291 | 291 | </div> |
292 | 292 | </div> |
293 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script> |
|
293 | + <script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script> |
|
294 | 294 | <div class="form-group"> |
295 | 295 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
296 | 296 | <div class="col-sm-10"> |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | </select> |
300 | 300 | </div> |
301 | 301 | </div> |
302 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script> |
|
302 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script> |
|
303 | 303 | <div class="form-group"> |
304 | 304 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
305 | 305 | <div class="col-sm-10"> |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | </div> |
323 | 323 | </div> |
324 | 324 | <?php |
325 | -}else { |
|
325 | +} else { |
|
326 | 326 | ?> |
327 | 327 | <div class="form-group"> |
328 | 328 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
@@ -335,8 +335,8 @@ discard block |
||
335 | 335 | ?> |
336 | 336 | <div class="form-group"> |
337 | 337 | <div class="col-sm-offset-2 col-sm-10"> |
338 | - <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
339 | - <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
338 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
339 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
340 | 340 | </div> |
341 | 341 | </div> |
342 | 342 | </fieldset> |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | </select> |
351 | 351 | </div> |
352 | 352 | </div> |
353 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script> |
|
353 | + <script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $_GET['airline']; ?>');</script> |
|
354 | 354 | <div class="form-group"> |
355 | 355 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
356 | 356 | <div class="col-sm-10"> |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | </select> |
360 | 360 | </div> |
361 | 361 | </div> |
362 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script> |
|
362 | + <script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script> |
|
363 | 363 | <div class="form-group"> |
364 | 364 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
365 | 365 | <div class="col-sm-10"> |
@@ -368,10 +368,10 @@ discard block |
||
368 | 368 | </div> |
369 | 369 | <div class="form-group"> |
370 | 370 | <div class="col-sm-offset-2 col-sm-10"> |
371 | - <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
372 | - <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
373 | - <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
374 | - <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
371 | + <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all") { print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
|
372 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger") { print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
373 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "cargo") { print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
374 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "military") { print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
375 | 375 | </div> |
376 | 376 | </div> |
377 | 377 | </fieldset> |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | </select> |
386 | 386 | </div> |
387 | 387 | </div> |
388 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script> |
|
388 | + <script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script> |
|
389 | 389 | <div class="form-group"> |
390 | 390 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
391 | 391 | <div class="col-sm-10"> |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | </select> |
395 | 395 | </div> |
396 | 396 | </div> |
397 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script> |
|
397 | + <script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script> |
|
398 | 398 | </fieldset> |
399 | 399 | <fieldset> |
400 | 400 | <legend><?php echo _("Route"); ?></legend> |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | </select> |
407 | 407 | </div> |
408 | 408 | </div> |
409 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script> |
|
409 | + <script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script> |
|
410 | 410 | <div class="form-group"> |
411 | 411 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
412 | 412 | <div class="col-sm-10"> |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | </select> |
416 | 416 | </div> |
417 | 417 | </div> |
418 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script> |
|
418 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script> |
|
419 | 419 | </fieldset> |
420 | 420 | <fieldset> |
421 | 421 | <legend><?php echo _("Date"); ?></legend> |
@@ -469,9 +469,9 @@ discard block |
||
469 | 469 | <option></option> |
470 | 470 | <?php |
471 | 471 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
472 | -foreach($altitude_array as $altitude) |
|
472 | +foreach ($altitude_array as $altitude) |
|
473 | 473 | { |
474 | - if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
474 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
475 | 475 | { |
476 | 476 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
477 | 477 | } else { |
@@ -489,9 +489,9 @@ discard block |
||
489 | 489 | <option></option> |
490 | 490 | <?php |
491 | 491 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
492 | -foreach($altitude_array as $altitude) |
|
492 | +foreach ($altitude_array as $altitude) |
|
493 | 493 | { |
494 | - if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
494 | + if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
495 | 495 | { |
496 | 496 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
497 | 497 | } else { |
@@ -530,10 +530,10 @@ discard block |
||
530 | 530 | <div class="col-sm-10"> |
531 | 531 | <select class="form-control" name="number_results"> |
532 | 532 | <?php |
533 | -$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
534 | -foreach($number_results_array as $number) |
|
533 | +$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
534 | +foreach ($number_results_array as $number) |
|
535 | 535 | { |
536 | - if(isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
536 | + if (isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
537 | 537 | { |
538 | 538 | print '<option value="'.$number.'" selected="selected">'.$number.'</option>'; |
539 | 539 | } else { |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | <fieldset> |
552 | 552 | <div class="form-group"> |
553 | 553 | <div class="col-sm-offset-2 col-sm-10"> |
554 | - <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
554 | + <label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
555 | 555 | </div> |
556 | 556 | </div> |
557 | 557 | </fieldset> |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | die; |
41 | 41 | } |
42 | 42 | //$hosts = array($globalSBS1Host.':'.$globalSBS1Port); |
43 | - $globalSources[] = array('host' => $globalSBS1Host,'port' => $globalSBS1Port); |
|
43 | + $globalSources[] = array('host' => $globalSBS1Host, 'port' => $globalSBS1Port); |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | |
47 | -$options = getopt('s::',array('source::','server','idsource::')); |
|
47 | +$options = getopt('s::', array('source::', 'server', 'idsource::')); |
|
48 | 48 | //if (isset($options['s'])) $hosts = array($options['s']); |
49 | 49 | //elseif (isset($options['source'])) $hosts = array($options['source']); |
50 | 50 | if (isset($options['s'])) { |
@@ -59,17 +59,17 @@ discard block |
||
59 | 59 | else $id_source = 1; |
60 | 60 | if (isset($globalServer) && $globalServer) { |
61 | 61 | if ($globalDebug) echo "Using Server Mode\n"; |
62 | - $SI=new SpotterServer(); |
|
63 | -} else $SI=new SpotterImport($Connection->db); |
|
62 | + $SI = new SpotterServer(); |
|
63 | +} else $SI = new SpotterImport($Connection->db); |
|
64 | 64 | //$APRS=new APRS($Connection->db); |
65 | -$SBS=new SBS(); |
|
66 | -$ACARS=new ACARS($Connection->db); |
|
67 | -$Common=new Common(); |
|
65 | +$SBS = new SBS(); |
|
66 | +$ACARS = new ACARS($Connection->db); |
|
67 | +$Common = new Common(); |
|
68 | 68 | date_default_timezone_set('UTC'); |
69 | 69 | //$servertz = system('date +%Z'); |
70 | 70 | // signal handler - playing nice with sockets and dump1090 |
71 | 71 | if (function_exists('pcntl_fork')) { |
72 | - pcntl_signal(SIGINT, function() { |
|
72 | + pcntl_signal(SIGINT, function() { |
|
73 | 73 | global $sockets; |
74 | 74 | echo "\n\nctrl-c or kill signal received. Tidying up ... "; |
75 | 75 | die("Bye!\n"); |
@@ -112,34 +112,34 @@ discard block |
||
112 | 112 | |
113 | 113 | function connect_all($hosts) { |
114 | 114 | //global $sockets, $formats, $globalDebug,$aprs_connect,$last_exec, $globalSourcesRights, $use_aprs; |
115 | - global $sockets, $globalSources, $globalDebug,$aprs_connect,$last_exec, $globalSourcesRights, $use_aprs; |
|
115 | + global $sockets, $globalSources, $globalDebug, $aprs_connect, $last_exec, $globalSourcesRights, $use_aprs; |
|
116 | 116 | if ($globalDebug) echo 'Connect to all...'."\n"; |
117 | 117 | foreach ($hosts as $id => $value) { |
118 | 118 | $host = $value['host']; |
119 | 119 | $globalSources[$id]['last_exec'] = 0; |
120 | 120 | // Here we check type of source(s) |
121 | - if (filter_var($host,FILTER_VALIDATE_URL) && (!isset($globalSources[$id]['format']) || strtolower($globalSources[$id]['format']) == 'auto')) { |
|
122 | - if (preg_match('/deltadb.txt$/i',$host)) { |
|
121 | + if (filter_var($host, FILTER_VALIDATE_URL) && (!isset($globalSources[$id]['format']) || strtolower($globalSources[$id]['format']) == 'auto')) { |
|
122 | + if (preg_match('/deltadb.txt$/i', $host)) { |
|
123 | 123 | //$formats[$id] = 'deltadbtxt'; |
124 | 124 | $globalSources[$id]['format'] = 'deltadbtxt'; |
125 | 125 | //$last_exec['deltadbtxt'] = 0; |
126 | 126 | if ($globalDebug) echo "Connect to deltadb source (".$host.")...\n"; |
127 | - } else if (preg_match('/vatsim-data.txt$/i',$host)) { |
|
127 | + } else if (preg_match('/vatsim-data.txt$/i', $host)) { |
|
128 | 128 | //$formats[$id] = 'vatsimtxt'; |
129 | 129 | $globalSources[$id]['format'] = 'vatsimtxt'; |
130 | 130 | //$last_exec['vatsimtxt'] = 0; |
131 | 131 | if ($globalDebug) echo "Connect to vatsim source (".$host.")...\n"; |
132 | - } else if (preg_match('/aircraftlist.json$/i',$host)) { |
|
132 | + } else if (preg_match('/aircraftlist.json$/i', $host)) { |
|
133 | 133 | //$formats[$id] = 'aircraftlistjson'; |
134 | 134 | $globalSources[$id]['format'] = 'aircraftlistjson'; |
135 | 135 | //$last_exec['aircraftlistjson'] = 0; |
136 | 136 | if ($globalDebug) echo "Connect to aircraftlist.json source (".$host.")...\n"; |
137 | - } else if (preg_match('/opensky/i',$host)) { |
|
137 | + } else if (preg_match('/opensky/i', $host)) { |
|
138 | 138 | //$formats[$id] = 'aircraftlistjson'; |
139 | 139 | $globalSources[$id]['format'] = 'opensky'; |
140 | 140 | //$last_exec['aircraftlistjson'] = 0; |
141 | 141 | if ($globalDebug) echo "Connect to opensky source (".$host.")...\n"; |
142 | - } else if (preg_match('/radarvirtuel.com\/file.json$/i',$host)) { |
|
142 | + } else if (preg_match('/radarvirtuel.com\/file.json$/i', $host)) { |
|
143 | 143 | //$formats[$id] = 'radarvirtueljson'; |
144 | 144 | $globalSources[$id]['format'] = 'radarvirtueljson'; |
145 | 145 | //$last_exec['radarvirtueljson'] = 0; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | echo '!!! You MUST set $globalSourcesRights = TRUE in settings.php if you have the right to use this feed !!!'."\n"; |
149 | 149 | exit(0); |
150 | 150 | } |
151 | - } else if (preg_match('/planeUpdateFAA.php$/i',$host)) { |
|
151 | + } else if (preg_match('/planeUpdateFAA.php$/i', $host)) { |
|
152 | 152 | //$formats[$id] = 'planeupdatefaa'; |
153 | 153 | $globalSources[$id]['format'] = 'planeupdatefaa'; |
154 | 154 | //$last_exec['planeupdatefaa'] = 0; |
@@ -157,26 +157,26 @@ discard block |
||
157 | 157 | echo '!!! You MUST set $globalSourcesRights = TRUE in settings.php if you have the right to use this feed !!!'."\n"; |
158 | 158 | exit(0); |
159 | 159 | } |
160 | - } else if (preg_match('/\/action.php\/acars\/data$/i',$host)) { |
|
160 | + } else if (preg_match('/\/action.php\/acars\/data$/i', $host)) { |
|
161 | 161 | //$formats[$id] = 'phpvmacars'; |
162 | 162 | $globalSources[$id]['format'] = 'phpvmacars'; |
163 | 163 | //$last_exec['phpvmacars'] = 0; |
164 | 164 | if ($globalDebug) echo "Connect to phpvmacars source (".$host.")...\n"; |
165 | - } else if (preg_match('/VAM-json.php$/i',$host)) { |
|
165 | + } else if (preg_match('/VAM-json.php$/i', $host)) { |
|
166 | 166 | //$formats[$id] = 'phpvmacars'; |
167 | 167 | $globalSources[$id]['format'] = 'vam'; |
168 | 168 | if ($globalDebug) echo "Connect to Vam source (".$host.")...\n"; |
169 | - } else if (preg_match('/whazzup/i',$host)) { |
|
169 | + } else if (preg_match('/whazzup/i', $host)) { |
|
170 | 170 | //$formats[$id] = 'whazzup'; |
171 | 171 | $globalSources[$id]['format'] = 'whazzup'; |
172 | 172 | //$last_exec['whazzup'] = 0; |
173 | 173 | if ($globalDebug) echo "Connect to whazzup source (".$host.")...\n"; |
174 | - } else if (preg_match('/recentpireps/i',$host)) { |
|
174 | + } else if (preg_match('/recentpireps/i', $host)) { |
|
175 | 175 | //$formats[$id] = 'pirepsjson'; |
176 | 176 | $globalSources[$id]['format'] = 'pirepsjson'; |
177 | 177 | //$last_exec['pirepsjson'] = 0; |
178 | 178 | if ($globalDebug) echo "Connect to pirepsjson source (".$host.")...\n"; |
179 | - } else if (preg_match(':data.fr24.com/zones/fcgi/feed.js:i',$host)) { |
|
179 | + } else if (preg_match(':data.fr24.com/zones/fcgi/feed.js:i', $host)) { |
|
180 | 180 | //$formats[$id] = 'fr24json'; |
181 | 181 | $globalSources[$id]['format'] = 'fr24json'; |
182 | 182 | //$last_exec['fr24json'] = 0; |
@@ -186,15 +186,15 @@ discard block |
||
186 | 186 | exit(0); |
187 | 187 | } |
188 | 188 | //} else if (preg_match('/10001/',$host)) { |
189 | - } else if (preg_match('/10001/',$host) || (isset($globalSources[$id]['port']) && $globalSources[$id]['port'] == '10001')) { |
|
189 | + } else if (preg_match('/10001/', $host) || (isset($globalSources[$id]['port']) && $globalSources[$id]['port'] == '10001')) { |
|
190 | 190 | //$formats[$id] = 'tsv'; |
191 | 191 | $globalSources[$id]['format'] = 'tsv'; |
192 | 192 | if ($globalDebug) echo "Connect to tsv source (".$host.")...\n"; |
193 | 193 | } |
194 | - } elseif (filter_var($host,FILTER_VALIDATE_URL)) { |
|
194 | + } elseif (filter_var($host, FILTER_VALIDATE_URL)) { |
|
195 | 195 | if ($globalDebug) echo "Connect to ".$globalSources[$id]['format']." source (".$host.")...\n"; |
196 | - } elseif (!filter_var($host,FILTER_VALIDATE_URL)) { |
|
197 | - $hostport = explode(':',$host); |
|
196 | + } elseif (!filter_var($host, FILTER_VALIDATE_URL)) { |
|
197 | + $hostport = explode(':', $host); |
|
198 | 198 | if (isset($hostport[1])) { |
199 | 199 | $port = $hostport[1]; |
200 | 200 | $hostn = $hostport[0]; |
@@ -203,14 +203,14 @@ discard block |
||
203 | 203 | $hostn = $globalSources[$id]['host']; |
204 | 204 | } |
205 | 205 | if (!isset($globalSources[$id]['format']) || ($globalSources[$id]['format'] != 'acars' && $globalSources[$id]['format'] != 'flightgearsp')) { |
206 | - $s = create_socket($hostn,$port, $errno, $errstr); |
|
206 | + $s = create_socket($hostn, $port, $errno, $errstr); |
|
207 | 207 | } else { |
208 | - $s = create_socket_udp($hostn,$port, $errno, $errstr); |
|
208 | + $s = create_socket_udp($hostn, $port, $errno, $errstr); |
|
209 | 209 | } |
210 | 210 | if ($s) { |
211 | 211 | $sockets[$id] = $s; |
212 | 212 | if (!isset($globalSources[$id]['format']) || strtolower($globalSources[$id]['format']) == 'auto') { |
213 | - if (preg_match('/aprs/',$hostn)) { |
|
213 | + if (preg_match('/aprs/', $hostn)) { |
|
214 | 214 | //$formats[$id] = 'aprs'; |
215 | 215 | $globalSources[$id]['format'] = 'aprs'; |
216 | 216 | //$aprs_connect = 0; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | else if (isset($globalSBS1TimeOut)) $timeout = $globalSBS1TimeOut; |
252 | 252 | else $timeout = 20; |
253 | 253 | $errno = ''; |
254 | -$errstr=''; |
|
254 | +$errstr = ''; |
|
255 | 255 | |
256 | 256 | if (!isset($globalDaemon)) $globalDaemon = TRUE; |
257 | 257 | /* Initiate connections to all the hosts simultaneously */ |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | |
281 | 281 | if ($use_aprs) { |
282 | 282 | require_once(dirname(__FILE__).'/../require/class.APRS.php'); |
283 | - $APRS=new APRS(); |
|
283 | + $APRS = new APRS(); |
|
284 | 284 | $aprs_connect = 0; |
285 | 285 | $aprs_keep = 120; |
286 | 286 | $aprs_last_tx = time(); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | else $aprs_ssid = 'FAM'; |
292 | 292 | //else $aprs_ssid = 'PerlEx'; |
293 | 293 | if (isset($globalAPRSfilter)) $aprs_filter = $globalAPRSfilter; |
294 | - else $aprs_filter = 'r/'.$globalCenterLatitude.'/'.$globalCenterLongitude.'/250.0'; |
|
294 | + else $aprs_filter = 'r/'.$globalCenterLatitude.'/'.$globalCenterLongitude.'/250.0'; |
|
295 | 295 | if ($aprs_full) $aprs_filter = ''; |
296 | 296 | if ($aprs_filter != '') $aprs_login = "user {$aprs_ssid} appid {$aprs_version} filter {$aprs_filter}\n"; |
297 | 297 | else $aprs_login = "user {$aprs_ssid} appid {$aprs_version}\n"; |
@@ -302,12 +302,12 @@ discard block |
||
302 | 302 | sleep(1); |
303 | 303 | if ($globalDebug) echo "SCAN MODE \n\n"; |
304 | 304 | if (!isset($globalCronEnd)) $globalCronEnd = 60; |
305 | -$endtime = time()+$globalCronEnd; |
|
305 | +$endtime = time() + $globalCronEnd; |
|
306 | 306 | $i = 1; |
307 | 307 | $tt = array(); |
308 | 308 | // Delete all ATC |
309 | 309 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
310 | - $ATC=new ATC($Connection->db); |
|
310 | + $ATC = new ATC($Connection->db); |
|
311 | 311 | } |
312 | 312 | if (!$globalDaemon && ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM))) { |
313 | 313 | $ATC->deleteAll(); |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | |
316 | 316 | // Infinite loop if daemon, else work for time defined in $globalCronEnd or only one time. |
317 | 317 | while ($i > 0) { |
318 | - if (!$globalDaemon) $i = $endtime-time(); |
|
318 | + if (!$globalDaemon) $i = $endtime - time(); |
|
319 | 319 | // Delete old ATC |
320 | 320 | if ($globalDaemon && ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM))) { |
321 | 321 | if ($globalDebug) echo 'Delete old ATC...'."\n"; |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | if ($max != $globalMinFetch) { |
331 | 331 | if ($globalDebug) echo 'Sleeping...'."\n"; |
332 | - sleep($globalMinFetch-$max+2); |
|
332 | + sleep($globalMinFetch - $max + 2); |
|
333 | 333 | } |
334 | 334 | } |
335 | 335 | |
@@ -340,8 +340,8 @@ discard block |
||
340 | 340 | if ($value['format'] == 'deltadbtxt' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
341 | 341 | //$buffer = $Common->getData($hosts[$id]); |
342 | 342 | $buffer = $Common->getData($value['host']); |
343 | - $buffer=trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'\n',$buffer)); |
|
344 | - $buffer = explode('\n',$buffer); |
|
343 | + $buffer = trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '\n', $buffer)); |
|
344 | + $buffer = explode('\n', $buffer); |
|
345 | 345 | foreach ($buffer as $line) { |
346 | 346 | if ($line != '' && count($line) > 7) { |
347 | 347 | $line = explode(',', $line); |
@@ -370,8 +370,8 @@ discard block |
||
370 | 370 | } elseif (($value['format'] == 'whazzup' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) || ($value['format'] == 'vatsimtxt' && (time() - $value[' last_exec'] > $globalMinFetch))) { |
371 | 371 | //$buffer = $Common->getData($hosts[$id]); |
372 | 372 | $buffer = $Common->getData($value['host']); |
373 | - $buffer=trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'\n',$buffer)); |
|
374 | - $buffer = explode('\n',$buffer); |
|
373 | + $buffer = trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '\n', $buffer)); |
|
374 | + $buffer = explode('\n', $buffer); |
|
375 | 375 | foreach ($buffer as $line) { |
376 | 376 | if ($line != '') { |
377 | 377 | $line = explode(':', $line); |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | $data['id'] = $line[1].'-'.$line[0]; |
381 | 381 | $data['pilot_id'] = $line[1]; |
382 | 382 | $data['pilot_name'] = $line[2]; |
383 | - $data['hex'] = str_pad(dechex($line[1]),6,'000000',STR_PAD_LEFT); |
|
383 | + $data['hex'] = str_pad(dechex($line[1]), 6, '000000', STR_PAD_LEFT); |
|
384 | 384 | $data['ident'] = $line[0]; // ident |
385 | 385 | if ($line[7] != '' && $line[7] != 0) $data['altitude'] = $line[7]; // altitude |
386 | 386 | $data['speed'] = $line[8]; // speed |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | //$data['datetime'] = date('Y-m-d H:i:s',strtotime($line[37])); |
397 | 397 | if (isset($line[37])) $data['last_update'] = $line[37]; |
398 | 398 | $data['departure_airport_icao'] = $line[11]; |
399 | - $data['departure_airport_time'] = rtrim(chunk_split($line[22],2,':'),':'); |
|
399 | + $data['departure_airport_time'] = rtrim(chunk_split($line[22], 2, ':'), ':'); |
|
400 | 400 | $data['arrival_airport_icao'] = $line[13]; |
401 | 401 | $data['frequency'] = $line[4]; |
402 | 402 | $data['type'] = $line[18]; |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | $data['id_source'] = $id_source; |
406 | 406 | //$data['arrival_airport_time'] = ; |
407 | 407 | if ($line[9] != '') { |
408 | - $aircraft_data = explode('/',$line[9]); |
|
408 | + $aircraft_data = explode('/', $line[9]); |
|
409 | 409 | if (isset($aircraft_data[1])) { |
410 | 410 | $data['aircraft_icao'] = $aircraft_data[1]; |
411 | 411 | } |
@@ -419,9 +419,9 @@ discard block |
||
419 | 419 | if ($line[3] == 'PILOT') $SI->add($data); |
420 | 420 | elseif ($line[3] == 'ATC') { |
421 | 421 | //print_r($data); |
422 | - $data['info'] = str_replace('^§','<br />',$data['info']); |
|
423 | - $data['info'] = str_replace('&sect;','',$data['info']); |
|
424 | - $typec = substr($data['ident'],-3); |
|
422 | + $data['info'] = str_replace('^§', '<br />', $data['info']); |
|
423 | + $data['info'] = str_replace('&sect;', '', $data['info']); |
|
424 | + $typec = substr($data['ident'], -3); |
|
425 | 425 | if ($typec == 'APP') $data['type'] = 'Approach'; |
426 | 426 | elseif ($typec == 'TWR') $data['type'] = 'Tower'; |
427 | 427 | elseif ($typec == 'OBS') $data['type'] = 'Observer'; |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | elseif ($typec == 'CTR') $data['type'] = 'Control Radar or Centre'; |
433 | 433 | elseif ($data['type'] == '') $data['type'] = 'Observer'; |
434 | 434 | if (!isset($data['source_name'])) $data['source_name'] = ''; |
435 | - echo $ATC->add($data['ident'],$data['frequency'],$data['latitude'],$data['longitude'],$data['range'],$data['info'],$data['datetime'],$data['type'],$data['pilot_id'],$data['pilot_name'],$data['format_source'],$data['source_name']); |
|
435 | + echo $ATC->add($data['ident'], $data['frequency'], $data['latitude'], $data['longitude'], $data['range'], $data['info'], $data['datetime'], $data['type'], $data['pilot_id'], $data['pilot_name'], $data['format_source'], $data['source_name']); |
|
436 | 436 | } |
437 | 437 | unset($data); |
438 | 438 | } |
@@ -443,9 +443,9 @@ discard block |
||
443 | 443 | $last_exec[$id]['last'] = time(); |
444 | 444 | //} elseif ($value == 'aircraftlistjson' && (time() - $last_exec['aircraftlistjson'] > $globalMinFetch)) { |
445 | 445 | } elseif ($value['format'] == 'aircraftlistjson' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
446 | - $buffer = $Common->getData($value['host'],'get','','','','','20'); |
|
446 | + $buffer = $Common->getData($value['host'], 'get', '', '', '', '', '20'); |
|
447 | 447 | if ($buffer != '') { |
448 | - $all_data = json_decode($buffer,true); |
|
448 | + $all_data = json_decode($buffer, true); |
|
449 | 449 | if (isset($all_data['acList'])) { |
450 | 450 | foreach ($all_data['acList'] as $line) { |
451 | 451 | $data = array(); |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | //} elseif ($value == 'planeupdatefaa' && (time() - $last_exec['planeupdatefaa'] > $globalMinFetch)) { |
500 | 500 | } elseif ($value['format'] == 'planeupdatefaa' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
501 | 501 | $buffer = $Common->getData($value['host']); |
502 | - $all_data = json_decode($buffer,true); |
|
502 | + $all_data = json_decode($buffer, true); |
|
503 | 503 | if (isset($all_data['planes'])) { |
504 | 504 | foreach ($all_data['planes'] as $key => $line) { |
505 | 505 | $data = array(); |
@@ -515,12 +515,12 @@ discard block |
||
515 | 515 | $data['emergency'] = ''; // emergency |
516 | 516 | $data['registration'] = $line[2]; |
517 | 517 | $data['aircraft_icao'] = $line[0]; |
518 | - $deparr = explode('-',$line[1]); |
|
518 | + $deparr = explode('-', $line[1]); |
|
519 | 519 | if (count($deparr) == 2) { |
520 | 520 | $data['departure_airport_icao'] = $deparr[0]; |
521 | 521 | $data['arrival_airport_icao'] = $deparr[1]; |
522 | 522 | } |
523 | - $data['datetime'] = date('Y-m-d H:i:s',$line[9]); |
|
523 | + $data['datetime'] = date('Y-m-d H:i:s', $line[9]); |
|
524 | 524 | $data['format_source'] = 'planeupdatefaa'; |
525 | 525 | $data['id_source'] = $id_source; |
526 | 526 | if (isset($value['name']) && $value['name'] != '') $data['source_name'] = $value['name']; |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | $last_exec[$id]['last'] = time(); |
533 | 533 | } elseif ($value['format'] == 'opensky' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
534 | 534 | $buffer = $Common->getData($value['host']); |
535 | - $all_data = json_decode($buffer,true); |
|
535 | + $all_data = json_decode($buffer, true); |
|
536 | 536 | if (isset($all_data['states'])) { |
537 | 537 | foreach ($all_data['states'] as $key => $line) { |
538 | 538 | $data = array(); |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | //$data['emergency'] = ''; // emergency |
549 | 549 | //$data['registration'] = $line[2]; |
550 | 550 | //$data['aircraft_icao'] = $line[0]; |
551 | - $data['datetime'] = date('Y-m-d H:i:s',$line[3]); |
|
551 | + $data['datetime'] = date('Y-m-d H:i:s', $line[3]); |
|
552 | 552 | $data['format_source'] = 'opensky'; |
553 | 553 | $data['id_source'] = $id_source; |
554 | 554 | $SI->add($data); |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | } elseif ($value['format'] == 'fr24json' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
562 | 562 | //$buffer = $Common->getData($hosts[$id]); |
563 | 563 | $buffer = $Common->getData($value['host']); |
564 | - $all_data = json_decode($buffer,true); |
|
564 | + $all_data = json_decode($buffer, true); |
|
565 | 565 | foreach ($all_data as $key => $line) { |
566 | 566 | if ($key != 'full_count' && $key != 'version' && $key != 'stats') { |
567 | 567 | $data = array(); |
@@ -592,11 +592,11 @@ discard block |
||
592 | 592 | //} elseif ($value == 'radarvirtueljson' && (time() - $last_exec['radarvirtueljson'] > $globalMinFetch)) { |
593 | 593 | } elseif ($value['format'] == 'radarvirtueljson' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
594 | 594 | //$buffer = $Common->getData($hosts[$id],'get','','','','','150'); |
595 | - $buffer = $Common->getData($value['host'],'get','','','','','150'); |
|
595 | + $buffer = $Common->getData($value['host'], 'get', '', '', '', '', '150'); |
|
596 | 596 | //echo $buffer; |
597 | - $buffer = str_replace(array("\n","\r"),"",$buffer); |
|
598 | - $buffer = preg_replace('/,"num":(.+)/','}',$buffer); |
|
599 | - $all_data = json_decode($buffer,true); |
|
597 | + $buffer = str_replace(array("\n", "\r"), "", $buffer); |
|
598 | + $buffer = preg_replace('/,"num":(.+)/', '}', $buffer); |
|
599 | + $all_data = json_decode($buffer, true); |
|
600 | 600 | if (json_last_error() != JSON_ERROR_NONE) { |
601 | 601 | die(json_last_error_msg()); |
602 | 602 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | //$data['departure_airport_iata'] = $line[11]; |
619 | 619 | //$data['arrival_airport_iata'] = $line[12]; |
620 | 620 | //$data['emergency'] = ''; // emergency |
621 | - $data['datetime'] = date('Y-m-d H:i:s',$line['inf']['dt']); //$line[10] |
|
621 | + $data['datetime'] = date('Y-m-d H:i:s', $line['inf']['dt']); //$line[10] |
|
622 | 622 | $data['format_source'] = 'radarvirtueljson'; |
623 | 623 | $data['id_source'] = $id_source; |
624 | 624 | if (isset($value['name']) && $value['name'] != '') $data['source_name'] = $value['name']; |
@@ -633,13 +633,13 @@ discard block |
||
633 | 633 | } elseif ($value['format'] == 'pirepsjson' && (time() - $last_exec[$id]['last'] > $globalMinFetch)) { |
634 | 634 | //$buffer = $Common->getData($hosts[$id]); |
635 | 635 | $buffer = $Common->getData($value['host'].'?'.time()); |
636 | - $all_data = json_decode(utf8_encode($buffer),true); |
|
636 | + $all_data = json_decode(utf8_encode($buffer), true); |
|
637 | 637 | |
638 | 638 | if (isset($all_data['pireps'])) { |
639 | 639 | foreach ($all_data['pireps'] as $line) { |
640 | 640 | $data = array(); |
641 | 641 | $data['id'] = $line['id']; |
642 | - $data['hex'] = substr(str_pad(dechex($line['id']),6,'000000',STR_PAD_LEFT),0,6); |
|
642 | + $data['hex'] = substr(str_pad(dechex($line['id']), 6, '000000', STR_PAD_LEFT), 0, 6); |
|
643 | 643 | $data['ident'] = $line['callsign']; // ident |
644 | 644 | if (isset($line['pilotid'])) $data['pilot_id'] = $line['pilotid']; // pilot id |
645 | 645 | if (isset($line['name'])) $data['pilot_name'] = $line['name']; // pilot name |
@@ -668,9 +668,9 @@ discard block |
||
668 | 668 | $SI->add($data); |
669 | 669 | // print_r($data); |
670 | 670 | } elseif ($line['icon'] == 'ct') { |
671 | - $data['info'] = str_replace('^§','<br />',$data['info']); |
|
672 | - $data['info'] = str_replace('&sect;','',$data['info']); |
|
673 | - $typec = substr($data['ident'],-3); |
|
671 | + $data['info'] = str_replace('^§', '<br />', $data['info']); |
|
672 | + $data['info'] = str_replace('&sect;', '', $data['info']); |
|
673 | + $typec = substr($data['ident'], -3); |
|
674 | 674 | $data['type'] = ''; |
675 | 675 | if ($typec == 'APP') $data['type'] = 'Approach'; |
676 | 676 | elseif ($typec == 'TWR') $data['type'] = 'Tower'; |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | elseif ($typec == 'FSS') $data['type'] = 'Flight Service Station'; |
682 | 682 | elseif ($typec == 'CTR') $data['type'] = 'Control Radar or Centre'; |
683 | 683 | else $data['type'] = 'Observer'; |
684 | - echo $ATC->add($data['ident'],'',$data['latitude'],$data['longitude'],'0',$data['info'],$data['datetime'],$data['type'],$data['pilot_id'],$data['pilot_name'],$data['format_source']); |
|
684 | + echo $ATC->add($data['ident'], '', $data['latitude'], $data['longitude'], '0', $data['info'], $data['datetime'], $data['type'], $data['pilot_id'], $data['pilot_name'], $data['format_source']); |
|
685 | 685 | } |
686 | 686 | unset($data); |
687 | 687 | } |
@@ -693,13 +693,13 @@ discard block |
||
693 | 693 | //$buffer = $Common->getData($hosts[$id]); |
694 | 694 | if ($globalDebug) echo 'Get Data...'."\n"; |
695 | 695 | $buffer = $Common->getData($value['host']); |
696 | - $all_data = json_decode($buffer,true); |
|
696 | + $all_data = json_decode($buffer, true); |
|
697 | 697 | if ($buffer != '' && is_array($all_data)) { |
698 | 698 | foreach ($all_data as $line) { |
699 | 699 | $data = array(); |
700 | 700 | //$data['id'] = $line['id']; // id not usable |
701 | 701 | if (isset($line['pilotid'])) $data['id'] = $line['pilotid'].$line['flightnum']; |
702 | - $data['hex'] = substr(str_pad(bin2hex($line['flightnum']),6,'000000',STR_PAD_LEFT),-6); // hex |
|
702 | + $data['hex'] = substr(str_pad(bin2hex($line['flightnum']), 6, '000000', STR_PAD_LEFT), -6); // hex |
|
703 | 703 | if (isset($line['pilotname'])) $data['pilot_name'] = $line['pilotname']; |
704 | 704 | if (isset($line['pilotid'])) $data['pilot_id'] = $line['pilotid']; |
705 | 705 | $data['ident'] = $line['flightnum']; // ident |
@@ -722,12 +722,12 @@ discard block |
||
722 | 722 | if (isset($line['route'])) $data['waypoints'] = $line['route']; // route |
723 | 723 | if (isset($line['aircraftname'])) { |
724 | 724 | $line['aircraftname'] = strtoupper($line['aircraftname']); |
725 | - $line['aircraftname'] = str_replace('BOEING ','B',$line['aircraftname']); |
|
726 | - $aircraft_data = explode('-',$line['aircraftname']); |
|
725 | + $line['aircraftname'] = str_replace('BOEING ', 'B', $line['aircraftname']); |
|
726 | + $aircraft_data = explode('-', $line['aircraftname']); |
|
727 | 727 | if (isset($aircraft_data[1]) && strlen($aircraft_data[0]) < 5) $data['aircraft_icao'] = $aircraft_data[0]; |
728 | 728 | elseif (isset($aircraft_data[1]) && strlen($aircraft_data[1]) < 5) $data['aircraft_icao'] = $aircraft_data[1]; |
729 | 729 | else { |
730 | - $aircraft_data = explode(' ',$line['aircraftname']); |
|
730 | + $aircraft_data = explode(' ', $line['aircraftname']); |
|
731 | 731 | if (isset($aircraft_data[1])) $data['aircraft_icao'] = $aircraft_data[1]; |
732 | 732 | else $data['aircraft_icao'] = $line['aircraftname']; |
733 | 733 | } |
@@ -749,13 +749,13 @@ discard block |
||
749 | 749 | //$buffer = $Common->getData($hosts[$id]); |
750 | 750 | if ($globalDebug) echo 'Get Data...'."\n"; |
751 | 751 | $buffer = $Common->getData($value['host']); |
752 | - $all_data = json_decode($buffer,true); |
|
752 | + $all_data = json_decode($buffer, true); |
|
753 | 753 | if ($buffer != '' && is_array($all_data)) { |
754 | 754 | foreach ($all_data as $line) { |
755 | 755 | $data = array(); |
756 | 756 | //$data['id'] = $line['id']; // id not usable |
757 | 757 | $data['id'] = trim($line['flight_id']); |
758 | - $data['hex'] = substr(str_pad(bin2hex($line['callsign']),6,'000000',STR_PAD_LEFT),-6); // hex |
|
758 | + $data['hex'] = substr(str_pad(bin2hex($line['callsign']), 6, '000000', STR_PAD_LEFT), -6); // hex |
|
759 | 759 | $data['pilot_name'] = $line['pilot_name']; |
760 | 760 | $data['pilot_id'] = $line['pilot_id']; |
761 | 761 | $data['ident'] = trim($line['callsign']); // ident |
@@ -805,9 +805,9 @@ discard block |
||
805 | 805 | //$value = $formats[$nb]; |
806 | 806 | $format = $globalSources[$nb]['format']; |
807 | 807 | if ($format == 'sbs' || $format == 'aprs' || $format == 'raw' || $format == 'tsv' || $format == 'acarssbs3') { |
808 | - $buffer = socket_read($r, 6000,PHP_NORMAL_READ); |
|
808 | + $buffer = socket_read($r, 6000, PHP_NORMAL_READ); |
|
809 | 809 | } else { |
810 | - $az = socket_recvfrom($r,$buffer,6000,0,$remote_ip,$remote_port); |
|
810 | + $az = socket_recvfrom($r, $buffer, 6000, 0, $remote_ip, $remote_port); |
|
811 | 811 | } |
812 | 812 | //$buffer = socket_read($r, 60000,PHP_NORMAL_READ); |
813 | 813 | //echo $buffer."\n"; |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | //if (function_exists('pcntl_fork')) pcntl_signal_dispatch(); |
816 | 816 | $error = false; |
817 | 817 | //$SI::del(); |
818 | - $buffer=trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$buffer)); |
|
818 | + $buffer = trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '', $buffer)); |
|
819 | 819 | // SBS format is CSV format |
820 | 820 | if ($buffer != '') { |
821 | 821 | $tt[$format] = 0; |
@@ -836,10 +836,10 @@ discard block |
||
836 | 836 | } elseif ($format == 'flightgearsp') { |
837 | 837 | //echo $buffer."\n"; |
838 | 838 | if (strlen($buffer) > 5) { |
839 | - $line = explode(',',$buffer); |
|
839 | + $line = explode(',', $buffer); |
|
840 | 840 | $data = array(); |
841 | 841 | //XGPS,2.0947,41.3093,-3047.6953,198.930,0.000,callsign,c172p |
842 | - $data['hex'] = substr(str_pad(bin2hex($line[6].$line[7]),6,'000000',STR_PAD_LEFT),0,6); |
|
842 | + $data['hex'] = substr(str_pad(bin2hex($line[6].$line[7]), 6, '000000', STR_PAD_LEFT), 0, 6); |
|
843 | 843 | $data['ident'] = $line[6]; |
844 | 844 | $data['aircraft_name'] = $line[7]; |
845 | 845 | $data['longitude'] = $line[1]; |
@@ -850,21 +850,21 @@ discard block |
||
850 | 850 | $data['datetime'] = date('Y-m-d H:i:s'); |
851 | 851 | $data['format_source'] = 'flightgearsp'; |
852 | 852 | if (($data['latitude'] == '' && $data['longitude'] == '') || (is_numeric($data['latitude']) && is_numeric($data['longitude']))) $SI->add($data); |
853 | - $send = @ socket_send( $r , $data_aprs , strlen($data_aprs) , 0 ); |
|
853 | + $send = @ socket_send($r, $data_aprs, strlen($data_aprs), 0); |
|
854 | 854 | } |
855 | 855 | } elseif ($format == 'acars') { |
856 | 856 | if ($globalDebug) echo 'ACARS : '.$buffer."\n"; |
857 | 857 | $ACARS->add(trim($buffer)); |
858 | - socket_sendto($r, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port); |
|
858 | + socket_sendto($r, "OK ".$buffer, 100, 0, $remote_ip, $remote_port); |
|
859 | 859 | $ACARS->deleteLiveAcarsData(); |
860 | 860 | } elseif ($format == 'flightgearmp') { |
861 | - if (substr($buffer,0,1) != '#') { |
|
861 | + if (substr($buffer, 0, 1) != '#') { |
|
862 | 862 | $data = array(); |
863 | 863 | //echo $buffer."\n"; |
864 | - $line = explode(' ',$buffer); |
|
864 | + $line = explode(' ', $buffer); |
|
865 | 865 | if (count($line) == 11) { |
866 | - $userserver = explode('@',$line[0]); |
|
867 | - $data['hex'] = substr(str_pad(bin2hex($line[0]),6,'000000',STR_PAD_LEFT),0,6); // hex |
|
866 | + $userserver = explode('@', $line[0]); |
|
867 | + $data['hex'] = substr(str_pad(bin2hex($line[0]), 6, '000000', STR_PAD_LEFT), 0, 6); // hex |
|
868 | 868 | $data['ident'] = $userserver[0]; |
869 | 869 | $data['registration'] = $userserver[0]; |
870 | 870 | $data['latitude'] = $line[4]; |
@@ -872,24 +872,24 @@ discard block |
||
872 | 872 | $data['altitude'] = $line[6]; |
873 | 873 | $data['datetime'] = date('Y-m-d H:i:s'); |
874 | 874 | $aircraft_type = $line[10]; |
875 | - $aircraft_type = preg_split(':/:',$aircraft_type); |
|
876 | - $data['aircraft_name'] = substr(end($aircraft_type),0,-4); |
|
875 | + $aircraft_type = preg_split(':/:', $aircraft_type); |
|
876 | + $data['aircraft_name'] = substr(end($aircraft_type), 0, -4); |
|
877 | 877 | if (($data['latitude'] == '' && $data['longitude'] == '') || (is_numeric($data['latitude']) && is_numeric($data['longitude']))) $SI->add($data); |
878 | 878 | } |
879 | 879 | } |
880 | 880 | } elseif ($format == 'beast') { |
881 | 881 | echo 'Beast Binary format not yet supported. Beast AVR format is supported in alpha state'."\n"; |
882 | 882 | die; |
883 | - } elseif ($format == 'tsv' || substr($buffer,0,4) == 'clock') { |
|
883 | + } elseif ($format == 'tsv' || substr($buffer, 0, 4) == 'clock') { |
|
884 | 884 | $line = explode("\t", $buffer); |
885 | - for($k = 0; $k < count($line); $k=$k+2) { |
|
885 | + for ($k = 0; $k < count($line); $k = $k + 2) { |
|
886 | 886 | $key = $line[$k]; |
887 | - $lined[$key] = $line[$k+1]; |
|
887 | + $lined[$key] = $line[$k + 1]; |
|
888 | 888 | } |
889 | 889 | if (count($lined) > 3) { |
890 | 890 | $data['hex'] = $lined['hexid']; |
891 | 891 | //$data['datetime'] = date('Y-m-d H:i:s',strtotime($lined['clock']));; |
892 | - $data['datetime'] = date('Y-m-d H:i:s');; |
|
892 | + $data['datetime'] = date('Y-m-d H:i:s'); ; |
|
893 | 893 | if (isset($lined['ident'])) $data['ident'] = $lined['ident']; |
894 | 894 | if (isset($lined['lat'])) $data['latitude'] = $lined['lat']; |
895 | 895 | if (isset($lined['lon'])) $data['longitude'] = $lined['lon']; |
@@ -907,24 +907,24 @@ discard block |
||
907 | 907 | } else $error = true; |
908 | 908 | } elseif ($format == 'aprs' && $use_aprs) { |
909 | 909 | if ($aprs_connect == 0) { |
910 | - $send = @ socket_send( $r , $aprs_login , strlen($aprs_login) , 0 ); |
|
910 | + $send = @ socket_send($r, $aprs_login, strlen($aprs_login), 0); |
|
911 | 911 | $aprs_connect = 1; |
912 | 912 | } |
913 | - if ( $aprs_keep>60 && time() - $aprs_last_tx > $aprs_keep ) { |
|
913 | + if ($aprs_keep > 60 && time() - $aprs_last_tx > $aprs_keep) { |
|
914 | 914 | $aprs_last_tx = time(); |
915 | 915 | $data_aprs = "# Keep alive"; |
916 | - $send = @ socket_send( $r , $data_aprs , strlen($data_aprs) , 0 ); |
|
916 | + $send = @ socket_send($r, $data_aprs, strlen($data_aprs), 0); |
|
917 | 917 | } |
918 | 918 | //echo 'Connect : '.$aprs_connect.' '.$buffer."\n"; |
919 | - $buffer = str_replace('APRS <- ','',$buffer); |
|
920 | - $buffer = str_replace('APRS -> ','',$buffer); |
|
921 | - if (substr($buffer,0,1) != '#' && substr($buffer,0,1) != '@' && substr($buffer,0,5) != 'APRS ') { |
|
919 | + $buffer = str_replace('APRS <- ', '', $buffer); |
|
920 | + $buffer = str_replace('APRS -> ', '', $buffer); |
|
921 | + if (substr($buffer, 0, 1) != '#' && substr($buffer, 0, 1) != '@' && substr($buffer, 0, 5) != 'APRS ') { |
|
922 | 922 | $line = $APRS->parse($buffer); |
923 | 923 | if (is_array($line) && isset($line['address']) && $line['address'] != '' && isset($line['ident'])) { |
924 | 924 | $data = array(); |
925 | 925 | //print_r($line); |
926 | 926 | $data['hex'] = $line['address']; |
927 | - $data['datetime'] = date('Y-m-d H:i:s',$line['timestamp']); |
|
927 | + $data['datetime'] = date('Y-m-d H:i:s', $line['timestamp']); |
|
928 | 928 | //$data['datetime'] = date('Y-m-d H:i:s'); |
929 | 929 | $data['ident'] = $line['ident']; |
930 | 930 | $data['latitude'] = $line['latitude']; |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | $currentdate = date('Y-m-d H:i:s'); |
945 | 945 | $aprsdate = strtotime($data['datetime']); |
946 | 946 | // Accept data if time <= system time + 20s |
947 | - if ($line['stealth'] == 0 && (strtotime($data['datetime']) <= strtotime($currentdate)+20) && (($data['latitude'] == '' && $data['longitude'] == '') || (is_numeric($data['latitude']) && is_numeric($data['longitude'])))) $send = $SI->add($data); |
|
947 | + if ($line['stealth'] == 0 && (strtotime($data['datetime']) <= strtotime($currentdate) + 20) && (($data['latitude'] == '' && $data['longitude'] == '') || (is_numeric($data['latitude']) && is_numeric($data['longitude'])))) $send = $SI->add($data); |
|
948 | 948 | else { |
949 | 949 | if ($line['stealth'] != 0) echo '-------- '.$data['ident'].' : APRS stealth ON => not adding'."\n"; |
950 | 950 | else echo '--------- '.$data['ident'].' : Date APRS : '.$data['datetime'].' - Current date : '.$currentdate.' => not adding future event'."\n"; |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | connect_all($sourceee); |
1030 | 1030 | $sourceee = array(); |
1031 | 1031 | //connect_all($globalSources); |
1032 | - $tt[$format]=0; |
|
1032 | + $tt[$format] = 0; |
|
1033 | 1033 | break; |
1034 | 1034 | } |
1035 | 1035 | } |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | } |
1038 | 1038 | } else { |
1039 | 1039 | $error = socket_strerror(socket_last_error()); |
1040 | - if ($globalDebug) echo "ERROR : socket_select give this error ".$error . "\n"; |
|
1040 | + if ($globalDebug) echo "ERROR : socket_select give this error ".$error."\n"; |
|
1041 | 1041 | if (($error != SOCKET_EINPROGRESS && $error != SOCKET_EALREADY && $error != 'Success') || time() - $time >= $timeout) { |
1042 | 1042 | if (isset($globalDebug)) echo "Restarting...\n"; |
1043 | 1043 | // Restart the script if possible |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | if ($globalDebug) echo "Shutdown all sockets..."; |
1046 | 1046 | |
1047 | 1047 | foreach ($sockets as $sock) { |
1048 | - @socket_shutdown($sock,2); |
|
1048 | + @socket_shutdown($sock, 2); |
|
1049 | 1049 | @socket_close($sock); |
1050 | 1050 | } |
1051 | 1051 |
@@ -13,45 +13,45 @@ discard block |
||
13 | 13 | * @param Array $filter the filter |
14 | 14 | * @return Array the SQL part |
15 | 15 | */ |
16 | - public function getFilter($filter = array(),$where = false,$and = false) { |
|
16 | + public function getFilter($filter = array(), $where = false, $and = false) { |
|
17 | 17 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
18 | 18 | $filters = array(); |
19 | 19 | if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) { |
20 | 20 | if (isset($globalStatsFilters[$globalFilterName][0]['source'])) { |
21 | 21 | $filters = $globalStatsFilters[$globalFilterName]; |
22 | 22 | } else { |
23 | - $filter = array_merge($filter,$globalStatsFilters[$globalFilterName]); |
|
23 | + $filter = array_merge($filter, $globalStatsFilters[$globalFilterName]); |
|
24 | 24 | } |
25 | 25 | } |
26 | - if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter); |
|
26 | + if (is_array($globalFilter)) $filter = array_merge($filter, $globalFilter); |
|
27 | 27 | $filter_query_join = ''; |
28 | 28 | $filter_query_where = ''; |
29 | - foreach($filters as $flt) { |
|
29 | + foreach ($filters as $flt) { |
|
30 | 30 | if (isset($flt['airlines']) && !empty($flt['airlines'])) { |
31 | 31 | if ($flt['airlines'][0] != '') { |
32 | 32 | if (isset($flt['source'])) { |
33 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','",$flt['airlines'])."') AND spotter_archive_output.format_source IN ('".implode("','",$flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
33 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','", $flt['airlines'])."') AND spotter_archive_output.format_source IN ('".implode("','", $flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
34 | 34 | } else { |
35 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','",$flt['airlines'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
35 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','", $flt['airlines'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | 39 | if (isset($flt['pilots_id']) && !empty($flt['pilots_id'])) { |
40 | 40 | if (isset($flt['source'])) { |
41 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','",$flt['pilots_id'])."') AND spotter_archive_output.format_source IN ('".implode("','",$flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
41 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','", $flt['pilots_id'])."') AND spotter_archive_output.format_source IN ('".implode("','", $flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
42 | 42 | } else { |
43 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','",$flt['pilots_id'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
43 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','", $flt['pilots_id'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | if ((isset($flt['airlines']) && empty($flt['airlines']) && isset($flt['pilots_id']) && empty($flt['pilots_id'])) || (!isset($flt['airlines']) && !isset($flt['pilots_id']))) { |
47 | 47 | if (isset($flt['source'])) { |
48 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_output WHERE spotter_output.format_source IN ('".implode("','",$flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
48 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_output WHERE spotter_output.format_source IN ('".implode("','", $flt['source'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
52 | 52 | if (isset($filter['airlines']) && !empty($filter['airlines'])) { |
53 | 53 | if ($filter['airlines'][0] != '') { |
54 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','",$filter['airlines'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
54 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','", $filter['airlines'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_type = '".$filter['airlinestype']."') sa ON sa.flightaware_id = spotter_archive_output.flightaware_id "; |
60 | 60 | } |
61 | 61 | if (isset($filter['pilots_id']) && !empty($filter['pilots_id'])) { |
62 | - $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','",$filter['pilots_id'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
62 | + $filter_query_join .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.pilot_id IN ('".implode("','", $filter['pilots_id'])."')) so ON so.flightaware_id = spotter_archive_output.flightaware_id"; |
|
63 | 63 | } |
64 | 64 | if (isset($filter['source']) && !empty($filter['source'])) { |
65 | - $filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')"; |
|
65 | + $filter_query_where = " WHERE format_source IN ('".implode("','", $filter['source'])."')"; |
|
66 | 66 | } |
67 | 67 | if (isset($filter['ident']) && !empty($filter['ident'])) { |
68 | 68 | $filter_query_where = " WHERE ident = '".$filter['ident']."'"; |
69 | 69 | } |
70 | 70 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
71 | 71 | if ($filter_query_where == '') { |
72 | - $filter_query_where = " WHERE format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
|
72 | + $filter_query_where = " WHERE format_source = 'aprs' AND source_name IN ('".implode("','", $filter['source_aprs'])."')"; |
|
73 | 73 | } else { |
74 | - $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
|
74 | + $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','", $filter['source_aprs'])."')"; |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE'; |
@@ -81,28 +81,28 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | // Spotter_archive |
84 | - public function addSpotterArchiveData($flightaware_id = '', $ident = '', $registration = '', $airline_name = '', $airline_icao = '', $airline_country = '', $airline_type = '', $aircraft_icao = '', $aircraft_shadow = '', $aircraft_name = '', $aircraft_manufacturer = '', $departure_airport_icao = '', $departure_airport_name = '', $departure_airport_city = '', $departure_airport_country = '', $departure_airport_time = '',$arrival_airport_icao = '', $arrival_airport_name = '', $arrival_airport_city ='', $arrival_airport_country = '', $arrival_airport_time = '', $route_stop = '', $date = '',$latitude = '', $longitude = '', $waypoints = '', $altitude = '', $heading = '', $ground_speed = '', $squawk = '', $ModeS = '', $pilot_id = '', $pilot_name = '',$verticalrate = '',$format_source = '', $source_name = '', $over_country = '') { |
|
84 | + public function addSpotterArchiveData($flightaware_id = '', $ident = '', $registration = '', $airline_name = '', $airline_icao = '', $airline_country = '', $airline_type = '', $aircraft_icao = '', $aircraft_shadow = '', $aircraft_name = '', $aircraft_manufacturer = '', $departure_airport_icao = '', $departure_airport_name = '', $departure_airport_city = '', $departure_airport_country = '', $departure_airport_time = '', $arrival_airport_icao = '', $arrival_airport_name = '', $arrival_airport_city = '', $arrival_airport_country = '', $arrival_airport_time = '', $route_stop = '', $date = '', $latitude = '', $longitude = '', $waypoints = '', $altitude = '', $heading = '', $ground_speed = '', $squawk = '', $ModeS = '', $pilot_id = '', $pilot_name = '', $verticalrate = '', $format_source = '', $source_name = '', $over_country = '') { |
|
85 | 85 | require_once(dirname(__FILE__).'/class.Spotter.php'); |
86 | 86 | if ($over_country == '') { |
87 | 87 | $Spotter = new Spotter($this->db); |
88 | - $data_country = $Spotter->getCountryFromLatitudeLongitude($latitude,$longitude); |
|
88 | + $data_country = $Spotter->getCountryFromLatitudeLongitude($latitude, $longitude); |
|
89 | 89 | if (!empty($data_country)) $country = $data_country['iso2']; |
90 | 90 | else $country = ''; |
91 | 91 | } else $country = $over_country; |
92 | - if ($airline_type === NULL) $airline_type =''; |
|
92 | + if ($airline_type === NULL) $airline_type = ''; |
|
93 | 93 | |
94 | 94 | //if ($country == '') echo "\n".'************ UNKNOW COUNTRY ****************'."\n"; |
95 | 95 | //else echo "\n".'*/*/*/*/*/*/*/ Country : '.$country.' */*/*/*/*/*/*/*/*/'."\n"; |
96 | 96 | |
97 | 97 | // Route is not added in spotter_archive |
98 | - $query = "INSERT INTO spotter_archive (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_shadow, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, departure_airport_time,arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, arrival_airport_time, route_stop, date,latitude, longitude, waypoints, altitude, heading, ground_speed, squawk, ModeS, pilot_id, pilot_name, verticalrate,format_source,over_country,source_name) |
|
98 | + $query = "INSERT INTO spotter_archive (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_shadow, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, departure_airport_time,arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, arrival_airport_time, route_stop, date,latitude, longitude, waypoints, altitude, heading, ground_speed, squawk, ModeS, pilot_id, pilot_name, verticalrate,format_source,over_country,source_name) |
|
99 | 99 | VALUES (:flightaware_id, :ident, :registration, :airline_name, :airline_icao, :airline_country, :airline_type, :aircraft_icao, :aircraft_shadow, :aircraft_name, :aircraft_manufacturer, :departure_airport_icao, :departure_airport_name, :departure_airport_city, :departure_airport_country, :departure_airport_time,:arrival_airport_icao, :arrival_airport_name, :arrival_airport_city, :arrival_airport_country, :arrival_airport_time, :route_stop, :date,:latitude, :longitude, :waypoints, :altitude, :heading, :ground_speed, :squawk, :ModeS, :pilot_id, :pilot_name, :verticalrate, :format_source, :over_country, :source_name)"; |
100 | 100 | |
101 | - $query_values = array(':flightaware_id' => $flightaware_id, ':ident' => $ident, ':registration' => $registration, ':airline_name' => $airline_name, ':airline_icao' => $airline_icao, ':airline_country' => $airline_country, ':airline_type' => $airline_type, ':aircraft_icao' => $aircraft_icao, ':aircraft_shadow' => $aircraft_shadow, ':aircraft_name' => $aircraft_name, ':aircraft_manufacturer' => $aircraft_manufacturer, ':departure_airport_icao' => $departure_airport_icao, ':departure_airport_name' => $departure_airport_name, ':departure_airport_city' => $departure_airport_city, ':departure_airport_country' => $departure_airport_country, ':departure_airport_time' => $departure_airport_time,':arrival_airport_icao' => $arrival_airport_icao, ':arrival_airport_name' => $arrival_airport_name, ':arrival_airport_city' => $arrival_airport_city, ':arrival_airport_country' => $arrival_airport_country, ':arrival_airport_time' => $arrival_airport_time, ':route_stop' => $route_stop, ':date' => $date,':latitude' => $latitude, ':longitude' => $longitude, ':waypoints' => $waypoints, ':altitude' => $altitude, ':heading' => $heading, ':ground_speed' => $ground_speed, ':squawk' => $squawk, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':format_source' => $format_source, ':over_country' => $country, ':source_name' => $source_name); |
|
101 | + $query_values = array(':flightaware_id' => $flightaware_id, ':ident' => $ident, ':registration' => $registration, ':airline_name' => $airline_name, ':airline_icao' => $airline_icao, ':airline_country' => $airline_country, ':airline_type' => $airline_type, ':aircraft_icao' => $aircraft_icao, ':aircraft_shadow' => $aircraft_shadow, ':aircraft_name' => $aircraft_name, ':aircraft_manufacturer' => $aircraft_manufacturer, ':departure_airport_icao' => $departure_airport_icao, ':departure_airport_name' => $departure_airport_name, ':departure_airport_city' => $departure_airport_city, ':departure_airport_country' => $departure_airport_country, ':departure_airport_time' => $departure_airport_time, ':arrival_airport_icao' => $arrival_airport_icao, ':arrival_airport_name' => $arrival_airport_name, ':arrival_airport_city' => $arrival_airport_city, ':arrival_airport_country' => $arrival_airport_country, ':arrival_airport_time' => $arrival_airport_time, ':route_stop' => $route_stop, ':date' => $date, ':latitude' => $latitude, ':longitude' => $longitude, ':waypoints' => $waypoints, ':altitude' => $altitude, ':heading' => $heading, ':ground_speed' => $ground_speed, ':squawk' => $squawk, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':format_source' => $format_source, ':over_country' => $country, ':source_name' => $source_name); |
|
102 | 102 | try { |
103 | 103 | $sth = $this->db->prepare($query); |
104 | 104 | $sth->execute($query_values); |
105 | - } catch(PDOException $e) { |
|
105 | + } catch (PDOException $e) { |
|
106 | 106 | return "error : ".$e->getMessage(); |
107 | 107 | } |
108 | 108 | return "success"; |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | |
123 | 123 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
124 | 124 | //$query = "SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.ident = :ident GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate LIMIT 1"; |
125 | - $query = "SELECT spotter_archive.* FROM spotter_archive WHERE ident = :ident ORDER BY date DESC LIMIT 1"; |
|
125 | + $query = "SELECT spotter_archive.* FROM spotter_archive WHERE ident = :ident ORDER BY date DESC LIMIT 1"; |
|
126 | 126 | |
127 | - $spotter_array = $Spotter->getDataFromDB($query,array(':ident' => $ident)); |
|
127 | + $spotter_array = $Spotter->getDataFromDB($query, array(':ident' => $ident)); |
|
128 | 128 | |
129 | 129 | return $spotter_array; |
130 | 130 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
144 | 144 | //$query = SpotterArchive->$global_query." WHERE spotter_archive.flightaware_id = :id"; |
145 | 145 | //$query = "SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.flightaware_id = :id GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate LIMIT 1"; |
146 | - $query = "SELECT * FROM spotter_archive WHERE flightaware_id = :id ORDER BY date DESC LIMIT 1"; |
|
146 | + $query = "SELECT * FROM spotter_archive WHERE flightaware_id = :id ORDER BY date DESC LIMIT 1"; |
|
147 | 147 | |
148 | 148 | // $spotter_array = Spotter->getDataFromDB($query,array(':id' => $id)); |
149 | 149 | /* |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | $spotter_array = $sth->fetchAll(PDO->FETCH_ASSOC); |
158 | 158 | */ |
159 | - $spotter_array = $Spotter->getDataFromDB($query,array(':id' => $id)); |
|
159 | + $spotter_array = $Spotter->getDataFromDB($query, array(':id' => $id)); |
|
160 | 160 | |
161 | 161 | return $spotter_array; |
162 | 162 | } |
@@ -171,14 +171,14 @@ discard block |
||
171 | 171 | { |
172 | 172 | date_default_timezone_set('UTC'); |
173 | 173 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
174 | - $query = $this->global_query." WHERE spotter_archive.flightaware_id = :id"; |
|
174 | + $query = $this->global_query." WHERE spotter_archive.flightaware_id = :id"; |
|
175 | 175 | |
176 | 176 | // $spotter_array = Spotter->getDataFromDB($query,array(':id' => $id)); |
177 | 177 | |
178 | 178 | try { |
179 | 179 | $sth = $this->db->prepare($query); |
180 | 180 | $sth->execute(array(':id' => $id)); |
181 | - } catch(PDOException $e) { |
|
181 | + } catch (PDOException $e) { |
|
182 | 182 | echo $e->getMessage(); |
183 | 183 | die; |
184 | 184 | } |
@@ -197,14 +197,14 @@ discard block |
||
197 | 197 | { |
198 | 198 | date_default_timezone_set('UTC'); |
199 | 199 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
200 | - $query = "SELECT spotter_archive.latitude, spotter_archive.longitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id"; |
|
200 | + $query = "SELECT spotter_archive.latitude, spotter_archive.longitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id"; |
|
201 | 201 | |
202 | 202 | // $spotter_array = Spotter->getDataFromDB($query,array(':id' => $id)); |
203 | 203 | |
204 | 204 | try { |
205 | 205 | $sth = $this->db->prepare($query); |
206 | 206 | $sth->execute(array(':id' => $id)); |
207 | - } catch(PDOException $e) { |
|
207 | + } catch (PDOException $e) { |
|
208 | 208 | echo $e->getMessage(); |
209 | 209 | die; |
210 | 210 | } |
@@ -226,12 +226,12 @@ discard block |
||
226 | 226 | date_default_timezone_set('UTC'); |
227 | 227 | |
228 | 228 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
229 | - $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.ident = :ident AND spotter_archive.latitude <> 0 AND spotter_archive.longitude <> 0 ORDER BY date"; |
|
229 | + $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.ident = :ident AND spotter_archive.latitude <> 0 AND spotter_archive.longitude <> 0 ORDER BY date"; |
|
230 | 230 | |
231 | 231 | try { |
232 | 232 | $sth = $this->db->prepare($query); |
233 | 233 | $sth->execute(array(':ident' => $ident)); |
234 | - } catch(PDOException $e) { |
|
234 | + } catch (PDOException $e) { |
|
235 | 235 | echo $e->getMessage(); |
236 | 236 | die; |
237 | 237 | } |
@@ -252,12 +252,12 @@ discard block |
||
252 | 252 | date_default_timezone_set('UTC'); |
253 | 253 | |
254 | 254 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
255 | - $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id AND spotter_archive.latitude <> 0 AND spotter_archive.longitude <> 0 ORDER BY date"; |
|
255 | + $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id AND spotter_archive.latitude <> 0 AND spotter_archive.longitude <> 0 ORDER BY date"; |
|
256 | 256 | |
257 | 257 | try { |
258 | 258 | $sth = $this->db->prepare($query); |
259 | 259 | $sth->execute(array(':id' => $id)); |
260 | - } catch(PDOException $e) { |
|
260 | + } catch (PDOException $e) { |
|
261 | 261 | echo $e->getMessage(); |
262 | 262 | die; |
263 | 263 | } |
@@ -278,12 +278,12 @@ discard block |
||
278 | 278 | date_default_timezone_set('UTC'); |
279 | 279 | |
280 | 280 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
281 | - $query = "SELECT spotter_archive.altitude, spotter_archive.ground_speed, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id ORDER BY date"; |
|
281 | + $query = "SELECT spotter_archive.altitude, spotter_archive.ground_speed, spotter_archive.date FROM spotter_archive WHERE spotter_archive.flightaware_id = :id ORDER BY date"; |
|
282 | 282 | |
283 | 283 | try { |
284 | 284 | $sth = $this->db->prepare($query); |
285 | 285 | $sth->execute(array(':id' => $id)); |
286 | - } catch(PDOException $e) { |
|
286 | + } catch (PDOException $e) { |
|
287 | 287 | echo $e->getMessage(); |
288 | 288 | die; |
289 | 289 | } |
@@ -305,13 +305,13 @@ discard block |
||
305 | 305 | date_default_timezone_set('UTC'); |
306 | 306 | |
307 | 307 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
308 | - $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.ident = :ident GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate LIMIT 1"; |
|
308 | + $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.ident = :ident GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate LIMIT 1"; |
|
309 | 309 | // $query = "SELECT spotter_archive.altitude, spotter_archive.date FROM spotter_archive WHERE spotter_archive.ident = :ident"; |
310 | 310 | |
311 | 311 | try { |
312 | 312 | $sth = $this->db->prepare($query); |
313 | 313 | $sth->execute(array(':ident' => $ident)); |
314 | - } catch(PDOException $e) { |
|
314 | + } catch (PDOException $e) { |
|
315 | 315 | echo $e->getMessage(); |
316 | 316 | die; |
317 | 317 | } |
@@ -328,13 +328,13 @@ discard block |
||
328 | 328 | * @return Array the spotter information |
329 | 329 | * |
330 | 330 | */ |
331 | - public function getSpotterArchiveData($ident,$flightaware_id,$date) |
|
331 | + public function getSpotterArchiveData($ident, $flightaware_id, $date) |
|
332 | 332 | { |
333 | 333 | $Spotter = new Spotter($this->db); |
334 | 334 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
335 | - $query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.ident = :ident AND l.flightaware_id = :flightaware_id AND l.date LIKE :date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
|
335 | + $query = "SELECT spotter_live.* FROM spotter_live INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_live l WHERE l.ident = :ident AND l.flightaware_id = :flightaware_id AND l.date LIKE :date GROUP BY l.flightaware_id) s on spotter_live.flightaware_id = s.flightaware_id AND spotter_live.date = s.maxdate"; |
|
336 | 336 | |
337 | - $spotter_array = $Spotter->getDataFromDB($query,array(':ident' => $ident,':flightaware_id' => $flightaware_id,':date' => $date.'%')); |
|
337 | + $spotter_array = $Spotter->getDataFromDB($query, array(':ident' => $ident, ':flightaware_id' => $flightaware_id, ':date' => $date.'%')); |
|
338 | 338 | |
339 | 339 | return $spotter_array; |
340 | 340 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | try { |
348 | 348 | $sth = $this->db->prepare($query); |
349 | 349 | $sth->execute(); |
350 | - } catch(PDOException $e) { |
|
350 | + } catch (PDOException $e) { |
|
351 | 351 | echo $e->getMessage(); |
352 | 352 | die; |
353 | 353 | } |
@@ -359,24 +359,24 @@ discard block |
||
359 | 359 | * @return Array the spotter information |
360 | 360 | * |
361 | 361 | */ |
362 | - public function getMinLiveSpotterData($begindate,$enddate,$filter = array()) |
|
362 | + public function getMinLiveSpotterData($begindate, $enddate, $filter = array()) |
|
363 | 363 | { |
364 | 364 | global $globalDBdriver, $globalLiveInterval; |
365 | 365 | date_default_timezone_set('UTC'); |
366 | 366 | |
367 | 367 | $filter_query = ''; |
368 | 368 | if (isset($filter['source']) && !empty($filter['source'])) { |
369 | - $filter_query .= " AND format_source IN ('".implode("','",$filter['source'])."') "; |
|
369 | + $filter_query .= " AND format_source IN ('".implode("','", $filter['source'])."') "; |
|
370 | 370 | } |
371 | 371 | // Use spotter_output also ? |
372 | 372 | if (isset($filter['airlines']) && !empty($filter['airlines'])) { |
373 | - $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','",$filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
373 | + $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','", $filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
374 | 374 | } |
375 | 375 | if (isset($filter['airlinestype']) && !empty($filter['airlinestype'])) { |
376 | 376 | $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_type = '".$filter['airlinestype']."') sa ON sa.flightaware_id = spotter_archive.flightaware_id "; |
377 | 377 | } |
378 | 378 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
379 | - $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
|
379 | + $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','", $filter['source_aprs'])."')"; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | //if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
@@ -395,14 +395,14 @@ discard block |
||
395 | 395 | GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id |
396 | 396 | AND spotter_archive.date = s.maxdate '.$filter_query.'LEFT JOIN (SELECT aircraft_shadow,icao FROM aircraft) a ON spotter_archive.aircraft_icao = a.icao'; |
397 | 397 | */ |
398 | - $query = 'SELECT spotter_archive.date,spotter_archive.flightaware_id, spotter_archive.ident, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, a.aircraft_shadow,a.engine_type, a.engine_count, a.wake_category |
|
398 | + $query = 'SELECT spotter_archive.date,spotter_archive.flightaware_id, spotter_archive.ident, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, a.aircraft_shadow,a.engine_type, a.engine_count, a.wake_category |
|
399 | 399 | FROM spotter_archive |
400 | 400 | INNER JOIN (SELECT * FROM aircraft) a on spotter_archive.aircraft_icao = a.icao |
401 | 401 | WHERE spotter_archive.date BETWEEN '."'".$begindate."'".' AND '."'".$begindate."'".' |
402 | 402 | '.$filter_query.' ORDER BY flightaware_id'; |
403 | 403 | } else { |
404 | 404 | //$query = 'SELECT spotter_archive.ident, spotter_archive.flightaware_id, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, a.aircraft_shadow FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate '.$filter_query.'INNER JOIN (SELECT * FROM aircraft) a on spotter_archive.aircraft_icao = a.icao'; |
405 | - $query = 'SELECT spotter_archive.date,spotter_archive.flightaware_id, spotter_archive.ident, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, a.aircraft_shadow,a.engine_type, a.engine_count, a.wake_category |
|
405 | + $query = 'SELECT spotter_archive.date,spotter_archive.flightaware_id, spotter_archive.ident, spotter_archive.aircraft_icao, spotter_archive.departure_airport_icao as departure_airport, spotter_archive.arrival_airport_icao as arrival_airport, spotter_archive.latitude, spotter_archive.longitude, spotter_archive.altitude, spotter_archive.heading, spotter_archive.ground_speed, spotter_archive.squawk, a.aircraft_shadow,a.engine_type, a.engine_count, a.wake_category |
|
406 | 406 | FROM spotter_archive |
407 | 407 | INNER JOIN (SELECT * FROM aircraft) a on spotter_archive.aircraft_icao = a.icao |
408 | 408 | WHERE spotter_archive.date >= '."'".$begindate."'".' AND spotter_archive.date <= '."'".$enddate."'".' |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | try { |
413 | 413 | $sth = $this->db->prepare($query); |
414 | 414 | $sth->execute(); |
415 | - } catch(PDOException $e) { |
|
415 | + } catch (PDOException $e) { |
|
416 | 416 | echo $e->getMessage(); |
417 | 417 | die; |
418 | 418 | } |
@@ -427,24 +427,24 @@ discard block |
||
427 | 427 | * @return Array the spotter information |
428 | 428 | * |
429 | 429 | */ |
430 | - public function getMinLiveSpotterDataPlayback($begindate,$enddate,$filter = array()) |
|
430 | + public function getMinLiveSpotterDataPlayback($begindate, $enddate, $filter = array()) |
|
431 | 431 | { |
432 | 432 | global $globalDBdriver, $globalLiveInterval; |
433 | 433 | date_default_timezone_set('UTC'); |
434 | 434 | |
435 | 435 | $filter_query = ''; |
436 | 436 | if (isset($filter['source']) && !empty($filter['source'])) { |
437 | - $filter_query .= " AND format_source IN ('".implode("','",$filter['source'])."') "; |
|
437 | + $filter_query .= " AND format_source IN ('".implode("','", $filter['source'])."') "; |
|
438 | 438 | } |
439 | 439 | // Should use spotter_output also ? |
440 | 440 | if (isset($filter['airlines']) && !empty($filter['airlines'])) { |
441 | - $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','",$filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
441 | + $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_icao IN ('".implode("','", $filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
442 | 442 | } |
443 | 443 | if (isset($filter['airlinestype']) && !empty($filter['airlinestype'])) { |
444 | 444 | $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_archive_output WHERE spotter_archive_output.airline_type = '".$filter['airlinestype']."') sa ON sa.flightaware_id = spotter_archive.flightaware_id "; |
445 | 445 | } |
446 | 446 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
447 | - $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
|
447 | + $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','", $filter['source_aprs'])."')"; |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | //if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | FROM spotter_archive |
455 | 455 | INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE (l.date BETWEEN '."'".$begindate."'".' AND '."'".$enddate."'".') GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate '.$filter_query.'LEFT JOIN (SELECT aircraft_shadow,icao FROM aircraft) a ON spotter_archive.aircraft_icao = a.icao'; |
456 | 456 | */ |
457 | - $query = 'SELECT a.aircraft_shadow, spotter_archive_output.ident, spotter_archive_output.flightaware_id, spotter_archive_output.aircraft_icao, spotter_archive_output.departure_airport_icao as departure_airport, spotter_archive_output.arrival_airport_icao as arrival_airport, spotter_archive_output.latitude, spotter_archive_output.longitude, spotter_archive_output.altitude, spotter_archive_output.heading, spotter_archive_output.ground_speed, spotter_archive_output.squawk |
|
457 | + $query = 'SELECT a.aircraft_shadow, spotter_archive_output.ident, spotter_archive_output.flightaware_id, spotter_archive_output.aircraft_icao, spotter_archive_output.departure_airport_icao as departure_airport, spotter_archive_output.arrival_airport_icao as arrival_airport, spotter_archive_output.latitude, spotter_archive_output.longitude, spotter_archive_output.altitude, spotter_archive_output.heading, spotter_archive_output.ground_speed, spotter_archive_output.squawk |
|
458 | 458 | FROM spotter_archive_output |
459 | 459 | LEFT JOIN (SELECT aircraft_shadow,icao FROM aircraft) a ON spotter_archive_output.aircraft_icao = a.icao |
460 | 460 | WHERE (spotter_archive_output.date BETWEEN '."'".$begindate."'".' AND '."'".$enddate."'".') |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | WHERE spotter_archive_output.date >= '."'".$begindate."'".' AND spotter_archive_output.date <= '."'".$enddate."'".' |
470 | 470 | '.$filter_query.' GROUP BY spotter_archive_output.flightaware_id, spotter_archive_output.ident, spotter_archive_output.aircraft_icao, spotter_archive_output.departure_airport_icao, spotter_archive_output.arrival_airport_icao, spotter_archive_output.latitude, spotter_archive_output.longitude, spotter_archive_output.altitude, spotter_archive_output.heading, spotter_archive_output.ground_speed, spotter_archive_output.squawk, a.aircraft_shadow'; |
471 | 471 | */ |
472 | - $query = 'SELECT DISTINCT spotter_archive_output.flightaware_id, spotter_archive_output.ident, spotter_archive_output.aircraft_icao, spotter_archive_output.departure_airport_icao as departure_airport, spotter_archive_output.arrival_airport_icao as arrival_airport, spotter_archive_output.latitude, spotter_archive_output.longitude, spotter_archive_output.altitude, spotter_archive_output.heading, spotter_archive_output.ground_speed, spotter_archive_output.squawk, a.aircraft_shadow |
|
472 | + $query = 'SELECT DISTINCT spotter_archive_output.flightaware_id, spotter_archive_output.ident, spotter_archive_output.aircraft_icao, spotter_archive_output.departure_airport_icao as departure_airport, spotter_archive_output.arrival_airport_icao as arrival_airport, spotter_archive_output.latitude, spotter_archive_output.longitude, spotter_archive_output.altitude, spotter_archive_output.heading, spotter_archive_output.ground_speed, spotter_archive_output.squawk, a.aircraft_shadow |
|
473 | 473 | FROM spotter_archive_output |
474 | 474 | INNER JOIN (SELECT * FROM aircraft) a on spotter_archive_output.aircraft_icao = a.icao |
475 | 475 | WHERE spotter_archive_output.date >= '."'".$begindate."'".' AND spotter_archive_output.date <= '."'".$enddate."'".' |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | try { |
482 | 482 | $sth = $this->db->prepare($query); |
483 | 483 | $sth->execute(); |
484 | - } catch(PDOException $e) { |
|
484 | + } catch (PDOException $e) { |
|
485 | 485 | echo $e->getMessage(); |
486 | 486 | die; |
487 | 487 | } |
@@ -496,23 +496,23 @@ discard block |
||
496 | 496 | * @return Array the spotter information |
497 | 497 | * |
498 | 498 | */ |
499 | - public function getLiveSpotterCount($begindate,$enddate,$filter = array()) |
|
499 | + public function getLiveSpotterCount($begindate, $enddate, $filter = array()) |
|
500 | 500 | { |
501 | 501 | global $globalDBdriver, $globalLiveInterval; |
502 | 502 | date_default_timezone_set('UTC'); |
503 | 503 | |
504 | 504 | $filter_query = ''; |
505 | 505 | if (isset($filter['source']) && !empty($filter['source'])) { |
506 | - $filter_query .= " AND format_source IN ('".implode("','",$filter['source'])."') "; |
|
506 | + $filter_query .= " AND format_source IN ('".implode("','", $filter['source'])."') "; |
|
507 | 507 | } |
508 | 508 | if (isset($filter['airlines']) && !empty($filter['airlines'])) { |
509 | - $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_output WHERE spotter_output.airline_icao IN ('".implode("','",$filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
509 | + $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_output WHERE spotter_output.airline_icao IN ('".implode("','", $filter['airlines'])."')) so ON so.flightaware_id = spotter_archive.flightaware_id "; |
|
510 | 510 | } |
511 | 511 | if (isset($filter['airlinestype']) && !empty($filter['airlinestype'])) { |
512 | 512 | $filter_query .= " INNER JOIN (SELECT flightaware_id FROM spotter_output WHERE spotter_output.airline_type = '".$filter['airlinestype']."') sa ON sa.flightaware_id = spotter_archive.flightaware_id "; |
513 | 513 | } |
514 | 514 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
515 | - $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
|
515 | + $filter_query = " AND format_source = 'aprs' AND source_name IN ('".implode("','", $filter['source_aprs'])."')"; |
|
516 | 516 | } |
517 | 517 | |
518 | 518 | //if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | try { |
528 | 528 | $sth = $this->db->prepare($query); |
529 | 529 | $sth->execute(); |
530 | - } catch(PDOException $e) { |
|
530 | + } catch (PDOException $e) { |
|
531 | 531 | echo $e->getMessage(); |
532 | 532 | die; |
533 | 533 | } |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | * @return Array the spotter information |
548 | 548 | * |
549 | 549 | */ |
550 | - public function searchSpotterData($q = '', $registration = '', $aircraft_icao = '', $aircraft_manufacturer = '', $highlights = '', $airline_icao = '', $airline_country = '', $airline_type = '', $airport = '', $airport_country = '', $callsign = '', $departure_airport_route = '', $arrival_airport_route = '', $owner = '',$pilot_id = '',$pilot_name = '',$altitude = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '', $filters=array()) |
|
550 | + public function searchSpotterData($q = '', $registration = '', $aircraft_icao = '', $aircraft_manufacturer = '', $highlights = '', $airline_icao = '', $airline_country = '', $airline_type = '', $airport = '', $airport_country = '', $callsign = '', $departure_airport_route = '', $arrival_airport_route = '', $owner = '', $pilot_id = '', $pilot_name = '', $altitude = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '', $origLat = '', $origLon = '', $dist = '', $filters = array()) |
|
551 | 551 | { |
552 | 552 | global $globalTimezone, $globalDBdriver; |
553 | 553 | require_once(dirname(__FILE__).'/class.Translation.php'); |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | |
570 | 570 | $q_array = explode(" ", $q); |
571 | 571 | |
572 | - foreach ($q_array as $q_item){ |
|
572 | + foreach ($q_array as $q_item) { |
|
573 | 573 | $additional_query .= " AND ("; |
574 | 574 | $additional_query .= "(spotter_archive_output.spotter_id like '%".$q_item."%') OR "; |
575 | 575 | $additional_query .= "(spotter_archive_output.aircraft_icao like '%".$q_item."%') OR "; |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | |
602 | 602 | if ($registration != "") |
603 | 603 | { |
604 | - $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
|
604 | + $registration = filter_var($registration, FILTER_SANITIZE_STRING); |
|
605 | 605 | if (!is_string($registration)) |
606 | 606 | { |
607 | 607 | return false; |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | |
613 | 613 | if ($aircraft_icao != "") |
614 | 614 | { |
615 | - $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
|
615 | + $aircraft_icao = filter_var($aircraft_icao, FILTER_SANITIZE_STRING); |
|
616 | 616 | if (!is_string($aircraft_icao)) |
617 | 617 | { |
618 | 618 | return false; |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | |
624 | 624 | if ($aircraft_manufacturer != "") |
625 | 625 | { |
626 | - $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
|
626 | + $aircraft_manufacturer = filter_var($aircraft_manufacturer, FILTER_SANITIZE_STRING); |
|
627 | 627 | if (!is_string($aircraft_manufacturer)) |
628 | 628 | { |
629 | 629 | return false; |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | |
645 | 645 | if ($airline_icao != "") |
646 | 646 | { |
647 | - $airline_icao = filter_var($airline_icao,FILTER_SANITIZE_STRING); |
|
647 | + $airline_icao = filter_var($airline_icao, FILTER_SANITIZE_STRING); |
|
648 | 648 | if (!is_string($airline_icao)) |
649 | 649 | { |
650 | 650 | return false; |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | |
656 | 656 | if ($airline_country != "") |
657 | 657 | { |
658 | - $airline_country = filter_var($airline_country,FILTER_SANITIZE_STRING); |
|
658 | + $airline_country = filter_var($airline_country, FILTER_SANITIZE_STRING); |
|
659 | 659 | if (!is_string($airline_country)) |
660 | 660 | { |
661 | 661 | return false; |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | |
667 | 667 | if ($airline_type != "") |
668 | 668 | { |
669 | - $airline_type = filter_var($airline_type,FILTER_SANITIZE_STRING); |
|
669 | + $airline_type = filter_var($airline_type, FILTER_SANITIZE_STRING); |
|
670 | 670 | if (!is_string($airline_type)) |
671 | 671 | { |
672 | 672 | return false; |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | |
689 | 689 | if ($airport != "") |
690 | 690 | { |
691 | - $airport = filter_var($airport,FILTER_SANITIZE_STRING); |
|
691 | + $airport = filter_var($airport, FILTER_SANITIZE_STRING); |
|
692 | 692 | if (!is_string($airport)) |
693 | 693 | { |
694 | 694 | return false; |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | |
700 | 700 | if ($airport_country != "") |
701 | 701 | { |
702 | - $airport_country = filter_var($airport_country,FILTER_SANITIZE_STRING); |
|
702 | + $airport_country = filter_var($airport_country, FILTER_SANITIZE_STRING); |
|
703 | 703 | if (!is_string($airport_country)) |
704 | 704 | { |
705 | 705 | return false; |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | |
711 | 711 | if ($callsign != "") |
712 | 712 | { |
713 | - $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
|
713 | + $callsign = filter_var($callsign, FILTER_SANITIZE_STRING); |
|
714 | 714 | if (!is_string($callsign)) |
715 | 715 | { |
716 | 716 | return false; |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | $translate = $Translation->ident2icao($callsign); |
719 | 719 | if ($translate != $callsign) { |
720 | 720 | $additional_query .= " AND (spotter_archive_output.ident = :callsign OR spotter_archive_output.ident = :translate)"; |
721 | - $query_values = array_merge($query_values,array(':callsign' => $callsign,':translate' => $translate)); |
|
721 | + $query_values = array_merge($query_values, array(':callsign' => $callsign, ':translate' => $translate)); |
|
722 | 722 | } else { |
723 | 723 | $additional_query .= " AND (spotter_archive_output.ident = '".$callsign."')"; |
724 | 724 | } |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | |
728 | 728 | if ($owner != "") |
729 | 729 | { |
730 | - $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
|
730 | + $owner = filter_var($owner, FILTER_SANITIZE_STRING); |
|
731 | 731 | if (!is_string($owner)) |
732 | 732 | { |
733 | 733 | return false; |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | |
739 | 739 | if ($pilot_name != "") |
740 | 740 | { |
741 | - $pilot_name = filter_var($pilot_name,FILTER_SANITIZE_STRING); |
|
741 | + $pilot_name = filter_var($pilot_name, FILTER_SANITIZE_STRING); |
|
742 | 742 | if (!is_string($pilot_name)) |
743 | 743 | { |
744 | 744 | return false; |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | |
750 | 750 | if ($pilot_id != "") |
751 | 751 | { |
752 | - $pilot_id = filter_var($pilot_id,FILTER_SANITIZE_NUMBER_INT); |
|
752 | + $pilot_id = filter_var($pilot_id, FILTER_SANITIZE_NUMBER_INT); |
|
753 | 753 | if (!is_string($pilot_id)) |
754 | 754 | { |
755 | 755 | return false; |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | |
761 | 761 | if ($departure_airport_route != "") |
762 | 762 | { |
763 | - $departure_airport_route = filter_var($departure_airport_route,FILTER_SANITIZE_STRING); |
|
763 | + $departure_airport_route = filter_var($departure_airport_route, FILTER_SANITIZE_STRING); |
|
764 | 764 | if (!is_string($departure_airport_route)) |
765 | 765 | { |
766 | 766 | return false; |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | |
772 | 772 | if ($arrival_airport_route != "") |
773 | 773 | { |
774 | - $arrival_airport_route = filter_var($arrival_airport_route,FILTER_SANITIZE_STRING); |
|
774 | + $arrival_airport_route = filter_var($arrival_airport_route, FILTER_SANITIZE_STRING); |
|
775 | 775 | if (!is_string($arrival_airport_route)) |
776 | 776 | { |
777 | 777 | return false; |
@@ -784,8 +784,8 @@ discard block |
||
784 | 784 | { |
785 | 785 | $altitude_array = explode(",", $altitude); |
786 | 786 | |
787 | - $altitude_array[0] = filter_var($altitude_array[0],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
788 | - $altitude_array[1] = filter_var($altitude_array[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
|
787 | + $altitude_array[0] = filter_var($altitude_array[0], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
788 | + $altitude_array[1] = filter_var($altitude_array[1], FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); |
|
789 | 789 | |
790 | 790 | |
791 | 791 | if ($altitude_array[1] != "") |
@@ -803,8 +803,8 @@ discard block |
||
803 | 803 | { |
804 | 804 | $date_array = explode(",", $date_posted); |
805 | 805 | |
806 | - $date_array[0] = filter_var($date_array[0],FILTER_SANITIZE_STRING); |
|
807 | - $date_array[1] = filter_var($date_array[1],FILTER_SANITIZE_STRING); |
|
806 | + $date_array[0] = filter_var($date_array[0], FILTER_SANITIZE_STRING); |
|
807 | + $date_array[1] = filter_var($date_array[1], FILTER_SANITIZE_STRING); |
|
808 | 808 | |
809 | 809 | if ($globalTimezone != '') { |
810 | 810 | date_default_timezone_set($globalTimezone); |
@@ -836,8 +836,8 @@ discard block |
||
836 | 836 | { |
837 | 837 | $limit_array = explode(",", $limit); |
838 | 838 | |
839 | - $limit_array[0] = filter_var($limit_array[0],FILTER_SANITIZE_NUMBER_INT); |
|
840 | - $limit_array[1] = filter_var($limit_array[1],FILTER_SANITIZE_NUMBER_INT); |
|
839 | + $limit_array[0] = filter_var($limit_array[0], FILTER_SANITIZE_NUMBER_INT); |
|
840 | + $limit_array[1] = filter_var($limit_array[1], FILTER_SANITIZE_NUMBER_INT); |
|
841 | 841 | |
842 | 842 | if ($limit_array[0] >= 0 && $limit_array[1] >= 0) |
843 | 843 | { |
@@ -848,8 +848,8 @@ discard block |
||
848 | 848 | |
849 | 849 | |
850 | 850 | if ($origLat != "" && $origLon != "" && $dist != "") { |
851 | - $dist = number_format($dist*0.621371,2,'.',''); |
|
852 | - $query="SELECT spotter_archive_output.*, 3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - ABS(CAST(spotter_archive.latitude as double precision)))*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(ABS(CAST(spotter_archive.latitude as double precision))*pi()/180)*POWER(SIN(($origLon-CAST(spotter_archive.longitude as double precision))*pi()/180/2),2))) as distance |
|
851 | + $dist = number_format($dist*0.621371, 2, '.', ''); |
|
852 | + $query = "SELECT spotter_archive_output.*, 3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - ABS(CAST(spotter_archive.latitude as double precision)))*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(ABS(CAST(spotter_archive.latitude as double precision))*pi()/180)*POWER(SIN(($origLon-CAST(spotter_archive.longitude as double precision))*pi()/180/2),2))) as distance |
|
853 | 853 | FROM spotter_archive_output, spotter_archive WHERE spotter_output_archive.flightaware_id = spotter_archive.flightaware_id AND spotter_output.ident <> '' ".$additional_query."AND CAST(spotter_archive.longitude as double precision) between ($origLon-$dist/ABS(cos(radians($origLat))*69)) and ($origLon+$dist/ABS(cos(radians($origLat))*69)) and CAST(spotter_archive.latitude as double precision) between ($origLat-($dist/69)) and ($origLat+($dist/69)) |
854 | 854 | AND (3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - ABS(CAST(spotter_archive.latitude as double precision)))*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(ABS(CAST(spotter_archive.latitude as double precision))*pi()/180)*POWER(SIN(($origLon-CAST(spotter_archive.longitude as double precision))*pi()/180/2),2)))) < $dist".$filter_query." ORDER BY distance"; |
855 | 855 | } else { |
@@ -866,12 +866,12 @@ discard block |
||
866 | 866 | $additional_query .= " AND (spotter_archive_output.waypoints <> '')"; |
867 | 867 | } |
868 | 868 | |
869 | - $query = "SELECT spotter_archive_output.* FROM spotter_archive_output |
|
869 | + $query = "SELECT spotter_archive_output.* FROM spotter_archive_output |
|
870 | 870 | WHERE spotter_archive_output.ident <> '' |
871 | 871 | ".$additional_query." |
872 | 872 | ".$filter_query.$orderby_query; |
873 | 873 | } |
874 | - $spotter_array = $Spotter->getDataFromDB($query, $query_values,$limit_query); |
|
874 | + $spotter_array = $Spotter->getDataFromDB($query, $query_values, $limit_query); |
|
875 | 875 | |
876 | 876 | return $spotter_array; |
877 | 877 | } |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | try { |
889 | 889 | $sth = $this->db->prepare($query); |
890 | 890 | $sth->execute(); |
891 | - } catch(PDOException $e) { |
|
891 | + } catch (PDOException $e) { |
|
892 | 892 | return "error"; |
893 | 893 | } |
894 | 894 | } |
@@ -925,8 +925,8 @@ discard block |
||
925 | 925 | { |
926 | 926 | $limit_array = explode(",", $limit); |
927 | 927 | |
928 | - $limit_array[0] = filter_var($limit_array[0],FILTER_SANITIZE_NUMBER_INT); |
|
929 | - $limit_array[1] = filter_var($limit_array[1],FILTER_SANITIZE_NUMBER_INT); |
|
928 | + $limit_array[0] = filter_var($limit_array[0], FILTER_SANITIZE_NUMBER_INT); |
|
929 | + $limit_array[1] = filter_var($limit_array[1], FILTER_SANITIZE_NUMBER_INT); |
|
930 | 930 | |
931 | 931 | if ($limit_array[0] >= 0 && $limit_array[1] >= 0) |
932 | 932 | { |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | * @return Array the airline country list |
957 | 957 | * |
958 | 958 | */ |
959 | - public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '') |
|
959 | + public function countAllFlightOverCountries($limit = true, $olderthanmonths = 0, $sincedate = '') |
|
960 | 960 | { |
961 | 961 | global $globalDBdriver; |
962 | 962 | /* |
@@ -985,7 +985,7 @@ discard block |
||
985 | 985 | $flight_array = array(); |
986 | 986 | $temp_array = array(); |
987 | 987 | |
988 | - while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
|
988 | + while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
|
989 | 989 | { |
990 | 990 | $temp_array['flight_count'] = $row['nb']; |
991 | 991 | $temp_array['flight_country'] = $row['name']; |
@@ -1002,14 +1002,14 @@ discard block |
||
1002 | 1002 | * @return Array the spotter information |
1003 | 1003 | * |
1004 | 1004 | */ |
1005 | - public function getDateArchiveSpotterDataById($id,$date) |
|
1005 | + public function getDateArchiveSpotterDataById($id, $date) |
|
1006 | 1006 | { |
1007 | 1007 | $Spotter = new Spotter($this->db); |
1008 | 1008 | date_default_timezone_set('UTC'); |
1009 | 1009 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
1010 | - $query = 'SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.flightaware_id = :id AND l.date <= :date GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate ORDER BY spotter_archive.date DESC'; |
|
1011 | - $date = date('c',$date); |
|
1012 | - $spotter_array = $Spotter->getDataFromDB($query,array(':id' => $id,':date' => $date)); |
|
1010 | + $query = 'SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.flightaware_id = :id AND l.date <= :date GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate ORDER BY spotter_archive.date DESC'; |
|
1011 | + $date = date('c', $date); |
|
1012 | + $spotter_array = $Spotter->getDataFromDB($query, array(':id' => $id, ':date' => $date)); |
|
1013 | 1013 | return $spotter_array; |
1014 | 1014 | } |
1015 | 1015 | |
@@ -1019,14 +1019,14 @@ discard block |
||
1019 | 1019 | * @return Array the spotter information |
1020 | 1020 | * |
1021 | 1021 | */ |
1022 | - public function getDateArchiveSpotterDataByIdent($ident,$date) |
|
1022 | + public function getDateArchiveSpotterDataByIdent($ident, $date) |
|
1023 | 1023 | { |
1024 | 1024 | $Spotter = new Spotter($this->db); |
1025 | 1025 | date_default_timezone_set('UTC'); |
1026 | 1026 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
1027 | - $query = 'SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.ident = :ident AND l.date <= :date GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate ORDER BY spotter_archive.date DESC'; |
|
1028 | - $date = date('c',$date); |
|
1029 | - $spotter_array = $Spotter->getDataFromDB($query,array(':ident' => $ident,':date' => $date)); |
|
1027 | + $query = 'SELECT spotter_archive.* FROM spotter_archive INNER JOIN (SELECT l.flightaware_id, max(l.date) as maxdate FROM spotter_archive l WHERE l.ident = :ident AND l.date <= :date GROUP BY l.flightaware_id) s on spotter_archive.flightaware_id = s.flightaware_id AND spotter_archive.date = s.maxdate ORDER BY spotter_archive.date DESC'; |
|
1028 | + $date = date('c', $date); |
|
1029 | + $spotter_array = $Spotter->getDataFromDB($query, array(':ident' => $ident, ':date' => $date)); |
|
1030 | 1030 | return $spotter_array; |
1031 | 1031 | } |
1032 | 1032 | |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | * @return Array the spotter information |
1037 | 1037 | * |
1038 | 1038 | */ |
1039 | - public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
|
1039 | + public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '', $filters = array()) |
|
1040 | 1040 | { |
1041 | 1041 | global $global_query; |
1042 | 1042 | $Spotter = new Spotter(); |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | $query_values = array(); |
1045 | 1045 | $limit_query = ''; |
1046 | 1046 | $additional_query = ''; |
1047 | - $filter_query = $this->getFilter($filters,true,true); |
|
1047 | + $filter_query = $this->getFilter($filters, true, true); |
|
1048 | 1048 | |
1049 | 1049 | if ($airport != "") |
1050 | 1050 | { |
@@ -1061,8 +1061,8 @@ discard block |
||
1061 | 1061 | { |
1062 | 1062 | $limit_array = explode(",", $limit); |
1063 | 1063 | |
1064 | - $limit_array[0] = filter_var($limit_array[0],FILTER_SANITIZE_NUMBER_INT); |
|
1065 | - $limit_array[1] = filter_var($limit_array[1],FILTER_SANITIZE_NUMBER_INT); |
|
1064 | + $limit_array[0] = filter_var($limit_array[0], FILTER_SANITIZE_NUMBER_INT); |
|
1065 | + $limit_array[1] = filter_var($limit_array[1], FILTER_SANITIZE_NUMBER_INT); |
|
1066 | 1066 | |
1067 | 1067 | if ($limit_array[0] >= 0 && $limit_array[1] >= 0) |
1068 | 1068 | { |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | <button type="button" class="close">×</button> |
8 | 8 | <?php |
9 | 9 | |
10 | -$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING); |
|
10 | +$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING); |
|
11 | 11 | $sat = urldecode($sat); |
12 | 12 | |
13 | 13 | if ($sat == 'ISS (ZARYA)') { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $aircraft_name = 'INTEGRAL'; |
43 | 43 | // $ground_speed = 14970; |
44 | 44 | $launch_date = '17 October 2002'; |
45 | -} elseif (strpos($sat,'IRIDIUM') !== false) { |
|
45 | +} elseif (strpos($sat, 'IRIDIUM') !== false) { |
|
46 | 46 | $image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg'; |
47 | 47 | $image_copyright = 'Cliff'; |
48 | 48 | $ident = 'Iridium satellite constellation'; |
@@ -50,22 +50,22 @@ discard block |
||
50 | 50 | $aircraft_name = $sat; |
51 | 51 | // $ground_speed = 14970; |
52 | 52 | // $launch_date = '29 september 2011'; |
53 | -} elseif (strpos($sat,'ORBCOMM') !== false) { |
|
53 | +} elseif (strpos($sat, 'ORBCOMM') !== false) { |
|
54 | 54 | $ident = 'Orbcomm'; |
55 | 55 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)'; |
56 | 56 | $aircraft_name = $sat; |
57 | -} elseif (strpos($sat,'GLOBALSTAR') !== false) { |
|
57 | +} elseif (strpos($sat, 'GLOBALSTAR') !== false) { |
|
58 | 58 | $ident = 'Globalstar'; |
59 | 59 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar'; |
60 | 60 | $aircraft_name = $sat; |
61 | -} elseif (strpos($sat,'OSCAR 7') !== false) { |
|
61 | +} elseif (strpos($sat, 'OSCAR 7') !== false) { |
|
62 | 62 | $image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg'; |
63 | 63 | $image_copyright = 'Amsat.org'; |
64 | 64 | $ident = 'AMSAT-OSCAR 7'; |
65 | 65 | $aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7'; |
66 | 66 | $aircraft_name = $sat; |
67 | 67 | $launch_date = '15 November 1974'; |
68 | -} elseif (strpos($sat,'santaclaus') !== false) { |
|
68 | +} elseif (strpos($sat, 'santaclaus') !== false) { |
|
69 | 69 | $image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg'; |
70 | 70 | $image_copyright = 'Jonathan G Meath'; |
71 | 71 | $ident = 'Santa Claus'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
28 | 28 | |
29 | 29 | // $output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}'; |
30 | -$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"'; |
|
30 | +$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"'; |
|
31 | 31 | if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"'; |
32 | 32 | $output .= '}'; |
33 | 33 | //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}'; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (!isset($_GET['now'])) { |
60 | 60 | $output .= '"epoch" : "'.date("Y").'-12-24T02:00:00Z",'; |
61 | 61 | } else { |
62 | - $output .= '"epoch" : "'.date("c",time() - $globalLiveInterval).'",'; |
|
62 | + $output .= '"epoch" : "'.date("c", time() - $globalLiveInterval).'",'; |
|
63 | 63 | } |
64 | 64 | //$output .= '"type": "Point",'; |
65 | 65 | //$output .= '"interpolationAlgorithm" : "LAGRANGE",'; |
@@ -113,581 +113,581 @@ discard block |
||
113 | 113 | */ |
114 | 114 | $i = 0; |
115 | 115 | $output .= $i.',-114.4,82.7,150000,'; |
116 | -$i = $i+300; |
|
116 | +$i = $i + 300; |
|
117 | 117 | $output .= $i.',-173.300003,64.379997,150000,'; |
118 | -$i = $i+300; |
|
118 | +$i = $i + 300; |
|
119 | 119 | $output .= $i.',177.479995,64.75,150000,'; |
120 | -$i = $i+300; |
|
120 | +$i = $i + 300; |
|
121 | 121 | $output .= $i.',158.65,53.016667,150000,'; |
122 | -$i = $i+300; |
|
122 | +$i = $i + 300; |
|
123 | 123 | $output .= $i.',165.545318,11.626074,150000,'; |
124 | -$i = $i+300; |
|
124 | +$i = $i + 300; |
|
125 | 125 | $output .= $i.',171.1300517813333,7.07999665990053,150000,'; |
126 | -$i = $i+300; |
|
126 | +$i = $i + 300; |
|
127 | 127 | $output .= $i.',179.380004,-16.469999,150000,'; |
128 | -$i = $i+300; |
|
128 | +$i = $i + 300; |
|
129 | 129 | $output .= $i.',178.429992,-18.129999,150000,'; |
130 | -$i = $i+300; |
|
130 | +$i = $i + 300; |
|
131 | 131 | $output .= $i.',174.759994,-36.849998,150000,'; |
132 | -$i = $i+300; |
|
132 | +$i = $i + 300; |
|
133 | 133 | $output .= $i.',176.839996,-39.639999,150000,'; |
134 | -$i = $i+300; |
|
134 | +$i = $i + 300; |
|
135 | 135 | $output .= $i.',174.779998,-41.279998,150000,'; |
136 | -$i = $i+300; |
|
136 | +$i = $i + 300; |
|
137 | 137 | $output .= $i.',172.639999,-43.529998,150000,'; |
138 | -$i = $i+300; |
|
138 | +$i = $i + 300; |
|
139 | 139 | $output .= $i.',167.838199,-46.986747,150000,'; |
140 | -$i = $i+300; |
|
140 | +$i = $i + 300; |
|
141 | 141 | $output .= $i.',168.320999,-17.740391,150000,'; |
142 | -$i = $i+300; |
|
142 | +$i = $i + 300; |
|
143 | 143 | $output .= $i.',167.149993,-15.51,150000,'; |
144 | -$i = $i+300; |
|
144 | +$i = $i + 300; |
|
145 | 145 | $output .= $i.',159.910003,-9.43,150000,'; |
146 | -$i = $i+300; |
|
146 | +$i = $i + 300; |
|
147 | 147 | $output .= $i.',156.850006,-8.1,150000,'; |
148 | -$i = $i+300; |
|
148 | +$i = $i + 300; |
|
149 | 149 | $output .= $i.',158.160003,6.92,150000,'; |
150 | -$i = $i+300; |
|
150 | +$i = $i + 300; |
|
151 | 151 | $output .= $i.',150.017702,45.873311,150000,'; |
152 | -$i = $i+300; |
|
152 | +$i = $i + 300; |
|
153 | 153 | $output .= $i.',154.796487,49.429802,150000,'; |
154 | -$i = $i+300; |
|
154 | +$i = $i + 300; |
|
155 | 155 | $output .= $i.',142.7262,46.948978,150000,'; |
156 | -$i = $i+300; |
|
156 | +$i = $i + 300; |
|
157 | 157 | $output .= $i.',150.800003,59.569999,150000,'; |
158 | -$i = $i+300; |
|
158 | +$i = $i + 300; |
|
159 | 159 | $output .= $i.',135.119995,48.419998,150000,'; |
160 | -$i = $i+300; |
|
160 | +$i = $i + 300; |
|
161 | 161 | $output .= $i.',131.899993,43.130001,150000,'; |
162 | -$i = $i+300; |
|
162 | +$i = $i + 300; |
|
163 | 163 | $output .= $i.',142.212096,27.070652,150000,'; |
164 | -$i = $i+300; |
|
164 | +$i = $i + 300; |
|
165 | 165 | $output .= $i.',141.312779,24.78389,150000,'; |
166 | -$i = $i+300; |
|
166 | +$i = $i + 300; |
|
167 | 167 | $output .= $i.',144.79373,13.444305,150000,'; |
168 | -$i = $i+300; |
|
168 | +$i = $i + 300; |
|
169 | 169 | $output .= $i.',151.783334,8.45,150000,'; |
170 | -$i = $i+300; |
|
170 | +$i = $i + 300; |
|
171 | 171 | $output .= $i.',151.749999,7.416667,150000,'; |
172 | -$i = $i+300; |
|
172 | +$i = $i + 300; |
|
173 | 173 | $output .= $i.',152.160003,-4.199999,150000,'; |
174 | -$i = $i+300; |
|
174 | +$i = $i + 300; |
|
175 | 175 | $output .= $i.',146.990005,-6.719999,150000,'; |
176 | -$i = $i+300; |
|
176 | +$i = $i + 300; |
|
177 | 177 | $output .= $i.',143.211639,-9.085352,150000,'; |
178 | -$i = $i+300; |
|
178 | +$i = $i + 300; |
|
179 | 179 | $output .= $i.',146.779998,-19.26,150000,'; |
180 | -$i = $i+300; |
|
180 | +$i = $i + 300; |
|
181 | 181 | $output .= $i.',149.179992,-21.139999,150000,'; |
182 | -$i = $i+300; |
|
182 | +$i = $i + 300; |
|
183 | 183 | $output .= $i.',153.020004,-27.459999,150000,'; |
184 | -$i = $i+300; |
|
184 | +$i = $i + 300; |
|
185 | 185 | $output .= $i.',151.210006,-33.869998,150000,'; |
186 | -$i = $i+300; |
|
186 | +$i = $i + 300; |
|
187 | 187 | $output .= $i.',147.291199,-42.85088,150000,'; |
188 | -$i = $i+300; |
|
188 | +$i = $i + 300; |
|
189 | 189 | $output .= $i.',138.600006,-34.93,150000,'; |
190 | -$i = $i+300; |
|
190 | +$i = $i + 300; |
|
191 | 191 | $output .= $i.',133.869995,-23.7,150000,'; |
192 | -$i = $i+300; |
|
192 | +$i = $i + 300; |
|
193 | 193 | $output .= $i.',130.850006,-12.43,150000,'; |
194 | -$i = $i+300; |
|
194 | +$i = $i + 300; |
|
195 | 195 | $output .= $i.',143.62,-3.56,150000,'; |
196 | -$i = $i+300; |
|
196 | +$i = $i + 300; |
|
197 | 197 | $output .= $i.',134.5552,7.3608,150000,'; |
198 | -$i = $i+300; |
|
198 | +$i = $i + 300; |
|
199 | 199 | $output .= $i.',135.169998,34.68,150000,'; |
200 | -$i = $i+300; |
|
200 | +$i = $i + 300; |
|
201 | 201 | $output .= $i.',138.690002,35.169998,150000,'; |
202 | -$i = $i+300; |
|
202 | +$i = $i + 300; |
|
203 | 203 | $output .= $i.',139.770004,35.669998,150000,'; |
204 | -$i = $i+300; |
|
204 | +$i = $i + 300; |
|
205 | 205 | $output .= $i.',140.740005,40.830001,150000,'; |
206 | -$i = $i+300; |
|
206 | +$i = $i + 300; |
|
207 | 207 | $output .= $i.',128.600006,35.869998,150000,'; |
208 | -$i = $i+300; |
|
208 | +$i = $i + 300; |
|
209 | 209 | $output .= $i.',125.925925,38.950981,150000,'; |
210 | -$i = $i+300; |
|
210 | +$i = $i + 300; |
|
211 | 211 | $output .= $i.',129.771118,62.093056,150000,'; |
212 | -$i = $i+300; |
|
212 | +$i = $i + 300; |
|
213 | 213 | $output .= $i.',104.239997,52.330001,150000,'; |
214 | -$i = $i+300; |
|
214 | +$i = $i + 300; |
|
215 | 215 | $output .= $i.',114.5056,48.060478,150000,'; |
216 | -$i = $i+300; |
|
216 | +$i = $i + 300; |
|
217 | 217 | $output .= $i.',106.580001,29.569999,150000,'; |
218 | -$i = $i+300; |
|
218 | +$i = $i + 300; |
|
219 | 219 | $output .= $i.',121.470001,31.229999,150000,'; |
220 | -$i = $i+300; |
|
220 | +$i = $i + 300; |
|
221 | 221 | $output .= $i.',113.25,23.12,150000,'; |
222 | -$i = $i+300; |
|
222 | +$i = $i + 300; |
|
223 | 223 | $output .= $i.',114.177465,22.307184,150000,'; |
224 | -$i = $i+300; |
|
224 | +$i = $i + 300; |
|
225 | 225 | $output .= $i.',121.639999,18.36,150000,'; |
226 | -$i = $i+300; |
|
226 | +$i = $i + 300; |
|
227 | 227 | $output .= $i.',122.080001,6.92,150000,'; |
228 | -$i = $i+300; |
|
228 | +$i = $i + 300; |
|
229 | 229 | $output .= $i.',114.639999,4.809999,150000,'; |
230 | -$i = $i+300; |
|
230 | +$i = $i + 300; |
|
231 | 231 | $output .= $i.',119.412399,-5.152193,150000,'; |
232 | -$i = $i+300; |
|
232 | +$i = $i + 300; |
|
233 | 233 | $output .= $i.',122.230003,-17.959999,150000,'; |
234 | -$i = $i+300; |
|
234 | +$i = $i + 300; |
|
235 | 235 | $output .= $i.',115.839996,-31.959999,150000,'; |
236 | -$i = $i+300; |
|
236 | +$i = $i + 300; |
|
237 | 237 | $output .= $i.',105.680687,-10.428593,150000,'; |
238 | -$i = $i+300; |
|
238 | +$i = $i + 300; |
|
239 | 239 | $output .= $i.',104.75,-2.99,150000,'; |
240 | -$i = $i+300; |
|
240 | +$i = $i + 300; |
|
241 | 241 | $output .= $i.',113.029998,3.17,150000,'; |
242 | -$i = $i+300; |
|
242 | +$i = $i + 300; |
|
243 | 243 | $output .= $i.',100.720001,4.86,150000,'; |
244 | -$i = $i+300; |
|
244 | +$i = $i + 300; |
|
245 | 245 | $output .= $i.',104.18,10.609999,150000,'; |
246 | -$i = $i+300; |
|
246 | +$i = $i + 300; |
|
247 | 247 | $output .= $i.',103.864403,13.36866,150000,'; |
248 | -$i = $i+300; |
|
248 | +$i = $i + 300; |
|
249 | 249 | $output .= $i.',99.330001,9.14,150000,'; |
250 | -$i = $i+300; |
|
250 | +$i = $i + 300; |
|
251 | 251 | $output .= $i.',105.073303,18.30217,150000,'; |
252 | -$i = $i+300; |
|
252 | +$i = $i + 300; |
|
253 | 253 | $output .= $i.',91.132088,29.6507,150000,'; |
254 | -$i = $i+300; |
|
254 | +$i = $i + 300; |
|
255 | 255 | $output .= $i.',116.477651,40.332809,150000,'; |
256 | -$i = $i+300; |
|
256 | +$i = $i + 300; |
|
257 | 257 | $output .= $i.',93.059997,56.02,150000,'; |
258 | -$i = $i+300; |
|
258 | +$i = $i + 300; |
|
259 | 259 | $output .= $i.',86.18,69.410003,150000,'; |
260 | -$i = $i+300; |
|
260 | +$i = $i + 300; |
|
261 | 261 | $output .= $i.',88.202881,69.315422,150000,'; |
262 | -$i = $i+300; |
|
262 | +$i = $i + 300; |
|
263 | 263 | $output .= $i.',73.400001,55,150000,'; |
264 | -$i = $i+300; |
|
264 | +$i = $i + 300; |
|
265 | 265 | $output .= $i.',76.949996,52.299999,150000,'; |
266 | -$i = $i+300; |
|
266 | +$i = $i + 300; |
|
267 | 267 | $output .= $i.',78.379997,42.490001,150000,'; |
268 | -$i = $i+300; |
|
268 | +$i = $i + 300; |
|
269 | 269 | $output .= $i.',69.779998,37.919998,150000,'; |
270 | -$i = $i+300; |
|
270 | +$i = $i + 300; |
|
271 | 271 | $output .= $i.',86.933333,27.983333,150000,'; |
272 | -$i = $i+300; |
|
272 | +$i = $i + 300; |
|
273 | 273 | $output .= $i.',84.870002,27.02,150000,'; |
274 | -$i = $i+300; |
|
274 | +$i = $i + 300; |
|
275 | 275 | $output .= $i.',88.36,22.569999,150000,'; |
276 | -$i = $i+300; |
|
276 | +$i = $i + 300; |
|
277 | 277 | $output .= $i.',90.389999,23.7,150000,'; |
278 | -$i = $i+300; |
|
278 | +$i = $i + 300; |
|
279 | 279 | $output .= $i.',97.04,20.78,150000,'; |
280 | -$i = $i+300; |
|
280 | +$i = $i + 300; |
|
281 | 281 | $output .= $i.',92.762917,11.66857,150000,'; |
282 | -$i = $i+300; |
|
282 | +$i = $i + 300; |
|
283 | 283 | $output .= $i.',50.23720550537109,-46.10261535644531,150000,'; |
284 | -$i = $i+300; |
|
284 | +$i = $i + 300; |
|
285 | 285 | $output .= $i.',72.422489,-7.336367,150000,'; |
286 | -$i = $i+300; |
|
286 | +$i = $i + 300; |
|
287 | 287 | $output .= $i.',73.510915,4.174199,150000,'; |
288 | -$i = $i+300; |
|
288 | +$i = $i + 300; |
|
289 | 289 | $output .= $i.',81.050003,6.989999,150000,'; |
290 | -$i = $i+300; |
|
290 | +$i = $i + 300; |
|
291 | 291 | $output .= $i.',72.819999,18.959999,150000,'; |
292 | -$i = $i+300; |
|
292 | +$i = $i + 300; |
|
293 | 293 | $output .= $i.',78.042222,27.174167,150000,'; |
294 | -$i = $i+300; |
|
294 | +$i = $i + 300; |
|
295 | 295 | $output .= $i.',71.449996,30.2,150000,'; |
296 | -$i = $i+300; |
|
296 | +$i = $i + 300; |
|
297 | 297 | $output .= $i.',67.109993,36.703819,150000,'; |
298 | -$i = $i+300; |
|
298 | +$i = $i + 300; |
|
299 | 299 | $output .= $i.',54.36,39.509998,150000,'; |
300 | -$i = $i+300; |
|
300 | +$i = $i + 300; |
|
301 | 301 | $output .= $i.',63.726529,40.214486,150000,'; |
302 | -$i = $i+300; |
|
302 | +$i = $i + 300; |
|
303 | 303 | $output .= $i.',58.853439,48.251126,150000,'; |
304 | -$i = $i+300; |
|
304 | +$i = $i + 300; |
|
305 | 305 | $output .= $i.',56.23246,58.00024,150000,'; |
306 | -$i = $i+300; |
|
306 | +$i = $i + 300; |
|
307 | 307 | $output .= $i.',49.659999,58.599998,150000,'; |
308 | -$i = $i+300; |
|
308 | +$i = $i + 300; |
|
309 | 309 | $output .= $i.',50.150001,53.2,150000,'; |
310 | -$i = $i+300; |
|
310 | +$i = $i + 300; |
|
311 | 311 | $output .= $i.',44.11,41.979999,150000,'; |
312 | -$i = $i+300; |
|
312 | +$i = $i + 300; |
|
313 | 313 | $output .= $i.',49.893226,40.38344,150000,'; |
314 | -$i = $i+300; |
|
314 | +$i = $i + 300; |
|
315 | 315 | $output .= $i.',44.75,40.5,150000,'; |
316 | -$i = $i+300; |
|
316 | +$i = $i + 300; |
|
317 | 317 | $output .= $i.',50.95,34.650001,150000,'; |
318 | -$i = $i+300; |
|
318 | +$i = $i + 300; |
|
319 | 319 | $output .= $i.',56.27433,27.18717,150000,'; |
320 | -$i = $i+300; |
|
320 | +$i = $i + 300; |
|
321 | 321 | $output .= $i.',54.989491,25.005817,150000,'; |
322 | -$i = $i+300; |
|
322 | +$i = $i + 300; |
|
323 | 323 | $output .= $i.',59.549999,22.569999,150000,'; |
324 | -$i = $i+300; |
|
324 | +$i = $i + 300; |
|
325 | 325 | $output .= $i.',47.58318996007591,-9.722414273737707,150000,'; |
326 | -$i = $i+300; |
|
326 | +$i = $i + 300; |
|
327 | 327 | $output .= $i.',57.471008,-20.26026,150000,'; |
328 | -$i = $i+300; |
|
328 | +$i = $i + 300; |
|
329 | 329 | $output .= $i.',37.946460723877,-46.6428451538086,150000,'; |
330 | -$i = $i+300; |
|
330 | +$i = $i + 300; |
|
331 | 331 | $output .= $i.',53,-67.5,150000,'; |
332 | -$i = $i+300; |
|
332 | +$i = $i + 300; |
|
333 | 333 | $output .= $i.',46.99004,-25.03233,150000,'; |
334 | -$i = $i+300; |
|
334 | +$i = $i + 300; |
|
335 | 335 | $output .= $i.',46.310001,-15.72,150000,'; |
336 | -$i = $i+300; |
|
336 | +$i = $i + 300; |
|
337 | 337 | $output .= $i.',44.41203117370608,-12.22338294982911,150000,'; |
338 | -$i = $i+300; |
|
338 | +$i = $i + 300; |
|
339 | 339 | $output .= $i.',39.3822,-6.097406,150000,'; |
340 | -$i = $i+300; |
|
340 | +$i = $i + 300; |
|
341 | 341 | $output .= $i.',39.659999,-4.039999,150000,'; |
342 | -$i = $i+300; |
|
342 | +$i = $i + 300; |
|
343 | 343 | $output .= $i.',40.033333,7.916667,150000,'; |
344 | -$i = $i+300; |
|
344 | +$i = $i + 300; |
|
345 | 345 | $output .= $i.',42.549999,16.899999,150000,'; |
346 | -$i = $i+300; |
|
346 | +$i = $i + 300; |
|
347 | 347 | $output .= $i.',43.970001,26.37,150000,'; |
348 | -$i = $i+300; |
|
348 | +$i = $i + 300; |
|
349 | 349 | $output .= $i.',41.12,30.455,150000,'; |
350 | -$i = $i+300; |
|
350 | +$i = $i + 300; |
|
351 | 351 | $output .= $i.',38.278671,34.547951,150000,'; |
352 | -$i = $i+300; |
|
352 | +$i = $i + 300; |
|
353 | 353 | $output .= $i.',37.619998,55.75,150000,'; |
354 | -$i = $i+300; |
|
354 | +$i = $i + 300; |
|
355 | 355 | $output .= $i.',30.453329,59.951889,150000,'; |
356 | -$i = $i+300; |
|
356 | +$i = $i + 300; |
|
357 | 357 | $output .= $i.',23.12,63.84,150000,'; |
358 | -$i = $i+300; |
|
358 | +$i = $i + 300; |
|
359 | 359 | $output .= $i.',26.709999,58.380001,150000,'; |
360 | -$i = $i+300; |
|
360 | +$i = $i + 300; |
|
361 | 361 | $output .= $i.',25.42,57.549999,150000,'; |
362 | -$i = $i+300; |
|
362 | +$i = $i + 300; |
|
363 | 363 | $output .= $i.',23.319999,55.93,150000,'; |
364 | -$i = $i+300; |
|
364 | +$i = $i + 300; |
|
365 | 365 | $output .= $i.',26.1,52.119998,150000,'; |
366 | -$i = $i+300; |
|
366 | +$i = $i + 300; |
|
367 | 367 | $output .= $i.',32.259998,48.5,150000,'; |
368 | -$i = $i+300; |
|
368 | +$i = $i + 300; |
|
369 | 369 | $output .= $i.',28.829999,47.029998,150000,'; |
370 | -$i = $i+300; |
|
370 | +$i = $i + 300; |
|
371 | 371 | $output .= $i.',25.61,45.659999,150000,'; |
372 | -$i = $i+300; |
|
372 | +$i = $i + 300; |
|
373 | 373 | $output .= $i.',27.469999,42.509998,150000,'; |
374 | -$i = $i+300; |
|
374 | +$i = $i + 300; |
|
375 | 375 | $output .= $i.',23.729999,37.979999,150000,'; |
376 | -$i = $i+300; |
|
376 | +$i = $i + 300; |
|
377 | 377 | $output .= $i.',27.149999,38.43,150000,'; |
378 | -$i = $i+300; |
|
378 | +$i = $i + 300; |
|
379 | 379 | $output .= $i.',31.132659,29.977088,150000,'; |
380 | -$i = $i+300; |
|
380 | +$i = $i + 300; |
|
381 | 381 | $output .= $i.',32.659999,13.17,150000,'; |
382 | -$i = $i+300; |
|
382 | +$i = $i + 300; |
|
383 | 383 | $output .= $i.',33.599998,1.71,150000,'; |
384 | -$i = $i+300; |
|
384 | +$i = $i + 300; |
|
385 | 385 | $output .= $i.',25.92,-2.95,150000,'; |
386 | -$i = $i+300; |
|
386 | +$i = $i + 300; |
|
387 | 387 | $output .= $i.',28.45,-14.439999,150000,'; |
388 | -$i = $i+300; |
|
388 | +$i = $i + 300; |
|
389 | 389 | $output .= $i.',30.819999,-20.059999,150000,'; |
390 | -$i = $i+300; |
|
390 | +$i = $i + 300; |
|
391 | 391 | $output .= $i.',21.639999,-21.7,150000,'; |
392 | -$i = $i+300; |
|
392 | +$i = $i + 300; |
|
393 | 393 | $output .= $i.',25.59,-33.959999,150000,'; |
394 | -$i = $i+300; |
|
394 | +$i = $i + 300; |
|
395 | 395 | $output .= $i.',18.129999,-26.579999,150000,'; |
396 | -$i = $i+300; |
|
396 | +$i = $i + 300; |
|
397 | 397 | $output .= $i.',13.767777,-10.722417,150000,'; |
398 | -$i = $i+300; |
|
398 | +$i = $i + 300; |
|
399 | 399 | $output .= $i.',10.13,-0.15,150000,'; |
400 | -$i = $i+300; |
|
400 | +$i = $i + 300; |
|
401 | 401 | $output .= $i.',20.67,5.76,150000,'; |
402 | -$i = $i+300; |
|
402 | +$i = $i + 300; |
|
403 | 403 | $output .= $i.',9.71,4.059999,150000,'; |
404 | -$i = $i+300; |
|
404 | +$i = $i + 300; |
|
405 | 405 | $output .= $i.',7.44,10.52,150000,'; |
406 | -$i = $i+300; |
|
406 | +$i = $i + 300; |
|
407 | 407 | $output .= $i.',18.69,12.189999,150000,'; |
408 | -$i = $i+300; |
|
408 | +$i = $i + 300; |
|
409 | 409 | $output .= $i.',7.98,17,150000,'; |
410 | -$i = $i+300; |
|
410 | +$i = $i + 300; |
|
411 | 411 | $output .= $i.',14.42,27.069999,150000,'; |
412 | -$i = $i+300; |
|
412 | +$i = $i + 300; |
|
413 | 413 | $output .= $i.',3.678539,32.489059,150000,'; |
414 | -$i = $i+300; |
|
414 | +$i = $i + 300; |
|
415 | 415 | $output .= $i.',-7.619999,33.599998,150000,'; |
416 | -$i = $i+300; |
|
416 | +$i = $i + 300; |
|
417 | 417 | $output .= $i.',13.611066,38.129963,150000,'; |
418 | -$i = $i+300; |
|
418 | +$i = $i + 300; |
|
419 | 419 | $output .= $i.',12.482323,41.895466,150000,'; |
420 | -$i = $i+300; |
|
420 | +$i = $i + 300; |
|
421 | 421 | $output .= $i.',17.189752,44.763891,150000,'; |
422 | -$i = $i+300; |
|
422 | +$i = $i + 300; |
|
423 | 423 | $output .= $i.',16.45,43.509998,150000,'; |
424 | -$i = $i+300; |
|
424 | +$i = $i + 300; |
|
425 | 425 | $output .= $i.',14.51,46.060001,150000,'; |
426 | -$i = $i+300; |
|
426 | +$i = $i + 300; |
|
427 | 427 | $output .= $i.',21.629999,47.54,150000,'; |
428 | -$i = $i+300; |
|
428 | +$i = $i + 300; |
|
429 | 429 | $output .= $i.',16.37,48.220001,150000,'; |
430 | -$i = $i+300; |
|
430 | +$i = $i + 300; |
|
431 | 431 | $output .= $i.',10.736111,47.554444,150000,'; |
432 | -$i = $i+300; |
|
432 | +$i = $i + 300; |
|
433 | 433 | $output .= $i.',14.43,50.080001,150000,'; |
434 | -$i = $i+300; |
|
434 | +$i = $i + 300; |
|
435 | 435 | $output .= $i.',17.129999,48.159999,150000,'; |
436 | -$i = $i+300; |
|
436 | +$i = $i + 300; |
|
437 | 437 | $output .= $i.',22.569999,51.240001,150000,'; |
438 | -$i = $i+300; |
|
438 | +$i = $i + 300; |
|
439 | 439 | $output .= $i.',13.411895,52.523781,150000,'; |
440 | -$i = $i+300; |
|
440 | +$i = $i + 300; |
|
441 | 441 | $output .= $i.',10.039999,56.470001,150000,'; |
442 | -$i = $i+300; |
|
442 | +$i = $i + 300; |
|
443 | 443 | $output .= $i.',13.02,55.61,150000,'; |
444 | -$i = $i+300; |
|
444 | +$i = $i + 300; |
|
445 | 445 | $output .= $i.',17.329999,62.400001,150000,'; |
446 | -$i = $i+300; |
|
446 | +$i = $i + 300; |
|
447 | 447 | $output .= $i.',14.229999,78.059997,150000,'; |
448 | -$i = $i+300; |
|
448 | +$i = $i + 300; |
|
449 | 449 | $output .= $i.',10.399999,63.439998,150000,'; |
450 | -$i = $i+300; |
|
450 | +$i = $i + 300; |
|
451 | 451 | $output .= $i.',2.350966,48.856558,150000,'; |
452 | -$i = $i+300; |
|
452 | +$i = $i + 300; |
|
453 | 453 | $output .= $i.',7.42,43.75,150000,'; |
454 | -$i = $i+300; |
|
454 | +$i = $i + 300; |
|
455 | 455 | $output .= $i.',1.57,42.54,150000,'; |
456 | -$i = $i+300; |
|
456 | +$i = $i + 300; |
|
457 | 457 | $output .= $i.',-0.991293,37.605651,150000,'; |
458 | -$i = $i+300; |
|
458 | +$i = $i + 300; |
|
459 | 459 | $output .= $i.',-7.429999,39.29,150000,'; |
460 | -$i = $i+300; |
|
460 | +$i = $i + 300; |
|
461 | 461 | $output .= $i.',-11.4053,16.5889,150000,'; |
462 | -$i = $i+300; |
|
462 | +$i = $i + 300; |
|
463 | 463 | $output .= $i.',-3.009999,16.78,150000,'; |
464 | -$i = $i+300; |
|
464 | +$i = $i + 300; |
|
465 | 465 | $output .= $i.',-5.36008,5.83885,150000,'; |
466 | -$i = $i+300; |
|
466 | +$i = $i + 300; |
|
467 | 467 | $output .= $i.',-12.3,11.319999,150000,'; |
468 | -$i = $i+300; |
|
468 | +$i = $i + 300; |
|
469 | 469 | $output .= $i.',-16.239999,12.829999,150000,'; |
470 | -$i = $i+300; |
|
470 | +$i = $i + 300; |
|
471 | 471 | $output .= $i.',-16.2507,28.457661,150000,'; |
472 | -$i = $i+300; |
|
472 | +$i = $i + 300; |
|
473 | 473 | $output .= $i.',-0.126197,51.500197,150000,'; |
474 | -$i = $i+300; |
|
474 | +$i = $i + 300; |
|
475 | 475 | $output .= $i.',-2.968111,56.461428,150000,'; |
476 | -$i = $i+300; |
|
476 | +$i = $i + 300; |
|
477 | 477 | $output .= $i.',-7.308429,54.998539,150000,'; |
478 | -$i = $i+300; |
|
478 | +$i = $i + 300; |
|
479 | 479 | $output .= $i.',-8.92,52.7,150000,'; |
480 | -$i = $i+300; |
|
480 | +$i = $i + 300; |
|
481 | 481 | $output .= $i.',-19.000959,63.427502,150000,'; |
482 | -$i = $i+300; |
|
482 | +$i = $i + 300; |
|
483 | 483 | $output .= $i.',-28.364049911499,38.47212219238281,150000,'; |
484 | -$i = $i+300; |
|
484 | +$i = $i + 300; |
|
485 | 485 | $output .= $i.',-23.76,15.279999,150000,'; |
486 | -$i = $i+300; |
|
486 | +$i = $i + 300; |
|
487 | 487 | $output .= $i.',-36.511219,-54.274151,150000,'; |
488 | -$i = $i+300; |
|
488 | +$i = $i + 300; |
|
489 | 489 | $output .= $i.',-58.979999,-51.830001,150000,'; |
490 | -$i = $i+300; |
|
490 | +$i = $i + 300; |
|
491 | 491 | $output .= $i.',-64.190002,-31.399999,150000,'; |
492 | -$i = $i+300; |
|
492 | +$i = $i + 300; |
|
493 | 493 | $output .= $i.',-54.18,-32.36,150000,'; |
494 | -$i = $i+300; |
|
494 | +$i = $i + 300; |
|
495 | 495 | $output .= $i.',-43.2,-22.909999,150000,'; |
496 | -$i = $i+300; |
|
496 | +$i = $i + 300; |
|
497 | 497 | $output .= $i.',-37.333333,65.666667,150000,'; |
498 | -$i = $i+300; |
|
498 | +$i = $i + 300; |
|
499 | 499 | $output .= $i.',-69.345131,77.48262,150000,'; |
500 | -$i = $i+300; |
|
500 | +$i = $i + 300; |
|
501 | 501 | $output .= $i.',-55.65049,48.929001,150000,'; |
502 | -$i = $i+300; |
|
502 | +$i = $i + 300; |
|
503 | 503 | $output .= $i.',-63.530471,44.681263,150000,'; |
504 | -$i = $i+300; |
|
504 | +$i = $i + 300; |
|
505 | 505 | $output .= $i.',-66.647818,45.957319,150000,'; |
506 | -$i = $i+300; |
|
506 | +$i = $i + 300; |
|
507 | 507 | $output .= $i.',-59.630001,13.18,150000,'; |
508 | -$i = $i+300; |
|
508 | +$i = $i + 300; |
|
509 | 509 | $output .= $i.',-61.744888,12.06526,150000,'; |
510 | -$i = $i+300; |
|
510 | +$i = $i + 300; |
|
511 | 511 | $output .= $i.',-61.171322,10.30501,150000,'; |
512 | -$i = $i+300; |
|
512 | +$i = $i + 300; |
|
513 | 513 | $output .= $i.',-67.470001,7.9,150000,'; |
514 | -$i = $i+300; |
|
514 | +$i = $i + 300; |
|
515 | 515 | $output .= $i.',-58.159999,6.789999,150000,'; |
516 | -$i = $i+300; |
|
516 | +$i = $i + 300; |
|
517 | 517 | $output .= $i.',-60.02,-3.119999,150000,'; |
518 | -$i = $i+300; |
|
518 | +$i = $i + 300; |
|
519 | 519 | $output .= $i.',-56.45,-14.409999,150000,'; |
520 | -$i = $i+300; |
|
520 | +$i = $i + 300; |
|
521 | 521 | $output .= $i.',-65.260002,-19.059999,150000,'; |
522 | -$i = $i+300; |
|
522 | +$i = $i + 300; |
|
523 | 523 | $output .= $i.',-56.636503,-24.158676,150000,'; |
524 | -$i = $i+300; |
|
524 | +$i = $i + 300; |
|
525 | 525 | $output .= $i.',-56.509998,-33.409999,150000,'; |
526 | -$i = $i+300; |
|
526 | +$i = $i + 300; |
|
527 | 527 | $output .= $i.',-68.523514,-50.021889,150000,'; |
528 | -$i = $i+300; |
|
528 | +$i = $i + 300; |
|
529 | 529 | $output .= $i.',-72.505127,-51.732529,150000,'; |
530 | -$i = $i+300; |
|
530 | +$i = $i + 300; |
|
531 | 531 | $output .= $i.',-71.639999,-33.04,150000,'; |
532 | -$i = $i+300; |
|
532 | +$i = $i + 300; |
|
533 | 533 | $output .= $i.',-72.515821,-13.162849,150000,'; |
534 | -$i = $i+300; |
|
534 | +$i = $i + 300; |
|
535 | 535 | $output .= $i.',-76.970001,-6.03,150000,'; |
536 | -$i = $i+300; |
|
536 | +$i = $i + 300; |
|
537 | 537 | $output .= $i.',-78.620002,-1.24,150000,'; |
538 | -$i = $i+300; |
|
538 | +$i = $i + 300; |
|
539 | 539 | $output .= $i.',-76.739997,8.1,150000,'; |
540 | -$i = $i+300; |
|
540 | +$i = $i + 300; |
|
541 | 541 | $output .= $i.',-79.879913,9.368985,150000,'; |
542 | -$i = $i+300; |
|
542 | +$i = $i + 300; |
|
543 | 543 | $output .= $i.',-76.949996,18,150000,'; |
544 | -$i = $i+300; |
|
544 | +$i = $i + 300; |
|
545 | 545 | $output .= $i.',-72.699996,19.11,150000,'; |
546 | -$i = $i+300; |
|
546 | +$i = $i + 300; |
|
547 | 547 | $output .= $i.',-75.220001,20.149999,150000,'; |
548 | -$i = $i+300; |
|
548 | +$i = $i + 300; |
|
549 | 549 | $output .= $i.',-73.682953,20.95027,150000,'; |
550 | -$i = $i+300; |
|
550 | +$i = $i + 300; |
|
551 | 551 | $output .= $i.',-80.605,28.405556,150000,'; |
552 | -$i = $i+300; |
|
552 | +$i = $i + 300; |
|
553 | 553 | $output .= $i.',-84.388056,33.748889,150000,'; |
554 | -$i = $i+300; |
|
554 | +$i = $i + 300; |
|
555 | 555 | $output .= $i.',-79.931111,32.776389,150000,'; |
556 | -$i = $i+300; |
|
556 | +$i = $i + 300; |
|
557 | 557 | $output .= $i.',-83.920833,35.960556,150000,'; |
558 | -$i = $i+300; |
|
558 | +$i = $i + 300; |
|
559 | 559 | $output .= $i.',-84.500278,38.049167,150000,'; |
560 | -$i = $i+300; |
|
560 | +$i = $i + 300; |
|
561 | 561 | $output .= $i.',-77.460833,38.303056,150000,'; |
562 | -$i = $i+300; |
|
562 | +$i = $i + 300; |
|
563 | 563 | $output .= $i.',-82.515556,40.758333,150000,'; |
564 | -$i = $i+300; |
|
564 | +$i = $i + 300; |
|
565 | 565 | $output .= $i.',-83.045833,42.331389,150000,'; |
566 | -$i = $i+300; |
|
566 | +$i = $i + 300; |
|
567 | 567 | $output .= $i.',-74.006389,40.714167,150000,'; |
568 | -$i = $i+300; |
|
568 | +$i = $i + 300; |
|
569 | 569 | $output .= $i.',-71.802778,42.2625,150000,'; |
570 | -$i = $i+300; |
|
570 | +$i = $i + 300; |
|
571 | 571 | $output .= $i.',-72.973056,43.610556,150000,'; |
572 | -$i = $i+300; |
|
572 | +$i = $i + 300; |
|
573 | 573 | $output .= $i.',-68.0125,46.860556,150000,'; |
574 | -$i = $i+300; |
|
574 | +$i = $i + 300; |
|
575 | 575 | $output .= $i.',-72.581779,46.357398,150000,'; |
576 | -$i = $i+300; |
|
576 | +$i = $i + 300; |
|
577 | 577 | $output .= $i.',-78.53632621543271,52.72737572958358,150000,'; |
578 | -$i = $i+300; |
|
578 | +$i = $i + 300; |
|
579 | 579 | $output .= $i.',-66.921779,52.940118,150000,'; |
580 | -$i = $i+300; |
|
580 | +$i = $i + 300; |
|
581 | 581 | $output .= $i.',-75.652573,62.201069,150000,'; |
582 | -$i = $i+300; |
|
582 | +$i = $i + 300; |
|
583 | 583 | $output .= $i.',-64.865257,67.935417,150000,'; |
584 | -$i = $i+300; |
|
584 | +$i = $i + 300; |
|
585 | 585 | $output .= $i.',-94.969443,74.716943,150000,'; |
586 | -$i = $i+300; |
|
586 | +$i = $i + 300; |
|
587 | 587 | $output .= $i.',-82.793909,76.395731,150000,'; |
588 | -$i = $i+300; |
|
588 | +$i = $i + 300; |
|
589 | 589 | $output .= $i.',-97.49276733398439,69.18675994873048,150000,'; |
590 | -$i = $i+300; |
|
590 | +$i = $i + 300; |
|
591 | 591 | $output .= $i.',-90.5537452697754,63.36753463745121,150000,'; |
592 | -$i = $i+300; |
|
592 | +$i = $i + 300; |
|
593 | 593 | $output .= $i.',-89.270113,48.412197,150000,'; |
594 | -$i = $i+300; |
|
594 | +$i = $i + 300; |
|
595 | 595 | $output .= $i.',-79.604159,43.68731,150000,'; |
596 | -$i = $i+300; |
|
596 | +$i = $i + 300; |
|
597 | 597 | $output .= $i.',-89.401111,43.073056,150000,'; |
598 | -$i = $i+300; |
|
598 | +$i = $i + 300; |
|
599 | 599 | $output .= $i.',-94.633611,42.395278,150000,'; |
600 | -$i = $i+300; |
|
600 | +$i = $i + 300; |
|
601 | 601 | $output .= $i.',-89.588889,40.693611,150000,'; |
602 | -$i = $i+300; |
|
602 | +$i = $i + 300; |
|
603 | 603 | $output .= $i.',-90.197778,38.627222,150000,'; |
604 | -$i = $i+300; |
|
604 | +$i = $i + 300; |
|
605 | 605 | $output .= $i.',-90.704167,35.842222,150000,'; |
606 | -$i = $i+300; |
|
606 | +$i = $i + 300; |
|
607 | 607 | $output .= $i.',-91.061667,33.41,150000,'; |
608 | -$i = $i+300; |
|
608 | +$i = $i + 300; |
|
609 | 609 | $output .= $i.',-92.445,31.311111,150000,'; |
610 | -$i = $i+300; |
|
610 | +$i = $i + 300; |
|
611 | 611 | $output .= $i.',-98.493333,29.423889,150000,'; |
612 | -$i = $i+300; |
|
612 | +$i = $i + 300; |
|
613 | 613 | $output .= $i.',-103.349998,20.67,150000,'; |
614 | -$i = $i+300; |
|
614 | +$i = $i + 300; |
|
615 | 615 | $output .= $i.',-86.830001,21.17,150000,'; |
616 | -$i = $i+300; |
|
616 | +$i = $i + 300; |
|
617 | 617 | $output .= $i.',-89.529998,14.979999,150000,'; |
618 | -$i = $i+300; |
|
618 | +$i = $i + 300; |
|
619 | 619 | $output .= $i.',-87.449996,13.42,150000,'; |
620 | -$i = $i+300; |
|
620 | +$i = $i + 300; |
|
621 | 621 | $output .= $i.',-83.709999,9.369999,150000,'; |
622 | -$i = $i+300; |
|
622 | +$i = $i + 300; |
|
623 | 623 | $output .= $i.',-91.5149765,-0.3781085,150000,'; |
624 | -$i = $i+300; |
|
624 | +$i = $i + 300; |
|
625 | 625 | $output .= $i.',-109.425598,-27.1546,150000,'; |
626 | -$i = $i+300; |
|
626 | +$i = $i + 300; |
|
627 | 627 | $output .= $i.',-109.9142,22.88093,150000,'; |
628 | -$i = $i+300; |
|
628 | +$i = $i + 300; |
|
629 | 629 | $output .= $i.',-110.910003,27.92,150000,'; |
630 | -$i = $i+300; |
|
630 | +$i = $i + 300; |
|
631 | 631 | $output .= $i.',-110.925833,32.221667,150000,'; |
632 | -$i = $i+300; |
|
632 | +$i = $i + 300; |
|
633 | 633 | $output .= $i.',-104.526667,33.395,150000,'; |
634 | -$i = $i+300; |
|
634 | +$i = $i + 300; |
|
635 | 635 | $output .= $i.',-113.061111,37.6775,150000,'; |
636 | -$i = $i+300; |
|
636 | +$i = $i + 300; |
|
637 | 637 | $output .= $i.',-104.820833,38.833889,150000,'; |
638 | -$i = $i+300; |
|
638 | +$i = $i + 300; |
|
639 | 639 | $output .= $i.',-108.73,42.833056,150000,'; |
640 | -$i = $i+300; |
|
640 | +$i = $i + 300; |
|
641 | 641 | $output .= $i.',-113.895,45.175833,150000,'; |
642 | -$i = $i+300; |
|
642 | +$i = $i + 300; |
|
643 | 643 | $output .= $i.',-113.993056,46.872222,150000,'; |
644 | -$i = $i+300; |
|
644 | +$i = $i + 300; |
|
645 | 645 | $output .= $i.',-114.080796,51.039877,150000,'; |
646 | -$i = $i+300; |
|
646 | +$i = $i + 300; |
|
647 | 647 | $output .= $i.',-102.3889594419702,57.15883691318781,150000,'; |
648 | -$i = $i+300; |
|
648 | +$i = $i + 300; |
|
649 | 649 | $output .= $i.',-118.0333,66.0833,150000,'; |
650 | -$i = $i+300; |
|
650 | +$i = $i + 300; |
|
651 | 651 | $output .= $i.',-140.55,64.45,150000,'; |
652 | -$i = $i+300; |
|
652 | +$i = $i + 300; |
|
653 | 653 | $output .= $i.',-122.690386,58.80667,150000,'; |
654 | -$i = $i+300; |
|
654 | +$i = $i + 300; |
|
655 | 655 | $output .= $i.',-121.92985,50.686341,150000,'; |
656 | -$i = $i+300; |
|
656 | +$i = $i + 300; |
|
657 | 657 | $output .= $i.',-122.330833,47.606389,150000,'; |
658 | -$i = $i+300; |
|
658 | +$i = $i + 300; |
|
659 | 659 | $output .= $i.',-122.274167,47.564167,150000,'; |
660 | -$i = $i+300; |
|
660 | +$i = $i + 300; |
|
661 | 661 | $output .= $i.',-122.968503,45.309901,150000,'; |
662 | -$i = $i+300; |
|
662 | +$i = $i + 300; |
|
663 | 663 | $output .= $i.',-122.874444,42.326667,150000,'; |
664 | -$i = $i+300; |
|
664 | +$i = $i + 300; |
|
665 | 665 | $output .= $i.',-122.390556,40.586667,150000,'; |
666 | -$i = $i+300; |
|
666 | +$i = $i + 300; |
|
667 | 667 | $output .= $i.',-117.068611,39.493333,150000,'; |
668 | -$i = $i+300; |
|
668 | +$i = $i + 300; |
|
669 | 669 | $output .= $i.',-122.418333,37.775,150000,'; |
670 | -$i = $i+300; |
|
670 | +$i = $i + 300; |
|
671 | 671 | $output .= $i.',-117.108333,34.207778,150000,'; |
672 | -$i = $i+300; |
|
672 | +$i = $i + 300; |
|
673 | 673 | $output .= $i.',-116.544444,33.830278,150000,'; |
674 | -$i = $i+300; |
|
674 | +$i = $i + 300; |
|
675 | 675 | $output .= $i.',-117.156389,32.715278,150000,'; |
676 | -$i = $i+300; |
|
676 | +$i = $i + 300; |
|
677 | 677 | $output .= $i.',-149.891667,61.218333,150000,'; |
678 | -$i = $i+300; |
|
678 | +$i = $i + 300; |
|
679 | 679 | $output .= $i.',-155.566389,62.948889,150000,'; |
680 | -$i = $i+300; |
|
680 | +$i = $i + 300; |
|
681 | 681 | $output .= $i.',-165.406389,64.501111,150000,'; |
682 | -$i = $i+300; |
|
682 | +$i = $i + 300; |
|
683 | 683 | $output .= $i.',-155.09,19.729722,150000,'; |
684 | -$i = $i+300; |
|
684 | +$i = $i + 300; |
|
685 | 685 | $output .= $i.',-156.337974,20.804858,150000,'; |
686 | -$i = $i+300; |
|
686 | +$i = $i + 300; |
|
687 | 687 | $output .= $i.',-157.043209,21.141189,150000,'; |
688 | -$i = $i+300; |
|
688 | +$i = $i + 300; |
|
689 | 689 | $output .= $i.',-158.009167,21.386667,150000,'; |
690 | -$i = $i+300; |
|
690 | +$i = $i + 300; |
|
691 | 691 | $output .= $i.',-159.371111,21.981111,150000'; |
692 | 692 | |
693 | 693 | $output .= ']}}'; |
@@ -70,11 +70,11 @@ |
||
70 | 70 | */ |
71 | 71 | $timearray = array(); |
72 | 72 | $begin = time(); |
73 | -for ($i =0; $i <= 288; $i++) { |
|
73 | +for ($i = 0; $i <= 288; $i++) { |
|
74 | 74 | $timearray[] = ($begin + $i*300)*1000; |
75 | 75 | } |
76 | 76 | |
77 | -$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',',$timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
77 | +$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',', $timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
78 | 78 | print $output; |
79 | 79 | |
80 | 80 | ?> |