Guest chikolol Posted August 19, 2009 Report Share Posted August 19, 2009 okay, sorry too ask for something again lol, well i have been working on my virtual airline for some time now, and i have codeshare branches on my airline, which operate expanded routes through out Europe and Americas, but i have a few thing on my Operations page for the different airline, such as JET2 AND DHL, now i ahve added those airlines and some schedules how would i show the latest flights flown by that airline and a schedule just by that particular airline, to show it on the page, not the whole system schedule but just that particular one, if its possible!, now i now i have posted this before dont get mad at me, please! and i have been through the API, lol am just asking for a little guide not everything but at least a clue on how to start, thats all. not asking for much Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 19, 2009 Administrators Report Share Posted August 19, 2009 I'll take a look, don't know if it's possible right now, never thought of that. If not, I'll add it into the beta for next release Quote Link to comment Share on other sites More sharing options...
Guest chikolol Posted August 19, 2009 Report Share Posted August 19, 2009 ok, no but what im tryint to say is this http://www.flyuk.aero/en/index1.php?page=flyuk_today# see how its two airlines, they put the image as the carrier thats what i mean, so in the schedule if some one had this idea of adding an image it wont all be the same, Quote Link to comment Share on other sites More sharing options...
Thomas Posted August 21, 2009 Report Share Posted August 21, 2009 I would also like to find this out aswell Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 21, 2009 Administrators Report Share Posted August 21, 2009 Not sure if I am understanding exactly what you are trying to do but if you are simply wanting to display the scheduled routes for one of your airlines and you are using a unique flight number code for the schedules for that airline you can sort the data using the "code" line out of the schedules table. I am guessing how you have it setup and making some assumptions but - your flight schedules are probably something like JET101 - KLAX - KBOS etc... DHL201 - KLAX - KBOS etc... The "JET" and the "DHL" portion of the flight number is a seperate item in the table named "code". If you set up your own sql request to only use lines that the "code" = "DHL" it should only return the flights for that airline, or you could sort the info after you pull the entire table and only display what you want using a similar command.. The PIREPS also store the same unique code so you could sort and display those in the same way. If you are tring to display a unique airline logo in the flight info as on the second page of the uk link you posted you could use the same theory using if - else commands based upon the returned "code" data. basically - if code = DHL -> then display logo image 1 // if code = JET -> then display logo image 2 // else display logo image 3 Let me know if any of this is what you are thinking and I can probably write a quick piece of php to make it work for you. Quote Link to comment Share on other sites More sharing options...
Guest chikolol Posted August 21, 2009 Report Share Posted August 21, 2009 yes mate, that's exactly what am looking for, and if you can then that would be awesome mate! id the code is simple and you can do that then that would be awesome, thank you mate! Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted August 22, 2009 Administrators Report Share Posted August 22, 2009 chikolol - Looks good on your site Thomas - Here is a basic piece of code to display the table data as an image according to the airline as on the flyUK site. You will need to modify it to fit your site and insert it in the schedule_results.tpl file or in whatever table you are using. This example is using the assumption that there is 4 airlines, you can adjust it to how many you have. <td> <?php if ($route->code=="abc") echo "<img src='http://www.yoursite.com/abc.gif'>"; elseif ($route->code=="def") echo "<img src='http://www.yoursite.com/def.gif'>"; elseif ($route->code=="ghi") echo "<img src='http://www.yoursite.com/ghi.gif'>"; else echo "<img src='http://www.yoursite.com/jkl.gif'>"; ?> </td> Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 22, 2009 Administrators Report Share Posted August 22, 2009 Simpilot nailed it. You can simplify the code with this: <?php echo "<img src='http://www.yoursite.com/{$route->code}.gif'>"; Just make sure an image exists for every code you have 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.