@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | - } else { |
|
| 16 | + } else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -26,8 +26,12 @@ discard block |
||
| 26 | 26 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
| 27 | 27 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
| 28 | 28 | $sql_date = $end_date; |
| 29 | - } else $sql_date = ''; |
|
| 30 | -} else $sql_date = ''; |
|
| 29 | + } else { |
|
| 30 | + $sql_date = ''; |
|
| 31 | + } |
|
| 32 | + } else { |
|
| 33 | + $sql_date = ''; |
|
| 34 | +} |
|
| 31 | 35 | |
| 32 | 36 | if (isset($_GET['highest_altitude'])) { |
| 33 | 37 | //for altitude manipulation |
@@ -41,8 +45,12 @@ discard block |
||
| 41 | 45 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
| 42 | 46 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
| 43 | 47 | $sql_altitude = $start_altitude; |
| 44 | - } else $sql_altitude = ''; |
|
| 45 | -} else $sql_altitude = ''; |
|
| 48 | + } else { |
|
| 49 | + $sql_altitude = ''; |
|
| 50 | + } |
|
| 51 | + } else { |
|
| 52 | + $sql_altitude = ''; |
|
| 53 | +} |
|
| 46 | 54 | |
| 47 | 55 | //calculuation for the pagination |
| 48 | 56 | if(!isset($_GET['limit'])) |
@@ -60,7 +68,7 @@ discard block |
||
| 60 | 68 | $limit_end = $_GET['number_results']; |
| 61 | 69 | $absolute_difference = $_GET['number_results']; |
| 62 | 70 | } |
| 63 | -} else { |
|
| 71 | +} else { |
|
| 64 | 72 | $limit_explode = explode(",", $_GET['limit']); |
| 65 | 73 | $limit_start = $limit_explode[0]; |
| 66 | 74 | $limit_end = $limit_explode[1]; |
@@ -93,10 +101,15 @@ discard block |
||
| 93 | 101 | $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING); |
| 94 | 102 | $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
| 95 | 103 | if ($dist != '') { |
| 96 | - if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
|
| 97 | - elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
|
| 104 | + if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') { |
|
| 105 | + $dist = $dist*1.60934; |
|
| 106 | + } elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') { |
|
| 107 | + $dist = $dist*1.852; |
|
| 108 | + } |
|
| 109 | + } |
|
| 110 | + if (!isset($sql_date)) { |
|
| 111 | + $sql_date = ''; |
|
| 98 | 112 | } |
| 99 | - if (!isset($sql_date)) $sql_date = ''; |
|
| 100 | 113 | if ($archive == 1) { |
| 101 | 114 | $SpotterArchive = new SpotterArchive(); |
| 102 | 115 | $spotter_array = $SpotterArchive->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,'',$origlat,$origlon,$dist); |
@@ -164,7 +177,10 @@ discard block |
||
| 164 | 177 | if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; } |
| 165 | 178 | if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; } |
| 166 | 179 | if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$_GET['registration'].'</span> '; } |
| 167 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; } |
|
| 180 | + if (isset($_GET['highlights'])) { |
|
| 181 | + if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; |
|
| 182 | + } |
|
| 183 | + } |
|
| 168 | 184 | if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; } |
| 169 | 185 | if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; } |
| 170 | 186 | if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; } |
@@ -275,7 +291,10 @@ discard block |
||
| 275 | 291 | <div class="form-group"> |
| 276 | 292 | <label class="control-label col-sm-2"><?php echo _("Keywords"); ?></label> |
| 277 | 293 | <div class="col-sm-10"> |
| 278 | - <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) print $_GET['q']; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
| 294 | + <input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) { |
|
| 295 | + print $_GET['q']; |
|
| 296 | +} |
|
| 297 | +?>" size="10" placeholder="<?php echo _("Keywords"); ?>" /> |
|
| 279 | 298 | </div> |
| 280 | 299 | </div> |
| 281 | 300 | </fieldset> |
@@ -290,7 +309,10 @@ discard block |
||
| 290 | 309 | </select> |
| 291 | 310 | </div> |
| 292 | 311 | </div> |
| 293 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script> |
|
| 312 | + <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) { |
|
| 313 | + print $_GET['manufacturer']; |
|
| 314 | +} |
|
| 315 | +?>')</script> |
|
| 294 | 316 | <div class="form-group"> |
| 295 | 317 | <label class="control-label col-sm-2"><?php echo _("Type"); ?></label> |
| 296 | 318 | <div class="col-sm-10"> |
@@ -299,11 +321,17 @@ discard block |
||
| 299 | 321 | </select> |
| 300 | 322 | </div> |
| 301 | 323 | </div> |
| 302 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script> |
|
| 324 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) { |
|
| 325 | + print $_GET['aircraft_icao']; |
|
| 326 | +} |
|
| 327 | +?>');</script> |
|
| 303 | 328 | <div class="form-group"> |
| 304 | 329 | <label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> |
| 305 | 330 | <div class="col-sm-10"> |
| 306 | - <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) print $_GET['registration']; ?>" size="8" /> |
|
| 331 | + <input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) { |
|
| 332 | + print $_GET['registration']; |
|
| 333 | +} |
|
| 334 | +?>" size="8" /> |
|
| 307 | 335 | </div> |
| 308 | 336 | </div> |
| 309 | 337 | <?php |
@@ -312,22 +340,31 @@ discard block |
||
| 312 | 340 | <div class="form-group"> |
| 313 | 341 | <label class="control-label col-sm-2"><?php echo _("Pilot id"); ?></label> |
| 314 | 342 | <div class="col-sm-10"> |
| 315 | - <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) print $_GET['pilot_id']; ?>" size="15" /> |
|
| 343 | + <input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) { |
|
| 344 | + print $_GET['pilot_id']; |
|
| 345 | +} |
|
| 346 | +?>" size="15" /> |
|
| 316 | 347 | </div> |
| 317 | 348 | </div> |
| 318 | 349 | <div class="form-group"> |
| 319 | 350 | <label class="control-label col-sm-2"><?php echo _("Pilot name"); ?></label> |
| 320 | 351 | <div class="col-sm-10"> |
| 321 | - <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $_GET['pilot_name']; ?>" size="15" /> |
|
| 352 | + <input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) { |
|
| 353 | + print $_GET['pilot_name']; |
|
| 354 | +} |
|
| 355 | +?>" size="15" /> |
|
| 322 | 356 | </div> |
| 323 | 357 | </div> |
| 324 | 358 | <?php |
| 325 | -}else { |
|
| 359 | +} else { |
|
| 326 | 360 | ?> |
| 327 | 361 | <div class="form-group"> |
| 328 | 362 | <label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> |
| 329 | 363 | <div class="col-sm-10"> |
| 330 | - <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) print $_GET['owner']; ?>" size="15" /> |
|
| 364 | + <input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) { |
|
| 365 | + print $_GET['owner']; |
|
| 366 | +} |
|
| 367 | +?>" size="15" /> |
|
| 331 | 368 | </div> |
| 332 | 369 | </div> |
| 333 | 370 | <?php |
@@ -335,8 +372,14 @@ discard block |
||
| 335 | 372 | ?> |
| 336 | 373 | <div class="form-group"> |
| 337 | 374 | <div class="col-sm-offset-2 col-sm-10"> |
| 338 | - <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
| 339 | - <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
| 375 | + <!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
| 376 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
| 377 | +} |
|
| 378 | +} ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>--> |
|
| 379 | + <label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) { |
|
| 380 | + if ($_GET['highlights'] == "true"){ print 'checked="checked"'; |
|
| 381 | +} |
|
| 382 | +} ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label> |
|
| 340 | 383 | </div> |
| 341 | 384 | </div> |
| 342 | 385 | </fieldset> |
@@ -350,7 +393,10 @@ discard block |
||
| 350 | 393 | </select> |
| 351 | 394 | </div> |
| 352 | 395 | </div> |
| 353 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script> |
|
| 396 | + <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) { |
|
| 397 | + print $_GET['airline']; |
|
| 398 | +} |
|
| 399 | +?>');</script> |
|
| 354 | 400 | <div class="form-group"> |
| 355 | 401 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 356 | 402 | <div class="col-sm-10"> |
@@ -359,19 +405,34 @@ discard block |
||
| 359 | 405 | </select> |
| 360 | 406 | </div> |
| 361 | 407 | </div> |
| 362 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script> |
|
| 408 | + <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) { |
|
| 409 | + print $_GET['airline_country']; |
|
| 410 | +} |
|
| 411 | +?>');</script> |
|
| 363 | 412 | <div class="form-group"> |
| 364 | 413 | <label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> |
| 365 | 414 | <div class="col-sm-10"> |
| 366 | - <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $_GET['callsign']; ?>" size="8" /> |
|
| 415 | + <input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) { |
|
| 416 | + print $_GET['callsign']; |
|
| 417 | +} |
|
| 418 | +?>" size="8" /> |
|
| 367 | 419 | </div> |
| 368 | 420 | </div> |
| 369 | 421 | <div class="form-group"> |
| 370 | 422 | <div class="col-sm-offset-2 col-sm-10"> |
| 371 | 423 | <label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label> |
| 372 | - <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
| 373 | - <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
| 374 | - <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label> |
|
| 424 | + <label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) { |
|
| 425 | + if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; |
|
| 426 | +} |
|
| 427 | +} ?>> <?php echo _("Only Passenger airlines"); ?></label> |
|
| 428 | + <label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) { |
|
| 429 | + if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; |
|
| 430 | +} |
|
| 431 | +} ?>> <?php echo _("Only Cargo airlines"); ?></label> |
|
| 432 | + <label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) { |
|
| 433 | + if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; |
|
| 434 | +} |
|
| 435 | +} ?>> <?php echo _("Only Military airlines"); ?></label> |
|
| 375 | 436 | </div> |
| 376 | 437 | </div> |
| 377 | 438 | </fieldset> |
@@ -385,7 +446,10 @@ discard block |
||
| 385 | 446 | </select> |
| 386 | 447 | </div> |
| 387 | 448 | </div> |
| 388 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script> |
|
| 449 | + <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) { |
|
| 450 | + print $_GET['airport_icao']; |
|
| 451 | +} |
|
| 452 | +?>');</script> |
|
| 389 | 453 | <div class="form-group"> |
| 390 | 454 | <label class="control-label col-sm-2"><?php echo _("Country"); ?></label> |
| 391 | 455 | <div class="col-sm-10"> |
@@ -394,7 +458,10 @@ discard block |
||
| 394 | 458 | </select> |
| 395 | 459 | </div> |
| 396 | 460 | </div> |
| 397 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script> |
|
| 461 | + <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) { |
|
| 462 | + print $_GET['airport_country']; |
|
| 463 | +} |
|
| 464 | +?>');</script> |
|
| 398 | 465 | </fieldset> |
| 399 | 466 | <fieldset> |
| 400 | 467 | <legend><?php echo _("Route"); ?></legend> |
@@ -406,7 +473,10 @@ discard block |
||
| 406 | 473 | </select> |
| 407 | 474 | </div> |
| 408 | 475 | </div> |
| 409 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script> |
|
| 476 | + <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) { |
|
| 477 | + print $_GET['departure_airport_route']; |
|
| 478 | +} |
|
| 479 | +?>');</script> |
|
| 410 | 480 | <div class="form-group"> |
| 411 | 481 | <label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> |
| 412 | 482 | <div class="col-sm-10"> |
@@ -415,7 +485,10 @@ discard block |
||
| 415 | 485 | </select> |
| 416 | 486 | </div> |
| 417 | 487 | </div> |
| 418 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script> |
|
| 488 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) { |
|
| 489 | + print $_GET['arrival_airport_route']; |
|
| 490 | +} |
|
| 491 | +?>');</script> |
|
| 419 | 492 | </fieldset> |
| 420 | 493 | <fieldset> |
| 421 | 494 | <legend><?php echo _("Date"); ?></legend> |
@@ -423,7 +496,10 @@ discard block |
||
| 423 | 496 | <label class="control-label col-sm-2"><?php echo _("Start Date"); ?></label> |
| 424 | 497 | <div class="col-sm-10"> |
| 425 | 498 | <div class='input-group date' id='datetimepicker1'> |
| 426 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) print $_GET['start_date']; ?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
| 499 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) { |
|
| 500 | + print $_GET['start_date']; |
|
| 501 | +} |
|
| 502 | +?>" placeholder="<?php echo _("Start Date/Time"); ?>" /> |
|
| 427 | 503 | <span class="input-group-addon"> |
| 428 | 504 | <span class="glyphicon glyphicon-calendar"></span> |
| 429 | 505 | </span> |
@@ -434,7 +510,10 @@ discard block |
||
| 434 | 510 | <label class="control-label col-sm-2"><?php echo _("End Date"); ?></label> |
| 435 | 511 | <div class="col-sm-10"> |
| 436 | 512 | <div class='input-group date' id='datetimepicker2'> |
| 437 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) print $_GET['end_date']; ?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
| 513 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) { |
|
| 514 | + print $_GET['end_date']; |
|
| 515 | +} |
|
| 516 | +?>" placeholder="<?php echo _("End Date/Time"); ?>" /> |
|
| 438 | 517 | <span class="input-group-addon"> |
| 439 | 518 | <span class="glyphicon glyphicon-calendar"></span> |
| 440 | 519 | </span> |
@@ -517,7 +596,12 @@ discard block |
||
| 517 | 596 | </div> |
| 518 | 597 | </div> |
| 519 | 598 | <div class="form-group"> |
| 520 | - <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label> |
|
| 599 | + <label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) { |
|
| 600 | + print $globalDistanceUnit; |
|
| 601 | +} else { |
|
| 602 | + print 'km'; |
|
| 603 | +} |
|
| 604 | +print ')'; ?></label> |
|
| 521 | 605 | <div class="col-sm-10"> |
| 522 | 606 | <input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" /> |
| 523 | 607 | </div> |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | - } else { |
|
| 16 | + } else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -47,7 +47,9 @@ discard block |
||
| 47 | 47 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 48 | 48 | $Stats = new Stats(); |
| 49 | 49 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 50 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 50 | + if (empty($all_manufacturers)) { |
|
| 51 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 52 | + } |
|
| 51 | 53 | foreach($all_manufacturers as $all_manufacturer) |
| 52 | 54 | { |
| 53 | 55 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |