@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $hour_array = $Spotter->countAllHoursByIdent($ident); |
30 | 30 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | var data = google.visualization.arrayToDataTable([ |
37 | 37 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
38 | 38 | $hour_data = ''; |
39 | - foreach($hour_array as $hour_item) |
|
39 | + foreach ($hour_array as $hour_item) |
|
40 | 40 | { |
41 | 41 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
42 | 42 | } |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -11,10 +11,21 @@ |
||
11 | 11 | <p>You can contribute to <?php print $globalName; ?> if you have an ADS-B receiver.</p> |
12 | 12 | <h3>You need to : </h3> |
13 | 13 | <ul> |
14 | - <li>Create an account on <a href="<?php if (isset($globalContributeLogin)) print $globalContributeLogin.'">'.$globalContributeLogin; else print 'https://login.flightairmap.fr">login.flightairmap.fr'; ?></a></li> |
|
14 | + <li>Create an account on <a href="<?php if (isset($globalContributeLogin)) { |
|
15 | + print $globalContributeLogin.'">'.$globalContributeLogin; |
|
16 | +} else { |
|
17 | + print 'https://login.flightairmap.fr">login.flightairmap.fr'; |
|
18 | +} |
|
19 | +?></a></li> |
|
15 | 20 | <li>Download dump1090 fork from <a href="https://github.com/Ysurac/dump1090">https://github.com/Ysurac/dump1090</a></li> |
16 | 21 | <li>Compile zfamup1090 with <em>make zfamup1090</em> (you need to have libcurl installed)</li> |
17 | - <li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) print ' --net-zfam-addr '.$globalContributeURL; if (isset($globalContributePort)) print ' --net-zfam-port '.$globalContributePort; ?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li> |
|
22 | + <li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) { |
|
23 | + print ' --net-zfam-addr '.$globalContributeURL; |
|
24 | +} |
|
25 | +if (isset($globalContributePort)) { |
|
26 | + print ' --net-zfam-port '.$globalContributePort; |
|
27 | +} |
|
28 | +?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li> |
|
18 | 29 | </ul> |
19 | 30 | </div> |
20 | 31 | <?php |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | function drawChart() { |
62 | 62 | var data = google.visualization.arrayToDataTable([ |
63 | 63 | ["'._("Country").'", "'._("# of times").'"], '; |
64 | - $country_data = ''; |
|
64 | + $country_data = ''; |
|
65 | 65 | foreach($airline_array as $airline_item) |
66 | 66 | { |
67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Airlines by Country of %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Airlines by Country of %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByCountry($country); |
56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
57 | 57 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | var data = google.visualization.arrayToDataTable([ |
63 | 63 | ["'._("Country").'", "'._("# of times").'"], '; |
64 | 64 | $country_data = ''; |
65 | - foreach($airline_array as $airline_item) |
|
65 | + foreach ($airline_array as $airline_item) |
|
66 | 66 | { |
67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
68 | 68 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | print '</thead>'; |
97 | 97 | print '<tbody>'; |
98 | 98 | $i = 1; |
99 | - foreach($airline_array as $airline_item) |
|
99 | + foreach ($airline_array as $airline_item) |
|
100 | 100 | { |
101 | 101 | print '<tr>'; |
102 | 102 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | require_once('require/class.Connection.php'); |
3 | -require_once('require/class.Spotter.php');; |
|
3 | +require_once('require/class.Spotter.php'); ; |
|
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | require_once('require/class.SpotterLive.php'); |
6 | 6 | |
7 | 7 | $title = "Current Activity"; |
8 | 8 | require_once('header.php'); |
9 | -$SpotterLive=new SpotterLive(); |
|
9 | +$SpotterLive = new SpotterLive(); |
|
10 | 10 | //calculuation for the pagination |
11 | -if(!isset($_GET['limit'])) |
|
11 | +if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | -} else { |
|
16 | +} else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | print '<div class="table column">'; |
37 | 37 | print '<p>'._("The table below shows the detailed information of all current flights.").'</p>'; |
38 | 38 | |
39 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
39 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
40 | 40 | if (isset($_GET['sort'])) { |
41 | 41 | $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort); |
42 | 42 | } else { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $limit_start = 0; |
19 | 19 | $limit_end = 25; |
20 | 20 | $absolute_difference = 25; |
21 | -} else { |
|
21 | +} else { |
|
22 | 22 | $limit_explode = explode(",", $_GET['limit']); |
23 | 23 | $limit_start = $limit_explode[0]; |
24 | 24 | $limit_end = $limit_explode[1]; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByIdent($ident); |
30 | 30 | if (!empty($manufacturers_array)) |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | print '</thead>'; |
40 | 40 | print '<tbody>'; |
41 | 41 | $i = 1; |
42 | - foreach($manufacturers_array as $manufacturer_item) |
|
42 | + foreach ($manufacturers_array as $manufacturer_item) |
|
43 | 43 | { |
44 | 44 | print '<tr>'; |
45 | 45 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | function drawChart() { |
63 | 63 | var data = google.visualization.arrayToDataTable([ |
64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
65 | - $country_data = ''; |
|
65 | + $country_data = ''; |
|
66 | 66 | foreach($airport_country_array as $airport_item) |
67 | 67 | { |
68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | var data = google.visualization.arrayToDataTable([ |
64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
65 | 65 | $country_data = ''; |
66 | - foreach($airport_country_array as $airport_item) |
|
66 | + foreach ($airport_country_array as $airport_item) |
|
67 | 67 | { |
68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
69 | 69 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | print '</thead>'; |
98 | 98 | print '<tbody>'; |
99 | 99 | $i = 1; |
100 | - foreach($airport_country_array as $airport_item) |
|
100 | + foreach ($airport_country_array as $airport_item) |
|
101 | 101 | { |
102 | 102 | print '<tr>'; |
103 | 103 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | <footer class="container"> |
4 | 4 | <?php |
5 | - if (isset($sql_time)) { |
|
5 | + if (isset($sql_time)) { |
|
6 | 6 | ?> |
7 | 7 | <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
8 | 8 | <br /> |
9 | 9 | <?php |
10 | - } |
|
10 | + } |
|
11 | 11 | ?> |
12 | 12 | <span>Developed in Barrie by <a href="http://www.mariotrunz.com" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
13 | 13 | </footer> |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <?php |
5 | 5 | if (isset($sql_time)) { |
6 | 6 | ?> |
7 | - <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
|
7 | + <i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i> |
|
8 | 8 | <br /> |
9 | 9 | <?php |
10 | 10 | } |
@@ -9,7 +9,10 @@ |
||
9 | 9 | <?php |
10 | 10 | } |
11 | 11 | ?> |
12 | - <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
12 | + <span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) { |
|
13 | + print $globalURL; |
|
14 | +} |
|
15 | +?>/about#source">Source & Credits</a></span> - <span><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank">Report any issues</a></span> |
|
13 | 16 | </footer> |
14 | 17 | |
15 | 18 | <div class="notifications bottom-left"></div> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | $page_url = $globalURL.'/tools-acars'; |
10 | 10 | |
11 | -$message = filter_input(INPUT_POST,'acars_message',FILTER_SANITIZE_STRING); |
|
11 | +$message = filter_input(INPUT_POST, 'acars_message', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | print '<div class="info column">'; |
14 | 14 | print '<h1>'._("Parse ACARS messages").'</h1>'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<fieldset class="form-group">'; |
24 | 24 | print '<label for="notam_message">'._("NOTAM Message").'</label>'; |
25 | 25 | print '<textarea class="form-control" name="notam_message" id="notam_message" rows="5">'; |
26 | -if ($message != '') print $message; |
|
26 | +if ($message != '') { |
|
27 | + print $message; |
|
28 | +} |
|
27 | 29 | print '</textarea>'; |
28 | 30 | print '</fieldset>'; |
29 | 31 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | function drawChart() { |
70 | 70 | var data = google.visualization.arrayToDataTable([ |
71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
72 | - $country_data = ''; |
|
72 | + $country_data = ''; |
|
73 | 73 | foreach($airport_country_array as $airport_item) |
74 | 74 | { |
75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
24 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirline($airline); |
64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
65 | 65 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | var data = google.visualization.arrayToDataTable([ |
71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
72 | 72 | $country_data = ''; |
73 | - foreach($airport_country_array as $airport_item) |
|
73 | + foreach ($airport_country_array as $airport_item) |
|
74 | 74 | { |
75 | 75 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
76 | 76 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | print '</thead>'; |
105 | 105 | print '<tbody>'; |
106 | 106 | $i = 1; |
107 | - foreach($airport_country_array as $airport_item) |
|
107 | + foreach ($airport_country_array as $airport_item) |
|
108 | 108 | { |
109 | 109 | print '<tr>'; |
110 | 110 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
25 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
25 | + if (empty($airline_names)) { |
|
26 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
27 | + } |
|
26 | 28 | foreach($airline_names as $airline_name) |
27 | 29 | { |
28 | 30 | if($airline == $airline_name['airline_icao']) |
@@ -44,8 +46,7 @@ discard block |
||
44 | 46 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
45 | 47 | { |
46 | 48 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | - } |
|
48 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
49 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
49 | 50 | { |
50 | 51 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
51 | 52 | } |