Jump to content

Select aircraft from schedule results


yourairways

Recommended Posts

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,

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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,:

pilt.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...

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

Link to comment
Share on other sites

  • 1 year later...
  • Moderators

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

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