Guest User

pilots_list.tpl

a guest
Jan 25th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. <h3><?php echo $title ;?></h3>
  2. <table width="100%">
  3. <?php
  4. $pilots = PilotListData::pilotlist(100);
  5.  
  6.  
  7.     if(!$pilots)
  8.     {
  9.         echo '<tr><td align="center" colspan="5">There are no pilots!</td></tr>';
  10.         return;
  11.     }
  12.     else
  13.     {
  14. ?>
  15. <table id="tabledlist" class="tablesorter">
  16. <thead>
  17. <tr>
  18.     <th>Pilot ID</th>
  19.     <th>Name</th>
  20.     <th>Rank</th>
  21.     <th>Flights</th>
  22.     <th>Hours</th>
  23. </tr>
  24. </thead>
  25. <?php
  26. foreach($pilots as $pilot)
  27. {
  28. ?>
  29. <tr>
  30.     <td align="center"><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>">
  31.             <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a>
  32.     </td>
  33.     <td width="1%" nowrap>
  34.         <img src="<?php echo Countries::getCountryImage($pilot->location);?>"
  35.             alt="<?php echo Countries::getCountryName($pilot->location);?>" />
  36.            
  37.         <?php echo $pilot->firstname.' '.$pilot->lastname?>
  38.     </td>
  39.     <td align="center"><img src="<?php
  40.     $rank = PilotListData::rank($pilot->rank);
  41.     echo $rank->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td>
  42.     <td align="center"><?php echo $pilot->totalflights?></td>
  43.     <td align="center"><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td>
  44. <?php
  45. }
  46. }
  47. ?>
  48. </table>
Add Comment
Please, Sign In to add comment