lol767 Posted August 5, 2013 Report Share Posted August 5, 2013 <?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> I've found this code to make a table of the recent flights Where should I put this, I've put this code on the layout.tpl but it appears on every page site: aeroviarias.cz.cc Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted August 19, 2013 Moderators Report Share Posted August 19, 2013 If you want this on your front page, add it to your frontpage_main.tpl 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.