Moderators joeri Posted March 6, 2011 Moderators Report Share Posted March 6, 2011 so here is the mess i made :-) i created a tpl called frontpage_recentbids.tpl there i put in this <style type="text/css"> <!-- .style1 { color: #F60; font-weight: bold; } .style2 { color: #000000; font-size: 18px; } .tablesorter { color: #FFF; } .tablesorterb { color: #FFF; } .tablesorterBIS { color: #FFFFFF; } .tablesorter .style1 .tablesorter { color: #000; } .tablesorter tbody tr .tablesorter { color: #000; } .tablesorter tbody .tablesorter .style2 { font-size: 10px; } .tablesorter tbody .tablesorter .style2 { color: #0F0; } .tablesorter tbody .tablesorter .style2 { color: #000; } .Style3 { font-size: 18px; } --> </style> <h3>Live Flight Board</h3> <table width="500" class="tablesorter"> <tr> <th width="105" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Pilot Name</span></th> <th width="77" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Flight No.</span></th> <!--<th width="77" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Aircraft</span></th>--> <th width="57" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Depart</span></th> <th width="61" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Arrival</span></th> <th width="176" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Phase</span></th> </tr> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $row) { $font = "<font color=''>"; // Standard font color if nothing below is TRUE if($row->phasedetail == 'Boarding') $font = "<font color='#2A00FF'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Taxiing') $font = "<font color='#FFBF00'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Cruise') $font = "<font color='#2A7F00'>"; //This should set the font color to green when Cruise. if($row->phasedetail == 'Climbing') $font = "<font color='#FF0000'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Descending') $font = "<font color='#FF0000'>"; //This should set the font color to green when Cruise. if($row->phasedetail == 'Arrived') $font = "<font color='#551F00'>"; //This should set the font color to red when Taxiing. // You can add more checks here for whatever you wish ?> <tr class="tablesorter"> <td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->pilotname;?></td> <td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->flightnum;?></td> <!--<td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->aircraftname;?></td>--> <td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->depicao;?></td> <td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->arricao;?></td> <td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $font.$row->phasedetail;?></td> </tr> <?php } } ?> </table> <?php if(!$results) { echo '<p align="center">Currently there no pilots in flight</p>'; return; } ?> then on the mainpage i have done this <?php MainController::Run('FrontBids', 'RecentFrontPage',5); ?> there probably is and willbe a better and faster way gr joeri 1 Quote Link to comment Share on other sites More sharing options...
B737Pilot Posted March 11, 2011 Report Share Posted March 11, 2011 Hello, any picture how it looks ? thanks Quote Link to comment Share on other sites More sharing options...
James142 Posted April 5, 2011 Report Share Posted April 5, 2011 Thank you Quote Link to comment Share on other sites More sharing options...
B737Pilot Posted April 17, 2011 Report Share Posted April 17, 2011 It does not show aircraft type, but according to the code it should show it Quote Link to comment Share on other sites More sharing options...
FiveStar Posted April 18, 2011 Report Share Posted April 18, 2011 yes the same problem with me also it was not showing AIRCRAFT type while getting Acars Data ? Quote Link to comment Share on other sites More sharing options...
airmermaid Posted April 18, 2011 Report Share Posted April 18, 2011 <!--<td align="center" bgcolor="#CCCCCC" class="style2" style="color: #000000"><?php echo $row->aircraftname;?></td>--> In my version the above code is like this <td align="center"><font color="#010854"><?php echo $flight->aircraftname;?> <?php echo $flight->aircraft;?></td> This shows the type and a/c registration. Quote Link to comment Share on other sites More sharing options...
FiveStar Posted April 18, 2011 Report Share Posted April 18, 2011 I have checked your code but Still no result BRO i have did little research on this i have noticed when i have gone to phpmyadmin in phpvms_schedules there are some rows and under aircraft row it was just showing text like 1,13,15,12 not showing aircraft names or not either REG number and when i have pasted your given code <td align="center"><font color="#010854"><?php echo $flight->aircraftname;?> <?php echo $flight->aircraft;?></td> it was just showing Digit 1 under Aircraft Row on my front page flight board AWaiting.......... Quote Link to comment Share on other sites More sharing options...
airmermaid Posted April 18, 2011 Report Share Posted April 18, 2011 Try changing foreach($results as $row) with foreach($results as $flight) And also all "$row"s wih "$flight". Quote Link to comment Share on other sites More sharing options...
B737Pilot Posted April 18, 2011 Report Share Posted April 18, 2011 I have checked your code but Still no result BRO i have did little research on this i have noticed when i have gone to phpmyadmin in phpvms_schedules there are some rows and under aircraft row it was just showing text like 1,13,15,12 not showing aircraft names or not either REG number and when i have pasted your given code <td align="center"><font color="#010854"><?php echo $flight->aircraftname;?> <?php echo $flight->aircraft;?></td> it was just showing Digit 1 under Aircraft Row on my front page flight board here are some reference pics for you? AWaiting.......... looks like you are using other flight board from other post, cause this one looks very different from the your picture.. 1 Quote Link to comment Share on other sites More sharing options...
B737Pilot Posted April 18, 2011 Report Share Posted April 18, 2011 In my version the above code is like this This shows the type and a/c registration. Still nothing :/ 1 Quote Link to comment Share on other sites More sharing options...
B737Pilot Posted April 18, 2011 Report Share Posted April 18, 2011 Ok, i made it <style type="text/css"><!-- .style1 { color: #001256; font-weight: bold; } .style2 { color: #000000; font-size: 18px; } .tablesorter { color: #FFF; } .tablesorterb { color: #FFF; } .tablesorterBIS { color: #FFFFFF; } .tablesorter .style1 .tablesorter { color: #000; } .tablesorter tbody tr .tablesorter { color: #000; } .tablesorter tbody .tablesorter .style2 { font-size: 12px; } .tablesorter tbody .tablesorter .style2 { color: #0F0; } .tablesorter tbody .tablesorter .style2 { color: #000; } .Style3 { font-size: 18px; } --> </style> <h3 style="text-align: center;">Departures/Arrivals</h3> <table width="500" class="tablesorter"> <tr> <th width="105" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Pilot in Command</span></th> <th width="77" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Callsign</span></th> <th width="57" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Departure</span></th> <th width="61" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Destination</span></th> <th width="90" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Equipment</span></th> <th width="176" " height="22" background="" class="style1"><span class="tablesorterBIS"> <div align="center" class="style1"> Phase</span></th> </tr> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $row) { $font = "<font color=''>"; // Standard font color if nothing below is TRUE if($row->phasedetail == 'Boarding') $font = "<font color='#2A00FF'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Taxiing') $font = "<font color='#FFBF00'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Cruise') $font = "<font color='#2A7F00'>"; //This should set the font color to green when Cruise. if($row->phasedetail == 'Climbing') $font = "<font color='#FF0000'>"; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Descending') $font = "<font color='#FF0000'>"; //This should set the font color to green when Cruise. if($row->phasedetail == 'Landed') $font = "<font color='#551F00'>"; //This should set the font color to red when Taxiing. // You can add more checks here for whatever you wish ?> <tr class="tablesorter"> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $row->pilotname;?></td> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $row->flightnum;?></td> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $row->depicao;?></td> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $row->arricao;?></td> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $row->aircraftname;?></td> <td align="center" bgcolor="#CDDA32" class="style2" style="color: #000000"><?php echo $font.$row->phasedetail;?></td> </tr> <?php } } ?> </table> <?php if(!$results) { echo'<p align="center">No Live Flights !!!</p>'; return; } ?> here is working code for flight board Quote Link to comment Share on other sites More sharing options...
FiveStar Posted April 18, 2011 Report Share Posted April 18, 2011 yes i Have this board from this Post could you Help :http://forum.phpvms.net/topic/4103-live-flights-board/ Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 15, 2011 Report Share Posted May 15, 2011 Hi guys! Is there a way to refresh this information the same as the live board? I have got a flight board on my start page, but this only refresh when you press F5, to refresh the whole page. Is there a way to get only the information of the liveboard refreshed? Thanks for the help! Lucas serious-airlines.com Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 18, 2011 Report Share Posted May 18, 2011 Anyone has a solution for this? Quote Link to comment Share on other sites More sharing options...
Kairon Posted May 18, 2011 Report Share Posted May 18, 2011 Anyone has a solution for this? Yes, with Ajax Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 20, 2011 Report Share Posted May 20, 2011 Ehh, ok... Quote Link to comment Share on other sites More sharing options...
dimitris Posted May 20, 2011 Report Share Posted May 20, 2011 An easier way than ajax is to create an other .tpl page, set an auto-refresh with html and then "<iframe>" this page to the frontpagemain.tpl. That's the way I have make my own on-line (based on IVAO data) table. OnLine Board (click on pilot callsign for details.) Regards, Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 23, 2011 Report Share Posted May 23, 2011 Hi Dimitris, Yes! that look EXACTLY like i would like it to be. I had it working but i get my whole page inside the iframe.. is there a way to only get the flightboard part inside the iframe? Kudos for the flightboard mate. Lucas Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted May 23, 2011 Moderators Report Share Posted May 23, 2011 Mr A yes, I Use a php include inside a div, the div is then ajax refreshed every xx secons so only the flight board is refreshed. Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 23, 2011 Report Share Posted May 23, 2011 oh man, that's gonne be another study.... ajax this time... tnx! Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted May 23, 2011 Moderators Report Share Posted May 23, 2011 Ok let me dig out the code. Right i have a php file in the root dir containing the flight board code, i include that with a php include in the frontpage_main.tpl In the frontpage_main.tpl i have this at the top, <script type="text/javascript"> setInterval(function() { $("#fboard").load(location.href+" #fboard>*",""); }, 60000); </script> Thats it then just enclose that php include in a div, so, <div id="fboard"> <?php include 'path_to_your_file.php';</div> Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted May 24, 2011 Report Share Posted May 24, 2011 Hm... OK! So i just came home from work. Tomrrow i will try this.. i think this will work out just fine! Thanks for the help Mark! Lucas Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted June 1, 2011 Report Share Posted June 1, 2011 Just a question. I create an iframe but i see the whole page. is there a possibility to create a page with ONLY the flightboard? so without the frames and stuff? Regards Lucas Quote Link to comment Share on other sites More sharing options...
James142 Posted June 1, 2011 Report Share Posted June 1, 2011 Just a question. I create an iframe but i see the whole page. is there a possibility to create a page with ONLY the flightboard? so without the frames and stuff? Regards Lucas Not sure if this will help but maybe: http://yourwebite.co.../your-page-here ? (using action.php instead of index.php) Kindest Regards, James Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted June 1, 2011 Report Share Posted June 1, 2011 Yeah, but when i do that link, i get also the logo and stuff in there. I only want the flightboard so i can iframe that into the index page. or if there is another way of doing it, please let me know! :-) Rgds Lucas Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 2, 2011 Report Share Posted June 2, 2011 G'day Guys, Ive seen alot of interest in the flight board, so i decided to create a background for one, what i hope to achieve is to have the letters display over the top of the image below and use the image as a background. Is this possible ? anyways here is what i created earlier today Quote Link to comment Share on other sites More sharing options...
MrAmsterdam Posted June 2, 2011 Report Share Posted June 2, 2011 Yeah that would be great. By the way guys, because i don't have the knowledge how to do it, i am willing to pay for a board with fancy letters and stuff :-) Regards Lucas Quote Link to comment Share on other sites More sharing options...
stuartpb Posted June 2, 2011 Report Share Posted June 2, 2011 You could do it with an image like that, using css. You could use a table and work out the letter spacing etc. It would be a pig to do though, especially as cross browser rendering differences & user text size preferences could easily make it a mess. I might have a go at designing a layout for it over the weekend, depending on what the rest of the family has planned. Quote Link to comment Share on other sites More sharing options...
Tylor Eddy Posted June 3, 2011 Report Share Posted June 3, 2011 You could do it with an image like that, using css. You could use a table and work out the letter spacing etc. It would be a pig to do though, especially as cross browser rendering differences & user text size preferences could easily make it a mess. I might have a go at designing a layout for it over the weekend, depending on what the rest of the family has planned. Something Like this would be great, as you wouldnt have the spacing issue, looks really good too 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.