Jump to content

Recommended Posts

Posted

Hello friends

I need a simple system I believe that to develop or that any manager has ever done.

would like an information system of the flights made in real time, without requiring the pilot to enter onto the map to view the data.

So would putting this information system in the initial page of the site. better look to see what I'm looking for.

Guest lorathon
Posted

Hello friends

I need a simple system I believe that to develop or that any manager has ever done.

would like an information system of the flights made in real time, without requiring the pilot to enter onto the map to view the data.

So would putting this information system in the initial page of the site. better look to see what I'm looking for.

Thats from http://www.phoenixva.org

What exactly are you looking for? What we have?

Posted

We are looking for exactly equal to your one, a script that reports data from the company's flights.

In acarsmap.tpl shows the flight data, the same system more like Be like your showing only the data without a map, to post on the page to begin with, this is your perfect.

Thank you.

Guest lorathon
Posted

If you use the following it will return an array ($results) of the current pilots that are online and flight information. All you need to do is tableize the data then.

$results = ACARSData::GetACARSData();

Guest lorathon
Posted

You can actually use this anywhere.

Here is a small example

<table>
 <tr>
   <th>Name</th>
   <th>Flight #</th>
   <th>Departure</th>
   <th>Arrival</th>
 </tr>

<?php

$results = ACARSData::GetACARSData();

if (count($results) > 0)
  {
  foreach($results as $row)
     {?>
     <tr>
         <td><?php echo $row->pilotname;?></td>
         <td><?php echo $row->flightnum;?></td>
         <td><?php echo $row->depicao;?></td>
         <td><?php echo $row->arricao;?></td>
     </tr>
     <?php
     }
  }
?>
</table>

  • Moderators
Posted

You can actually use this anywhere.

Here is a small example

<table>
 <tr>
   <th>Name</th>
   <th>Flight #</th>
   <th>Departure</th>
   <th>Arrival</th>
 </tr>

<?php

$results = ACARSData::GetACARSData();

if (count($results) > 0)
  {
  foreach($results as $row)
     {?>
     <tr>
         <td><?php echo $row->pilotname;?></td>
         <td><?php echo $row->flightnum;?></td>
         <td><?php echo $row->depicao;?></td>
         <td><?php echo $row->arricao;?></td>
     </tr>
     <?php
     }
  }
?>
</table>

Thanks lorathon! it worked

Posted

Thanks

perfect scrip.

Only one question which I change the script to run. example:

Taxiing = white

Taking off = green

Descending = yellow

fsacars.php would be in? function which could be pasted to change the colors on each drive.

Guest lorathon
Posted

Be sure to check the actual phasedetails and change accordingly. I do not use fsacars so don't remember what the exact wording of the fsacars phase details was. But as long as you compare it right you should get the look that you want.

<table>
 <tr>
   <th>Name</th>
   <th>Flight #</th>
   <th>Departure</th>
   <th>Arrival</th>
   <th>Phase</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 == 'Taxiing') $font = "<font color='#FF0000'>";  //This should set the font color to red when Taxiing. 
        if($row->phasedetail == 'Cruise')  $font = "<font color='#00FF00'>";  //This should set the font color to green when Cruise.
                                                                              // You can add more checks here for whatever you wish
        ?>
     <tr>
         <td><?php echo $row->pilotname;?></td>
         <td><?php echo $row->flightnum;?></td>
         <td><?php echo $row->depicao;?></td>
         <td><?php echo $row->arricao;?></td>
         <td><?php echo $font.$row->phasedetail;?></font></td>
     </tr>
     <?php
     }
  }
?>
</table>

Posted

i've added the code above as a news item on my frontpage and granted there are no live flights i get this output:

0) { foreach($results as $row) { $font = ""; // Standard font color if nothing below is TRUE if($row->phasedetail == 'Taxiing') $font = ""; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Cruise') $font = ""; //This should set the font color to green when Cruise. // You can add more checks here for whatever you wish ?>
Name 	Flight # 	Departure 	Arrival 	Phase
pilotname;?> 	flightnum;?> 	depicao;?> 	arricao;?> 	phasedetail;?>

does this look right when there are no "live flights"?

thanks

Guest lorathon
Posted

i've added the code above as a news item on my frontpage and granted there are no live flights i get this output:

0) { foreach($results as $row) { $font = ""; // Standard font color if nothing below is TRUE if($row->phasedetail == 'Taxiing') $font = ""; //This should set the font color to red when Taxiing. if($row->phasedetail == 'Cruise') $font = ""; //This should set the font color to green when Cruise. // You can add more checks here for whatever you wish ?>
Name 	Flight # 	Departure 	Arrival 	Phase
pilotname;?> 	flightnum;?> 	depicao;?> 	arricao;?> 	phasedetail;?>

does this look right when there are no "live flights"?

thanks

It looks like the php is not in the php brackets for some reason. All php code has to have the <?php at the beginning and the ?> at the end. Can you post the whole page? Somewhere above this there is something wrong

Posted

It looks like the php is not in the php brackets for some reason. All php code has to have the <?php at the beginning and the ?> at the end. Can you post the whole page? Somewhere above this there is something wrong

here it is:

<?php
$query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC"; 
$list = DB::get_results($query); 
echo '<h3>Upcoming Departures - Current Time is '.date('G:i').'</h3>'; 
echo '<table width="100%" border="1">'; 
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Departure Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; 
$count = 0; 
foreach($list as $flight) 
{ 
if(date('G:i') >= '23') 
   	{$time = '0';} 
 	else 
   	{$time = date('G:i');} 
       	if(($flight->deptime + 0) > $time) 
       	{ 
   	if($count < 10) 
   	{ 
       	$aircraft = OperationsData::getAircraftInfo($flight->aircraft); 
       	echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>'; 
       	echo '<td>'; 
       	if(($flight->deptime - date('G:i')) <= 1) 
       	{ 
           	echo 'Now Boarding'; 
       	} 

  else
       	{ 
           	echo 'Scheduled Departure'; 
       	} 
       	echo '</td></tr>'; 
       	$count++; 
   	} 
} 
} 
echo '</table>';

echo '<h3>Upcoming Arrivals - Current Time is '.date('G:i').'</h3>'; 
echo '<table width="100%" border="0">'; 
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Arrival Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; 
$count = 0; 
foreach($list as $flight) 
{ 
if(date('G:i') >= '23') 
   	{$time = '0';} 
 	else 
   	{$time = date('G:i');} 
       	if(($flight->arrtime + 0) > $time) 
       	{ 
   	if($count < 10) 
   	{ 
       	$aircraft = OperationsData::getAircraftInfo($flight->aircraft); 
       	echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; 
       	echo '<td>'; 
       	if(($flight->arrtime - date('G:i')) <= 1) 
       	{ 
           	echo 'Arriving Soon'; 
       	} 
       	else 
       	{ 
           	echo 'On Time'; 
       	} 
       	echo '</td></tr>'; 
       	$count++; 
   	} 
} 
} 
echo '</table>';  
?>

Guest lorathon
Posted

here it is:

<?php
$query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC"; 
$list = DB::get_results($query); 
echo '<h3>Upcoming Departures - Current Time is '.date('G:i').'</h3>'; 
echo '<table width="100%" border="1">'; 
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Departure Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; 
$count = 0; 
foreach($list as $flight) 
{ 
if(date('G:i') >= '23') 
   	{$time = '0';} 
 	else 
   	{$time = date('G:i');} 
       	if(($flight->deptime + 0) > $time) 
       	{ 
   	if($count < 10) 
   	{ 
       	$aircraft = OperationsData::getAircraftInfo($flight->aircraft); 
       	echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>'; 
       	echo '<td>'; 
       	if(($flight->deptime - date('G:i')) <= 1) 
       	{ 
           	echo 'Now Boarding'; 
       	} 

  else
       	{ 
           	echo 'Scheduled Departure'; 
       	} 
       	echo '</td></tr>'; 
       	$count++; 
   	} 
} 
} 
echo '</table>';

echo '<h3>Upcoming Arrivals - Current Time is '.date('G:i').'</h3>'; 
echo '<table width="100%" border="0">'; 
echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Arrival Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; 
$count = 0; 
foreach($list as $flight) 
{ 
if(date('G:i') >= '23') 
   	{$time = '0';} 
 	else 
   	{$time = date('G:i');} 
       	if(($flight->arrtime + 0) > $time) 
       	{ 
   	if($count < 10) 
   	{ 
       	$aircraft = OperationsData::getAircraftInfo($flight->aircraft); 
       	echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; 
       	echo '<td>'; 
       	if(($flight->arrtime - date('G:i')) <= 1) 
       	{ 
           	echo 'Arriving Soon'; 
       	} 
       	else 
       	{ 
           	echo 'On Time'; 
       	} 
       	echo '</td></tr>'; 
       	$count++; 
   	} 
} 
} 
echo '</table>';  
?>

This doesnt have the code I wrote in it. This looks like a timetable for the upcoming flights in a few hours.

Posted

so sorry sir, i accidently copied the code from something else... here is the actual code of your script

<table>
 <tr>
   <th>Name</th>
   <th>Flight #</th>
   <th>Departure</th>
   <th>Arrival</th>
   <th>Phase</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 == 'Taxiing') $font = "<font color='#FF0000'>";  //This should set the font color to red when Taxiing. 
        if($row->phasedetail == 'Cruise')  $font = "<font color='#00FF00'>";  //This should set the font color to green when Cruise.
                                                                              // You can add more checks here for whatever you wish
        ?>
     <tr>
         <td><?php echo $row->pilotname;?></td>
         <td><?php echo $row->flightnum;?></td>
         <td><?php echo $row->depicao;?></td>
         <td><?php echo $row->arricao;?></td>
         <td><?php echo $font.$row->phasedetail;?></font></td>
     </tr>
     <?php
     }
  }
?>
</table>

Guest lorathon
Posted

It looks like you can not add the code through the news feature. It changes it up. You need to add it to the code outside of phpVMS and then upload it. You could make the news page and then edit the actual file that was created.

Posted

Hello friends,

I am providing below a system of a va here in Brazil,

so you can have higher ideals.

System is very good, there is a scoring system for each flight, calling the pilot in the T / D.

I think it would be a good idea for PHPVMS, and develop something not already done better.

here is the thought and those who are developing with time.

27773869.jpg

Rating médio = Average Rating in porcent.

Admissão = register date

T/D médio = average data system on all flights

Posted

CN@ndo voce poderia me passar o código q você colocou no seu site para mim? pois u não consigo diminuir a tabela e se diminuo ela fica totalmente errada

english

CN@ndo you could pass me the code you put in your site for me? cause I can not diminish the table and if I reduce it is totally wrong

translated in google translator

Posted

Pilot Flight Number Departure Arrival Status Altitude Speed Distance/Time Remain

SVA0001 - Thomas Schedl SVA500 EDTQ EDDF Arrived 0 0 1 nm / 00:00

SVA0003 - Valentin Golec SVA128 EGLL LOWS Climbing 30358 509 374 nm / 0:44

how can get the exact output of my current flight like above to put it on the front page? and how can this be formated to look exactly like the output under the live ACARS map?

BR and thanks in advance

Thomas

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