Airport Tables

I suppose this could be called version 1.0?

Basically this will generate a table which contains all your airport details.

A readme file is included and it’s pretty simple to set up.

  • Preview -

I’ll more than likely make some changes to this in the coming days, make it more interactive and add some new features, etc… So please post feedback and anything suggestions below.

Cheers,

Adam.

[Airport List Module.zip](< base_url >/applications/core/interface/file/attachment.php?id=237)

Nice, Can you add how many times each airport had a pirep filed(flown)?

1 Like

I want to add a link to the individual airports, to load a page up with further info, using this module. I want to add great circle pics and other info etc. but I want to be able to click on the airport icao to bring up the new page? Can anyone guide me in this? Maybe a code of some sort. Thanks.

Hi Adam,

Thanks for this module, I was hoping to simply add an image to each ICAO location using the country flags but I’m not real good at programming but am trying … lol

Here is what I have so far, (Most likely no where near the mark …)

Warning: Missing argument 1 for Countries::getCountryImage(), called in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\airport_main.tpl on line 18 and defined in C:\xampp\htdocs\adam\auz\phpvms\core\common\Countries.class.php on line 93

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\airport_main.tpl on line 19

<h2>All Airports</h2>

<table border=“0” cellpadding=“5” cellspacing=“3”>

<thead>

<tr bgcolor=“#E4EEF6”>

<td bgcolor=“#E4EEF6”><div align=“center”><strong>Country</strong></div></td>

<td><b>ICAO</b></td>

<td><b>Airport Name</b></td>

<td><b>Airport Country</b></td>

<td><b>Lat</b></td>

<td><b>Long</b></td>

</tr>

</thead>

<tbody>

<?php $allairports = OperationsData::GetAllAirports(); ?>

<?php $countries = Countries::getCountryImage();?>

<?php foreach ($countries as $country)

{ ?>

<?php foreach ($allairports as $airport)

{

?>

<tr>

<td><div align=“center”><img src=“<?php echo Countries::getCountryImage($code->icao);?>”

alt=“<?php echo Countries::getCountryName($code->icao);?>” /></div></td>

<td><?php echo $airport->icao; ?> </td>

<td><?php echo $airport->name; ?> </td>

<td><div align=“center”><?php echo $airport->country; ?> </div></td>

<td><?php echo $airport->lat; ?> </td>

<td><?php echo $airport->lng; ?> </td>

</tr>

<?php }

} ?>

</tbody>

</table>

So would anyone know what the correct code would be to simply add an image to the country ?

Any suggestions would be mostly appreciated.

Thanks in advance

Adam

AUZ

Yup I would also like to learn about that.

I guess if I had used similiar php as in the pilot lists for country image it would work, except for that in $pilot->location it is in NO for Norway , SE for Sweden etc, but in $airport->location its in full country name Norway, Sweden.

Using the ICAO minus the 2 last identifers will not work either because ES in icao dosent meet SE (iso?) like the images are called… I guess making all that refers to location country in the same format would have helped?

Hoping Im just missing a simple solution

Hi Adam,

Thanks for this module, I was hoping to simply add an image to each ICAO location using the country flags but I’m not real good at programming but am trying … lol

Here is what I have so far, (Most likely no where near the mark …)

So would anyone know what the correct code would be to simply add an image to the country ?

Any suggestions would be mostly appreciated.

Thanks in advance

Adam

AUZ

Hi

Am working on the same kind of thing here to display the flag on the pilots page next to hub, also to include the ICAO and location. Ill let you know if and when I win

Ok thanks for that

Looking forward to getting it working if possible.

Cheers

There are still quite a lot of questions in here that I would like to see if anyone has the solutions for. (links, country images, times flown to/from)

Thanks, works brilliant

Would be good if it would display the number of flights that airport had?

Nice, Can you add how many times each airport had a pirep filed(flown)?

Martin

flights to or from? If Adamm approves I can extend the code a bit…

Dave, have you heard anything from Adamm?

Dave, have you heard anything from Adamm?

No, doesnt look like he has been on the site since late June.

Hey there

would it be possible to add the “times flown” display inside this module? So Pilots can see how often this Airport has been flown?

Maybe with something like

<?php $schedules = schedules::getschedules();?>

<?php foreach ($schedules as $schedules)

{ ?>

<td><?php echo $schedules->timesflown; ?> </td>

please help

no one?

Hey there

would it be possible to add the “times flown” display inside this module? So Pilots can see how often this Airport has been flown?

Maybe with something like

<?php $schedules = schedules::getschedules();?>

<?php foreach ($schedules as $schedules)

{ ?>

<td><?php echo $schedules->timesflown; ?> </td>

please help

It’s to bad code has to go untouched when someone goes absent. I think phpVMS mods should be like phpBB. If a author abandons it and will not reply to anyone after said amount of days, then someone can take over until he or she gets back… If they ever do get back.

But yeah this list would be cool if it was extended on.

1 Like

Hi guys,

what do I have to edit if I want only the approved airports from the pireps to be shown?

With this script you can see all airports that are in the DB stored.

Hope someone can help me.

Thanks,

Mark

something other I would like to know is

can the List ordered by country name instead of ICAO code?

Best Regards

Thomas