Harryh Posted June 16, 2011 Report Share Posted June 16, 2011 As the BAe 146 Virtual Pilots Association is entirely devoted to the BAe 146. We have realized the 146 has been operated by a massive range of airlines. However instead of adding every airline into the PHPVMS database i would like pilots to be able to simply put their airline flown in the "Comments/remarks" field in KAcars or which ever logging system they prefer. On my home page i currently have a Latest Flights board (an image has been attached to the post). I would like it to display the airline they have flown by gathering what they have put in the "comments/Remarks" field of their flight. for example i may fly from EGBB to LFPG with British Airways, so i would put in the "comments/remarks" field either "British Airways" "BA" or "BAW" which ever is easier. With this i would like to display the airline logo on the latest flight board is this possible ? P.S here is the code for my latest flights board <p> <?php $count = 5; $pireps = PIREPData::getRecentReportsByCount($count); ?> <table width="820" bordercolor="#359CD7"> <thead> <tr bordercolor="#359CD7"> <th width="113"><div align="left">Flight Num </div></th> <th width="76"><div align="left">Departure</div></th> <th width="81"><div align="left">Arrival</div></th> <th width="82"><div align="left">Duration</div></th> <th width="168"><div align="left">Pilot</div></th> <th width="272"><div align="left">Landing Rate ft/pm</div></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>'.$pirep->code.$pirep->flightnum.'</td>'; echo '<td>'.$pirep->depicao.'</td>'; echo '<td>'.$pirep->arricao.'</td>'; echo '<td>'.$pirep->flighttime.'</td>'; echo '<td>'.$pilotid.' '.$pilotinfo->firstname.' '.$pilotinfo->lastname.'</td>'; echo '<td>'.$pirep->landingrate.'</td>'; echo '</tr>'; } } else { echo '<tr><td>There are no recent flights!</td></tr>'; } ?> </tbody> </table> <!-- Above link back must stay with the tab panel. --> <!-- JavaScript should not be modified. --> <script type="text/javascript" language="JavaScript"> var idlist = new Array(); function TP_1296074588_ManageDisplay(which) { for(var i = 1; i <= 3; i++) { if(i == which) { document.getElementById('TP_1296074588_tab'+i+'hood').style.display = "block"; document.getElementById('TP_1296074588_tab'+i+'bonnet').style.display = "none"; document.getElementById('TP_1296074588_content'+i).style.display = "block"; document.getElementById('TP_1296074588_TAB'+i).style.color = "white"; document.getElementById('TP_1296074588_TAB'+i).style.backgroundColor = "black"; } else { document.getElementById('TP_1296074588_tab'+i+'hood').style.display = "none"; document.getElementById('TP_1296074588_tab'+i+'bonnet').style.display = "block"; document.getElementById('TP_1296074588_content'+i).style.display = "none"; document.getElementById('TP_1296074588_TAB'+i).style.color = "black"; document.getElementById('TP_1296074588_TAB'+i).style.backgroundColor = "white"; } } } function TP_1296074588_Initialize() { for(var i = 1; i <= 3; i++) { idlist.push('TP_1296074588_tab'+i+'hood'); idlist.push('TP_1296074588_tab'+i+'bonnet'); idlist.push('content'+i); } TP_1296074588_ManageDisplay(1); } TP_1296074588_Initialize(); </script> </p> Quote Link to comment Share on other sites More sharing options...
Harryh Posted June 17, 2011 Author Report Share Posted June 17, 2011 Right i have round where the "comments/remarks" are entered into the database. They are in a table called "phpvms_pirepcomments"will i be able to retrieve information from a different table in the same code ? 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.