CN@ndo Posted May 12, 2010 Report Share Posted May 12, 2010 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. Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 12, 2010 Report Share Posted May 12, 2010 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? Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 12, 2010 Author Report Share Posted May 12, 2010 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. Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 12, 2010 Report Share Posted May 12, 2010 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(); Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 12, 2010 Author Report Share Posted May 12, 2010 hello lorathon Thanks for your help, this script which is posted in php / modules? thank you! Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 13, 2010 Report Share Posted May 13, 2010 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> Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 13, 2010 Moderators Report Share Posted May 13, 2010 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 Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 13, 2010 Author Report Share Posted May 13, 2010 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. Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 13, 2010 Report Share Posted May 13, 2010 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> Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 13, 2010 Author Report Share Posted May 13, 2010 Perfect !!!!!! Very good!! Only one question which script to use to update this page every 30 seconds or 1 minute. Thank you! Quote Link to comment Share on other sites More sharing options...
gehatz Posted May 15, 2010 Report Share Posted May 15, 2010 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 Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 15, 2010 Report Share Posted May 15, 2010 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 Quote Link to comment Share on other sites More sharing options...
gehatz Posted May 15, 2010 Report Share Posted May 15, 2010 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>'; ?> Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 16, 2010 Author Report Share Posted May 16, 2010 Hello Look what I posted on the page "frontpage_main.tpl" view below My Site to view: My link Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 16, 2010 Report Share Posted May 16, 2010 Thats looks great. Well Done. Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 16, 2010 Report Share Posted May 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
gehatz Posted May 16, 2010 Report Share Posted May 16, 2010 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> Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 16, 2010 Report Share Posted May 16, 2010 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. Quote Link to comment Share on other sites More sharing options...
CN@ndo Posted May 16, 2010 Author Report Share Posted May 16, 2010 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. Rating médio = Average Rating in porcent. Admissão = register date T/D médio = average data system on all flights Quote Link to comment Share on other sites More sharing options...
mateus Posted May 22, 2010 Report Share Posted May 22, 2010 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 Quote Link to comment Share on other sites More sharing options...
dimitris Posted May 27, 2010 Report Share Posted May 27, 2010 Hello Look what I posted on the page "frontpage_main.tpl" view below My Site to view: My link Hello ! What code are you using to get this table ? Thank you Dimitris ! Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted June 1, 2010 Report Share Posted June 1, 2010 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 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted June 4, 2010 Report Share Posted June 4, 2010 it looks great but I have a question how can manage that the script refresh output data from time eg. 10seconds? thanks in advance and BR Thomas 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.