LuxuryCEO Posted November 18, 2012 Report Share Posted November 18, 2012 hi guys am working on my flight bids board but instead of the board showing the ID ( ICAO ) i cant it to show the airport name what i mean is instead of EGAA - EGCC for example i want it to be Belfast - Manchester the preview is here >> http://www.flyluxva....x.php/FrontBids heres the code hope you can help me <div id="mainbox"> <?php if(!$lastbids) { echo '<p align="center">No flights have currently been booked</p>'; return; } ?> <table width="101%" class="tablesorter"> <thead> <tr bgcolor="#000099"> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Airline</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Flight Number</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Departure</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Arrival</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Aircraft</font></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Tail No.</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Flight Time</font></div></th> <th align="center" background='images/tables/tableheading.png'> <font face='Verdana' size='1' color="#FFFFFF">Status</font></div></th> </tr> </thead> <tbody> <?php foreach($lastbids as $lastbid) { ?> <tr bgcolor="#333333"> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><img src="/images/airline/LAV/LAV.png">LUXURY AIRWAYS</span></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid->code . $lastbid->flightnum; ?></a> </td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid->depicao; ?></span></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid ->arricao;?></span></td> <?php $params = $lastbid->pilotid; $pilot = PilotData::GetPilotData($params); $pname = $pilot->firstname; $psurname = $pilot->lastname; ?> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid->aircraft; ?></span></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid->registration?></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $lastbid->flighttime; ?> Hours</span></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><img src="/images/blink_gruen_anim.gif"></span></td> </tr> <?php } ?> </tbody> </table> <hr> </div> Regards Michael Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted November 18, 2012 Moderators Report Share Posted November 18, 2012 I think your using the bids where as im using acars data, $flight->arrapt $flight->depapt But as i said i think your using different variables so probably not work. Quote Link to comment Share on other sites More sharing options...
LuxuryCEO Posted November 18, 2012 Author Report Share Posted November 18, 2012 will try that mark and il let you know Quote Link to comment Share on other sites More sharing options...
LuxuryCEO Posted November 18, 2012 Author Report Share Posted November 18, 2012 nope no go mark any thing else you can think of matey Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 18, 2012 Moderators Report Share Posted November 18, 2012 Add the following right after bracket where the foreach starts: $airp1 = OperationsData::getairportinfo($lastbid->depicao); $airp2 = OperationsData::getairportinfo($lastbid->arricao); Now in <td> for departure airport data replace the following: <?php echo $lastbid->depicao :?> with this: <?php echo $airp1->name ;?> And for arrial: <?php echo $airp2->name ;?> And your home safe. Quote Link to comment Share on other sites More sharing options...
LuxuryCEO Posted November 18, 2012 Author Report Share Posted November 18, 2012 Add the following right after bracket where the foreach starts: $airp1 = OperationsData::getairportinfo($lastbid->depicao); $airp2 = OperationsData::getairportinfo($lastbid->arricao); youve lost me on this part heres what ive got so far >> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $airp1->name ;?></span></td> <td align=center background='images/tables/board.png'> <font face=Verdana size=1 color=#E8D33D><?php echo $airp2->name ;?></span></td> Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 18, 2012 Moderators Report Share Posted November 18, 2012 Replace this part: <?php foreach($lastbids as $lastbid) { ?> with this: <?php foreach($lastbids as $lastbid) { $airp1 = OperationsData::getairportinfo($lastbid->depicao); $airp2 = OperationsData::getairportinfo($lastbid->arricao); ?> Quote Link to comment Share on other sites More sharing options...
LuxuryCEO Posted November 18, 2012 Author Report Share Posted November 18, 2012 Parse error: syntax error, unexpected '<' in /home/a3027304/public_html/core/templates/frontpage_recentbids.tpl on line 26 it didnt like that parkho Edit: disregard that last post parkho its works now nice one rep+ Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 18, 2012 Moderators Report Share Posted November 18, 2012 cool 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.