Jump to content

freshJet

Members
  • Posts

    1470
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by freshJet

  1. This works <?php $deptime = str_replace(':', '', $schedule->deptime); $arrtime = str_replace(':', '', $schedule->arrtime); $dephour = substr($deptime, 0, 2); $depmin = substr($deptime, -2); $arrhour = substr($arrtime, 0, 2); $arrmin = substr($arrtime, -2); echo $dephour.' <br />'; echo $depmin.' <br />'; echo $arrhour.' <br />'; echo $arrmin.' <br />'; ?>
  2. Never used bootstrap nor do I plan on it, for the reason that everyone else uses it. Basically what Tom said about your site looking the same as the rest. I personally find it easier to use my own code, not only that, but it's much more fulfilling as well.
  3. Here are some previews of some qucik renditions I did. I call it jSchedule. For those interested, would you rather see this built into the Admin panel or as an external application (www.yoursite.com/jschedule) on your site?
  4. $schedule->aircrafticao; I think
  5. Yes, exactly. But not as cluttered I'm doing a basic rendition just now just to figure out how to piece it together.
  6. Sorry the times should be: <?php $deptime = str_replace(':', '', $schedule->deptime); $arrtime = str_replace(':', '', $schedule->arrtime); $dephour = substr($deptime, 0, 5); $depmin = substr($deptime, -2); $arrhour = substr($arrtime, 0, 5); $arrmin = substr($arrtime, -2); echo $dephour; echo $depmin; echo $arrhour; echo $arrmin; ?> The ICAO is $schedule->depicao and $schedule->arricao.
  7. I am considering developing a new module. The module would be used for admin staff only, and would not be accessible by pilots. The concept is a schedule builder. Many VAs will assign any odd time and aircraft to their flights without a thought, however this module is intended for those who wish to build their schedules in a realistic way. The module would allow the user to add flights onto a timeline by aircraft, so that flights would be organised in an illustrative manner. Each flight will be represented by a block, which shows only basic information such as departure/arrival airports and departure/arrival times, but the block will hold all relevant schedule data such as flight number, route, price, etc, Once the user is happy, they can then export the data to a .csv file which can then be imported to the phpVMS schedules. This will be a fairly complex development, so, if it were to go ahead then I would have to consider whether or not this will be a free product or whether it will come with a fee. If a fee were to be used, it will likely cost no more than £20 (around $30 or 25€).
  8. Registration, flight number and route are easy: <?php echo $schedule->registration;?> <?php echo $schedule->flightnum;?> <?php echo $schedule->route;?> Splitting up the times is a bit more tricky. This will only work if your times are in the HH:MM format, not HHMM. <?php $deptime = str_replace(':', '', $schedule->deptime); $arrtime = str_replace(':', '', $schedule->arrtime); $dephour = substr($deptime, -2); $depmin = substr($deptime, 2); $arrhour = substr($arrtime, -2); $arrmin = substr($arrtime, 2); echo $dephour; echo $depmin; echo $arrhour; echo $arrmin;
  9. Edit your original post and use Full Editor to edit the title.
  10. Isn't that what he wants? Per pilot from the hub?
  11. 1. http://www.yoursite....older/image.jpg Doesn't really matter where it's uploaded to, just make sure the path is correct. 2. http://forum.phpvms....so/#entry111443
  12. You can do #2 by: public static function FlightsByPilotByHub($pilotid, $icao) { $query = "SELECT COUNT(id) as flights FROM phpvms_pireps WHERE depicao = '$icao' OR arricao = '$icao' AND pilotid = '$pilotid' AND accepted = '1'"; $result = DB::get_row($query); return $result->flights; } Not tested.
  13. This looks promising. As I told you before I am already making my own OFP system but it is extremely complex in some aspects. Most of it is OK, however this may be the breakthrough weneed to get it fully functional. I've just given it ago, it seems like a simpler solution than I'd thought. I have to agree with Tom.
  14. This is the story of my life
  15. freshJet

    HubStats Class

    I don't know, I have no experience in using it. It may well do.
  16. Thanks a lot Derek, I hope this acts as a breakthrough in the development of my redesigned OFPs.
  17. Absolutely, that would fantastic.
  18. Is the server down? I can't use the ICAO lookup function when adding an airport.
  19. freshJet

    HubStats Class

    Only thing I can suggest is that you don't have phpvms_ as your table prefix. Other than that, you could always do $startdate = date("Y-m-01"); $enddate = date("Y-m-t"); HubStats::TotalHoursBetweenDates('PANC', date("Y-m-01"), date("Y-m-t")); Shouldn't make a difference but give it shot. EDIT: You might have to set your timezone: date_default_timezone_set('Europe/London'); Change as necessary of course.
  20. Yes. You won't see it on my site however, you can't see my briefings.
  21. I use this script in my briefings, so schedule_briefing.tpl. If you want it in that, use: <?php function get_metar($location){ $fileName = "http://weather.noaa.gov/pub/data/observations/metar/stations/$location.TXT"; $metar = ''; $fileData = @file($fileName) or die('METAR not available'); if ($fileData != false) { list($i, $date) = each($fileData); $utc = strtotime(trim($date)); $time = date("D, F jS Y g:i A",$utc); while (list($i, $line) = each($fileData)) { $metar .= ' ' . trim($line); } $metar = trim(str_replace(' ', ' ', $metar)); } echo "METAR FOR $location (Issued: $time UTC):<br>$metar"; } echo get_metar($schedule->depicao); echo "</br>"; echo get_metar($schedule->arricao); ?>
  22. You need to add the progress bar feature yourself
  23. freshJet

    HubStats Class

    What start and end dates are you passing in?
  24. Pages are written in HTML. To create a custom page you can add one through the admin panel and edit it via core/pages or alternatively create a module and do it that way.
×
×
  • Create New...