@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | { |
42 | 42 | if (isset($globalTimezone)) { |
43 | 43 | date_default_timezone_set($globalTimezone); |
44 | - } else date_default_timezone_set('UTC'); |
|
44 | + } else { |
|
45 | + date_default_timezone_set('UTC'); |
|
46 | + } |
|
45 | 47 | print '<tr>'; |
46 | 48 | if (isset($_GET['image']) && $_GET['image'] == "true") |
47 | 49 | { |
@@ -98,10 +100,14 @@ discard block |
||
98 | 100 | print '</div>'; |
99 | 101 | print '<div class="other2">'; |
100 | 102 | print '<span><i class="fa fa-arrow-up"></i> '.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_name'].', '.$spotter_item['departure_airport_country']; |
101 | - if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') print ' ('.$spotter_item['departure_airport_time'].')'; |
|
103 | + if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') { |
|
104 | + print ' ('.$spotter_item['departure_airport_time'].')'; |
|
105 | + } |
|
102 | 106 | print '</span>'; |
103 | 107 | print '<span><i class="fa fa-arrow-down"></i> '.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_name'].', '.$spotter_item['arrival_airport_country']; |
104 | - if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
108 | + if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != '') { |
|
109 | + print ' ('.$spotter_item['arrival_airport_time'].')'; |
|
110 | + } |
|
105 | 111 | print '</span>'; |
106 | 112 | print '</div>'; |
107 | 113 | print '<div class="other3">'; |
@@ -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 | |
14 | 16 | if (!empty($spotter_array)) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | $limit_start = 0; |
13 | 13 | $limit_end = 28; |
14 | 14 | $absolute_difference = 28; |
15 | -} else { |
|
15 | +} else { |
|
16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
17 | 17 | $limit_start = $limit_explode[0]; |
18 | 18 | $limit_end = $limit_explode[1]; |
@@ -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 |
@@ -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 |
@@ -21,7 +21,9 @@ |
||
21 | 21 | print '<fieldset class="form-group">'; |
22 | 22 | print '<label for="acars_message">'._("ACARS Message").'</label>'; |
23 | 23 | print '<textarea class="form-control" name="acars_message" id="acars_message" rows="5">'; |
24 | -if ($message != '') print $message; |
|
24 | +if ($message != '') { |
|
25 | + print $message; |
|
26 | +} |
|
25 | 27 | print '</textarea>'; |
26 | 28 | print '</fieldset>'; |
27 | 29 | print '<button type="submit" class="btn btn-primary">Submit</button>'; |
@@ -1,30 +1,30 @@ |
||
1 | 1 | #!/usr/bin/php |
2 | 2 | <?php |
3 | - require_once('../require/settings.php'); |
|
4 | - if ($globalInstalled) { |
|
5 | - echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | - exit; |
|
7 | - } |
|
8 | - require('class.create_db.php'); |
|
9 | - echo "Create and import all tables..."; |
|
10 | - create_db::import_all_db('../db/'); |
|
11 | - echo "Done !\n"; |
|
3 | + require_once('../require/settings.php'); |
|
4 | + if ($globalInstalled) { |
|
5 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | + exit; |
|
7 | + } |
|
8 | + require('class.create_db.php'); |
|
9 | + echo "Create and import all tables..."; |
|
10 | + create_db::import_all_db('../db/'); |
|
11 | + echo "Done !\n"; |
|
12 | 12 | |
13 | - require('class.update_db.php'); |
|
14 | - echo "Populate all tables...\n"; |
|
15 | - update_db::update_all(); |
|
16 | - echo "\nInstall waypoints...(VERY slow!)"; |
|
17 | - update_db::update_waypoints(); |
|
18 | - echo "Done !\n"; |
|
19 | - echo "Install airspace..."; |
|
20 | - update_db::update_airspace(); |
|
21 | - echo "Done !\n"; |
|
22 | - echo 'All is now installed ! Thanks'."\n"; |
|
23 | - if ($globalSBS1) { |
|
24 | - echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
25 | - } |
|
26 | - if ($globalACARS) { |
|
27 | - echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
28 | - } |
|
13 | + require('class.update_db.php'); |
|
14 | + echo "Populate all tables...\n"; |
|
15 | + update_db::update_all(); |
|
16 | + echo "\nInstall waypoints...(VERY slow!)"; |
|
17 | + update_db::update_waypoints(); |
|
18 | + echo "Done !\n"; |
|
19 | + echo "Install airspace..."; |
|
20 | + update_db::update_airspace(); |
|
21 | + echo "Done !\n"; |
|
22 | + echo 'All is now installed ! Thanks'."\n"; |
|
23 | + if ($globalSBS1) { |
|
24 | + echo 'You need to run cron-sbs.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
25 | + } |
|
26 | + if ($globalACARS) { |
|
27 | + echo 'You need to run cron-acars.php as a daemon. You can use init script in the install/init directory.'."\n"; |
|
28 | + } |
|
29 | 29 | |
30 | 30 | ?> |
31 | 31 | \ No newline at end of file |
@@ -1,23 +1,23 @@ |
||
1 | 1 | #!/usr/bin/php |
2 | 2 | <?php |
3 | - require_once('../require/settings.php'); |
|
4 | - if ($globalInstalled) { |
|
5 | - echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | - exit; |
|
7 | - } |
|
8 | - require('class.update_db.php'); |
|
9 | - if (isset($globalVATSIM) && $globalVATSIM) { |
|
3 | + require_once('../require/settings.php'); |
|
4 | + if ($globalInstalled) { |
|
5 | + echo '$globalInstalled must be set to FALSE in require/settings.php'; |
|
6 | + exit; |
|
7 | + } |
|
8 | + require('class.update_db.php'); |
|
9 | + if (isset($globalVATSIM) && $globalVATSIM) { |
|
10 | 10 | echo "Install VATSIM airlines..."; |
11 | 11 | update_db::update_vatsim(); |
12 | 12 | echo "Done !\n"; |
13 | - } |
|
14 | - if (isset($globalIVAO) && $globalIVAO) { |
|
13 | + } |
|
14 | + if (isset($globalIVAO) && $globalIVAO) { |
|
15 | 15 | if (!file_exists('tmp/ivae_feb2013.zip')) { |
16 | 16 | echo "You have to download the file ivae_feb2013.zip from https://www.ivao.aero/softdev/mirrors.asp?software=IvAeDataUp and put it in install/tmp directory"; |
17 | 17 | } else { |
18 | - echo "Install IVAO airlines and logos..."; |
|
19 | - update_db::update_IVAO(); |
|
18 | + echo "Install IVAO airlines and logos..."; |
|
19 | + update_db::update_IVAO(); |
|
20 | 20 | echo "Done !\n"; |
21 | 21 | } |
22 | - } |
|
22 | + } |
|
23 | 23 | ?> |
24 | 24 | \ No newline at end of file |
@@ -215,14 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | $r = null; |
217 | 217 | |
218 | - if( $code == "select" ) { $r = $this->test_select(); } |
|
219 | - elseif( $code == "constant_as" ) { $r = $this->test_constant_as(); } |
|
220 | - elseif( $code == "math_as" ) { $r = $this->test_math_as(); } |
|
221 | - elseif( $code == "count" ) { $r = $this->test_count(); } |
|
222 | - elseif( $code == "max" ) { $r = $this->test_max(); } |
|
223 | - elseif( $code == "load" ) { $r = $this->test_load(); } |
|
224 | - elseif( $code == "sample" ) { $r = $this->test_sample(); } |
|
225 | - else { print "<p>Unknown capability code: '$code'</p>"; return false; } |
|
218 | + if( $code == "select" ) { $r = $this->test_select(); } elseif( $code == "constant_as" ) { $r = $this->test_constant_as(); } elseif( $code == "math_as" ) { $r = $this->test_math_as(); } elseif( $code == "count" ) { $r = $this->test_count(); } elseif( $code == "max" ) { $r = $this->test_max(); } elseif( $code == "load" ) { $r = $this->test_load(); } elseif( $code == "sample" ) { $r = $this->test_sample(); } else { print "<p>Unknown capability code: '$code'</p>"; return false; } |
|
226 | 219 | $this->caps[$code] = $r; |
227 | 220 | if( isset( $this->caps_cache ) ) |
228 | 221 | { |
@@ -231,8 +224,7 @@ discard block |
||
231 | 224 | if( $was_cached ) |
232 | 225 | { |
233 | 226 | dba_replace( $db_key, $db_val, $this->caps_cache ); |
234 | - } |
|
235 | - else |
|
227 | + } else |
|
236 | 228 | { |
237 | 229 | dba_insert( $db_key, $db_val, $this->caps_cache ); |
238 | 230 | } |