Jump to content

Flown Routes Template


Guest lorathon

Recommended Posts

Guest lorathon

I believe there is an error in the flown routes template. The following code will continue if a route has the same depicao or arricao. What happens is that two flight departing from the same location are not shown. Only one will be shown (the first in line) I commented out the first part and just had the loop continue if the flight numbers were in the $shown array

This is my commented out code

foreach($allschedules as $route)
{	/*
// Dont show repeated routes
if(in_array($route->depicao, $shown))
	continue;
else
	$shown[] = $route->depicao;

if(in_array($route->arricao, $shown))
	continue;
else
	$shown[] = $route->arricao;
*/	

if(in_array($route->code.$route->flightnum, $shown))
	continue;
else
	$shown[] = $route->code.$route->flightnum;

if(empty($route->arrlat) || empty($route->arrlng)
	|| empty($route->deplat) || empty($route->deplng))
{
	continue;
}

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...