Jump to content

Flight Briefing


Stealthbird97

Recommended Posts

Does anyone know how I would go about making the Flight Briefings show something different depending on the Airline the flight is for.

For example.

My phpVMS has two airlines on it. A Caribbean Airline and a European Airline,.

As the Weather charts defaulting on the Flight Briefings are for North America I want to change them.

I know where I can find some decent weather charts for Europe and the Caribbean and I intend to change them.

The only thing is, I don't want irrelivant charts showing up. As i would have had to put all of the European Weather charts and the Caribbean ones on the Flight Briefing template file.

If there a way to only show specific charts depending on the airline.

It will be a php IF statement but I don't know what parameters I'm going to need.

Thanks in Advance.

Link to comment
Share on other sites

  • Administrators

At the start of your schedule_briefing.tpl file you can use an if qualifier and look at the airline code. It is available in that template as $schedule->code

<?php
if($schedule->code == 'ABC')
{
 do stuff for airline ABC
}
else
{
 do stuff for other airline
}
?>

Link to comment
Share on other sites

I'd make it depending on the arrival icao... you can use the first letter to determine the icao region, eg K is US, L and E are Europe, M is middle america etc

He is not looking to do it via airports, but via the two airlines he has. But yes you could. But you would need a few if else statements, To bypass that, you would get the code for the airport ICAO code That way it would save on a huge clump of code.

Link to comment
Share on other sites

Might be better to actually read the posts before posting your own.

I did read the post, and actually thought about it. waste of time, obviously... :rolleyes:

My idea was that it shouldn't matter which airline it is, but the destination you fly to... you want to see the weather charts for your arrival destination, regardless of the airline you fly for.

Link to comment
Share on other sites

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...