yourairways Posted May 12, 2014 Report Posted May 12, 2014 Dear All, Is there any solution for selecting aircraft from schedule_results.tpl? For example EGKK-EDDM flight is added as B738 to schedules database, it would be nice to have drop-down, where pilots could select other aircraft types like A320. Then the (custom) weight calculations would be correct on schedule_briefing.tpl. It is just annoying to add all schedules 2 times. Best Regards, Quote
Moderators servetas Posted May 12, 2014 Moderators Report Posted May 12, 2014 Unfortunately this can't be done with the current default functions. If you want to do something like this, you will have to edit some of the default phpvms functions and files. I have already though of it during the past. Quote
yourairways Posted May 12, 2014 Author Report Posted May 12, 2014 Thx for a reply, I have been thinking about php POST method, so that schedule_results.tpl will have a dropdown ("hidden form") and link would POST result to schedule_briefing.tpl but for some reason, I am not able to get it working with phpvms. I have used it in several other sites. Quote
Moderators servetas Posted May 12, 2014 Moderators Report Posted May 12, 2014 I think that it is not so easy because you will have to edit the default phpvms database (the bids table)... Quote
Moderators servetas Posted May 12, 2014 Moderators Report Posted May 12, 2014 Double post, please delete. Quote
freshJet Posted May 12, 2014 Report Posted May 12, 2014 Should be pretty easy, but yes you will need to edit the default bids table. Quote
yourairways Posted May 12, 2014 Author Report Posted May 12, 2014 So to sum up, it is working for me. Some "Out of the box" thinking required ... Example of added code: schedule_results.tpl - after /* THIS BEGINS ONE TABLE ROW */ <form action="<?php echo url('/schedules/brief/'.$route->id);?>" method="post"> ... <?php if($route->aircraft == A320){ $option1 = "A320"; $option2 = "B739"; }else if($route->aircraft == B739){ $option1 = "B739"; $option2 = "A320"; } ?> ... <select name="<?php echo $route->code . $route->flightnum?>actype2" type="text" id="<?php echo $route->code . $route->flightnum?>actype2"> <option value="<?php echo $option1; ?>"><?php echo $option1; ?></option> <option value="<?php echo $option2; ?>"><?php echo $option2; ?></option> </select> <input type="submit" name="submit" value="GO TO BRIEFING" /> </form> schedule_briefing.tpl $actype2 = $_POST[$schedule->code.$schedule->flightnum.actype2]; and now the value actype2 can be used for everything You like. Best regards,: Quote
mseiwald Posted May 12, 2014 Report Posted May 12, 2014 That alone wont do. I have done this several times already. You will also need to change the way your ACARS client reads the aircraft with the bid or else it will always take the aircraft from the schedules table. Quote
yourairways Posted May 12, 2014 Author Report Posted May 12, 2014 That alone wont do. I have done this several times already. You will also need to change the way your ACARS client reads the aircraft with the bid or else it will always take the aircraft from the schedules table. I do not use ACARS. It was required for "briefing" page to have correct values for each type. As You can see on the picture. Quote
regexpress Posted May 25, 2015 Report Posted May 25, 2015 HI, I do have an issue here where the solution looks a bit like this. Using the addons Real Market and Real booking, I would like a schedule to be assigned to a type of aircraft I.E. 737-400, instead of a registration. Then, in the sched page you can bid, you have to choose, for the flight, the registration you want to fly with, regarding the aircrafts (here 737-400) that are available at the departure airport... Is that possible and if yes, is it a lot of scripting? Thanks, Bernard Quote
Moderators ProSkyDesign Posted December 9, 2016 Moderators Report Posted December 9, 2016 Any solution? Quote
Moderators Parkho Posted December 9, 2016 Moderators Report Posted December 9, 2016 HI, I do have an issue here where the solution looks a bit like this. Using the addons Real Market and Real booking, I would like a schedule to be assigned to a type of aircraft I.E. 737-400, instead of a registration. Then, in the sched page you can bid, you have to choose, for the flight, the registration you want to fly with, regarding the aircrafts (here 737-400) that are available at the departure airport... Is that possible and if yes, is it a lot of scripting? Thanks, Bernard It is possible but you're gonna have to request that in paid services or wait for someone like me to do it for free. Quote
Moderators ProSkyDesign Posted December 9, 2016 Moderators Report Posted December 9, 2016 It is possible but you're gonna have to request that in paid services or wait for someone like me to do it for free. Could you do it? and how much it cost? Quote
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.