I do hate having to keep asking for more help :S but would the foreach loop look something like this:
$distance= OperationsData::GetRouteInfo($this->get->distance);
if(!$distance)
{
$distance = OperationsData::RetrieveRouteInfo($this->get->distance);
}
Nope it is a javascript as is changes colour as the % gets bigger. <- Again my fault for not giving all the information in the topic. I tested it with php and it worked so its just the acars :/
EDIT: I made it look like I was giving out to you, so I changed this reply
I spent ages getting the bar working (http://www.flyaerova.com/table/index.html) looks like it was a waste of time now
Thanks for the suggestions anyways!
May I ask are you talking about the javascript in the live map or in the progress bar?
I should have included what I was trying to do :S
To make it clear here is what I am trying to do:
On the ACARS map (live map) I'm putting in a JavaScript progress bar to show how much % of the flight a pilot has completed on his journey. But in order to calculate it I need the total distance of the actual flight. I am unable to get that code..
Thanks for all the support so far!
James
I currently only know the basics of php, When I put
<?php $flightinfo=SchedulesData::findFlight($flightno);
$dist=$flightinfo->distance;
echo 'Distance: '.$dist;?>
into the acarsmap.tpl file it doesnt show anything. Do I have to put something into acars.php for the distance to show up?
Sorry I'm abit confused here :S When I add
</php $flightinfo=SchedulesData::findFlight($flightno);
$dist=$flightinfo->distance; ?>
to the acars.tpl file, nothing shows up?
Thanks,
James
Im trying to get the Percentage of something but its not working.
This is what I have dont so far:
<?php $flown = 20;
$total = 100;
$final_percentage = $total * ( 1 - $flown/100);
echo "Final Percentage: ".$final_percentage;
?>%
But it ends up with 80% when it should be 20% (20/100). Does anyone know where I went wrong?
Thanks,
James
Hello everyone
I wanted to remove the news from the frontpage_main and add something else. But I dont know what to put in its place. Would anyone like to suggest any ideas that I could use for my main page (www.flyaerova.com)
Thanks guys!
James
I got this code from Lorathon a while back:
<?php
if(AUTH::$userinfo->totalhours > 10)
{
// show-do your stuff here
}
else
{
echo "You do not have enough hours to view this page";} ?>
So maybe add the code in your downloads.tpl file?
I was trying to get a sidebar filled with tables to only show up on the index.php. IF i added it to the frontpage_main.tpl file, it showed up on the bottom of the page.
I have decided to leave it now, thanks for the help anyway.
James
Change
background-color: navyblue; /***This is the entire site background color**/
to
background-image:url('/***YOUR BACKGROUND IMAGE URL HERE***/'); /***This is the entire site background color**/
Change
<?php echo $firstname .' '. $lastname; ?>
With
<?php echo $pilot->firstname.' '.$pilot->lastname ?>
Not sure if it will work, but thats the code I have.