| @@ -14,7 +14,7 @@ | ||
| 14 | 14 | $limit_start = 0; | 
| 15 | 15 | $limit_end = 25; | 
| 16 | 16 | $absolute_difference = 25; | 
| 17 | -	}  else { | |
| 17 | +	} else { | |
| 18 | 18 |  		$limit_explode = explode(",", $_GET['limit']); | 
| 19 | 19 | $limit_start = $limit_explode[0]; | 
| 20 | 20 | $limit_end = $limit_explode[1]; | 
| @@ -11,7 +11,9 @@ | ||
| 11 | 11 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); | 
| 12 | 12 |  if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { | 
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); | 
| 14 | -} else $spotter_array = array(); | |
| 14 | +} else { | |
| 15 | + $spotter_array = array(); | |
| 16 | +} | |
| 15 | 17 | |
| 16 | 18 | if (!empty($spotter_array)) | 
| 17 | 19 |  { | 
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | $limit_start = 0; | 
| 13 | 13 | $limit_end = 25; | 
| 14 | 14 | $absolute_difference = 25; | 
| 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]; | 
| @@ -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">'; | 
| @@ -51,7 +51,9 @@ discard block | ||
| 51 | 51 | |
| 52 | 52 |  		if (isset($globalTimezone)) { | 
| 53 | 53 | date_default_timezone_set($globalTimezone); | 
| 54 | -		} else date_default_timezone_set('UTC'); | |
| 54 | +		} else { | |
| 55 | +			date_default_timezone_set('UTC'); | |
| 56 | + } | |
| 55 | 57 | |
| 56 | 58 |  		//date_default_timezone_set('UTC'); | 
| 57 | 59 |  		if (is_array($all_data) && count($all_data) > 0) { | 
| @@ -300,9 +302,13 @@ discard block | ||
| 300 | 302 | print '<div>'; | 
| 301 | 303 | if (isset($spotter_item['pilot_id']) && $spotter_item['pilot_id'] != "") | 
| 302 | 304 |  			{ | 
| 303 | -				if ($spotter_item['format_source'] == 'whazzup') print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; | |
| 304 | -				elseif ($spotter_item['format_source'] == 'vatsimtxt') print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; | |
| 305 | -				else print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; | |
| 305 | +				if ($spotter_item['format_source'] == 'whazzup') { | |
| 306 | +					print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; | |
| 307 | +				} elseif ($spotter_item['format_source'] == 'vatsimtxt') { | |
| 308 | +					print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>'; | |
| 309 | +				} else { | |
| 310 | +					print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; | |
| 311 | + } | |
| 306 | 312 |  			} else { | 
| 307 | 313 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != "") | 
| 308 | 314 |  				{ | 
| @@ -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)) | 
| @@ -71,8 +71,12 @@ discard block | ||
| 71 | 71 |  	{ | 
| 72 | 72 |  		$title = sprintf(_("Detailed View for %s"),$spotter_array[0]['ident']); | 
| 73 | 73 | $ident = $spotter_array[0]['ident']; | 
| 74 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; | |
| 75 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; | |
| 74 | +		if (isset($spotter_array[0]['latitude'])) { | |
| 75 | + $latitude = $spotter_array[0]['latitude']; | |
| 76 | + } | |
| 77 | +		if (isset($spotter_array[0]['longitude'])) { | |
| 78 | + $longitude = $spotter_array[0]['longitude']; | |
| 79 | + } | |
| 76 | 80 |  		require_once('header.php'); | 
| 77 | 81 |  		if (isset($globalArchive) && $globalArchive) { | 
| 78 | 82 | // Requirement for altitude graph | 
| @@ -80,7 +84,9 @@ discard block | ||
| 80 | 84 | $all_data = $SpotterArchive->getAltitudeSpeedArchiveSpotterDataById($spotter_array[0]['flightaware_id']); | 
| 81 | 85 |  			if (isset($globalTimezone)) { | 
| 82 | 86 | date_default_timezone_set($globalTimezone); | 
| 83 | -			} else date_default_timezone_set('UTC'); | |
| 87 | +			} else { | |
| 88 | +				date_default_timezone_set('UTC'); | |
| 89 | + } | |
| 84 | 90 |  			if (count($all_data) > 0) { | 
| 85 | 91 | print '<div id="chart6" class="chart" width="100%"></div> | 
| 86 | 92 | <script> | 
| @@ -16,8 +16,12 @@ discard block | ||
| 16 | 16 |          } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ | 
| 17 | 17 |                  $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; | 
| 18 | 18 | $sql_date = $end_date; | 
| 19 | - } else $sql_date = ''; | |
| 20 | -} else $sql_date = ''; | |
| 19 | +        } else { | |
| 20 | + $sql_date = ''; | |
| 21 | + } | |
| 22 | +        } else { | |
| 23 | + $sql_date = ''; | |
| 24 | +} | |
| 21 | 25 | |
| 22 | 26 |  if (isset($_GET['highest_altitude'])) { | 
| 23 | 27 | //for altitude manipulation | 
| @@ -31,8 +35,12 @@ discard block | ||
| 31 | 35 |          } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ | 
| 32 | 36 | $start_altitude = $_GET['lowest_altitude'].",60000"; | 
| 33 | 37 | $sql_altitude = $start_altitude; | 
| 34 | - } else $sql_altitude = ''; | |
| 35 | -} else $sql_altitude = ''; | |
| 38 | +        } else { | |
| 39 | + $sql_altitude = ''; | |
| 40 | + } | |
| 41 | +        } else { | |
| 42 | + $sql_altitude = ''; | |
| 43 | +} | |
| 36 | 44 | |
| 37 | 45 | //calculuation for the pagination | 
| 38 | 46 | if(!isset($_GET['limit'])) | 
| @@ -50,7 +58,7 @@ discard block | ||
| 50 | 58 | $limit_end = $_GET['number_results']; | 
| 51 | 59 | $absolute_difference = $_GET['number_results']; | 
| 52 | 60 | } | 
| 53 | -}  else { | |
| 61 | +} else { | |
| 54 | 62 |          $limit_explode = explode(",", $_GET['limit']); | 
| 55 | 63 | $limit_start = $limit_explode[0]; | 
| 56 | 64 | $limit_end = $limit_explode[1]; | 
| @@ -67,8 +75,11 @@ discard block | ||
| 67 | 75 | |
| 68 | 76 |  header("Content-type: text/csv"); | 
| 69 | 77 | |
| 70 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; | |
| 71 | -else $sort = ''; | |
| 78 | +if (isset($_GET['sort'])) { | |
| 79 | + $sort = $_GET['sort']; | |
| 80 | +} else { | |
| 81 | + $sort = ''; | |
| 82 | +} | |
| 72 | 83 | |
| 73 | 84 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); | 
| 74 | 85 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); | 
| @@ -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]; |