@@ -27,7 +27,7 @@ |
||
27 | 27 | print '</thead>'; |
28 | 28 | print '<tbody>'; |
29 | 29 | $i = 1; |
30 | - foreach($route_array as $route_item) |
|
30 | + foreach ($route_array as $route_item) |
|
31 | 31 | { |
32 | 32 | print '<tr>'; |
33 | 33 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,7 +5,9 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $title = _("Statistics").' - '._("Most common Route by Waypoint"); |
7 | 7 | require_once('header.php'); |
8 | -if (!isset($filter_name)) $filter_name = ''; |
|
8 | +if (!isset($filter_name)) { |
|
9 | + $filter_name = ''; |
|
10 | +} |
|
9 | 11 | include('statistics-sub-menu.php'); |
10 | 12 | |
11 | 13 | print '<div class="info"> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $page_url = $globalURL.'/tools-metar'; |
12 | 12 | |
13 | -$message = filter_input(INPUT_POST,'metar_message',FILTER_SANITIZE_STRING); |
|
13 | +$message = filter_input(INPUT_POST, 'metar_message', FILTER_SANITIZE_STRING); |
|
14 | 14 | |
15 | 15 | print '<div class="info column">'; |
16 | 16 | print '<h1>'._("Parse METAR messages").'</h1>'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | print '<b>'._("Dew point:").'</b> '.$metar_parse['dew'].' °C'." "; |
72 | 72 | } |
73 | 73 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
74 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
74 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
75 | 75 | print '<b>'._("Humidity:").'</b> '.$humidity.'%'." "; |
76 | 76 | } |
77 | 77 | if (isset($metar_parse['QNH'])) { |
@@ -23,7 +23,9 @@ discard block |
||
23 | 23 | print '<fieldset class="form-group">'; |
24 | 24 | print '<label for="metar_message">'._("METAR Message").'</label>'; |
25 | 25 | print '<textarea class="form-control" name="metar_message" id="metar_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>'; |
@@ -59,7 +61,9 @@ discard block |
||
59 | 61 | if (isset($metar_parse['cloud'])) { |
60 | 62 | print '<b>'._("Cloud:").'</b> '; |
61 | 63 | foreach ($metar_parse['cloud'] as $key => $cloud) { |
62 | - if ($key > 0) print ' / '; |
|
64 | + if ($key > 0) { |
|
65 | + print ' / '; |
|
66 | + } |
|
63 | 67 | print $cloud['type'].' at '.$cloud['level'].' m'; |
64 | 68 | } |
65 | 69 | print " "; |
@@ -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); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', 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 by Registration of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Aircraft by Registration 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 by Registration").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration 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 by Registration of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $aircraft_array = $Spotter->countAllAircraftRegistrationByIdent($ident); |
30 | 30 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | print '</thead>'; |
43 | 43 | print '<tbody>'; |
44 | 44 | $i = 1; |
45 | - foreach($aircraft_array as $aircraft_item) |
|
45 | + foreach ($aircraft_array as $aircraft_item) |
|
46 | 46 | { |
47 | 47 | print '<tr>'; |
48 | 48 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -13,18 +13,18 @@ discard block |
||
13 | 13 | require_once('header.php'); |
14 | 14 | |
15 | 15 | //calculuation for the pagination |
16 | -if(!isset($_GET['limit'])) |
|
16 | +if (!isset($_GET['limit'])) |
|
17 | 17 | { |
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]; |
25 | 25 | } |
26 | 26 | |
27 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
27 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
28 | 28 | |
29 | 29 | $absolute_difference = abs($limit_start - $limit_end); |
30 | 30 | $limit_next = $limit_end + $absolute_difference; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | $category = "aircraft"; |
37 | 37 | } else { |
38 | - $category = filter_input(INPUT_GET,'category',FILTER_SANITIZE_STRING); |
|
38 | + $category = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $page_url = $globalURL.'/newest/'.$category; |
@@ -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]; |
@@ -3,9 +3,9 @@ discard block |
||
3 | 3 | </span> |
4 | 4 | <div class="sub-menu sub-menu-container"> |
5 | 5 | <ul class="nav nav-pills"> |
6 | - <li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
6 | + <li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
7 | 7 | <li class="dropdown"> |
8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
10 | 10 | </a> |
11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | </ul> |
16 | 16 | </li> |
17 | 17 | <li class="dropdown"> |
18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
19 | 19 | <?php echo _("Airline"); ?> <span class="caret"></span> |
20 | 20 | </a> |
21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | </ul> |
25 | 25 | </li> |
26 | 26 | <li class="dropdown"> |
27 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
27 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
28 | 28 | <?php echo _("Airport"); ?> <span class="caret"></span> |
29 | 29 | </a> |
30 | 30 | <ul class="dropdown-menu" role="menu"> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | <li><a href="<?php print $globalURL; ?>/country/statistics/arrival-airport-country/<?php print $country; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
35 | 35 | </ul> |
36 | 36 | </li> |
37 | - <li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | - <li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
37 | + <li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
38 | + <li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
39 | 39 | </ul> |
40 | 40 | </div> |
41 | 41 | \ No newline at end of file |
@@ -5,8 +5,8 @@ |
||
5 | 5 | |
6 | 6 | if ($_POST['departure_airport'] != "" || $_POST['arrival_airport']) |
7 | 7 | { |
8 | - $departure_airport = filter_input(INPUT_POST,'departure_airport',FILTER_SANITIZE_STRING); |
|
9 | - $arrival_airport = filter_input(INPUT_POST,'arrival_airport',FILTER_SANITIZE_STRING); |
|
8 | + $departure_airport = filter_input(INPUT_POST, 'departure_airport', FILTER_SANITIZE_STRING); |
|
9 | + $arrival_airport = filter_input(INPUT_POST, 'arrival_airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | header('Location: '.$globalURL.'/route/'.$departure_airport.'/'.$arrival_airport); |
11 | 11 | } else { |
12 | 12 | header('Location: '.$globalURL); |
@@ -8,7 +8,9 @@ |
||
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else { |
|
12 | + $spotter_array=array(); |
|
13 | +} |
|
12 | 14 | |
13 | 15 | if (!empty($spotter_array)) |
14 | 16 | { |
@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort=filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else $spotter_array = array(); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports of aircraft with registration %s"), $registration); |
|
16 | 16 | |
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | include('registration-sub-menu.php'); |
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
28 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
28 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
29 | 29 | $airport_airport_array = $Spotter->countAllArrivalAirportsByRegistration($registration); |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
31 | 31 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | print '<script>'; |
35 | 35 | print 'var series = ['; |
36 | 36 | $airport_data = ''; |
37 | - foreach($airport_airport_array as $airport_item) |
|
37 | + foreach ($airport_airport_array as $airport_item) |
|
38 | 38 | { |
39 | 39 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
40 | 40 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | print '</thead>'; |
89 | 89 | print '<tbody>'; |
90 | 90 | $i = 1; |
91 | - foreach($airport_airport_array as $airport_item) |
|
91 | + foreach ($airport_airport_array as $airport_item) |
|
92 | 92 | { |
93 | 93 | print '<tr>'; |
94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,7 +8,9 @@ |
||
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else { |
|
12 | + $spotter_array=array(); |
|
13 | +} |
|
12 | 14 | |
13 | 15 | if (!empty($spotter_array)) |
14 | 16 | { |
@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else $spotter_array = array(); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"),$registration); |
|
15 | + $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"), $registration); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="info column">'; |
18 | 18 | print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('registration-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
28 | 28 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByRegistration($registration); |
29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
33 | 33 | print 'var series = ['; |
34 | 34 | $country_data = ''; |
35 | - foreach($airport_country_array as $airport_item) |
|
35 | + foreach ($airport_country_array as $airport_item) |
|
36 | 36 | { |
37 | 37 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
38 | 38 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | print '</thead>'; |
80 | 80 | print '<tbody>'; |
81 | 81 | $i = 1; |
82 | - foreach($airport_country_array as $airport_item) |
|
82 | + foreach ($airport_country_array as $airport_item) |
|
83 | 83 | { |
84 | 84 | print '<tr>'; |
85 | 85 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -17,10 +17,10 @@ discard block |
||
17 | 17 | header('Content-Type: text/javascript'); |
18 | 18 | |
19 | 19 | |
20 | -$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
|
20 | +$polar = $Stats->getStatsSource(date('Y-m-d'), 'polar'); |
|
21 | 21 | $output = '{"type": "FeatureCollection","features": ['; |
22 | 22 | if (!empty($polar)) { |
23 | - foreach($polar as $eachpolar) { |
|
23 | + foreach ($polar as $eachpolar) { |
|
24 | 24 | $data = json_decode($eachpolar['source_data']); |
25 | 25 | $name = $eachpolar['source_name']; |
26 | 26 | $coord = $Location->getLocationInfobySourceName($name); |
@@ -33,15 +33,15 @@ discard block |
||
33 | 33 | $initial_longitude = $globalCenterLongitude; |
34 | 34 | } |
35 | 35 | $first = ''; |
36 | - foreach($data as $value => $key) { |
|
37 | - $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key); |
|
38 | - if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; |
|
36 | + foreach ($data as $value => $key) { |
|
37 | + $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude, $initial_longitude, $value*22.5, $key); |
|
38 | + if ($first == '') $first = '['.round($final_coord['longitude'], 5).','.round($final_coord['latitude'], 5).']'; |
|
39 | 39 | $output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],'; |
40 | 40 | } |
41 | 41 | $output .= $first; |
42 | 42 | $output .= ']]}},'; |
43 | 43 | } |
44 | - $output = substr($output, 0, -1); |
|
44 | + $output = substr($output, 0, -1); |
|
45 | 45 | } |
46 | 46 | $output .= ']}'; |
47 | 47 | print $output; |
@@ -35,7 +35,9 @@ |
||
35 | 35 | $first = ''; |
36 | 36 | foreach($data as $value => $key) { |
37 | 37 | $final_coord = $Common->getCoordfromDistanceBearing($initial_latitude,$initial_longitude,$value*22.5,$key); |
38 | - if ($first == '') $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; |
|
38 | + if ($first == '') { |
|
39 | + $first = '['.round($final_coord['longitude'],5).','.round($final_coord['latitude'],5).']'; |
|
40 | + } |
|
39 | 41 | $output .= '['.$final_coord['longitude'].','.$final_coord['latitude'].'],'; |
40 | 42 | } |
41 | 43 | $output .= $first; |