Is it possible to have a flight board that first checks the system time and then displays the following.
Flight Number - Departure ICAO - Arrival - Aircraft - Status
This would be eye candy, rather than actual status, since most of us have more flights than pilots. The board would display only flights with an arrival time within 2 hours of system time. Flight status would, depending onwhere they are in relation to system time, be on time, arriving, arrived.
I suppose something similar could be done for departures, but I’m trying to keep it as simple as possible.
Does this sound like something that could be done? Or, maybe I should ask if it has already been done.
Is it possible to have a flight board that first checks the system time and then displays the following.
Flight Number - Departure ICAO - Arrival - Aircraft - Status
This would be eye candy, rather than actual status, since most of us have more flights than pilots. The board would display only flights with an arrival time within 2 hours of system time. Flight status would, depending onwhere they are in relation to system time, be on time, arriving, arrived.
I suppose something similar could be done for departures, but I’m trying to keep it as simple as possible.
Does this sound like something that could be done? Or, maybe I should ask if it has already been done.
Don’t laugh, but I am trying to do it. Looking at code from other pages, trying to figure out what variable names I need, with one eye on the monitor and the other on a book on PHP. The results, so far are either infuriating or hysterically funny. I don’t know which is worse. My approach is this:
Get the system time and convert it to the 24 hour format I’m using in the routes.
Get the routes with arrival times that are equal to or plus/minus one hour to the system time.
Display those routes in a table with flight number, departure and arrival ICAOs, a/c tail number and verbiage based on how far from the system time the arrival time is.
Don’t laugh, but I am trying to do it. Looking at code from other pages, trying to figure out what variable names I need, with one eye on the monitor and the other on a book on PHP. The results, so far are either infuriating or hysterically funny. I don’t know which is worse. My approach is this:
Get the system time and convert it to the 24 hour format I’m using in the routes.
Get the routes with arrival times that are equal to or plus/minus one hour to the system time.
Display those routes in a table with flight number, departure and arrival ICAOs, a/c tail number and verbiage based on how far from the system time the arrival time is.
Similar, but instead of the last two columns, a column with verbiage such as on time, arriving, landed, arrived (based on schedule time vs. system time). That way, any time the page was loaded, different flights would be displayed. A departure board could be done similarly, with different status verbiage.
Similar, but instead of the last two columns, a column with verbiage such as on time, arriving, landed, arrived (based on schedule time vs. system time). That way, any time the page was loaded, different flights would be displayed. A departure board could be done similarly, with different status verbiage.
Well im defo interested. Something like that would be good
This will show the next 5 flights scheduled to arrive and is written to work with 24 hour date format, so if you are using 12 hour date format with am/pm in your schedules you will have to modify the date function.
It should look something like
Pretty plain but you can build it up how you would like and skin it.
I’ve obviously missed something I need to do, because it is only echoing the variables and some of the code. I don’t know my you know what from my elbow, when it comes to php.
This is the output I get. I obviously have failed to do something necessary. I have about 30 aircraft and 700 routes. I’ve spent all day adding routes, so at this point I can’t see straight. I’ll look at this again in the morning to see if I can figure what I screwed up.
Hi, It looks looke you are adding this via the add page in the admin section, just add the code in to the frontpage_main,tpl, when i tried earlier nothing was displayed in the table ill have another look at it again because like the post says its great eye candy
How strange is that, i have just done it again and its populated, it could be something to do with the time though, last night it was23:45 when i tried today its 11:04, ill let you know when it get to 13:00 if it still works.
I’ve obviously missed something I need to do, because it is only echoing the variables and some of the code. I don’t know my you know what from my elbow, when it comes to php.
This is the output I get. I obviously have failed to do something necessary. I have about 30 aircraft and 700 routes. I’ve spent all day adding routes, so at this point I can’t see straight. I’ll look at this again in the morning to see if I can figure what I screwed up.
Remember that this is php coding - it needs to be enclosed in php tags - ie <?php and ?>
I have changed the original post to include them - sorry.
How strange is that, i have just done it again and its populated, it could be something to do with the time though, last night it was23:45 when i tried today its 11:04, ill let you know when it get to 13:00 if it still works.
If this is what you guys are looking for I will have to mess with it a little. Right now it is just looking for upcoming flights between the current time and midnight, it does not look “around the corner” until after midnight.