Jump to content

freshJet

Members
  • Posts

    1470
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by freshJet

  1. Yes but he means WHEN they login not if they are logged in. I wondered this a long time ago to.
  2. You could do it with AJAX and PHP
  3. Yes thanks Jon I got that bit. But the pilot codes are done in order of join date anyway so it would make no difference :S
  4. Ohhh right. Yeah I've always wanted that too!
  5. What difference would this make though?
  6. I don't understand
  7. This should do the trick.
  8. VA's like these come and go all the time. Maybe it was something to do with the real airline begin defunct too.
  9. Erm, are you sure that the pilot has flown any flights?
  10. There should be a ' after pireps.
  11. I'm not sure what you're looking for?
  12. Hmm... You could create columns in your phpvms_pilots table for the kills but how you'll determine them is beyond me. You could try some PHP to determine whether it's night or day - e.g get the departure and arrival times from the PIREPs for each pilot, convert it to a number, find the average and if it's between two values (e.g 9 and 5 for 9PM and 5AM) then display it as night or else day.
  13. OK try removing the continue in the first one so it's just else { }. For the second, try : <?php $today = date('Y-m-d') $query = 'SELECT * FROM '.TABLE_PREFIX.'pireps WHERE submitdate < $date; AND pilotid = {$userinfo->pilotid}'; $result = DB::get_row($query); $flightstoday = count($result); echo $flightstoday; ?> Actually I'm not so sure about this one because I don't know if you can put the php date into SQL.
  14. No. Have you installed the module?
  15. OK it works and I now have the lat and long for each waypoint, but how can I retrieve the rest of the data for each waypoint (type, freq etc) by using the coordinates?
  16. freshJet

    ACARS

    Download Visual Basic and get used to it. I can tell you now that it ain't gonna be easy in the slightest. You should contact Jeffery Kobus (lorathon) - he'll make you a custom one.
  17. I know what's wrong: <?php $pilotid = $userinfo->pilotid; $pireps = PIREPData::getAllReportsForPilot($pilotid); $today = date('Y-m-d'); if(($pireps->submitdate) == $today) { echo $pireps; } else { continue; } ?> AND <?php $query = 'SELECT COUNT(*) AS total FROM '.TABLE_PREFIX.'pireps WHERE submitdate < date('Y-m-d'); AND pilotid = {$userinfo->pilotid}'; $result = DB::get_row($query); $flightstoday = count($result); echo $flightstoday; ?>
  18. That's the one. And yeah it applies to all the pages.
  19. This may or most likely won't work: <?php $pilotid = $userinfo->pilotid; $pireps = getAllReportsForPilot($pilotid); $today = date('Y-m-d'); if(($pireps->submitdate) == $today) { echo $pireps; } else { continue; } ?> OR <?php $query = 'SELECT COUNT(*) AS total FROM '.TABLE_PREFIX.'pireps WHERE submitdate < dmy AND pilotid = {$userinfo->pilotid}'; $result = DB::get_row($query); $flightstoday = count($result); ?>
  20. Erm sorry to bring this up but just checked my navdata and it is indeed empty :S How do I populate it?
  21. Woops I didn't mean that $pilotid. Hang on I'll test it out.
  22. Better scratch that...
  23. Try this <?php $query = 'SELECT COUNT(*) AS total FROM '.TABLE_PREFIX.'pireps WHERE submitdate < dmy AND $pilotid = $userinfo->pilotid '; $result=DB::get_row($query); if (!$result){ echo '0'; } else { echo $result->total; } ?> Not sure though
  24. Yeah you can somehow but I can't remember how to do it.
  25. Shouldn't it be echo '0'; ?
×
×
  • Create New...