Jump to content

Recommended Posts

Posted

All hello.

Put the code in the frontpage_main.tpl At the moment there are flights, but they do not appear on live board

<div class="mc020303"></div>
                       </div>    <?php
   if(!$lastbids) {
   echo '<p align="center">There are currently no booked flights!</p></div>';
   return;
   }
   ?>
   <center>
   <table cellspacing="0" cellpadding="0" style="border:1px solid grey;">
       <thead>
           <tr style="font-size:14px; font-weight:bold;">
               <th align="center" style="background-color: #1F1F1F; width: 3.5%;"> </th>
               <th align="center" style="background-color: #1F1F1F; width: 10%;"><font color="#ff8710"><b>Flight</b></font></th>
               <th align="center" style="background-color: #1F1F1F; width: 30%;"><font color="#ff8710"><b>Departing</b></font></th>
               <th align="center" style="background-color: #1F1F1F; width: 30%;"><font color="#ff8710"><b>Arriving</b></font></th>
               <th align="center" style="background-color: #1F1F1F; width: 5%"><font color="#ff8710"><b>Aircraft</b></font></th>
               <th align="center" style="background-color: #1F1F1F; width: 18.5%;"><font color="#ff8710"><b>Status</b></font></th>
           </tr>
       </thead>
       <tbody>
       <?php
           $data = (ACARSData::GetACARSData($cutofftime = '240'));
           if ($flights > 0) {
               if($flights) {
               foreach($flights as $flight) {
                      $pid = $flight->pilotid + 100;?>
               <tr style="height:12px; font-size:14px; font-weight:normal;">
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding: 1px;"><?php if($flight->phasedetail == "Boarding") { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots_blink.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots_yellow.gif'>"; } ?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F;"><font color="#ff961e"><?php echo $flight->flightnum?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 5px;"><font color="#ff961e"> <?php echo $flight->depapt?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 5px;"><font color="#ff961e"> <?php echo $flight->arrapt?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 0px;"><font color="#ff961e"> <?php echo $flight->aircraftname?> </td>
                   <td
   align="center" valign="middle"
   style="background-color: #1F1F1F;"><font
   color="#ff961e"><?php if($flight->phasedetail
   != 'Paused') { echo $flight->phasedetail; }
   else { echo "Cruise"; } ?></font></td>
               </tr>
               <?php
               }
               }
               while($row = mysql_fetch_assoc($result)) {
               mysql_select_db('bookacarsdata');
               $dep = mysql_fetch_assoc(mysql_query("SELECT name FROM bookacarsdata WHERE icao = '$row[OriginAirport]'"));
               $arr = mysql_fetch_assoc(mysql_query("SELECT name FROM bookacarsdata WHERE icao = '$row[DestinationAirport]'"));
               $row['OriginAirport'];
               ?>
               <tr style="height:12px; font-size:14px; font-weight:normal;">
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding: 1px;"><?php if($row['Status'] == 0) { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots_blink.gif'>"; } elseif($row['Status'] == 4) { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots.gif'>"; } elseif($row['Status'] == 3) { echo "<img style='padding-left:3px;' src='http://www.airberlinva.de/lib/skins/airberlin/images/dots_yellow.gif'>"; }?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F;"><font color="#ff961e"><?php echo $row['FlightNumber']; ?>*</td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 5px;"><font color="#ff961e"> <?php echo utf8_encode($dep['name']); ?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 5px;"><font color="#ff961e"> <?php echo utf8_encode($arr['name']); ?></td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F; padding-right: 0px;"><font color="#ff961e"> <?php echo $row['Aircraft']; ?> </td>
                   <td align="center" valign="middle" style="background-color: #1F1F1F;"><font color="#ff961e"><?php  if($row['Status'] == 0) { echo "Boarding"; } elseif($row['PauseMode'] != 0) { echo "Paused"; } elseif($row['Status'] == 1) { echo "Taxiing to Runway"; } elseif($row['Status'] == 2 && $row['AltitudeStatus'] == 1) { echo "Cruise"; } elseif($row['Status'] == 2 && $row['AltitudeStatus'] == 2) { echo "Climbing"; } elseif($row['Status'] == 2 && $row['AltitudeStatus'] == 0) { echo "Descending"; } elseif($row['Status'] == 3) { echo "Taxiing to Gate"; } elseif($row['Status'] == 4) { echo "Arrived"; } ?></font></td>
               </tr>
               <?php          
               }
           } else { ?>
               <tr><td width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ff961e;">No Flights in Progress!</td></tr>
           <?php
           }
           ?>
       </tbody>
   </table>
   <p><i>The actual, flights and flights completed in the last <?php echo Config::Get('ACARS_LIVE_TIME') ?> minutes.<br /></i></p>

Please help me.What's wrong? Thanks

Posted

HI guys,

just looking at your post, checked the link out, very nice, I am a nothing when it comes down to php, so how would I put the above code onto my site, change colours etc?

Thanks for any help.

Deano

Posted

work code

<style type="text/css">
<!--
th {
color: #ff8710;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bolder;
font-size: 14px;
}
td {
color: #ff961e;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
}
-->
</style>
<h2>Flight Departures Board</h2>
<table style="border:1px solid grey;" cellspacing="0" cellpadding="0" bgcolor="#1F1F1F">
 <tr>
   <th align="center" style="background-color: #171717; width: 3.5%;"> </th>
   <th width="10%" align="center" style="background-color: #171717;">РейÑ</th>
   <th width="30%" align="center" style="background-color: #171717;">Вылет</th>
   <th width="30%" align="center" style="background-color: #171717;">Прилет</th>
   <th width="5%" align="center" style="background-color: #171717;">Самолет</th>
   <th width="18.5%" align="center" style="background-color: #171717;">СтатуÑ</th>
</tr>

<?php

$results = ACARSData::GetACARSData();

if (count($results) > 0)
  {
  foreach($results as $flight)
     {

        ?>
     <tr>
         <td align="center"><?php if($flight->phasedetail == "Boarding") { echo "<img style='padding-left:3px;' src='http://global-aero.ru/lib/skins/ObsessBlue/image/dots_blink.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://global-aero.ru/lib/skins/ObsessBlue/image/dots.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://global-aero.ru/lib/skins/ObsessBlue/image/dots_yellow.gif'>"; } ?></td>
         <td align="center"><?php echo $flight->flightnum;?></td>
         <td align="center"><?php echo $flight->depname;?></td>
         <td align="center"><?php echo $flight->arrname;?></td>
         <td align="center"><?php echo $flight->aircraftname;?></td>
         <td align="center"><?php if($flight->phasedetail
   != 'Paused') { echo $flight->phasedetail; }
   else { echo "Cruise"; }?></font></td>
     </tr>
 <?php          
               }
           } else { ?>
               <tr><td width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ff961e;">РейÑов нет!</td></tr>
           <?php
           }
           ?>
</table>
<p><i>Ðктуальные рейÑÑ‹ и рейÑÑ‹ за крайние <?php echo Config::Get('ACARS_LIVE_TIME') ?> минут.<br /></p>

  • Moderators
Posted

I have somewhat rewritten for my va, keep meaning to post the code but the past couple of weeks have been mad and i have had my own problems to sort out.

You can see a live demo on my site, i have depictions for all stages of flight.

www.easyjetva.com

I have got to set up the wife's phone so after that ill strip it down and post here.

  • 2 years later...
Posted

I have somewhat rewritten for my va, keep meaning to post the code but the past couple of weeks have been mad and i have had my own problems to sort out.

You can see a live demo on my site, i have depictions for all stages of flight.

www.easyjetva.com

I have got to set up the wife's phone so after that ill strip it down and post here.

Can you post it ?

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