Jump to content

orpheas

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by orpheas

  1. <table align="center" border="0" width="100%">
    <thead>
    	<tr>
    		<th background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Last 10 Flights</font></th></tr>
    </thead>
    </table>
    <?php
    $count = 10;
    $pireps = PIREPData::getRecentReportsByCount($count);
    ?>
    
    <table align="center" border="0" width="100%">
      <thead>
        <tr border="0">
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Pilot</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Airline</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Flight #</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Origin</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Arrival</font></th>
    <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='2' color="#FFFFFF">Landing Rate</font></th>
        </tr>
       </thead>
       <tbody>
    <?php
    
    if(count($pireps) > 0)
    {
     foreach ($pireps as $pirep)
     {
       $pilotinfo = PilotData::getPilotData($pirep->pilotid);
       $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid); 
    
       echo "<tr>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->firstname $pirep->lastname </font></td>";
       echo '<td align=center width=120px bgcolor=#000000><a href="'.fileurl('/index.php/pireps/viewreport/'.$pirep->pirepid.'').'"><img src="'.fileurl('/images/airline/'.$pirep->code.'.gif').'" alt="'.$airline->name.'" width="127px" height="32px" /></a></td>';
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->code  $pirep->flightnum </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->depname </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->arrname </font></td>";
       echo "<td align=center background='images/tables/board.png'> <font face=Verdana size=2 color=#E8D33D> $pirep->landingrate ft/min</font></td>";
       echo "</tr>";
     }
    }
    else
    {
       echo "<tr><td>There are no recent flights!</td></tr>";
    }
    ?>
    
    </tbody>
    </table>

    Thank Jeff :)

×
×
  • Create New...