@@ -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 | if (isset($limit_explode[1])) { |
| 19 | 19 | $limit_start = $limit_explode[0]; |
@@ -15,8 +15,12 @@ discard block |
||
| 15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
| 16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
| 17 | 17 | $sql_date = $end_date; |
| 18 | - } else $sql_date = ''; |
|
| 19 | -} else $sql_date = ''; |
|
| 18 | + } else { |
|
| 19 | + $sql_date = ''; |
|
| 20 | + } |
|
| 21 | + } else { |
|
| 22 | + $sql_date = ''; |
|
| 23 | +} |
|
| 20 | 24 | |
| 21 | 25 | if (isset($_GET['highest_altitude'])) { |
| 22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
| 30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
| 31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
| 32 | 36 | $sql_altitude = $start_altitude; |
| 33 | - } else $sql_altitude = ''; |
|
| 34 | -} else $sql_altitude = ''; |
|
| 37 | + } else { |
|
| 38 | + $sql_altitude = ''; |
|
| 39 | + } |
|
| 40 | + } else { |
|
| 41 | + $sql_altitude = ''; |
|
| 42 | +} |
|
| 35 | 43 | |
| 36 | 44 | //calculuation for the pagination |
| 37 | 45 | if(!isset($_GET['limit'])) |
@@ -48,7 +56,7 @@ discard block |
||
| 48 | 56 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
| 49 | 57 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
| 50 | 58 | } |
| 51 | -} else { |
|
| 59 | +} else { |
|
| 52 | 60 | $limit_explode = explode(",", $_GET['limit']); |
| 53 | 61 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
| 54 | 62 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -66,8 +74,11 @@ discard block |
||
| 66 | 74 | |
| 67 | 75 | header('Content-Type: text/xml'); |
| 68 | 76 | |
| 69 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
| 70 | -else $sort = ''; |
|
| 77 | +if (isset($_GET['sort'])) { |
|
| 78 | + $sort = $_GET['sort']; |
|
| 79 | +} else { |
|
| 80 | + $sort = ''; |
|
| 81 | +} |
|
| 71 | 82 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
| 72 | 83 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
| 73 | 84 | $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
@@ -123,7 +134,9 @@ discard block |
||
| 123 | 134 | $waypoint_pieces = explode(' ', $spotter_item['waypoints']); |
| 124 | 135 | $waypoint_pieces = array_chunk($waypoint_pieces, 2); |
| 125 | 136 | foreach ($waypoint_pieces as $waypoint_coordinate) { |
| 126 | - if (isset($waypoint_coordinate[1])) $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 137 | + if (isset($waypoint_coordinate[1])) { |
|
| 138 | + $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 139 | + } |
|
| 127 | 140 | } |
| 128 | 141 | $output .= '</coordinates>'; |
| 129 | 142 | $output .= '<altitudeMode>absolute</altitudeMode>'; |