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