Try copy this
<?php
$flights = PIREPData::getRecentReportsByCount(10); < ---------------------- insert at your choise (10)
$string = "";
foreach($flights as $flight)
{
$string = $string.$flight->depicao.'+-+'.$flight->arricao.',+';
}
?>
<style type="text/css">
#tabledlist {
color: #7d3200;
}
</style>
<img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=650x300&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" />
<?php
$count = 5;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<table id="tabledlist" class="tablesorter" width="100%" border = "1">
<thead>
<tr>
<th bgcolor="#7d3200"><font color="#FFFFFF">Flight</font></th>
<th bgcolor="#7d3200"><font color="#FFFFFF">Departure</font></th>
<th bgcolor="#7d3200"><font color="#FFFFFF">Arrival</font></th>
<th bgcolor="#7d3200"><font color="#FFFFFF">Duration</font></th>
<th bgcolor="#7d3200"><font color="#FFFFFF">Pilot</font></th>
<th bgcolor="#7d3200"><font color="#FFFFFF">Status</font></th>
</tr>
</tdead>
<tbody>
<?php
if(count($pireps) > 0)
{
foreach ($pireps as $pirep)
{
{
$pilotinfo = PilotData::getPilotData($pirep->pilotid);
$pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
if($pirep->accepted == '0') $status = 'REJECTED';
if($pirep->accepted == '1') $status = 'ACCEPTED';
else $status = 'PENDING';
}
?>
<tr>
<td><?php echo $pirep->code.$pirep->flightnum; ?></td>
<td><?php echo $pirep->depicao; ?></td>
<td><?php echo $pirep->arricao; ?></td>
<td><?php echo $pirep->flighttime; ?></td>
<td><?php echo $pilotinfo->firstname.' '.$pilotinfo->lastname; ?></td>
<td><?php
if($pirep->accepted == PIREP_ACCEPTED)
echo 'Accepted';
elseif($pirep->accepted == PIREP_REJECTED)
echo 'Rejected';
elseif($pirep->accepted == PIREP_PENDING)
echo 'Approval Pending';
elseif($pirep->accepted == PIREP_INPROGRESS)
echo 'Flight in Progress';
?>
</td>
</tr>
<?php
}}
else
{
echo '<tr><td>There are no recent flights!</td></tr>';
}
?>
</tbody>
</table>
Bye