Stealthbird97 Posted December 16, 2012 Report Share Posted December 16, 2012 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. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 16, 2012 Administrators Report Share Posted December 16, 2012 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 } ?> Quote Link to comment Share on other sites More sharing options...
Stealthbird97 Posted December 16, 2012 Author Report Share Posted December 16, 2012 Thanks. I had to addapt it a little to allow for html content This is what I got to get it to work. <?php if($schedule->code == 'JCA') { ?> <p>Hello JCA</p> <?php } else { ?> <p> Hello EUC</p> <?php } ?> Quote Link to comment Share on other sites More sharing options...
mischka Posted December 16, 2012 Report Share Posted December 16, 2012 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted December 17, 2012 Report Share Posted December 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Stealthbird97 Posted December 17, 2012 Author Report Share Posted December 17, 2012 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 Might be better to actually read the posts before posting your own. Quote Link to comment Share on other sites More sharing options...
mischka Posted December 17, 2012 Report Share Posted December 17, 2012 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... 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.