Jump to content

Recommended Posts

Posted

I'm trying to show the airport name in the schedule_results.tpl but for some reason I cannot get it to show up.

I've tried this:

<font size="3"> <strong>Departure: </strong><?php echo $route->depname ?><br />

and this:

<font size="3"> <strong>Departure: </strong><?php echo $schedule->depname ?><br />

and neither of them are showing anything. Is there something I missed, or can't it be shown? I can get the ICAO to show up, but not the name.

Posted

Departure

<?php $departname = OperationsData::getAirportInfo($route->depicao);?>
<td><?php echo $route->depicao;?> <?php echo $departname->name;?></td>

Arrival

<?php $arrivename = OperationsData::getAirportInfo($route->arricao);?>
<td><?php echo $route->arricao;?> <?php echo $arrivename->name;?></td>

Hope that helps :)

Posted

No worries, glad to have helped. The data pulled in the schedules page doesn't include the airport name, only the ICAO. So I had to pull the airport names from the airports table, relative to the airport ICAO's on the schedule.

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