Jump to content

Last Airport landed at


CPC900

Recommended Posts

I just want to add to the "pilots_list.tpl" where the pilot last landed at after the total hours are listed.  Now, I can obviously add <th>Last Location</th> for the option in the table but how/where to I get that data from??  I am a bit confused how I would code that?!  I want to pull the Last entry in pireps:arricao in the database for the pilot, but I am at a loss for how to code the line pertaining to it.  I was thinking:

<td><?php echo PilotData::GetFieldValue($pireps->arricao, 'Last Location'); ?></td>

But that is obviously stupid :(

Link to comment
Share on other sites

Ok, here is what I have.  It only shows the Hub of the pilot.  What am I missing?!  I am a bit slow on this one.  :-[

<h3><?php echo $title?></h3>

<?php

if(!$allpilots)

{

echo 'There are no pilots!';

return;

}

?>

<table id="tabledlist" class="tablesorter">

<thead>

<tr>

<th>Pilot ID</th>

<th>Name</th>

<th>Rank</th>

<th>Flights</th>

<th>Hours</th>

<th>Last Location</th>

</tr>

</thead>

<tbody>

<?php

foreach($allpilots as $pilot)

{

?>

<tr>

<td width="20%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">

<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>

</td>

<td>

<img src="<?php echo Countries::getCountryImage($pilot->location);?>"

alt="<?php echo Countries::getCountryName($pilot->location);?>" />

<?php echo $pilot->firstname.' '.$pilot->lastname?>

</td>

<td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td>

<td><?php echo $pilot->totalflights?></td>

<td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>

    <td align=center><?php

if(!$report)

{

  echo $pilot->hub

;

}

?>

<?php echo $report->arricao

; ?>

</td>

<?php

}

?>

</tbody>

</table>

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