Hello guys
I am trying to make the pilot roster to show only the pilots and i have managed this the only problem is that it keeps looping the pilot_list.tpl
i have also tried to insert my own page into it like <?php echo "Hello World"; ?> and this keeps looping asswel so i am sure that the code is corect
This is the code of the pilot_list.tpl
<?php $roster = PilotData::getAllPilots(); ?>
<?php
if(!$roster)
{
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>HUBs</th>
</tr>
</thead>
<tbody>
<?php foreach($roster as $pilot) { ?>
<tr>
<td width="1%" nowrap>
<img src="<?php echo Countries::getCountryImage($pilot->location);?>"
alt="<?php echo Countries::getCountryName($pilot->location);?>" />
<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>
<center><?php echo $pilot->firstname.' '.$pilot->lastname?></center>
</td>
<center><td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td></center>
<center><td><?php echo $pilot->totalflights?></td></center>
<center><td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td></center>
<center><td><?php echo $pilot->hub?></td></center>
</tr>
<?php } ?>
</tbody>
</table>
any help would be gratefull
Thanks in advance
Vangelis Boulasikis
http://aviation-global-airways.com