flightboard

so here is the mess i made :slight_smile:

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

Hello, any picture how it looks ? thanks

Thank you

It does not show aircraft type, but according to the code it should show it

yes the same problem with me also it was not showing AIRCRAFT type while getting Acars Data ?

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

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…

Try changing

foreach($results as $row)

with

foreach($results as $flight)

And also all "$row"s wih “$flight”.

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

<?php echo $flight->aircraftname;?> <?php echo $flight->aircraft;?>

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 Like

In my version the above code is like this

This shows the type and a/c registration.

Still nothing :confused:

1 Like

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

yes i Have this board from this Post could you Help :

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

Anyone has a solution for this?

Anyone has a solution for this?

Yes, with Ajax

Ehh, ok…

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,

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

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.

oh man, that’s gonne be another study… ajax this time… tnx!