Jump to content

help plz recent arrivals code issue


PIAS2011

Recommended Posts

Hello i am using this code for my recent arrivals board but i am getting the error : Syntax error in line 98

<center><h2>Recent Arrivals</center></h>
<table align="center" border="0" width="605px">
</table>
<?php
$count = 10;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<table style="border:1px solid grey;" cellspacing="0" cellpadding="0" bgcolor="#1F1F1F">
  <thead>
    <tr>
   <th width="7%" align="center" style="background-color: #171717;">Flight#</th>
   <th width="30%" align="center" style="background-color: #171717;">Departure</th>
   <th width="30%" align="center" style="background-color: #171717;">Arrival</th>
   <th width="15%" align="center" style="background-color: #171717;">Pilot</th>
   <th width="10%" align="center" style="background-color: #171717;">Landing Rate</th>
   <th width="8%" align="center" style="background-color: #171717;">Aircraft</th>
   <th width="5%" align="center" style="background-color: #171717;">Status</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); 

   if($pirep->accepted == '0') $status = 'REJECTED';
   if($pirep->accepted == '1') $status = 'ACCEPTED';
   else $status = 'PENDING'; 

   echo "<tr>";
   echo "<td align=center   bgcolor=#171717> $pirep->code-$pirep->flightnum </font></td>";
   echo "<td align=center   bgcolor=#171717> $pirep->depname </font></td>";
   echo "<td align=center  bgcolor=#171717> $pirep->arrname </font></td>";
   echo "<td align=center   bgcolor=#171717> $pilotid $pilotinfo->firstname $pilotinfo->lastname </font></td>";
   echo "<td align=center  bgcolor=#171717> $pirep->landingrate </font></td>";
   echo "<td align=center   bgcolor=#171717> $pirep->aircraft </font></td>";
   echo "<td align=center    bgcolor=#171717> <?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';

               ?>

   </font></td>";
   echo "</tr>";
 }
}
else
{
   echo "<tr><td><center>There are no recent flights!</td></tr></center>";
}
?>
</tbody>
</table>

thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...