Jump to content

Pilot list


poole3003

Recommended Posts

what would or the code be at the END of this to stop the table from doing it muliple times

<div id="content">

<?php $roster = PilotData::getAllPilots(); ?>

<?php

if(!$roster)

{

echo 'There are no pilots!';

return;

}

?>

<table>

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

<thead>

<tr>

<th width="160px">Pilot ID</th>

<th width="220px">Name</th>

<th width="120px">Rank</th>

<th width="50px">Flights</th>

<th width="100px">Hours</th>

<th width="100px">HUB</th>

<th width="128px">Vatsim ID</th>

<th width="50px">Status</th>

</tr>

</thead>

<tbody>

<?php foreach($roster as $pilot) {

if($pilot->retired == 1) { continue; }

?>

<tr>

<TD ALIGN="center">

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

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

<a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo $pilot->pilotid?>">

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

</td>

<TD ALIGN="left">

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

</td>

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

<TD ALIGN="center"><?php echo $pilot->totalflights?></td>

<TD ALIGN="center"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>

<TD ALIGN="center"><?php echo $pilot->hub?></td>

<td><div align="center">

<?php

$fieldvalue = PilotData :: GetFieldValue ( $Pilot -> pilotid , 'Vatsim ID' );

if( $fieldvalue != '' )

{

echo '<a href="http://www.vataware.com/pilot.cfm?cid='.$fieldvalue.'" target="_blank"><center><img src="INSERT THE LINK FOR VIEW IMAGE -- YES VATSIM --" width="20" height="18" border="0" alt="Vatsim ID" /></center></a>';

}

else

{

}

?>

</div></td>

<TD ALIGN="center"><?php if($pilot->retired == 0) { ?>

<img src="http://i105.photobucket.com/albums/m228/Mickpooel89/1414215184_nuclear_zpsdace2c8c.png" alt="Active" />

<?php } else { ?>

<img src="http://i105.photobucket.com/albums/m228/Mickpooel89/1414215277_delete_zps2e02e6b4.png" alt="Inactive" />

<?php } ?></td>

</td>

</tr>

<?php } ?>

</tbody>

</table>

</div>

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