Jump to content

VATSIM Prefile


mookie5913

Recommended Posts

Hey All,

Very New to PHP VMS, I know HTML and CSS but not PHP so this is a new learning experience for me!

Questions

1. I would like to embed the VATSIM Prefile page http://www.vatsim.net/fp/ directly into a page, that way I can file flightplans without leaving my site. Is this possible, and how would you do it?

2. Any tips for skinning, Ive read tons of stuff and downloaded a few custom skins but cant really figure out the basic just of it?

Thanks

Evan

Link to comment
Share on other sites

You can use irames to embed the VATSIM FP Prefile. What I did for my VA is that I created a php code that automatically fills the FP with data from the booked flight and all you have to do is input your ID and password.

2. If you know HTML/CSS as you wrote, you should have no problem with skinning.

Link to comment
Share on other sites

. VATSIM clearly states NOT to use an iframe or embed it in any way so this is the best way to do so :)

Where did you read that?

Ontopic: i will post the entire code for you tomorrow but you will have to modify it for your VA fleet. It is just a separate php file you call in the schedule_brief.tpl file.

You could of course just put the code in there but I like to keep my code clean and include() works fine :)

Link to comment
Share on other sites

Of course :)

The data is sent as follows:

http://www.vatsim.net/fp/?2=BAW444

Results in this because the 2 in the URL refers to field 2.

http://www.vatsim.net/fp/?2=BAW123&3=A320

Results in this because the 2 in the URL refers to field 2 and the 3 refers to field 3.

So, in your schedule briefing, you can make it:

http://www.vatsim.net/fp/?2=<?php echo $schedule->code.''.$schedule->flightnum;?>&3=<?php echo $schedule->aircraft;?>

Remember to try and fill in as many fields as possible for the pilots, so that they have less filling out to do.

Then, make this a link for your pilots:

<a href="http://www.vatsim.net/fp/?2=<?php echo $schedule->code.''.$schedule->flightnum;?>&3=<?php echo $schedule->aircraft;?>">VATSIM Prefile</a>

Then click the link in your schedule briefing and it will bring up the relevant data :) Mine currently does 10 of the 16 fields. You can add even more if you have the VATSIM ID custom field, as you can then get their ID too.

Link to comment
Share on other sites

  • 5 months later...

Here is like I'm using in my VA. But remember this code has some costumization.

<a href="http://www.vatsim.net/fp/?1=I&2=<?php echo $schedule->code.$schedule->flightnum; ?>&3=<?php echo $acft_fsinn; ?>&4=0450&5=<?php echo $schedule->depicao;?>&6=<?php echo str_replace(":", "", $schedule->deptime); ?>&7=<?php echo $schedule->flightlevel; ?>&8=<?php echo strtoupper($schedule->route); ?>&9=<?php echo $schedule->arricao;?>&10a=<?php printf('%02d', $hr); ?>&10b=<?php printf('%02d', $min); ?>&11=<?php echo "{$schedule->notes}"; ?>&11a=V&12a=<?php printf('%02d', $fob_hr); ?>&12b=<?php printf('%02d', $fob_min); ?>&13=<?php echo $altn_ap ?>&14=<?php echo $_SESSION['piloto']; ?>+ICAO" target="_blank">Registrar</a>

Link to comment
Share on other sites

  • 2 months later...

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