Jump to content

Problem displaying all hubs on roster


-Nick Tyson-

Recommended Posts

I added more hubs but when going to the roster instead of displaying the icao like the other versions have it just says "There are no pilots!" 3 times as seen here http://nicktyson.me/simb6/index.php/pilots.

I haven't edited any php. Thanks for any help!


<?php
if(!$allpilots)
{
	echo 'There are no pilots!';
	return;
}
?>
<table width="100%">
<thead>
<tr>
<th ><div align="center"><a href="#">PID</a></div></th>
<th><div align="center"><a href="#">Name</a></div></th>
<th><div align="center"><a href="#">Rank</a></div></th>
<th><div align="center"><a href="#">Flights</a></div></th>
<th><div align="center"><a href="#">Hours</a></div></th>
</tr>
</thead>
<tbody>
<?php
foreach($allpilots as $pilot)
{
/* 
	To include a custom field, use the following example:

	<td>
		<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>
	</td>

	For instance, if you added a field called "IVAO Callsign":

		echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign');		
 */
?>
<tr bgcolor="#fff" onmouseover="this.style.backgroundColor='#cae3ff';" onmouseout="this.style.backgroundColor='#fff';">
<td width="1%" nowrap><div align="center"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
  <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
  </div></td>
<td>
	<div align="center"><img src="<?php echo Countries::getCountryImage($pilot->location);?>" 
		alt="<?php echo Countries::getCountryName($pilot->location);?>" />
	  
	  <?php echo $pilot->firstname.' '.$pilot->lastname?>
      </div></td>
<td><div align="center"><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></div></td>
<td><div align="center"><?php echo $pilot->totalflights?></div></td>
<td><div align="center"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></div></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...