mattsmith Posted February 4, 2017 Report Posted February 4, 2017 (edited) How do you limit the schedules so you have to fly from where you last landed? Edited February 9, 2017 by mattsmith Quote
OmerAslan Posted February 4, 2017 Report Posted February 4, 2017 Hi, Parkho has Flight booking system and works the way you want... Click Here ( link will take you in this forum somewhere) not external link... Quote
Moderators servetas Posted February 6, 2017 Moderators Report Posted February 6, 2017 I had posted my reply yesterday but it seems that it has been lost. @mattsmish had you seen it? Quote
mattsmith Posted February 6, 2017 Author Report Posted February 6, 2017 I did see it but i hadn't added it yet was just going to do it Quote
Moderators servetas Posted February 6, 2017 Moderators Report Posted February 6, 2017 Oh gosh. Ok, you will have to open your schedule_results.tpl or .php file and find this: foreach($schedule_list as $schedule) { You might have $schedules instead of $schedule_list in your file as per your phpVMS version. Before the above code and after the php opening tag (<?php), add this: $last_location = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); and below the foreach statement add this: if($last_location->arricao != $schedule->depicao) continue; Let us know if you come up with any issue. Quote
mattsmith Posted February 6, 2017 Author Report Posted February 6, 2017 So i can only find flights from the last airport i landed at but is there anyway that only the Airport that your at is in the search box? Quote
Moderators servetas Posted February 6, 2017 Moderators Report Posted February 6, 2017 Basically you can update the schedule_searchform.tpl or .php template file and completely remove the "By Departure Airport" tab considering that your pilots will only be able to view schedules departing from one specific airport only so the search by departure airport is useless. 1 Quote
mattsmith Posted February 8, 2017 Author Report Posted February 8, 2017 The only problem is that a new pilot can't find any flights as they haven't submitted a pirep Quote
Moderators servetas Posted February 9, 2017 Moderators Report Posted February 9, 2017 Can you try replacing: $last_location = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); with this: $last_location = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, PIREP_ACCEPTED); $last_location = isset($last_location->arricao) ? $last_location->arricao : Auth::$userinfo->hub; Also, replace this: if($last_location->arricao != $schedule->depicao) continue; with this: if($last_location != $schedule->depicao) continue; In case the pilot does not have any validated pirep, the system will take into consideration the pilot's hub. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.