Jump to content

Recommended Posts

Posted

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 :(

Posted

Yes.

i use that Code In pilots_list !!

<th bgcolor=#F2F2F2>Location</th>

<td bgcolor=#FFFFFF width=10% height=5 align=center><font face=Tahoma color=#7E7E7E size=2><?php 

if(!$report)
{
echo $pilot->hub
;
}
?>
<?php echo $report->arricao

; ?>
</td>

Posted

Sorry for beating a dead horse, but......

I was wrong about Faraz's code.  It only ends up showing the Hub that the pilot belongs to.  Is there a way to add the Last airport the pilot landed at??  Did this get added, or no??  Sorry to ask again.

Posted

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>

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