Thanks for your response Simpilot really appreciate your and support towards phpvms community.
Actually i am not getting the code working i tried putting it in frontpage_main.tpl not understanding the structure fully as how the code will work where should i put it exactly and output will come on flightboard and also the above code will only replace FlightNum how we can create a code which will replace all the text at once for all the flight board output text? i request you to help me combining the code with flight board code so it will work properly i tried the below code.
<h3 style="text-align: left;">Flight Status Board</h3>
<left>
<div id="fboard" style="border:solid 1px #060">
<table class="imagetable2" width="100%" cellpadding="0" cellspacing="0">
<thead>
<tr style="font-size:11px;">
<th width="6%" align="center" style="background-color: #0B3861; width: 3.5%;">Airline</th>
<th width="10%" align="left" style="background-color: #0B3861; "><font color="#ffc600">Flight</font></th>
<th width="25%" align="left" style="background-color: #0B3861; width: 33%;"><font color="#ffc600">Departing</font></th>
<th width="25%" align="left" style="background-color: #0B3861; width: 33%;"><font color="#ffc600">Arriving</font></th>
<th width="5%" align="center" style="background-color: #0B3861; "><font color="#ffc600">Pilot</font></th>
<th width="8%" align="center" style="background-color: #0B3861; "><font color="#ffc600">Aircraft</font></th>
<th width="12%" align="center" style="background-color: #0B3861; "><font color="#ffc600">Status</font></th>
<th width="5%" align="center" style="background-color: #0B3861; "><font color="#ffc600">ETE</font></th>
<th align="center" style="background-color: #0B3861; "> </th>
</tr>
</thead>
<tbody>
<?php
$flights = ACARSData::GetACARSData();
if ($flights OR $fsfk > 0) {
if($flights) {
foreach($flights as $flight) {
$pid = $flight->pilotid + 100;
function FlightNumReplace ($ReplaceText)
{
$Numbers=array(
'1' => "<img src='/images/date/1.gif' />",
'2' => "<img src='/images/date/2.gif' />",
'3' => "<img src='/images/date/3.gif' />",
'4' => "<img src='/images/date/4.gif' />",
'5' => "<img src='/images/date/5.gif' />",
'6' => "<img src='/images/date/6.gif' />",
'7' => "<img src='/images/date/7.gif' />",
'8' => "<img src='/images/date/8.gif' />",
'9' => "<img src='/images/date/9.gif' />",
'0' => "<img src='/images/date/0.gif' />"
);
$FlightNum=str_replace(array_keys($Numbers), array_values($Numbers), $ReplaceText);
return $FlightNum;
}?>
<tr style="height:12px; font-size:10px; font-weight:normal; ">
<td align="left" valign="middle" style="background-color: #363433; padding-right: 0px; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><?php
$str = "$flight->flightnum";
$find="PIA";
$position = strpos($str,$find);
if ($position === false){
echo ""; } else { echo "<img style='padding-left:3px;' width='80px'; height='20px'' src=''>"; }?></td>
<td align="left" valign="middle" style="background-color: #363433; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><font face="digi"font size=2 color="#eecb04"><?php echo $flight->flightnum?></font></td>
<td align="left" valign="middle" style="background-color: #363433; padding-right: 5px; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><font face="digi"font size=2 color="#ffc600"> <?php echo $flight->depapt?></font></td>
<td align="left" valign="middle" style="background-color: #363433; padding-right: 5px; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><font face="digi"font size=2 color="#ffc600"> <?php echo $flight->arrapt?></font></td><td align="left" valign="middle" style="background-color: #363433; padding-right: 0px; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><font face="digi"font size=2 color="#ffc600"> <?php echo $flight->pilotname?> </font></td>
<td align="left" valign="middle" style="background-color: #363433; padding-right: 0px; border-bottom-style:solid; border-bottom-width:1px; border-bottom-color:#363433"><font face="digi" font size=2 color="#ffc600"> <?php echo $flight->aircraftname?> </font></td>
</tr>
<?php
}
}{
mysql_select_db('TEST');
$dep = mysql_fetch_assoc(mysql_query("SELECT name FROM phpvms_airports WHERE icao = '$row[OriginAirport]'"));
$arr = mysql_fetch_assoc(mysql_query("SELECT name FROM phpvms_airports WHERE icao = '$row[DestinationAirport]'"));
$row['OriginAirport'];
?>
<?php
}
} else { ?>
<tr><td align="center" colspan="10" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ffc600; background-color: #363433;">No flights in Progress!</td></tr>
<?php
}
?>
</tbody>
</table>
</div>
thanking you once again
Irfan Khan