Jump to content

IrfanKhan

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by IrfanKhan

  1. Hello everyone just need little help if for example from touchdown table i wanted to skip any of the aircraft how should i get the final result. from all the touchdowns i wanted one or more aircraft should not show up what will be the code i can use to skip any aircraft? i used this code but still no luck <?php foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->pilotid); $aircraft = OperationsData::getAircraftInfo($stat->aircraft); If($aircraft->code == “C172â€) { Continue; } else { echo '<tr>'; echo '<td>'.PilotData::getPilotCode($pilot->code, $pilot->pilotid).' - '.$pilot->firstname.' '.$pilot->lastname.'</td>'; echo '<td>'.$aircraft->fullname.'</td>'; echo '<td>'.$stat->arricao.'</td>'; echo '<td>'.$stat->landingrate.'</td>'; echo '<td>'.date(DATE_FORMAT, strtotime($stat->submitdate)).'</td>'; echo '</tr>'; } } ?> Thank you
  2. I am using the below code to get the airline logo BUT you have to create images with your Airline ICAO code like suggested by sava. <td align="center"> <?php echo '<img src="'.fileurl('/lib/images/airline/'.$report->code.'.png').'" alt="'.$airline->name.'" width="100" style="vertical-align:top" />'; ?> </td>
  3. Well done nice addon for all the virtual airlines just i have one question to ask if i wanted to display the certificate without the link how can i get the final result. i wanted to to display the certificate directly in small window within the pilot center dont want the click link? Appreciate your response.
  4. Once again thank you so much Simpilot for giving time to respond back let me play with the code and advised and will get back to you.
  5. 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
  6. Hello actually i am trying to create flight board on which instead of all the text we can replace images of alphabets by using str_replace command. i do not have idea as from where to start i wanted to build a simple flight board on which instead of text for example getting flight number <?php echo $flight->flightnum?> instead it shows just text Dubai International Airport the text should replace the each alphabet with each alphabet image and full airport name will be display as image not as text so i just have idea we need to put replace command to achieve the final result i will appreciate if someone would help me in building this flight board i will be more then happy to share with all the forum members the final code. something like this just an example 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; } Thanks Irfan Khan
  7. if you have any backup of your website and database try to restore it might work for you it is not able to locate the SKIN folder in your directory.
×
×
  • Create New...