Jump to content

CrashGordon

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by CrashGordon

  1. Maybe I'm dumb, but how does this differ from simply creating a csv file with the following data? code flightnum depicao arricao route aircraft flightlevel distance deptime arrtime flighttime notes price flighttype daysofweek enabled I don't understand why creating a schedule in one fale and then pasting the data into another is better than simply entering the data in the csv file you intend to import. What am I missing?
  2. CrashGordon

    Version 1.0.0.6

    Sounds great to me.
  3. My limited understanding of PHP is that elseif does extra code only when the preceding if statement is true. If that is so, then the result would still be to display both holding and landed. I think what has to happen is that the first if statement has to be equal or less than x minutes and more than y minutes. The second if statement is similar to the first but uses a "lower" set of minutes. Then the else statement can display "on time" or whatever else you want.. I tried that once, but don't think I did it correctly. If the roller coaster ride that the stock market has become, calms down a bit, tomorrow, I'll give it another try.
  4. I moderate the VA forum at flightsimulationforums.com and have run into him on a number of occasions. His usual thing is to tell other VAs they are doing things wrong or should change one thing or another, or telling them they are in trouble for using the name of their VA. He's been warned about his behavior a number of times. About the only thing he does well, is make "pretty" "press releases". As far as defending against "predators" , I would tell someone wanting to merge with Omega-Air...well, I can't really say that here. I log the IP address of every visitor and drop suspicious ones into .htaccess. As for pilot privacy, I'm even critical of phpVMS for not having an option to display only the first name and last initial of the pilots, instead of the full last name. Heck, for that matter, I usually remove the "posted by" on the news page...but forgot to, the last time I upgraded.
  5. If this is the airport you are talking about, use the latitude and longitude that is highlighted. CNC3, small_airport, Brampton Airport,43.7603,-79.875,935, CA-ON, Brampton
  6. Looks good. I will give it a try. BTW, the code I'm currently using for the flight board is this. $query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC"; <BR>$list = DB::get_results($query); <BR>echo '<h3>Departures - '.date('F j, Y G:i').'</h3>'; <BR>echo '<table width="90%" border="1" bordercolor="#ffffff" bgcolor="#B6C7DB">'; <BR>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>ID</b></td><td><b>Status</b></td></tr>'; <BR>echo '<SPAN CLASS="omega_flightboard">';<BR>$count = 0; <BR>foreach($list as $flight) <BR>{ <BR> if(($flight->deptime + 0) > date('G:i')) <BR> { </P><P> if($count < 15)<BR> { <BR> $aircraft = OperationsData::getAircraftInfo($flight->aircraft); <BR> echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->name.'</td><td>'.$aircraft->registration.'</td>'; <BR> echo '<td>'; <BR> <BR> if(($flight->deptime - date('G:i')) <= 1)<BR> { <BR> echo '<SPAN CLASS="omega_white">Departing Soon</SPAN>'; <BR> } <BR> else <BR> { <BR> echo 'Scheduled Departure'; <BR> } <BR> echo '</td></tr></font>'; <BR> $count++; <BR> } <BR> } <BR>} <BR>echo '</table>';<BR>echo '</span>';<BR>echo '<h3>Arrivals - '.date('F j, Y G:i').'</h3>'; <BR>echo '<table width="90%" border="1" bordercolor="#ffffff" bgcolor="#B6C7DB">'; <BR>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>ID</b></td><td><b>Status</b></td></tr>'; <BR>$count = 0; <BR>foreach($list as $flight) <BR>{ <BR> if(($flight->arrtime + 0) > date('G:i')) <BR> { <BR> if($count < 15) <BR> { <BR> $aircraft = OperationsData::getAircraftInfo($flight->aircraft); <BR> echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->name.'</td><td>'.$aircraft->registration.'</td>'; <BR> echo '<td>'; </P><P> if(($flight->arrtime - date('G:i')) <= 1) <BR> { <BR> echo '<SPAN CLASS="omega_white">Arriving Soon</SPAN>'; <BR> } <BR> else <BR> <BR> { <BR> echo 'On Time'; <BR> } <BR> echo '</td></tr>'; <BR> $count++; <BR> } <BR> } <BR>} <BR>echo '</table>'; <BR> Note that you'll have to replace <SPAN CLASS="omega_white"> with your own customization. I just dropped it into styles.css as this: .omega_white {color:#ffffff;}
  7. I just wish there were an easy way to enter multiple aircraft with a list of tail numbers, at the same time, instead of having to enter all the data for each. But, I'm nowhere near proficient enough a coder to cobble that together.
  8. By the way, I have been fooling around with this and now have this. This adds a new batch of work, because I must now enter more aircraft into the system so the same tail number doesn't appear twice.
  9. The information comes out of your schedules, not who is flying.
  10. That is because the first and second conditions are both true. In other words, equal or less than hour is also equal or less than 15 minutes. I tried adding code that made it eqal or less than an hour and equal or greater than 16 minutes, but couldn't get it to work.
  11. This, also has to be in your local.config.php. # Pilot pilots to only fly aircraft they're ranked to Config::Set('RESTRICT_AIRCRAFT_RANKS', true);
  12. That would be nice, but it also turns it into something other than a flight board.
  13. Bravo!!!!
  14. Hot diggity dog! Thanks.
  15. Does anyone know of a way to extract the airport database in FSX into a CSV, or similar format? I'm getting grumpy about the number of airports missing in either geonames or phpvms lookups. I'm not talking unknown air strips in the boondocks. Neither one can look up OAIX, for example. Loading FSX every time I need airport coordinates, is too time consuming.
  16. If you are relying on me, to come up with the code, I feel sorry for you. I just took an hour to see if I could get it to display departures and arrivals based on departure or arrival ICAO codes. The results...well, let's not talk about that. Originally, I was looking for nothing but front page eye candy, since all the other features already existed in the pilot center. I'm still trying to come up with code that will occasionally report a flight as delayed or cancelled. I'm not having terribly good luck with that, either.
  17. Anything is possible, but I can't even get it to display more than two conditions for arrivals and departures, so I won't be the one to do it.
  18. That is the truest statement I've seen in a long time. I suspect that folks who don't live up to their own expectations in their real life career, go out of their way to play the big bad "executive". Maybe it's my reputation for being evil, wicked, mean and nasty, that has saved me from "merger" offers.
  19. I'm sorry. I tried as best I could with my limited knowledge of PHP, but the following code for departures only displays "Scheduled departure". { $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 / 60 * 5 and ($flight->deptime - date('G:i')) >= 1 / 60 * 14) { echo 'Departing'; } else if(($flight->deptime - date('G:i')) <= 1 / 60 * 15 and ($flight->deptime - date('G:i')) >= 1 / 60 * 29) { echo 'Boarding/Loading'; } else if(($flight->deptime - date('G:i')) <= 1 / 60 * 30 and ($flight->deptime - date('G:i')) >= 1 / 60 * 45) { echo 'Departing Soon'; } else { echo 'Scheduled Departure'; } And the following code for Arrivals only displays "On time". if(($flight->arrtime + 0) > date('G:i')) { if($count < 15) { $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 / 60 * 5 and ($flight->arrtime - date('G:i')) >= 1 / 60 * 14) { echo 'Landed'; } else if(($flight->arrtime - date('G:i')) <= 1 / 60 * 15 and ($flight->arrtime - date('G:i')) >= 1 / 60 * 29) { echo 'On Approach'; } else if(($flight->arrtime - date('G:i')) <= 1 / 60 * 30 and ($flight->arrtime - date('G:i')) >= 1 / 60 * 45) { echo 'Holding Pattern'; } else { echo 'On Time'; } It's giaving me a headache, so I'm going to take a break for a while.
  20. That would be nice, as I also use SMF.
  21. I figured out that the reason the code for more that 2 categories didn't work is because while all had a <= none contained a >=. Ttherefore only the smallest category displayed. I'll be working on that, today. By the way, the flightboard is an excellent way to remind me I've scheduled more than on plane to depart or arrive at the same time.
  22. There's a lot of code posted in this thread. Which were you using?
  23. I tried the following, butIt appears some flights are not displaying. Try not to laugh too hard at this code. if(($flight->arrtime - date('G:i')) <= 1 / 60 * 5) { echo 'Landed'; } else if(($flight->arrtime - date('G:i')) <= 1 / 60 * 15) { echo 'On Approach'; } else if(($flight->arrtime - date('G:i')) <= 1 / 60 * 30) { echo 'Holding Pattern'; } else { echo 'On Time'; }
  24. Thank you. That worked fine.
  25. I doubt it, as I encountered the problem on a Windows 7 machine.
×
×
  • Create New...