Completed
Push — master ( 8e51f6...557b77 )
by Yannick
12:09 queued 04:29
created
date-statistics-aircraft.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
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
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort);
8 8
 else $spotter_array = array();
9 9
 
10 10
 if (!empty($spotter_array))
11 11
 {
12
-	$title = sprintf(_("Most Common Aircraft on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Aircraft on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 	require_once('header.php');
14 14
 	print '<div class="select-item">';
15 15
 	print '<form action="'.$globalURL.'/date" method="post">';
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 	print '</div>';
21 21
 
22 22
 	print '<div class="info column">';
23
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
23
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
24 24
 	print '</div>';
25 25
 
26 26
 	include('date-sub-menu.php');
27 27
 	print '<div class="column">';
28 28
 	print '<h2>'._("Most Common Aircraft").'</h2>';
29
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
29
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
30 30
 
31 31
 	$aircraft_array = $Spotter->countAllAircraftTypesByDate($_GET['date']);
32 32
 	if (!empty($aircraft_array))
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		print '</thead>';
42 42
 		print '<tbody>';
43 43
 		$i = 1;
44
-		foreach($aircraft_array as $aircraft_item)
44
+		foreach ($aircraft_array as $aircraft_item)
45 45
 		{
46 46
 			print '<tr>';
47 47
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
search-wkt.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7 7
         //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
8
+        if ($_GET['start_date'] != "" && $_GET['end_date'] != "") {
9 9
                 $start_date = $_GET['start_date'].":00";
10 10
                 $end_date = $_GET['end_date'].":00";
11 11
                 $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
12
+        } else if ($_GET['start_date'] != "") {
13 13
                 $start_date = $_GET['start_date'].":00";
14 14
                 $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
15
+        } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") {
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18 18
         } else $sql_date = '';
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22 22
         //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
23
+        if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") {
24 24
                 $end_altitude = $_GET['highest_altitude'];
25 25
                 $start_altitude = $_GET['lowest_altitude'];
26 26
                 $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
27
+        } else if ($_GET['highest_altitude'] != "") {
28 28
                 $end_altitude = $_GET['highest_altitude'];
29 29
                 $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
30
+        } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") {
31 31
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 32
                 $sql_altitude = $start_altitude;
33 33
         } else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37
-if(!isset($_GET['limit']))
37
+if (!isset($_GET['limit']))
38 38
 {
39 39
         if (!isset($_GET['number_results']))
40 40
         {
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
                 $limit_end = 25;
43 43
                 $absolute_difference = 25;
44 44
         } else {
45
-                if ($_GET['number_results'] > 1000){
45
+                if ($_GET['number_results'] > 1000) {
46 46
                         $_GET['number_results'] = 1000;
47 47
                 }
48 48
                 $limit_start = 0;
49 49
                 $limit_end = $_GET['number_results'];
50 50
                 $absolute_difference = $_GET['number_results'];
51 51
         }
52
-}  else {
52
+} else {
53 53
         $limit_explode = explode(",", $_GET['limit']);
54 54
         $limit_start = $limit_explode[0];
55 55
         $limit_end = $limit_explode[1];
@@ -69,30 +69,30 @@  discard block
 block discarded – undo
69 69
 
70 70
 if (isset($_GET['sort'])) $sort = $_GET['sort'];
71 71
 else $sort = '';
72
-$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
73
-$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
74
-$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
75
-$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING);
76
-$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING);
77
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
78
-$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING);
79
-$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING);
80
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
81
-$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING);
82
-$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING);
83
-$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING);
84
-$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING);
85
-$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING);
86
-$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING);
87
-$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING);
88
-$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,'');
72
+$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
73
+$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING);
74
+$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING);
75
+$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING);
76
+$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING);
77
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
78
+$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING);
79
+$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING);
80
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
81
+$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING);
82
+$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING);
83
+$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING);
84
+$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING);
85
+$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING);
86
+$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING);
87
+$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING);
88
+$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, '');
89 89
        
90 90
 $i = 1;      
91 91
 //$output .= "oid;Line\n";
92 92
 $output = '';
93 93
 if (!empty($spotter_array))
94 94
 {
95
-	foreach($spotter_array as $spotter_item)
95
+	foreach ($spotter_array as $spotter_item)
96 96
 	{
97 97
 		if ($spotter_item['waypoints'] != '') {
98 98
 			$waypoint_pieces = explode(' ', $spotter_item['waypoints']);
Please login to merge, or discard this patch.
airport-statistics-route.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/airport');
7 7
         die();
8 8
 }
9
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
9
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Routes to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
16
+	$title = sprintf(_("Most Common Routes to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
17 17
 
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<option></option>';
23 23
 	$airport_names = $Spotter->getAllAirportNames();
24 24
 	ksort($airport_names);
25
-	foreach($airport_names as $airport_name)
25
+	foreach ($airport_names as $airport_name)
26 26
 	{
27
-		if($airport == $airport_name['airport_icao'])
27
+		if ($airport == $airport_name['airport_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
30 30
 		} else {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		print '<div><span class="label">'._("ICAO").'</span>'.$airport_array[0]['icao'].'</div>';
47 47
 		print '<div><span class="label">'._("IATA").'</span>'.$airport_array[0]['iata'].'</div>';
48 48
 		print '<div><span class="label">'._("Altitude").'</span>'.$airport_array[0]['altitude'].'</div>';
49
-		print '<div><span class="label">'._("Coordinates");'</span><a href="http://maps.google.ca/maps?z=10&t=k&q='.$airport_array[0]['latitude'].','.$airport_array[0]['longitude'].'" target="_blank">Google Map<i class="fa fa-angle-double-right"></i></a></div>';
49
+		print '<div><span class="label">'._("Coordinates"); '</span><a href="http://maps.google.ca/maps?z=10&t=k&q='.$airport_array[0]['latitude'].','.$airport_array[0]['longitude'].'" target="_blank">Google Map<i class="fa fa-angle-double-right"></i></a></div>';
50 50
 		print '</div>';
51 51
 	} else {
52 52
 		print '<div class="alert alert-warning">'._("This special airport profile shows all flights that do <u>not</u> have a departure and/or arrival airport associated with them.").'</div>';
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 
55 55
 	include('airport-sub-menu.php');
56 56
 	print '<div class="column">';
57
-	print '<h2>'._("Most Common Routes");'</h2>';
58
-	print '<p>'.sprintf(_("The statistic below shows the most common routes to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
57
+	print '<h2>'._("Most Common Routes"); '</h2>';
58
+	print '<p>'.sprintf(_("The statistic below shows the most common routes to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
59 59
 
60 60
 	$route_array = $Spotter->countAllRoutesByAirport($airport);
61 61
 	if (!empty($route_array))
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		print '</thead>';
72 72
 		print '<tbody>';
73 73
 		$i = 1;
74
-		foreach($route_array as $route_item)
74
+		foreach ($route_array as $route_item)
75 75
 		{
76 76
 			print '<tr>';
77 77
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-statistics-departure-airport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
10
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports from %s"),$manufacturer);
16
+	$title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer);
17 17
 
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
22 22
 	print '<option></option>';
23 23
 	$all_manufacturers = $Spotter->getAllManufacturers();
24
-	foreach($all_manufacturers as $all_manufacturer)
24
+	foreach ($all_manufacturers as $all_manufacturer)
25 25
 	{
26
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
26
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
27 27
 		{
28 28
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
29 29
 		} else {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	include('manufacturer-sub-menu.php');
43 43
 	print '<div class="column">';
44 44
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
45
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>';
45
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>';
46 46
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer);
47 47
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
48 48
     	<script>
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         	["'._("Airport").'", "'._("# of times").'"],';
58 58
 
59 59
 	$airport_data = '';
60
-	foreach($airport_airport_array as $airport_item)
60
+	foreach ($airport_airport_array as $airport_item)
61 61
 	{
62 62
 		$name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')';
63 63
 		$name = str_replace("'", "", $name);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	print '</thead>';
97 97
 	print '<tbody>';
98 98
 	$i = 1;
99
-	foreach($airport_airport_array as $airport_item)
99
+	foreach ($airport_airport_array as $airport_item)
100 100
 	{
101 101
 		print '<tr>';
102 102
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
require/class.Translation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
             } else return $ident;
32 32
         } else return $ident;
33 33
         if ($airline_icao == 'AF') {
34
-            if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident;
35
-            else $icao = 'AFR'.ltrim(substr($ident,2),'0');
34
+            if (filter_var(substr($ident, 2), FILTER_VALIDATE_INT, array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident;
35
+            else $icao = 'AFR'.ltrim(substr($ident, 2), '0');
36 36
         } else {
37 37
             $identicao = $Spotter->getAllAirlineInfo($airline_icao);
38 38
             if (isset($identicao[0])) {
39
-                $icao = $identicao[0]['icao'].ltrim(substr($ident,2),'0');
39
+                $icao = $identicao[0]['icao'].ltrim(substr($ident, 2), '0');
40 40
             } else $icao = $ident;
41 41
         }
42 42
         return $icao;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                  try {
50 50
                         $sth = $this->db->prepare($query);
51 51
                         $sth->execute($query_values);
52
-                } catch(PDOException $e) {
52
+                } catch (PDOException $e) {
53 53
                         return "error : ".$e->getMessage();
54 54
                 }
55 55
                 $row = $sth->fetch(PDO::FETCH_ASSOC);
@@ -58,29 +58,29 @@  discard block
 block discarded – undo
58 58
                 } else return $ident;
59 59
         }
60 60
 
61
-       public function addOperator($ident,$correct_ident,$source) {
61
+       public function addOperator($ident, $correct_ident, $source) {
62 62
                 $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)";
63
-                $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source);
63
+                $query_values = array(':ident' => $ident, ':correct_ident' => $correct_ident, ':source' => $source);
64 64
                  try {
65 65
                         $sth = $this->db->prepare($query);
66 66
                         $sth->execute($query_values);
67
-                } catch(PDOException $e) {
67
+                } catch (PDOException $e) {
68 68
                         return "error : ".$e->getMessage();
69 69
                 }
70 70
         }
71 71
 
72
-       public function updateOperator($ident,$correct_ident,$source) {
72
+       public function updateOperator($ident, $correct_ident, $source) {
73 73
                 $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident";
74
-                $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source);
74
+                $query_values = array(':ident' => $ident, ':correct_ident' => $correct_ident, ':source' => $source);
75 75
                  try {
76 76
                         $sth = $this->db->prepare($query);
77 77
                         $sth->execute($query_values);
78
-                } catch(PDOException $e) {
78
+                } catch (PDOException $e) {
79 79
                         return "error : ".$e->getMessage();
80 80
                 }
81 81
         }
82 82
         
83
-        public function checkTranslation($ident,$web = false) {
83
+        public function checkTranslation($ident, $web = false) {
84 84
     	    global $globalTranslationSources, $globalTranslationFetch;
85 85
     	    //if (!isset($globalTranslationSources)) $globalTranslationSources = array('planefinder');
86 86
     	    $globalTranslationSources = array();
Please login to merge, or discard this patch.
require/settings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $globalLongitudeMin = '1.0'; //the minimum longitude (east)
30 30
 
31 31
 $globalCenterLatitude = '46.38'; //the latitude center of your coverage area
32
-$globalCenterLongitude = '5.29';//the longitude center of your coverage area
32
+$globalCenterLongitude = '5.29'; //the longitude center of your coverage area
33 33
 
34 34
 $globalLiveZoom = '9'; //default zoom on Live Map
35 35
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 $globalACARS = FALSE;
127 127
 $globalACARSHost = '0.0.0.0'; // Local IP to listen
128 128
 $globalACARSPort = '9999';
129
-$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive
129
+$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive
130 130
 $globalACARSArchiveKeepMonths = '0';
131 131
 
132 132
 //APRS configuration (for glidernet)
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 //Retrieve Image from externals sources
202 202
 $globalAircraftImageFetch = TRUE;
203 203
 //Sources for Aircraft image
204
-$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources');
204
+$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources');
205 205
 // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic)
206 206
 // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'exif' => true);
207 207
 // ************************
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE)
210 210
 $globalSchedulesFetch = TRUE;
211 211
 //Sources for airline schedule if not official airline site
212
-$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
212
+$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware');
213 213
 
214 214
 //Retrieve translation from external sources (set to FALSE for IVAO)
215 215
 $globalTranslationFetch = TRUE;
Please login to merge, or discard this patch.
require/class.METAR.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                         $Connection = new Connection();
55 55
                         $sth = $Connection->db->prepare($query);
56 56
                         $sth->execute();
57
-                } catch(PDOException $e) {
57
+                } catch (PDOException $e) {
58 58
                         return "error : ".$e->getMessage();
59 59
                 }
60 60
                 $row = $sth->fetch(PDO::FETCH_ASSOC);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                         $Connection = new Connection();
70 70
                         $sth = $Connection->db->prepare($query);
71 71
                         $sth->execute();
72
-                } catch(PDOException $e) {
72
+                } catch (PDOException $e) {
73 73
                         return "error : ".$e->getMessage();
74 74
                 }
75 75
         }
@@ -79,34 +79,34 @@  discard block
 block discarded – undo
79 79
         public function parse($data) {
80 80
     		//$data = str_replace(array('\n','\r','\r','\n'),'',$data);
81 81
     		$codes = implode('|', array_keys($this->texts));
82
-    		$regWeather = '#^(\+|\-|VC)?(' . $codes . ')(' . $codes . ')?$#';
82
+    		$regWeather = '#^(\+|\-|VC)?('.$codes.')('.$codes.')?$#';
83 83
     		//$pieces = explode(' ',$data);
84
-    		$pieces = preg_split('/\s/',$data);
84
+    		$pieces = preg_split('/\s/', $data);
85 85
     		$pos = 0;
86 86
     		if ($pieces[0] == 'METAR') $pos++;
87 87
     		elseif ($pieces[0] == 'SPECI') $pos++;
88 88
     		if (strlen($pieces[$pos]) != 4) $pos++;
89 89
     		$result['location'] = $pieces[$pos];
90 90
     		$pos++;
91
-    		$result['dayofmonth'] = substr($pieces[$pos],0,2);
92
-    		$result['time'] = substr($pieces[$pos],2,4);
91
+    		$result['dayofmonth'] = substr($pieces[$pos], 0, 2);
92
+    		$result['time'] = substr($pieces[$pos], 2, 4);
93 93
     		$c = count($pieces);
94
-    		for($pos++; $pos < $c; $pos++) {
94
+    		for ($pos++; $pos < $c; $pos++) {
95 95
     			$piece = $pieces[$pos];
96 96
     			if ($piece == 'RMK') break;
97 97
     			if ($piece == 'AUTO') $result['auto'] = true;
98 98
     			if ($piece == 'COR') $result['correction'] = true;
99 99
     			// Wind Speed
100 100
     			if (preg_match('#(VRB|\d\d\d)(\d\d)(?:G(\d\d))?(KT|MPS|KPH)(?: (\d{1,3})V(\d{1,3}))?$#', $piece, $matches)) {
101
-    				$result['wind']['direction'] = (float)$matches[1];
101
+    				$result['wind']['direction'] = (float) $matches[1];
102 102
 				$result['wind']['unit'] = $matches[4];
103
-    				if ($result['wind']['unit'] == 'KT') $result['wind']['speed'] = round(((float)$matches[2])*0.51444444444,2);
104
-    				elseif ($result['wind']['unit'] == 'KPH') $result['wind']['speed'] = round(((float)$matches[2])*1000,2);
105
-    				elseif ($result['wind']['unit'] == 'MPS') $result['wind']['speed'] = round(((float)$matches[2]),2);
106
-				$result['wind']['gust'] = (float)$matches[3];
103
+    				if ($result['wind']['unit'] == 'KT') $result['wind']['speed'] = round(((float) $matches[2])*0.51444444444, 2);
104
+    				elseif ($result['wind']['unit'] == 'KPH') $result['wind']['speed'] = round(((float) $matches[2])*1000, 2);
105
+    				elseif ($result['wind']['unit'] == 'MPS') $result['wind']['speed'] = round(((float) $matches[2]), 2);
106
+				$result['wind']['gust'] = (float) $matches[3];
107 107
 				$result['wind']['unit'] = $matches[4];
108
-				$result['wind']['min_variation'] = array_key_exists(5,$matches) ? $matches[5] : 0;
109
-				$result['wind']['max_variation'] = array_key_exists(6,$matches) ? $matches[6] : 0;
108
+				$result['wind']['min_variation'] = array_key_exists(5, $matches) ? $matches[5] : 0;
109
+				$result['wind']['max_variation'] = array_key_exists(6, $matches) ? $matches[6] : 0;
110 110
     			}
111 111
 
112 112
 /*    			if (preg_match('#^([0-9]{3})([0-9]{2})(G([0-9]{2}))?(KT|MPS)$#', $piece, $matches)) {
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
     			*/
127 127
     			// Temperature
128 128
     			if (preg_match('#^(M?[0-9]{2,})/(M?[0-9]{2,})$#', $piece, $matches)) {
129
-    				$temp = (float)$matches[1];
129
+    				$temp = (float) $matches[1];
130 130
 				if ($matches[1]{0} == 'M') {
131
-					$temp = ((float)substr($matches[1], 1)) * -1;
131
+					$temp = ((float) substr($matches[1], 1))*-1;
132 132
 				}
133 133
     				$result['temperature'] = $temp;
134
-    				$dew = (float)$matches[2];
134
+    				$dew = (float) $matches[2];
135 135
 				if ($matches[2]{0} == 'M') {
136
-					$dew = ((float)substr($matches[2], 1)) * -1;
136
+					$dew = ((float) substr($matches[2], 1))*-1;
137 137
 				}
138 138
 				$result['dew'] = $dew;
139 139
     			}
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     					$result['QNH'] = $matches[2];
146 146
     				} else {
147 147
     					// inHg
148
-    					$result['QNH'] = round(($matches[2] / 100)*33.86389,2);
148
+    					$result['QNH'] = round(($matches[2]/100)*33.86389, 2);
149 149
 				}
150 150
     				/*
151 151
     				$result['QNH'] = $matches[1] == 'Q' ? $matches[2] : ($matches[2] / 100);
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
     			// Visibility
167 167
     			if (preg_match('#^([0-9]{4})|(([0-9]{1,4})SM)$#', $piece, $matches)) {
168 168
     				if (isset($matches[3]) && strlen($matches[3]) > 0) {
169
-					$result['visibility'] = (float)$matches[3] * 1609.34;
169
+					$result['visibility'] = (float) $matches[3]*1609.34;
170 170
 				} else {
171 171
 					if ($matches[1] == '9999') {
172 172
 						$result['visibility'] = '> 10000';
173 173
 					} else {
174
-						$result['visibility'] = (float)$matches[1];
174
+						$result['visibility'] = (float) $matches[1];
175 175
 					}
176 176
 				}
177 177
 				if (preg_match('#^CAVOK$#', $piece, $matches)) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     				elseif ($type == 'OVC') $cloud['type'] = 'Overcast/Full cloud coverage';
193 193
     				elseif ($type == 'VV') $cloud['type'] = 'Vertical visibility';
194 194
     				$cloud['type_code'] = $type;
195
-    				$cloud['level'] = round(((float)$matches[2]) * 100 * 0.3048);
195
+    				$cloud['level'] = round(((float) $matches[2])*100*0.3048);
196 196
     				$cloud['significant'] = isset($matches[3]) ? $matches[3] : '';
197 197
     				$result['cloud'][] = $cloud;
198 198
     			}
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 				$rvr['runway'] = $matches[1];
202 202
 				$rvr['assessment'] = $matches[2];
203 203
 				$rvr['rvr'] = $matches[3];
204
-				$rvr['rvr_max'] = array_key_exists(4,$matches) ? $matches[4] : 0;
205
-				$rvr['unit'] = array_key_exists(5,$matches) ? $matches[5] : '';
204
+				$rvr['rvr_max'] = array_key_exists(4, $matches) ? $matches[4] : 0;
205
+				$rvr['unit'] = array_key_exists(5, $matches) ? $matches[5] : '';
206 206
 				$result['RVR'] = $rvr;
207 207
 			}
208 208
     			
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
     			if (preg_match('#^(R[A-Z0-9]{2,3})/([0-9]{4})(V([0-9]{4}))?(FT)?$#', $piece, $matches)) {
220 220
     				//echo $piece;
221 221
     				//print_r($matches);
222
-    				if (isset($matches[5])) $range = array('exact' => (float)$matches[2], 'unit' => $matches[5] ? 'FT' : 'M');
223
-    				else $range = array('exact' => (float)$matches[2], 'unit' => 'M');
222
+    				if (isset($matches[5])) $range = array('exact' => (float) $matches[2], 'unit' => $matches[5] ? 'FT' : 'M');
223
+    				else $range = array('exact' => (float) $matches[2], 'unit' => 'M');
224 224
 				if (isset($matches[3])) {
225 225
 					$range = Array(
226
-					    'from' => (float)$matches[2],
227
-					    'to'   => (float)$matches[4],
226
+					    'from' => (float) $matches[2],
227
+					    'to'   => (float) $matches[4],
228 228
 					    'unit' => $matches[5] ? 'FT' : 'M'
229 229
 					);
230 230
 				}
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                  try {
274 274
                         $sth = $this->db->prepare($query);
275 275
                         $sth->execute($query_values);
276
-                } catch(PDOException $e) {
276
+                } catch (PDOException $e) {
277 277
                         return "error : ".$e->getMessage();
278 278
                 }
279 279
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -283,19 +283,19 @@  discard block
 block discarded – undo
283 283
                 return $all;
284 284
         }
285 285
 
286
-       public function addMETAR($location,$metar,$date) {
286
+       public function addMETAR($location, $metar, $date) {
287 287
 		global $globalDBdriver;
288
-		$date = date('Y-m-d H:i:s',strtotime($date));
288
+		$date = date('Y-m-d H:i:s', strtotime($date));
289 289
 		if ($globalDBdriver == 'mysql') {
290 290
 			$query = "INSERT INTO metar (metar_location,metar_date,metar) VALUES (:location,:date,:metar) ON DUPLICATE KEY UPDATE metar_date = :date, metar = :metar";
291 291
 		} else {
292 292
 			$query = "UPDATE metar SET metar_date = :date, metar = metar WHERE metar_location = :location;INSERT INTO metar (metar_location,metar_date,metar) SELECT :location,:date,:metar WHERE NOT EXISTS (SELECT 1 FROM metar WHERE metar_location = :location);";
293 293
 		}
294
-                $query_values = array(':location' => $location,':date' => $date,':metar' => $metar);
294
+                $query_values = array(':location' => $location, ':date' => $date, ':metar' => $metar);
295 295
                  try {
296 296
                         $sth = $this->db->prepare($query);
297 297
                         $sth->execute($query_values);
298
-                } catch(PDOException $e) {
298
+                } catch (PDOException $e) {
299 299
                         return "error : ".$e->getMessage();
300 300
                 }
301 301
         }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                  try {
307 307
                         $sth = $this->db->prepare($query);
308 308
                         $sth->execute($query_values);
309
-                } catch(PDOException $e) {
309
+                } catch (PDOException $e) {
310 310
                         return "error : ".$e->getMessage();
311 311
                 }
312 312
         }
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                  try {
316 316
                         $sth = $this->db->prepare($query);
317 317
                         $sth->execute();
318
-                } catch(PDOException $e) {
318
+                } catch (PDOException $e) {
319 319
                         return "error : ".$e->getMessage();
320 320
                 }
321 321
         }
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
     		}
333 333
     		if (isset($globalDebug) && $globalDebug) echo "Done - Updating DB...";
334 334
     		$date = '';
335
-    		foreach(explode("\n",$cycle) as $line) {
336
-    			if (preg_match('#^([0-9]{4})/([0-9]{2})/([0-9]{2}) ([0-9]{2}):([0-9]{2})$#',$line)) {
335
+    		foreach (explode("\n", $cycle) as $line) {
336
+    			if (preg_match('#^([0-9]{4})/([0-9]{2})/([0-9]{2}) ([0-9]{2}):([0-9]{2})$#', $line)) {
337 337
     				//echo "date : ".$line."\n";
338 338
     				$date = $line;
339 339
     			} elseif ($line != '') {
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
     			    //echo $line;
342 342
     			    if ($date == '') $date = date('Y/m/d H:m');
343 343
     			    $pos = 0;
344
-    			    $pieces = preg_split('/\s/',$line);
344
+    			    $pieces = preg_split('/\s/', $line);
345 345
     			    if ($pieces[0] == 'METAR') $pos++;
346 346
     			    if (strlen($pieces[$pos]) != 4) $pos++;
347 347
 	        	    $location = $pieces[$pos];
348
-	        	    echo $this->addMETAR($location,$line,$date);
348
+	        	    echo $this->addMETAR($location, $line, $date);
349 349
     			}
350 350
     			//echo $line."\n";
351 351
     		}
@@ -357,11 +357,11 @@  discard block
 block discarded – undo
357 357
     		if ($globalMETARurl == '') return array();
358 358
     		date_default_timezone_set("UTC");
359 359
     		$Common = new Common();
360
-    		$url = str_replace('{icao}',$icao,$globalMETARurl);
360
+    		$url = str_replace('{icao}', $icao, $globalMETARurl);
361 361
     		$cycle = $Common->getData($url);
362 362
     		$date = '';
363
-    		foreach(explode("\n",$cycle) as $line) {
364
-    			if (preg_match('#^([0-9]{4})/([0-9]{2})/([0-9]{2}) ([0-9]{2}):([0-9]{2})$#',$line)) {
363
+    		foreach (explode("\n", $cycle) as $line) {
364
+    			if (preg_match('#^([0-9]{4})/([0-9]{2})/([0-9]{2}) ([0-9]{2}):([0-9]{2})$#', $line)) {
365 365
     				echo "date : ".$line."\n";
366 366
     				$date = $line;
367 367
     			} elseif ($line != '') {
@@ -369,12 +369,12 @@  discard block
 block discarded – undo
369 369
     			    //echo $line;
370 370
     			    if ($date == '') $date = date('Y/m/d H:m');
371 371
     			    $pos = 0;
372
-    			    $pieces = preg_split('/\s/',$line);
372
+    			    $pieces = preg_split('/\s/', $line);
373 373
     			    if ($pieces[0] == 'METAR') $pos++;
374 374
     			    if (strlen($pieces[$pos]) != 4) $pos++;
375 375
 	        	    $location = $pieces[$pos];
376 376
 	        	    if (strlen($location == 4)) {
377
-	        		$this->addMETAR($location,$line,$date);
377
+	        		$this->addMETAR($location, $line, $date);
378 378
 	        		return array('0' => array('metar_date' => $date, 'metar_location' => $location, 'metar' => $line));
379 379
 	        	    } else return array();
380 380
     			}
Please login to merge, or discard this patch.
require/class.Language.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -24,54 +24,54 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 class Language {
27
-	public $all_languages = array('ar_SA' => array('العَرَبِيَّةُ',	'ar',	'arabic'),
28
-				'bg_BG' => array('Български',		'bg',	'bulgarian'),
29
-				'id_ID' => array('Bahasa Indonesia',	'id',	'indonesian'),
30
-				'ms_MY' => array('Bahasa Melayu',	'ms',	'malay'),
31
-				'ca_ES' => array('Català',		'ca',	'catalan'), // ca_CA
32
-				'cs_CZ' => array('Čeština',		'cs',	'czech'),
33
-				'de_DE' => array('Deutsch',		'de',	'german'),
34
-				'da_DK' => array('Dansk',		'da',	'danish')     , // dk_DK
35
-				'et_EE' => array('Eesti',		'et',	'estonian'), // ee_ET
36
-				'en_GB' => array('English',		'en',	'english'),
37
-				'en_US' => array('English (US)',	'en',	'english'),
38
-				'es_AR' => array('Español (Argentina)',	'es',	'spanish'),
39
-				'es_CO' => array('Español (Colombia)',	'es',	'spanish'),
40
-				'es_ES' => array('Español (España)',	'es',	'spanish'),
41
-				'es_419' => array('Español (América Latina)',	'es',	'spanish'),
42
-				'es_MX' => array('Español (Mexico)',	'es',	'spanish'),
43
-				'es_VE' => array('Español (Venezuela)',	'es',	'spanish'),
44
-				'eu_ES' => array('Euskara',		'en',	'basque'),
45
-				'fr_FR' => array('Français',		'fr',	'french'),
46
-				'gl_ES' => array('Galego',		'gl',	'galician'),
47
-				'el_GR' => array('Ελληνικά',		'el',	'greek'), // el_EL
48
-				'he_IL' => array('עברית',		'he',	'hebrew'), // he_HE
49
-				'hr_HR' => array('Hrvatski',		'hr',	'croatian'),
50
-				'hu_HU' => array('Magyar',		'hu',	'hungarian'),
51
-				'it_IT' => array('Italiano',		'it',	'italian'),
52
-				'lv_LV' => array('Latviešu',		'lv',	'latvian'),
53
-				'lt_LT' => array('Lietuvių',		'lt',	'lithuanian'),
54
-				'nl_NL' => array('Nederlands',		'nl',	'dutch'),
55
-				'nb_NO' => array('Norsk (Bokmål)',	'nb',	'norwegian'), // no_NB
56
-				'nn_NO' => array('Norsk (Nynorsk)',	'nn',	'norwegian'), // no_NN
57
-				'fa_IR' => array('فارسی',		'fa',	'persian'),
58
-				'pl_PL' => array('Polski',		'pl',	'polish'),
59
-				'pt_PT' => array('Português',		'pt',	'portuguese'),
60
-				'pt_BR' => array('Português do Brasil',	'pt',	'brazilian portuguese'),
61
-				'ro_RO' => array('Română',		'en',	'romanian'),
62
-				'ru_RU' => array('Pусский',		'ru',	'russian'),
63
-				'sk_SK' => array('Slovenčina',		'sk',	'slovak'),
64
-				'sl_SI' => array('Slovenščina',		'sl',	'slovenian slovene'),
65
-				'sr_RS' => array('Srpski',		'sr',	'serbian'),
66
-				'fi_FI' => array('Suomi',		'fi',	'finish'),
67
-				'sv_SE' => array('Svenska',		'sv',	'swedish'),
68
-				'vi_VN' => array('Tiếng Việt',		'vi',	'vietnamese'),
69
-				'th_TH' => array('ภาษาไทย',		'th',	'thai'),
70
-				'tr_TR' => array('Türkçe',		'tr',	'turkish'),
71
-				'uk_UA' => array('Українська',		'en',	'ukrainian'), // ua_UA
72
-				'ja_JP' => array('日本語',		'ja',	'japanese'),
73
-				'zh_CN' => array('简体中文',		'zh',	'chinese'),
74
-				'zh_TW' => array('繁體中文',		'zh',	'chinese')
27
+	public $all_languages = array('ar_SA' => array('العَرَبِيَّةُ', 'ar', 'arabic'),
28
+				'bg_BG' => array('Български', 'bg', 'bulgarian'),
29
+				'id_ID' => array('Bahasa Indonesia', 'id', 'indonesian'),
30
+				'ms_MY' => array('Bahasa Melayu', 'ms', 'malay'),
31
+				'ca_ES' => array('Català', 'ca', 'catalan'), // ca_CA
32
+				'cs_CZ' => array('Čeština', 'cs', 'czech'),
33
+				'de_DE' => array('Deutsch', 'de', 'german'),
34
+				'da_DK' => array('Dansk', 'da', 'danish'), // dk_DK
35
+				'et_EE' => array('Eesti', 'et', 'estonian'), // ee_ET
36
+				'en_GB' => array('English', 'en', 'english'),
37
+				'en_US' => array('English (US)', 'en', 'english'),
38
+				'es_AR' => array('Español (Argentina)', 'es', 'spanish'),
39
+				'es_CO' => array('Español (Colombia)', 'es', 'spanish'),
40
+				'es_ES' => array('Español (España)', 'es', 'spanish'),
41
+				'es_419' => array('Español (América Latina)', 'es', 'spanish'),
42
+				'es_MX' => array('Español (Mexico)', 'es', 'spanish'),
43
+				'es_VE' => array('Español (Venezuela)', 'es', 'spanish'),
44
+				'eu_ES' => array('Euskara', 'en', 'basque'),
45
+				'fr_FR' => array('Français', 'fr', 'french'),
46
+				'gl_ES' => array('Galego', 'gl', 'galician'),
47
+				'el_GR' => array('Ελληνικά', 'el', 'greek'), // el_EL
48
+				'he_IL' => array('עברית', 'he', 'hebrew'), // he_HE
49
+				'hr_HR' => array('Hrvatski', 'hr', 'croatian'),
50
+				'hu_HU' => array('Magyar', 'hu', 'hungarian'),
51
+				'it_IT' => array('Italiano', 'it', 'italian'),
52
+				'lv_LV' => array('Latviešu', 'lv', 'latvian'),
53
+				'lt_LT' => array('Lietuvių', 'lt', 'lithuanian'),
54
+				'nl_NL' => array('Nederlands', 'nl', 'dutch'),
55
+				'nb_NO' => array('Norsk (Bokmål)', 'nb', 'norwegian'), // no_NB
56
+				'nn_NO' => array('Norsk (Nynorsk)', 'nn', 'norwegian'), // no_NN
57
+				'fa_IR' => array('فارسی', 'fa', 'persian'),
58
+				'pl_PL' => array('Polski', 'pl', 'polish'),
59
+				'pt_PT' => array('Português', 'pt', 'portuguese'),
60
+				'pt_BR' => array('Português do Brasil', 'pt', 'brazilian portuguese'),
61
+				'ro_RO' => array('Română', 'en', 'romanian'),
62
+				'ru_RU' => array('Pусский', 'ru', 'russian'),
63
+				'sk_SK' => array('Slovenčina', 'sk', 'slovak'),
64
+				'sl_SI' => array('Slovenščina', 'sl', 'slovenian slovene'),
65
+				'sr_RS' => array('Srpski', 'sr', 'serbian'),
66
+				'fi_FI' => array('Suomi', 'fi', 'finish'),
67
+				'sv_SE' => array('Svenska', 'sv', 'swedish'),
68
+				'vi_VN' => array('Tiếng Việt', 'vi', 'vietnamese'),
69
+				'th_TH' => array('ภาษาไทย', 'th', 'thai'),
70
+				'tr_TR' => array('Türkçe', 'tr', 'turkish'),
71
+				'uk_UA' => array('Українська', 'en', 'ukrainian'), // ua_UA
72
+				'ja_JP' => array('日本語', 'ja', 'japanese'),
73
+				'zh_CN' => array('简体中文', 'zh', 'chinese'),
74
+				'zh_TW' => array('繁體中文', 'zh', 'chinese')
75 75
 			);
76 76
 
77 77
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 	public function getLocale($locale)
101 101
 	{
102
-		return array($locale,$this->all_languages[$locale][1],$this->all_languages[$locale][2],$locale.'.utf8',$locale.'.UTF8');
102
+		return array($locale, $this->all_languages[$locale][1], $this->all_languages[$locale][2], $locale.'.utf8', $locale.'.UTF8');
103 103
 	}
104 104
 
105 105
 	/**
Please login to merge, or discard this patch.
require/class.Source.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
                  try {
15 15
                         $sth = $this->db->prepare($query);
16 16
                         $sth->execute($query_values);
17
-                } catch(PDOException $e) {
17
+                } catch (PDOException $e) {
18 18
                         return "error : ".$e->getMessage();
19 19
                 }
20 20
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
                  try {
27 27
                         $sth = $this->db->prepare($query);
28 28
                         $sth->execute($query_values);
29
-                } catch(PDOException $e) {
29
+                } catch (PDOException $e) {
30 30
                         return "error : ".$e->getMessage();
31 31
                 }
32 32
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
                  try {
39 39
                         $sth = $this->db->prepare($query);
40 40
                         $sth->execute($query_values);
41
-                } catch(PDOException $e) {
41
+                } catch (PDOException $e) {
42 42
                         return "error : ".$e->getMessage();
43 43
                 }
44 44
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
45 45
                 return $all;
46 46
         }
47 47
   
48
-       public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png') {
48
+       public function addLocation($name, $latitude, $longitude, $altitude, $city, $country, $source, $logo = 'antenna.png') {
49 49
                 $query = "INSERT INTO source_location (name,latitude,longitude,altitude,country,city,logo,source) VALUES (:name,:latitude,:longitude,:altitude,:country,:city,:logo,:source)";
50
-                $query_values = array(':name' => $name,':latitude' => $latitude, ':longitude' => $longitude,':altitude' => $altitude,':city' => $city,':country' => $country,':logo' => $logo,':source' => $source);
50
+                $query_values = array(':name' => $name, ':latitude' => $latitude, ':longitude' => $longitude, ':altitude' => $altitude, ':city' => $city, ':country' => $country, ':logo' => $logo, ':source' => $source);
51 51
                  try {
52 52
                         $sth = $this->db->prepare($query);
53 53
                         $sth->execute($query_values);
54
-                } catch(PDOException $e) {
54
+                } catch (PDOException $e) {
55 55
                         return "error : ".$e->getMessage();
56 56
                 }
57 57
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                  try {
63 63
                         $sth = $this->db->prepare($query);
64 64
                         $sth->execute($query_values);
65
-                } catch(PDOException $e) {
65
+                } catch (PDOException $e) {
66 66
                         return "error : ".$e->getMessage();
67 67
                 }
68 68
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                  try {
72 72
                         $sth = $this->db->prepare($query);
73 73
                         $sth->execute();
74
-                } catch(PDOException $e) {
74
+                } catch (PDOException $e) {
75 75
                         return "error : ".$e->getMessage();
76 76
                 }
77 77
         }
Please login to merge, or discard this patch.