Colin Posted June 30, 2012 Report Share Posted June 30, 2012 Hi Guys, Another quick one, how do I display the latest flights flown on the homepage ?I've tried creating this map a number of times but always results in errors, the type of map I have in mind is the one currently used by Qantas Virtual (pic attached) http://qantasvirtual.com/, As always any help appreciated and thanks in advance Quote Link to comment Share on other sites More sharing options...
Colin Posted July 1, 2012 Author Report Share Posted July 1, 2012 Can anybody help me out with this one please Quote Link to comment Share on other sites More sharing options...
TaylorWelka Posted July 1, 2012 Report Share Posted July 1, 2012 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> Quote Link to comment Share on other sites More sharing options...
Colin Posted July 2, 2012 Author Report Share Posted July 2, 2012 That's excellent thanks, much appreciated to you ! Quote Link to comment Share on other sites More sharing options...
AlessandroCuba Posted December 19, 2012 Report Share Posted December 19, 2012 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 "; } ?> Quote Link to comment Share on other sites More sharing options...
TK0001 Posted March 23, 2013 Report Share Posted March 23, 2013 Thanks that helped a lot Quote Link to comment Share on other sites More sharing options...
lol767 Posted August 5, 2013 Report Share Posted August 5, 2013 I know I'm late, but where do I input this code? Quote Link to comment Share on other sites More sharing options...
lol767 Posted August 5, 2013 Report Share Posted August 5, 2013 Ok, I have put the code on the layout.tpl and the sidebar went down aeroviarias.cz.cc Quote Link to comment Share on other sites More sharing options...
biokemisten Posted April 16, 2014 Report Share Posted April 16, 2014 Thanks, fitting great in frontpage_main Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.