<?php
$count = 8;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
 <table width="1500" border="1" cellspacing="2" cellpadding="2">
   <tdead>
     <tr class="recent">
       <td><strong>Flight No</strong></td>
       <td><strong>Departure</strong></td>
       <td><strong>Arrival</strong></td>
       <td><strong>Duration</strong></td>
       <td><strong>Pilot</strong></td>
       <th>Landing Rate</strong></th>
       <td><strong>Status</strong></td>
       </tr>
     </tdead>
   <tbody>
     <?php
if(count($pireps) > 0)
{
 foreach ($pireps as $pirep)
 {
 {
       $pilotinfo = PilotData::getPilotData($pirep->pilotid);
       $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
} 
?>
     <tr>
       <td><a href="<?php echo url('/pireps/viewreport/'.$pirep->pirepid);?>">
             <?php echo $pirep->code.$pirep->flightnum; ?></a>
       </td>
       <td><?php echo $pirep->depicao; ?></td>
       <td><?php echo $pirep->arricao; ?></td>
       <td><?php echo $pirep->flighttime; ?></td>
       <td><a href="<?php echo url('/profile/view/'.$pirep->pilotid);?>">
             <?php echo $pilotinfo->firstname.' '.$pilotinfo->lastname; ?></a>
       <td><?php echo $pirep->landingrate; ?></td>
       <td><?php
               if($pirep->accepted == PIREP_ACCEPTED)
                       echo '<span style="color:#347C17"><strong>Accepted</strong></span>';
               elseif($pirep->accepted == PIREP_REJECTED)
                       echo '<span style="color:#FF0000"><strong>Rejected</strong></span>';
               elseif($pirep->accepted == PIREP_PENDING)
                       echo '<span style="color:#E56717"><strong>Approval Pending</strong></span>';
               elseif($pirep->accepted == PIREP_INPROGRESS)
                       echo '<span style="color:#whatever">Flight in Progress</span>';
                       ?>
       </td>
     </tr>
     <?php
}}
else
{
       echo '<tr><td>There are no recent flights!</td></tr>';
}
?>
    </tbody>
 </table>
</div>
<hr />
	This is what im using on the VA im working with