Jump to content

Automatic Refresh


carlosuc99

Recommended Posts

Hi,

I found a flight board at his forum but because the post are SOLVED I put here my error. The flight board it is OK, but for refreh the information we need to go the browser. The code is this:

<style type="text/css">
<!--
th {
color: #FFFFFF;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bolder;
font-size: 14px;
}
td {
color: #FFFFFF;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
}
-->
</style>
<h2 align="center">Vuelos Activos</h2><br>
<table style="border:1px solid grey;" cellspacing="0" cellpadding="0" bgcolor="#1F1F1F">
 <tr>
   <th align="center" style="background-color: #D2232A; width: 3.5%;"> </th>
<th width="10%" align="center" style="background-color: #D2232A;">Piloto</th>
   <th width="10%" align="center" style="background-color: #D2232A;">Flight</th>
   <th width="30%" align="center" style="background-color: #D2232A;">Departure</th>
   <th width="30%" align="center" style="background-color: #D2232A;">Arrival</th>
   <th width="5%" align="center" style="background-color: #D2232A;">Aircraft</th>
   <th width="18.5%" align="center" style="background-color: #D2232A;">Status</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://localhost/helittva/lib/images/dots_blink.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://localhost/helittva/lib/images/dots.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://localhost/helittva/lib/images/dots_yellow.gif'>"; } ?></td>
	  <td align="center">HTH<?php echo $flight->pilotid;?></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: #FFFFFF;">No Hay Vuelos Activos!</td></tr>
	    <?php
	    }
	    ?>
</table>

I want to put a automatic refresh for the table.

Any Idea??

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