@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | print '</ul>You <strong>must</strong> add these modules.</div>'; |
| 84 | 84 | require('../footer.php'); |
| 85 | - exit; |
|
| 85 | + exit; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | if (!isset($_SESSION['install']) && !isset($_POST['dbtype']) && (count($error) == 0)) { |
@@ -291,17 +291,17 @@ discard block |
||
| 291 | 291 | </tr> |
| 292 | 292 | <!-- |
| 293 | 293 | <?php |
| 294 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 295 | - $Connection = new Connection(); |
|
| 294 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 295 | + $Connection = new Connection(); |
|
| 296 | 296 | ?> |
| 297 | 297 | --> |
| 298 | 298 | <?php |
| 299 | - if ($Connection->db != NULL) { |
|
| 299 | + if ($Connection->db != NULL) { |
|
| 300 | 300 | if ($Connection->tableExists('source_location')) { |
| 301 | - require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
| 302 | - $Source = new Source(); |
|
| 303 | - $alllocations = $Source->getAllLocationInfo(); |
|
| 304 | - foreach ($alllocations as $location) { |
|
| 301 | + require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
| 302 | + $Source = new Source(); |
|
| 303 | + $alllocations = $Source->getAllLocationInfo(); |
|
| 304 | + foreach ($alllocations as $location) { |
|
| 305 | 305 | ?> |
| 306 | 306 | <tr> |
| 307 | 307 | <input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" /> |
@@ -315,9 +315,9 @@ discard block |
||
| 315 | 315 | </tr> |
| 316 | 316 | |
| 317 | 317 | <?php |
| 318 | - } |
|
| 318 | + } |
|
| 319 | + } |
|
| 319 | 320 | } |
| 320 | - } |
|
| 321 | 321 | ?> |
| 322 | 322 | |
| 323 | 323 | <tr> |
@@ -408,12 +408,12 @@ discard block |
||
| 408 | 408 | ?> |
| 409 | 409 | <tr> |
| 410 | 410 | <?php |
| 411 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 411 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 412 | 412 | ?> |
| 413 | 413 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 414 | 414 | <td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td> |
| 415 | 415 | <?php |
| 416 | - } else { |
|
| 416 | + } else { |
|
| 417 | 417 | $hostport = explode(':',$source['host']); |
| 418 | 418 | if (isset($hostport[1])) { |
| 419 | 419 | $host = $hostport[0]; |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 427 | 427 | <td><input type="number" name="port[]" id="port" value="<?php print $port; ?>" /></td> |
| 428 | 428 | <?php |
| 429 | - } |
|
| 429 | + } |
|
| 430 | 430 | ?> |
| 431 | 431 | <td> |
| 432 | 432 | <select name="format[]" id="format"> |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | <br /> |
| 702 | 702 | <p> |
| 703 | 703 | <?php |
| 704 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 704 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 705 | 705 | ?> |
| 706 | 706 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 707 | 707 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -711,11 +711,11 @@ discard block |
||
| 711 | 711 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 712 | 712 | <?php |
| 713 | 713 | } |
| 714 | - } else { |
|
| 714 | + } else { |
|
| 715 | 715 | ?> |
| 716 | 716 | <b>PHP GD is not installed, you can t change color of aircraft icon on map</b> |
| 717 | 717 | <?php |
| 718 | - } |
|
| 718 | + } |
|
| 719 | 719 | ?> |
| 720 | 720 | </p> |
| 721 | 721 | <br /> |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | </p> |
| 735 | 735 | <?php |
| 736 | 736 | require('../footer.php'); |
| 737 | - exit; |
|
| 737 | + exit; |
|
| 738 | 738 | } |
| 739 | 739 | |
| 740 | 740 | $settings = array(); |
@@ -824,8 +824,8 @@ discard block |
||
| 824 | 824 | |
| 825 | 825 | $sources = array(); |
| 826 | 826 | foreach ($source_name as $keys => $name) { |
| 827 | - if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 828 | - else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 827 | + if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 828 | + else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 829 | 829 | } |
| 830 | 830 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 831 | 831 | |
@@ -1078,14 +1078,14 @@ discard block |
||
| 1078 | 1078 | |
| 1079 | 1079 | // Set some defaults values... |
| 1080 | 1080 | if (!isset($globalAircraftImageSources)) { |
| 1081 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1082 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1081 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1082 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | 1085 | if (!isset($globalSchedulesSources)) { |
| 1086 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1087 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1088 | - } |
|
| 1086 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1087 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1088 | + } |
|
| 1089 | 1089 | |
| 1090 | 1090 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1091 | 1091 | |
@@ -1125,17 +1125,17 @@ discard block |
||
| 1125 | 1125 | print '<ul><div id="step">'; |
| 1126 | 1126 | $pop = false; |
| 1127 | 1127 | foreach ($_SESSION['done'] as $done) { |
| 1128 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1129 | - if ($done == 'Create database') $pop = true; |
|
| 1130 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1131 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1128 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1129 | + if ($done == 'Create database') $pop = true; |
|
| 1130 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1131 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1132 | 1132 | } |
| 1133 | 1133 | if ($pop) { |
| 1134 | - sleep(5); |
|
| 1135 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1134 | + sleep(5); |
|
| 1135 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1136 | 1136 | } else if ($popi) { |
| 1137 | - sleep(5); |
|
| 1138 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1137 | + sleep(5); |
|
| 1138 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1139 | 1139 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1140 | 1140 | print '</div></ul>'; |
| 1141 | 1141 | print '<div id="error"></div>'; |
@@ -1198,7 +1198,7 @@ discard block |
||
| 1198 | 1198 | unset($_COOKIE['install']); |
| 1199 | 1199 | print '<div class="info column"><ul>'; |
| 1200 | 1200 | foreach ($_SESSION['done'] as $done) { |
| 1201 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1201 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1202 | 1202 | } |
| 1203 | 1203 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1204 | 1204 | print '</ul></div>'; |
@@ -114,45 +114,72 @@ discard block |
||
| 114 | 114 | </div> |
| 115 | 115 | <p> |
| 116 | 116 | <label for="dbhost">Database hostname</label> |
| 117 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 117 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 118 | + print $globalDBhost; |
|
| 119 | +} |
|
| 120 | +?>" /> |
|
| 118 | 121 | </p> |
| 119 | 122 | <p> |
| 120 | 123 | <label for="dbport">Database port</label> |
| 121 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 124 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 125 | + print $globalDBport; |
|
| 126 | +} |
|
| 127 | +?>" /> |
|
| 122 | 128 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 123 | 129 | </p> |
| 124 | 130 | <p> |
| 125 | 131 | <label for="dbname">Database name</label> |
| 126 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 132 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 133 | + print $globalDBname; |
|
| 134 | +} |
|
| 135 | +?>" /> |
|
| 127 | 136 | </p> |
| 128 | 137 | <p> |
| 129 | 138 | <label for="dbuser">Database user</label> |
| 130 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 139 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 140 | + print $globalDBuser; |
|
| 141 | +} |
|
| 142 | +?>" /> |
|
| 131 | 143 | </p> |
| 132 | 144 | <p> |
| 133 | 145 | <label for="dbuserpass">Database user password</label> |
| 134 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 146 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 147 | + print $globalDBpass; |
|
| 148 | +} |
|
| 149 | +?>" /> |
|
| 135 | 150 | </p> |
| 136 | 151 | </fieldset> |
| 137 | 152 | <fieldset id="site"> |
| 138 | 153 | <legend>Site configuration</legend> |
| 139 | 154 | <p> |
| 140 | 155 | <label for="sitename">Site name</label> |
| 141 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 156 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 157 | + print $globalName; |
|
| 158 | +} |
|
| 159 | +?>" /> |
|
| 142 | 160 | </p> |
| 143 | 161 | <p> |
| 144 | 162 | <label for="siteurl">Site directory</label> |
| 145 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 163 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 164 | + print $globalURL; |
|
| 165 | +} |
|
| 166 | +?>" /> |
|
| 146 | 167 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 147 | 168 | </p> |
| 148 | 169 | <p> |
| 149 | 170 | <label for="timezone">Timezone</label> |
| 150 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 171 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 172 | + print $globalTimezone; |
|
| 173 | +} |
|
| 174 | +?>" /> |
|
| 151 | 175 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 152 | 176 | </p> |
| 153 | 177 | <p> |
| 154 | 178 | <label for="language">Language</label> |
| 155 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 179 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 180 | + print $globalLanguage; |
|
| 181 | +} |
|
| 182 | +?>" /> |
|
| 156 | 183 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 157 | 184 | </p> |
| 158 | 185 | </fieldset> |
@@ -173,11 +200,17 @@ discard block |
||
| 173 | 200 | <div id="mapbox_data"> |
| 174 | 201 | <p> |
| 175 | 202 | <label for="mapboxid">Mapbox id</label> |
| 176 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 203 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 204 | + print $globalMapboxId; |
|
| 205 | +} |
|
| 206 | +?>" /> |
|
| 177 | 207 | </p> |
| 178 | 208 | <p> |
| 179 | 209 | <label for="mapboxtoken">Mapbox token</label> |
| 180 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 210 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 211 | + print $globalMapboxToken; |
|
| 212 | +} |
|
| 213 | +?>" /> |
|
| 181 | 214 | </p> |
| 182 | 215 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 183 | 216 | </div> |
@@ -185,7 +218,10 @@ discard block |
||
| 185 | 218 | <div id="google_data"> |
| 186 | 219 | <p> |
| 187 | 220 | <label for="googlekey">Google API key</label> |
| 188 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 221 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 222 | + print $globalGoogleAPIKey; |
|
| 223 | +} |
|
| 224 | +?>" /> |
|
| 189 | 225 | <p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p> |
| 190 | 226 | </p> |
| 191 | 227 | </div> |
@@ -193,7 +229,10 @@ discard block |
||
| 193 | 229 | <div id="bing_data"> |
| 194 | 230 | <p> |
| 195 | 231 | <label for="bingkey">Bing Map key</label> |
| 196 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 232 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 233 | + print $globalBingMapKey; |
|
| 234 | +} |
|
| 235 | +?>" /> |
|
| 197 | 236 | <p class="help-block">Get a key <a href="https://msdn.microsoft.com/en-us/library/ff428642.aspx">here</a></p> |
| 198 | 237 | </p> |
| 199 | 238 | </div> |
@@ -201,7 +240,10 @@ discard block |
||
| 201 | 240 | <div id="mapquest_data"> |
| 202 | 241 | <p> |
| 203 | 242 | <label for="mapquestkey">MapQuest key</label> |
| 204 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 243 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 244 | + print $globalMapQuestKey; |
|
| 245 | +} |
|
| 246 | +?>" /> |
|
| 205 | 247 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 206 | 248 | </p> |
| 207 | 249 | </div> |
@@ -209,11 +251,17 @@ discard block |
||
| 209 | 251 | <div id="here_data"> |
| 210 | 252 | <p> |
| 211 | 253 | <label for="hereappid">Here App_Id</label> |
| 212 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 254 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 255 | + print $globalHereappId; |
|
| 256 | +} |
|
| 257 | +?>" /> |
|
| 213 | 258 | </p> |
| 214 | 259 | <p> |
| 215 | 260 | <label for="hereappcode">Here App_Code</label> |
| 216 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 261 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 262 | + print $globalHereappCode; |
|
| 263 | +} |
|
| 264 | +?>" /> |
|
| 217 | 265 | </p> |
| 218 | 266 | <p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p> |
| 219 | 267 | </div> |
@@ -222,42 +270,86 @@ discard block |
||
| 222 | 270 | <legend>Coverage area</legend> |
| 223 | 271 | <p> |
| 224 | 272 | <label for="latitudemax">The maximum latitude (north)</label> |
| 225 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 273 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 274 | + print $globalLatitudeMax; |
|
| 275 | +} |
|
| 276 | +?>" /> |
|
| 226 | 277 | </p> |
| 227 | 278 | <p> |
| 228 | 279 | <label for="latitudemin">The minimum latitude (south)</label> |
| 229 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 280 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 281 | + print $globalLatitudeMin; |
|
| 282 | +} |
|
| 283 | +?>" /> |
|
| 230 | 284 | </p> |
| 231 | 285 | <p> |
| 232 | 286 | <label for="longitudemax">The maximum longitude (west)</label> |
| 233 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 287 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 288 | + print $globalLongitudeMax; |
|
| 289 | +} |
|
| 290 | +?>" /> |
|
| 234 | 291 | </p> |
| 235 | 292 | <p> |
| 236 | 293 | <label for="longitudemin">The minimum longitude (east)</label> |
| 237 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 294 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 295 | + print $globalLongitudeMin; |
|
| 296 | +} |
|
| 297 | +?>" /> |
|
| 238 | 298 | </p> |
| 239 | 299 | <p> |
| 240 | 300 | <label for="latitudecenter">The latitude center</label> |
| 241 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 301 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 302 | + print $globalCenterLatitude; |
|
| 303 | +} |
|
| 304 | +?>" /> |
|
| 242 | 305 | </p> |
| 243 | 306 | <p> |
| 244 | 307 | <label for="longitudecenter">The longitude center</label> |
| 245 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 308 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 309 | + print $globalCenterLongitude; |
|
| 310 | +} |
|
| 311 | +?>" /> |
|
| 246 | 312 | </p> |
| 247 | 313 | <p> |
| 248 | 314 | <label for="livezoom">Default Zoom on live map</label> |
| 249 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 315 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 316 | + print $globalLiveZoom; |
|
| 317 | +} else { |
|
| 318 | + print '9'; |
|
| 319 | +} |
|
| 320 | +?>" /> |
|
| 250 | 321 | </p> |
| 251 | 322 | <p> |
| 252 | 323 | <label for="squawk_country">Country for squawk usage</label> |
| 253 | 324 | <select name="squawk_country" id="squawk_country"> |
| 254 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 255 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 256 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 257 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 258 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 259 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 260 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 325 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 326 | + print ' selected '; |
|
| 327 | +} |
|
| 328 | +?>>UK</option> |
|
| 329 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 330 | + print ' selected '; |
|
| 331 | +} |
|
| 332 | +?>>NZ</option> |
|
| 333 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 334 | + print ' selected '; |
|
| 335 | +} |
|
| 336 | +?>>US</option> |
|
| 337 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 338 | + print ' selected '; |
|
| 339 | +} |
|
| 340 | +?>>AU</option> |
|
| 341 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 342 | + print ' selected '; |
|
| 343 | +} |
|
| 344 | +?>>NL</option> |
|
| 345 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 346 | + print ' selected '; |
|
| 347 | +} |
|
| 348 | +?>>FR</option> |
|
| 349 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 350 | + print ' selected '; |
|
| 351 | +} |
|
| 352 | +?>>TR</option> |
|
| 261 | 353 | </select> |
| 262 | 354 | </p> |
| 263 | 355 | </fieldset> |
@@ -266,15 +358,24 @@ discard block |
||
| 266 | 358 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 267 | 359 | <p> |
| 268 | 360 | <label for="latitude">Center latitude</label> |
| 269 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 361 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 362 | + echo $globalDistanceIgnore['latitude']; |
|
| 363 | +} |
|
| 364 | +?>" /> |
|
| 270 | 365 | </p> |
| 271 | 366 | <p> |
| 272 | 367 | <label for="longitude">Center longitude</label> |
| 273 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 368 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 369 | + echo $globalDistanceIgnore['longitude']; |
|
| 370 | +} |
|
| 371 | +?>" /> |
|
| 274 | 372 | </p> |
| 275 | 373 | <p> |
| 276 | 374 | <label for="Distance">Distance (in km)</label> |
| 277 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 375 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 376 | + echo $globalDistanceIgnore['distance']; |
|
| 377 | +} |
|
| 378 | +?>" /> |
|
| 278 | 379 | </p> |
| 279 | 380 | </fieldset> |
| 280 | 381 | <fieldset id="sourceloc"> |
@@ -367,11 +468,17 @@ discard block |
||
| 367 | 468 | <div id="flightaware_data"> |
| 368 | 469 | <p> |
| 369 | 470 | <label for="flightawareusername">FlightAware username</label> |
| 370 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 471 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 472 | + print $globalFlightAwareUsername; |
|
| 473 | +} |
|
| 474 | +?>" /> |
|
| 371 | 475 | </p> |
| 372 | 476 | <p> |
| 373 | 477 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 374 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 478 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 479 | + print $globalFlightAwarePassword; |
|
| 480 | +} |
|
| 481 | +?>" /> |
|
| 375 | 482 | </p> |
| 376 | 483 | </div> |
| 377 | 484 | --> |
@@ -430,20 +537,56 @@ discard block |
||
| 430 | 537 | ?> |
| 431 | 538 | <td> |
| 432 | 539 | <select name="format[]" id="format"> |
| 433 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 434 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 435 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 436 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 437 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 438 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 439 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 440 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server</option> |
|
| 441 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 442 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 540 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 541 | + print 'selected'; |
|
| 542 | +} |
|
| 543 | +?>>Auto</option> |
|
| 544 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 545 | + print 'selected'; |
|
| 546 | +} |
|
| 547 | +?>>SBS</option> |
|
| 548 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 549 | + print 'selected'; |
|
| 550 | +} |
|
| 551 | +?>>TSV</option> |
|
| 552 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 553 | + print 'selected'; |
|
| 554 | +} |
|
| 555 | +?>>Raw</option> |
|
| 556 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 557 | + print 'selected'; |
|
| 558 | +} |
|
| 559 | +?>>APRS</option> |
|
| 560 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 561 | + print 'selected'; |
|
| 562 | +} |
|
| 563 | +?>>Radarcape deltadb.txt</option> |
|
| 564 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 565 | + print 'selected'; |
|
| 566 | +} |
|
| 567 | +?>>Vatsim</option> |
|
| 568 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 569 | + print 'selected'; |
|
| 570 | +} |
|
| 571 | +?>>Virtual Radar Server</option> |
|
| 572 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 573 | + print 'selected'; |
|
| 574 | +} |
|
| 575 | +?>>phpVMS</option> |
|
| 576 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 577 | + print 'selected'; |
|
| 578 | +} |
|
| 579 | +?>>IVAO</option> |
|
| 443 | 580 | </select> |
| 444 | 581 | </td> |
| 445 | - <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td> |
|
| 446 | - <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) print 'checked'; ?> /></td> |
|
| 582 | + <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 583 | + print $source['name']; |
|
| 584 | +} |
|
| 585 | +?>" /></td> |
|
| 586 | + <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) { |
|
| 587 | + print 'checked'; |
|
| 588 | +} |
|
| 589 | +?> /></td> |
|
| 447 | 590 | <td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td> |
| 448 | 591 | </tr> |
| 449 | 592 | <?php |
@@ -482,11 +625,17 @@ discard block |
||
| 482 | 625 | <p>Listen UDP server for acarsdec/acarsdeco2/...</p> |
| 483 | 626 | <p> |
| 484 | 627 | <label for="acarshost">ACARS UDP host</label> |
| 485 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 628 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 629 | + print $globalACARSHost; |
|
| 630 | +} |
|
| 631 | +?>" /> |
|
| 486 | 632 | </p> |
| 487 | 633 | <p> |
| 488 | 634 | <label for="acarsport">ACARS UDP port</label> |
| 489 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 635 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 636 | + print $globalACARSPort; |
|
| 637 | +} |
|
| 638 | +?>" /> |
|
| 490 | 639 | </p> |
| 491 | 640 | </fieldset> |
| 492 | 641 | </div> |
@@ -540,12 +689,18 @@ discard block |
||
| 540 | 689 | <div id="schedules_options"> |
| 541 | 690 | <p> |
| 542 | 691 | <label for="britishairways">British Airways API Key</label> |
| 543 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 692 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 693 | + print $globalBritishAirwaysKey; |
|
| 694 | +} |
|
| 695 | +?>" /> |
|
| 544 | 696 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 545 | 697 | </p> |
| 546 | 698 | <p> |
| 547 | 699 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 548 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 700 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 701 | + print $globalTransaviaKey; |
|
| 702 | +} |
|
| 703 | +?>" /> |
|
| 549 | 704 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 550 | 705 | </p> |
| 551 | 706 | <p> |
@@ -553,10 +708,16 @@ discard block |
||
| 553 | 708 | <b>Lufthansa API Key</b> |
| 554 | 709 | <p> |
| 555 | 710 | <label for="lufthansakey">Key</label> |
| 556 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 711 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 712 | + print $globalLufthansaKey['key']; |
|
| 713 | +} |
|
| 714 | +?>" /> |
|
| 557 | 715 | </p><p> |
| 558 | 716 | <label for="lufthansasecret">Secret</label> |
| 559 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 717 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 718 | + print $globalLufthansaKey['secret']; |
|
| 719 | +} |
|
| 720 | +?>" /> |
|
| 560 | 721 | </p> |
| 561 | 722 | </div> |
| 562 | 723 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -576,7 +737,10 @@ discard block |
||
| 576 | 737 | </p> |
| 577 | 738 | <p> |
| 578 | 739 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 579 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 740 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 741 | + print $globalNOTAMSource; |
|
| 742 | +} |
|
| 743 | +?>" /> |
|
| 580 | 744 | </p> |
| 581 | 745 | <br /> |
| 582 | 746 | <p> |
@@ -591,14 +755,20 @@ discard block |
||
| 591 | 755 | <div id="metarsrc"> |
| 592 | 756 | <p> |
| 593 | 757 | <label for="metarsource">URL of your METAR source</label> |
| 594 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 758 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 759 | + print $globalMETARurl; |
|
| 760 | +} |
|
| 761 | +?>" /> |
|
| 595 | 762 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 596 | 763 | </p> |
| 597 | 764 | </div> |
| 598 | 765 | <br /> |
| 599 | 766 | <p> |
| 600 | 767 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 601 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 768 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 769 | + print $globalBitlyAccessToken; |
|
| 770 | +} |
|
| 771 | +?>" /> |
|
| 602 | 772 | </p> |
| 603 | 773 | <br /> |
| 604 | 774 | <p> |
@@ -612,7 +782,12 @@ discard block |
||
| 612 | 782 | </p> |
| 613 | 783 | <p> |
| 614 | 784 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 615 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
| 785 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 786 | + print $globalArchiveMonths; |
|
| 787 | +} else { |
|
| 788 | + echo '0'; |
|
| 789 | +} |
|
| 790 | +?>" /> |
|
| 616 | 791 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 617 | 792 | </p> |
| 618 | 793 | <p> |
@@ -622,12 +797,22 @@ discard block |
||
| 622 | 797 | </p> |
| 623 | 798 | <p> |
| 624 | 799 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 625 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
| 800 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 801 | + print $globalArchiveKeepMonths; |
|
| 802 | +} else { |
|
| 803 | + echo '0'; |
|
| 804 | +} |
|
| 805 | +?>" /> |
|
| 626 | 806 | <p class="help-block">0 to disable</p> |
| 627 | 807 | </p> |
| 628 | 808 | <p> |
| 629 | 809 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 630 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
| 810 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 811 | + print $globalArchiveKeepTrackMonths; |
|
| 812 | +} else { |
|
| 813 | + echo '0'; |
|
| 814 | +} |
|
| 815 | +?>" /> |
|
| 631 | 816 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 632 | 817 | </p> |
| 633 | 818 | <br /> |
@@ -636,7 +821,12 @@ discard block |
||
| 636 | 821 | <input type="checkbox" name="daemon" id="daemon" value="daemon"<?php if ((isset($globalDaemon) && $globalDaemon) || !isset($globalDaemon)) { ?> checked="checked"<?php } ?> onClick="daemon_js()" /> |
| 637 | 822 | <div id="cronends"> |
| 638 | 823 | <label for="cronend">Run script for xx seconds</label> |
| 639 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 824 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 825 | + print $globalCronEnd; |
|
| 826 | +} else { |
|
| 827 | + print '0'; |
|
| 828 | +} |
|
| 829 | +?>" /> |
|
| 640 | 830 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 641 | 831 | </div> |
| 642 | 832 | <p class="help-block">Uncheck if the script is running as cron job</p> |
@@ -677,26 +867,49 @@ discard block |
||
| 677 | 867 | <br /> |
| 678 | 868 | <p> |
| 679 | 869 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 680 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 870 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 871 | + echo $globalLiveInterval; |
|
| 872 | +} else { |
|
| 873 | + echo '200'; |
|
| 874 | +} |
|
| 875 | +?>" /> |
|
| 681 | 876 | </p> |
| 682 | 877 | <p> |
| 683 | 878 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 684 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 879 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 880 | + echo $globalMapRefresh; |
|
| 881 | +} else { |
|
| 882 | + echo '30'; |
|
| 883 | +} |
|
| 884 | +?>" /> |
|
| 685 | 885 | </p> |
| 686 | 886 | <p> |
| 687 | 887 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 688 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 888 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 889 | + echo $globalMapIdleTimeout; |
|
| 890 | +} else { |
|
| 891 | + echo '30'; |
|
| 892 | +} |
|
| 893 | +?>" /> |
|
| 689 | 894 | <p class="help-block">0 to disable</p> |
| 690 | 895 | </p> |
| 691 | 896 | <br /> |
| 692 | 897 | <p> |
| 693 | 898 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 694 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 899 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 900 | + echo $globalClosestMinDist; |
|
| 901 | +} else { |
|
| 902 | + echo '50'; |
|
| 903 | +} |
|
| 904 | +?>" /> |
|
| 695 | 905 | </p> |
| 696 | 906 | <br /> |
| 697 | 907 | <p> |
| 698 | 908 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 699 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 909 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 910 | + echo $globalAircraftSize; |
|
| 911 | +} |
|
| 912 | +?>" /> |
|
| 700 | 913 | </p> |
| 701 | 914 | <br /> |
| 702 | 915 | <p> |
@@ -704,7 +917,12 @@ discard block |
||
| 704 | 917 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 705 | 918 | ?> |
| 706 | 919 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 707 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 920 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 921 | + echo $globalAircraftIconColor; |
|
| 922 | +} else { |
|
| 923 | + echo '1a3151'; |
|
| 924 | +} |
|
| 925 | +?>" /> |
|
| 708 | 926 | <?php |
| 709 | 927 | if (!is_writable('../cache')) { |
| 710 | 928 | ?> |
@@ -722,8 +940,18 @@ discard block |
||
| 722 | 940 | <p> |
| 723 | 941 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 724 | 942 | <div class="range"> |
| 725 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 726 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 943 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 944 | + echo $globalAirportZoom; |
|
| 945 | +} else { |
|
| 946 | + echo '7'; |
|
| 947 | +} |
|
| 948 | +?>" /> |
|
| 949 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 950 | + echo $globalAirportZoom; |
|
| 951 | +} else { |
|
| 952 | + echo '7'; |
|
| 953 | +} |
|
| 954 | +?></output> |
|
| 727 | 955 | </div> |
| 728 | 956 | </p> |
| 729 | 957 | </fieldset> |
@@ -751,8 +979,12 @@ discard block |
||
| 751 | 979 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 752 | 980 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 753 | 981 | |
| 754 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 755 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 982 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 983 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 984 | + } |
|
| 985 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 986 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 987 | + } |
|
| 756 | 988 | |
| 757 | 989 | $_SESSION['database_root'] = $dbroot; |
| 758 | 990 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -819,15 +1051,23 @@ discard block |
||
| 819 | 1051 | $source_city = $_POST['source_city']; |
| 820 | 1052 | $source_country = $_POST['source_country']; |
| 821 | 1053 | $source_ref = $_POST['source_ref']; |
| 822 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 823 | - else $source_id = array(); |
|
| 1054 | + if (isset($source_id)) { |
|
| 1055 | + $source_id = $_POST['source_id']; |
|
| 1056 | + } else { |
|
| 1057 | + $source_id = array(); |
|
| 1058 | + } |
|
| 824 | 1059 | |
| 825 | 1060 | $sources = array(); |
| 826 | 1061 | foreach ($source_name as $keys => $name) { |
| 827 | - if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 828 | - else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 1062 | + if (isset($source_id[$keys])) { |
|
| 1063 | + $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]); |
|
| 1064 | + } else { |
|
| 1065 | + $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]); |
|
| 1066 | + } |
|
| 1067 | + } |
|
| 1068 | + if (count($sources) > 0) { |
|
| 1069 | + $_SESSION['sources'] = $sources; |
|
| 829 | 1070 | } |
| 830 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 831 | 1071 | |
| 832 | 1072 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 833 | 1073 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -864,13 +1104,21 @@ discard block |
||
| 864 | 1104 | $port = $_POST['port']; |
| 865 | 1105 | $name = $_POST['name']; |
| 866 | 1106 | $format = $_POST['format']; |
| 867 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 868 | - else $sourcestats = array(); |
|
| 1107 | + if (isset($_POST['sourcestats'])) { |
|
| 1108 | + $sourcestats = $_POST['sourcestats']; |
|
| 1109 | + } else { |
|
| 1110 | + $sourcestats = array(); |
|
| 1111 | + } |
|
| 869 | 1112 | $gSources = array(); |
| 870 | 1113 | foreach ($host as $key => $h) { |
| 871 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 872 | - else $cov = 'FALSE'; |
|
| 873 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
| 1114 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1115 | + $cov = 'TRUE'; |
|
| 1116 | + } else { |
|
| 1117 | + $cov = 'FALSE'; |
|
| 1118 | + } |
|
| 1119 | + if ($h != '') { |
|
| 1120 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
| 1121 | + } |
|
| 874 | 1122 | } |
| 875 | 1123 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 876 | 1124 | |
@@ -894,7 +1142,9 @@ discard block |
||
| 894 | 1142 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 895 | 1143 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 896 | 1144 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 897 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1145 | + } else { |
|
| 1146 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1147 | + } |
|
| 898 | 1148 | |
| 899 | 1149 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 900 | 1150 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -933,7 +1183,9 @@ discard block |
||
| 933 | 1183 | |
| 934 | 1184 | // Create in settings.php keys not yet configurable if not already here |
| 935 | 1185 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 936 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1186 | + if (!isset($globalDebug)) { |
|
| 1187 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1188 | + } |
|
| 937 | 1189 | |
| 938 | 1190 | $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
| 939 | 1191 | if ($archive == 'archive') { |
@@ -963,24 +1215,38 @@ discard block |
||
| 963 | 1215 | } |
| 964 | 1216 | */ |
| 965 | 1217 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 966 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 967 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 968 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 969 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1218 | + if ($globalsbs == 'sbs') { |
|
| 1219 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1220 | + } else { |
|
| 1221 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1222 | + } |
|
| 1223 | + if ($globalaprs == 'aprs') { |
|
| 1224 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1225 | + } else { |
|
| 1226 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1227 | + } |
|
| 970 | 1228 | if ($globalivao == 'ivao') { |
| 971 | 1229 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
| 972 | 1230 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 973 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1231 | + } else { |
|
| 1232 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1233 | + } |
|
| 974 | 1234 | if ($globalvatsim == 'vatsim') { |
| 975 | 1235 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
| 976 | 1236 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 977 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1237 | + } else { |
|
| 1238 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1239 | + } |
|
| 978 | 1240 | if ($globalphpvms == 'phpvms') { |
| 979 | 1241 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 980 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1242 | + } else { |
|
| 1243 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1244 | + } |
|
| 981 | 1245 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
| 982 | 1246 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 983 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1247 | + } else { |
|
| 1248 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1249 | + } |
|
| 984 | 1250 | |
| 985 | 1251 | |
| 986 | 1252 | |
@@ -1074,7 +1340,9 @@ discard block |
||
| 1074 | 1340 | $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
| 1075 | 1341 | } |
| 1076 | 1342 | |
| 1077 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1343 | + if (!isset($globalTransaction)) { |
|
| 1344 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1345 | + } |
|
| 1078 | 1346 | |
| 1079 | 1347 | // Set some defaults values... |
| 1080 | 1348 | if (!isset($globalAircraftImageSources)) { |
@@ -1089,15 +1357,23 @@ discard block |
||
| 1089 | 1357 | |
| 1090 | 1358 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1091 | 1359 | |
| 1092 | - if ($error == '') settings::modify_settings($settings); |
|
| 1093 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 1360 | + if ($error == '') { |
|
| 1361 | + settings::modify_settings($settings); |
|
| 1362 | + } |
|
| 1363 | + if ($error == '') { |
|
| 1364 | + settings::comment_settings($settings_comment); |
|
| 1365 | + } |
|
| 1094 | 1366 | if ($error != '') { |
| 1095 | 1367 | print '<div class="info column">'.$error.'</div>'; |
| 1096 | 1368 | require('../footer.php'); |
| 1097 | 1369 | exit; |
| 1098 | 1370 | } else { |
| 1099 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1100 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 1371 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 1372 | + $_SESSION['waypoints'] = 1; |
|
| 1373 | + } |
|
| 1374 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 1375 | + $_SESSION['owner'] = 1; |
|
| 1376 | + } |
|
| 1101 | 1377 | if (isset($_POST['createdb'])) { |
| 1102 | 1378 | $_SESSION['install'] = 'database_create'; |
| 1103 | 1379 | } else { |
@@ -1126,9 +1402,15 @@ discard block |
||
| 1126 | 1402 | $pop = false; |
| 1127 | 1403 | foreach ($_SESSION['done'] as $done) { |
| 1128 | 1404 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1129 | - if ($done == 'Create database') $pop = true; |
|
| 1130 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1131 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1405 | + if ($done == 'Create database') { |
|
| 1406 | + $pop = true; |
|
| 1407 | + } |
|
| 1408 | + if ($_SESSION['install'] == 'database_create') { |
|
| 1409 | + $pop = true; |
|
| 1410 | + } |
|
| 1411 | + if ($_SESSION['install'] == 'database_import') { |
|
| 1412 | + $popi = true; |
|
| 1413 | + } |
|
| 1132 | 1414 | } |
| 1133 | 1415 | if ($pop) { |
| 1134 | 1416 | sleep(5); |
@@ -1136,7 +1418,9 @@ discard block |
||
| 1136 | 1418 | } else if ($popi) { |
| 1137 | 1419 | sleep(5); |
| 1138 | 1420 | print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
| 1139 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1421 | + } else { |
|
| 1422 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1423 | + } |
|
| 1140 | 1424 | print '</div></ul>'; |
| 1141 | 1425 | print '<div id="error"></div>'; |
| 1142 | 1426 | /* foreach ($_SESSION['done'] as $done) { |