Jump to content

flightboard


joeri

Recommended Posts

  • Moderators

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 :D

gr joeri

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
<!--<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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

2.gif

1.gif

AWaiting..........

looks like you are using other flight board from other post, cause this one looks very different from the your picture..

  • Like 1
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • Moderators

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>

Link to comment
Share on other sites

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

flightboard.jpg

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :)

todays-awesome-ios-app-flightboard_1.jpg

Link to comment
Share on other sites

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