Jump to content

Latest Flights Map [SOLVED]


Colin

Recommended Posts

they have modified it but the basic code is

<?php
    $flights = PIREPData::getRecentReportsByCount(10);																	 
    $string = "";
    foreach($flights as $flight)
    {	 
		    $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+';
    }																	 
?>
<img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=wls&MR=900&MX=720x360&PM=b:disc7%2b%25U" width="725 px" /><br />
Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> - copyright © <a href="http://www.kls2.com/~karl/">Karl L. Swartz</a>
<!--Start Table-->
<?php
$count = 5;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<table width="725 px" border="1" bordercolor="#FFFFFF">
  <thead>
 <tr align="center" valign="middle" bgcolor="#7D95AF">
   <th>Flight #</th>
   <th>Departure</th>
   <th>Arrival</th>
   <th>Duration</th>
   <th>Pilot</th>
   <th>Landing Rate</th>
   <th>Aircraft</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> $pirep->code $pirep->flightnum </td>";
   echo "<td align=center> $pirep->depicao </td>";
   echo "<td align=center> $pirep->arricao </td>";
   echo "<td align=center> $pirep->flighttime </td>";
   echo "<td align=center> $pilotid $pilotinfo->firstname $pilotinfo->lastname </td>";
   echo "<td align=center> $pirep->landingrate </td>";
   echo "<td align=center> $pirep->aircraft </td>";
   echo "</tr>";
 }
}
else
{
   echo "<tr><td>There are no recent flights!</td></tr>";
}
?>
</table>
</td>

Link to comment
Share on other sites

  • 5 months later...

You can also try this

[b]	Ultimos Arrivos[/b]


';
echo '';
echo '';
echo '';
echo '';
echo '';
echo '';

echo '';

foreach ($pireps as $pirep)
{

$pilotinfo = PilotData::getPilotData($pirep->pilotid);
$pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);

echo "";
echo '';
echo "";
//echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
}
echo "</p>										 							Vuelo							Tiempo							Piloto							Landing Rate							Aeronave													[img='.SITE_URL.]							$pirep->code $pirep->flightnum							$pirep->depicao - $pirep->arricao							$pirep->flighttime							$pilotinfo->firstname $pilotinfo->lastname							echo $pirep->landingrate							echo $pirep->aircraft			
";
}
?>

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...
  • 8 months later...

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...