ShredMountains Posted July 28, 2016 Report Share Posted July 28, 2016 Hello!! So im working on trying to spruce up the information for my acars map, this is the code im trying to get to work its just showing nothing, so its outputting blank info. Any idea on why it would return nothing, maybe I'm not calling the right info from the acars? Or something like that? <td><!--<div id="something"><span class="badge badge-theme"><%=flight.phasedetail%></span></div>--> <?php if($flight->phasedetail=="Boarding") { echo '<div id="boarding"><span class="badge badge-theme">Boarding</span></div>'; } elseif($flight->phasedetail == "Taxiing to Runway") { echo '<div id="taxiingtorunway"><span class="badge badge-theme">Taxiing to Runway</span></div>'; } elseif($flight->phasedetail == "Taking Off") { echo '<div id="takingoff"><span class="badge badge-theme">Taking Off</span></div>'; } elseif($flight->phasedetail == "Climbing") { echo '<div id="climbing"><span class="badge badge-theme">Climbing</span></div>'; } elseif($flight->phasedetail == "Cruise") { echo '<div id="cruise"><span class="badge badge-theme">Cruise</span></div>'; } elseif($flight->phasedetail == "Arrived") { echo '<div id="arrived"><span class="badge badge-theme">Arrived</span></div>'; } elseif($flight->phasedetail == "Descending") { echo '<div id="descending"><span class="badge badge-theme">Descending</span></div>'; } elseif($flight->phasedetail == "Level Flight") { echo '<div id="levelflight"><span class="badge badge-theme">Level Flight</span></div>'; } elseif($flight->phasedetail == "On Approach") { echo '<div id="onapproach"><span class="badge badge-theme">On Approach</span></div>'; } elseif($flight->phasedetail == "Taxiing to Gate") { echo '<div id="taxiingtogate"><span class="badge badge-theme">Taxiing to Gate</span></div>'; } elseif($flight->phasedetail == "Arrived") { echo '<div id="arrived"><span class="badge badge-theme">Arrived</span></div>'; }?> </td> Quote Link to comment Share on other sites More sharing options...
web541 Posted July 28, 2016 Report Share Posted July 28, 2016 just confirming what file you are putting this in (acarsmap.tpl?) If so, where have you declared $flight because by the looks of things, its not working because it doesn't have any data in it Quote Link to comment Share on other sites More sharing options...
ShredMountains Posted July 28, 2016 Author Report Share Posted July 28, 2016 Ah, I'm super new to php and stuff, so for this I would assume I would need to call the function with like a else statement before all this code above? Also yes I'm working on the acarsmap.tpl file. How would you or anyone recommend coming up with this code to pull the data to be presented into this area? 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.