-
Posts
408 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by CrashGordon
-
Lucas, Unless I misunderstand things, the current code gets the time from your host's server, however, if the time can be manipulated (as it currently is at midnight), it should be possible. I'm looking for a way to set it to UTC.
-
Since I didn't see this problem before 2.1, I 've got to ask the question. Do the foreign characters exist in the font specified? This is an area I've never really looked into, sof if the question is dumb, ignore it.
-
Thanks. I'm trying tio figure everything out at once and sometimes confuse myself in the process. I found some examples which helped me wrap my brain (or what's left of it) around the concept.
-
I'll give it a try.
-
I waited for this hour because I figured when the server time hit 23 and the new code changed it to 0, the results would be interesting. First, there are flights in the schedule with departure or arrival times of 00:15 or similar. They don't appear because the forst hour after 0 is 01:00. And for some reason nothing displays as arriving soon or now boarding when some of them should show scheduled departure on time (in flight) instead of arriving soon. Still, there is only one hour in 24 that has this problem. Here is what appears after the time goes to the next day.
-
It's getting interesting. I finally took a break and tried to see what was happening. Imagine my surprise whenthe data I edited yesterday was there. So, I turned on debugging and went to edit a couple ot others that were missing the Country. I edit, see the green box saying it has been edited, but the country doesn't appear. On a hunch, I refreshed the browser. There it was! Nothing in the error log. I guess that makes it a non-issue for me. I don't know if nightfox's problem is the same one.
-
While I have some idea how to incorporate CSS with HTNL, I've never dealth with th CSS/PHP combination. What would really be helpful is to see an example of CSS that can be applied to tables and how it is incorporated into a PHP page. More simply stated, I want to make the tables in my site consistant with each other. TIA
-
I forgot to mention earlier, that I had kludged both the departure and arrival code into one blob. For that reason the sort is done on the departure ICAO, only. I'm working on displaying more statuses, such as on approach, final call, etc. I'm also trying to display these based on the number of minutes before and after the current time, rather than the hour. Thanks to simpilot, the hard part is done. I'm just tinkering with bits and pieces.
-
This is what is running on my site, right now. Omega-Air Virtual Airlines I reduced the width to 80% from 100% to fit my site better. I also reduced the table border from 1 to 0. I also changed the verbiage a little to suit my own taste. $query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC"; $list = DB::get_results($query); echo '<h3>Upcoming Departures - Current Time is '.date('G:i').'</h3>'; echo '<table width="80%" border="0">'; echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Departure Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; $count = 0; foreach($list as $flight) { if(date('G:i') >= '23') {$time = '0';} else {$time = date('G:i');} if(($flight->deptime + 0) > $time) { if($count < 10) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>'; echo '<td>'; if(($flight->deptime - date('G:i')) <= 1) { echo 'Now Boarding'; } else { echo 'Scheduled Departure'; } echo '</td></tr>'; $count++; } } } echo '</table>'; echo '<h3>Upcoming Arrivals - Current Time is '.date('G:i').'</h3>'; echo '<table width="80%" border="0">'; echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Arrival Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; $count = 0; foreach($list as $flight) { if(date('G:i') >= '23') {$time = '0';} else {$time = date('G:i');} if(($flight->arrtime + 0) > $time) { if($count < 10) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; echo '<td>'; if(($flight->arrtime - date('G:i')) <= 1) { echo 'Arriving Soon'; } else { echo 'On Time'; } echo '</td></tr>'; $count++; } } } echo '</table>'; I have it running in frontpage_main_tpl. If you want it as a stand-alone page, remember to it in in <?php and ?> It isn't perfect, yet, but it does work. Not being proficient in PHP, I still have to figure out how to make it pretty. Oops, almost forgot to mention this, but as it stands now, it is possible for the arrival board to show a flight as in flight or on time while it is still boarding in the departure board.
-
Oops.
-
Not a thing.
-
I'll try it later today. Does it show flights from 00:00 or from 01:00?
-
I pretty much expected this to happen when it got to this time of nite. There is nothing to specify that the hour after 23 isn't 24, but 0. I'm not sure I can cobble together the "correct" fix, but having the board down for 1 hour out of 24 is something I can live with. I suppose I could put some code in that if the"hour" is 23, it gets changed to 0. That would give me the same display for 2 hours, but there would be some flights listed. Just thinking out loud here. It would probably mean that I couldn't display the current time twice, but that's no problem. Some pseudo code here: get current time display current time if current time = 23 set current time to minus 1 else proceed as normal Would setting the current time to minus 1, then cause it to display flights beginning in the current time+1 (meaning 00:00 and after)? That would at least overcome the problem of no flights appearing. Please don't laugh too loudly.
-
I noticed that the lookup server failed to provide a country code on a few of my airports, but when I went to edit them, I could enter the data, and got the message that the airport had been edited. The only problem is the data I entered isn't there. anyone having a similar problem? I searched "edit airport, but didn't see anything.
-
Very nice. Thanks for posting that.
-
There probably is, but then you'd have to translate it into the configuration file format they require...and you still be limited in the size of your fleet.
-
I have this in frontpage_mail.tpl, now. I have to look at the schedule to see if it is working as expected. I also have to explore having one table sort based on departure dime and the other on arrival time. When it is working properly, I'll post the code. EDIT: I changed the code to get the departures working, though I still need to add another parameter to show recently departed flights.
-
Now, that I've got it working, I added the flight number. If it helps others as clueless about PHP as I am, the code is here. <?php $query = "SELECT * FROM phpvms_schedules ORDER BY arrtime + 0 ASC"; $list = DB::get_results($query); echo '<h3>Upcoming Arrivals - Current Time is '.date('G:i').'</h3>'; echo '<table width="100%" border="1">'; echo '<tr><td>Flight Number</td><td>Departure</td><td>Arrival</td><td>Arrival Time</td><td>Aircraft</td><td>Status</td></tr>'; $count = 0; foreach($list as $flight) { if(($flight->arrtime + 0) > date('G:i')) { if($count < 5) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; echo '<td>'; if(($flight->arrtime - date('G:i')) <= 1) { echo 'Arriving Soon'; } else { echo 'In Flight'; } echo '</td></tr>'; $count++; } } } echo '</table>'; ?> Now that you showed me how this type of thing is done, I'm doing a departure board.
-
I'm as dumb as I look. I forgot to add the tags. Now, it 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.
-
I wish I could report I've got it working, but if that happened, whatever would I do for the rest of the day.
-
Wow! That is what I'm looking for. Will give it a try and see if I can get it to work here. Thanks.
-
I hate to throw some cold water on this software, but there are problems. First the number of different aircraft ICAO codes it will accept is quite limited. I can't get it to accept all my aircraft. Second, there is no way to import youte data from phpVMS, which meansslow and arduous hand entry. Not good if you have a few huncred routes. I'm back to square one in trying to cobble together something that derives its data from phpVMS.
-
I certainly don't mind, Tom, but you might want to look at this, before reinventing the wheel. http://forum.phpvms....live-timetable/ EDIT: That software won't serve my needs. Back to trying to write code.
-
What a great thing. I was just talking about something like this in addons. Now, I don't have to reinvent the wheel. Thanks for post ing this. I'm not getting any error with the SDK.