<?php
$count = 5;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<table width="427" border="0" cellspacing="2" cellpadding="2">
<tdead>
<tr class="recent">
<td width="68"><strong>Flight No</strong></td>
<td width="70"><strong>Departure</strong></td>
<td width="84"><strong>Arrival</strong></td>
<td width="74"><strong>Duration</strong></td>
<td width="38"><strong>Pilot</strong></td>
<td width="55"><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><?php echo $pirep->pilotid; ?></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>
Im useing this coded but I cant seem to get a map to link to it and the map show the routes what am I doing wrong thanks.