@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -824,11 +824,11 @@ |
||
824 | 824 | } |
825 | 825 | |
826 | 826 | /** |
827 | - * Returns true if $string is valid UTF-8 and false otherwise. |
|
828 | - * |
|
829 | - * @param mixed $str String to be tested |
|
830 | - * @return boolean |
|
831 | - */ |
|
827 | + * Returns true if $string is valid UTF-8 and false otherwise. |
|
828 | + * |
|
829 | + * @param mixed $str String to be tested |
|
830 | + * @return boolean |
|
831 | + */ |
|
832 | 832 | static function is_utf8($str) |
833 | 833 | { |
834 | 834 | $c=0; $b=0; |
@@ -7,73 +7,73 @@ |
||
7 | 7 | public function __construct($dbc = null) { |
8 | 8 | $Connection = new Connection($dbc); |
9 | 9 | $this->db = $Connection->db; |
10 | - } |
|
11 | - public function getAllLocationInfo() { |
|
12 | - $query = "SELECT * FROM source_location"; |
|
13 | - $query_values = array(); |
|
14 | - try { |
|
15 | - $sth = $this->db->prepare($query); |
|
16 | - $sth->execute($query_values); |
|
17 | - } catch(PDOException $e) { |
|
18 | - return "error : ".$e->getMessage(); |
|
19 | - } |
|
20 | - $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
21 | - return $all; |
|
22 | - } |
|
23 | - public function getLocationInfobyName($name) { |
|
24 | - $query = "SELECT * FROM source_location WHERE name = :name"; |
|
25 | - $query_values = array(':name' => $name); |
|
26 | - try { |
|
27 | - $sth = $this->db->prepare($query); |
|
28 | - $sth->execute($query_values); |
|
29 | - } catch(PDOException $e) { |
|
30 | - return "error : ".$e->getMessage(); |
|
31 | - } |
|
32 | - $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
33 | - return $all; |
|
34 | - } |
|
35 | - public function getLocationInfobySourceName($name) { |
|
36 | - $query = "SELECT * FROM source_location WHERE source = :name"; |
|
37 | - $query_values = array(':name' => $name); |
|
38 | - try { |
|
39 | - $sth = $this->db->prepare($query); |
|
40 | - $sth->execute($query_values); |
|
41 | - } catch(PDOException $e) { |
|
42 | - return "error : ".$e->getMessage(); |
|
43 | - } |
|
44 | - $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
45 | - return $all; |
|
46 | - } |
|
10 | + } |
|
11 | + public function getAllLocationInfo() { |
|
12 | + $query = "SELECT * FROM source_location"; |
|
13 | + $query_values = array(); |
|
14 | + try { |
|
15 | + $sth = $this->db->prepare($query); |
|
16 | + $sth->execute($query_values); |
|
17 | + } catch(PDOException $e) { |
|
18 | + return "error : ".$e->getMessage(); |
|
19 | + } |
|
20 | + $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
21 | + return $all; |
|
22 | + } |
|
23 | + public function getLocationInfobyName($name) { |
|
24 | + $query = "SELECT * FROM source_location WHERE name = :name"; |
|
25 | + $query_values = array(':name' => $name); |
|
26 | + try { |
|
27 | + $sth = $this->db->prepare($query); |
|
28 | + $sth->execute($query_values); |
|
29 | + } catch(PDOException $e) { |
|
30 | + return "error : ".$e->getMessage(); |
|
31 | + } |
|
32 | + $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
33 | + return $all; |
|
34 | + } |
|
35 | + public function getLocationInfobySourceName($name) { |
|
36 | + $query = "SELECT * FROM source_location WHERE source = :name"; |
|
37 | + $query_values = array(':name' => $name); |
|
38 | + try { |
|
39 | + $sth = $this->db->prepare($query); |
|
40 | + $sth->execute($query_values); |
|
41 | + } catch(PDOException $e) { |
|
42 | + return "error : ".$e->getMessage(); |
|
43 | + } |
|
44 | + $all = $sth->fetchAll(PDO::FETCH_ASSOC); |
|
45 | + return $all; |
|
46 | + } |
|
47 | 47 | |
48 | - public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png') { |
|
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); |
|
51 | - try { |
|
52 | - $sth = $this->db->prepare($query); |
|
53 | - $sth->execute($query_values); |
|
54 | - } catch(PDOException $e) { |
|
55 | - return "error : ".$e->getMessage(); |
|
56 | - } |
|
57 | - } |
|
48 | + public function addLocation($name,$latitude,$longitude,$altitude,$city,$country,$source,$logo = 'antenna.png') { |
|
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); |
|
51 | + try { |
|
52 | + $sth = $this->db->prepare($query); |
|
53 | + $sth->execute($query_values); |
|
54 | + } catch(PDOException $e) { |
|
55 | + return "error : ".$e->getMessage(); |
|
56 | + } |
|
57 | + } |
|
58 | 58 | |
59 | - public function deleteLocation($id) { |
|
60 | - $query = "DELETE FROM source_location WHERE id = :id"; |
|
61 | - $query_values = array(':id' => $id); |
|
62 | - try { |
|
63 | - $sth = $this->db->prepare($query); |
|
64 | - $sth->execute($query_values); |
|
65 | - } catch(PDOException $e) { |
|
66 | - return "error : ".$e->getMessage(); |
|
67 | - } |
|
68 | - } |
|
69 | - public function deleteAllLocation() { |
|
70 | - $query = "DELETE FROM source_location"; |
|
71 | - try { |
|
72 | - $sth = $this->db->prepare($query); |
|
73 | - $sth->execute(); |
|
74 | - } catch(PDOException $e) { |
|
75 | - return "error : ".$e->getMessage(); |
|
76 | - } |
|
77 | - } |
|
59 | + public function deleteLocation($id) { |
|
60 | + $query = "DELETE FROM source_location WHERE id = :id"; |
|
61 | + $query_values = array(':id' => $id); |
|
62 | + try { |
|
63 | + $sth = $this->db->prepare($query); |
|
64 | + $sth->execute($query_values); |
|
65 | + } catch(PDOException $e) { |
|
66 | + return "error : ".$e->getMessage(); |
|
67 | + } |
|
68 | + } |
|
69 | + public function deleteAllLocation() { |
|
70 | + $query = "DELETE FROM source_location"; |
|
71 | + try { |
|
72 | + $sth = $this->db->prepare($query); |
|
73 | + $sth->execute(); |
|
74 | + } catch(PDOException $e) { |
|
75 | + return "error : ".$e->getMessage(); |
|
76 | + } |
|
77 | + } |
|
78 | 78 | } |
79 | 79 | ?> |
80 | 80 | \ No newline at end of file |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['airline'])) { |
7 | - header('Location: '.$globalURL.'/airline'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/airline'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
11 | 11 | $Spotter = new Spotter(); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | function drawChart() { |
74 | 74 | var data = google.visualization.arrayToDataTable([ |
75 | 75 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
76 | - $hour_data = ''; |
|
76 | + $hour_data = ''; |
|
77 | 77 | foreach($hour_array as $hour_item) |
78 | 78 | { |
79 | 79 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | function drawChart() { |
39 | 39 | var data = google.visualization.arrayToDataTable([ |
40 | 40 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
41 | - $hour_data = ''; |
|
41 | + $hour_data = ''; |
|
42 | 42 | foreach($hour_array as $hour_item) |
43 | 43 | { |
44 | 44 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | function drawChart() { |
56 | 56 | var data = google.visualization.arrayToDataTable([ |
57 | 57 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
58 | - $hour_data = ''; |
|
58 | + $hour_data = ''; |
|
59 | 59 | foreach($hour_array as $hour_item) |
60 | 60 | { |
61 | 61 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | <meta property="og:site_name" content="<?php print $globalName; ?>"/> |
41 | 41 | |
42 | 42 | <?php |
43 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
43 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
44 | 44 | ?> |
45 | 45 | <script language="JavaScript" type="text/javascript"> |
46 | 46 | function datasource_js() { |
@@ -121,22 +121,22 @@ discard block |
||
121 | 121 | } |
122 | 122 | </script> |
123 | 123 | <?php |
124 | - } |
|
124 | + } |
|
125 | 125 | ?> |
126 | 126 | |
127 | 127 | </head> |
128 | 128 | |
129 | 129 | <?php |
130 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
130 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
131 | 131 | ?> |
132 | 132 | |
133 | 133 | <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()"> |
134 | 134 | <?php |
135 | - } else { |
|
135 | + } else { |
|
136 | 136 | ?> |
137 | 137 | <body class="page-<?php print strtolower($current_page); ?>"> |
138 | 138 | <?php |
139 | - } |
|
139 | + } |
|
140 | 140 | ?> |
141 | 141 | <div class="navbar navbar-fixed-top" role="navigation"> |
142 | 142 | <div class="container"> |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | |
188 | 188 | <?php |
189 | 189 | if (isset($top_header)) { |
190 | - if ($top_header != "") |
|
191 | - { |
|
190 | + if ($top_header != "") |
|
191 | + { |
|
192 | 192 | print '<div class="top-header container clear" role="main">'; |
193 | 193 | print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />'; |
194 | 194 | print '</div>'; |
195 | - } |
|
195 | + } |
|
196 | 196 | } |
197 | 197 | ?> |
198 | 198 |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['country'])) { |
6 | - header('Location: '.$globalURL.'/country'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/country'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |