Guest lorathon Posted April 11, 2010 Report Share Posted April 11, 2010 This module will build a random itinerary of 5,10 or 15 flights in length. Starting from the pilots current location and linking each flight from the arrival airport. Once the itinerary is built it can then be bid on in whole. The entire itinerary add to the pilots current bids in the correct order. Options included are Skip over schedules that have disabled aircraft Skip over schedules with an aircraft of higher minrank than the searching pilot Download from my site www.fs-products.net Quote Link to comment Share on other sites More sharing options...
TennShadow Posted April 11, 2010 Report Share Posted April 11, 2010 Great addon...thanks! Moved to Releases. Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 11, 2010 Moderators Report Share Posted April 11, 2010 STAR!!!!!! Just going to put it on my dev site for some testing and ill let you know how it goes Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 11, 2010 Moderators Report Share Posted April 11, 2010 Jeff, I get the following error, Warning: Invalid argument supplied for foreach() in /srv/www/grantsva.com/public_html/TestVA/core/modules/RandomFlights/RandomFlights.php on line 30 30 is in the loop, $flights = SchedulesData::findSchedules($params); foreach ($flights as $row) { $r = rand(0, count($flights)); $airline = OperationsData::getAirlineByCode($flights[$r]->code); if($airline->enabled == 0) continue; if ($flights[$r]->aircraftlevel > Auth::$userinfo->ranklevel) { continue; } One thing i have done differently is the tpl files were placed in to the skins folder, would this make a difference, i will give it a go in the core templates as well? Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted April 11, 2010 Moderators Report Share Posted April 11, 2010 Forget the above, all OK, i forgot i was messing about the the fleet and forgot to reimport that table in to the database Nice addition Jeff, Thank you. Quote Link to comment Share on other sites More sharing options...
saapilot Posted April 17, 2010 Report Share Posted April 17, 2010 Hi Jeff, Is it possible to filter the itinery by airline? I have different airlines and would like the itinery to be generated for a selected airline only. Thanks in advance. Mark Quote Link to comment Share on other sites More sharing options...
Alex Posted May 3, 2010 Report Share Posted May 3, 2010 Hi Lorathon, Would it be possible for the Random Itinerary to search for the first route that is closest to the Pilots clock time and then get the rest from that point? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 3, 2010 Report Share Posted May 3, 2010 I will see what I can do for the above two posts Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 14, 2010 Report Share Posted May 14, 2010 Jeff, I get the error: An Error Was Encountered The module "INDEX" doesn't exist! Its probably something simple but I dont know how to fix it! Cheers Dale Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 15, 2010 Report Share Posted May 15, 2010 The address to access is as follows http://www.robinhoodairlines.com/index.php/randomflights I just checked it out on your site and it looks to be there. Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 15, 2010 Report Share Posted May 15, 2010 Yep, its there mate but then I get this error: Warning: Invalid argument supplied for foreach() in /home/robinhoo/public_html/core/modules/RandomFlights/RandomFlights.php on line 30 Any ideas? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 15, 2010 Report Share Posted May 15, 2010 Looking at your schedule I imagine it is due to the fact that your schedule does not have inter-connected flights. The itinerary builder is looking for flights that continue from airport to airport. KLAX-KLAS KLAX-KONT KONT-PHNL PHNL-KSFO etc...... Quote Link to comment Share on other sites More sharing options...
gehatz Posted May 15, 2010 Report Share Posted May 15, 2010 Hey Lorathon, I was just thinking that your addon (already excellent) would benefit from a feature (or set of features) which allow a pilot to enter their departure (initial) airport and the arrival (terminal) airport. If there is no direct flight it should populate with an itinerary of interconnected flights which would start from the departure (init) airport and end at the arrival (terminal) airport. for example if i wanted to travel from LGAV to KIAD and there was no direct flight it should give me an itinerary of flights that are operational by the VA like LGAV (Athens, GRE) to KJFK KJFK to KIAD it will enhance the sence of realism in the VA as far as booking flights don't you think? Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 15, 2010 Report Share Posted May 15, 2010 Looking at your schedule I imagine it is due to the fact that your schedule does not have inter-connected flights. The itinerary builder is looking for flights that continue from airport to airport. KLAX-KLAS KLAX-KONT KONT-PHNL PHNL-KSFO etc...... Cool mate, thanks for the info, I will add more flights! Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 15, 2010 Report Share Posted May 15, 2010 Hey Lorathon, I was just thinking that your addon (already excellent) would benefit from a feature (or set of features) which allow a pilot to enter their departure (initial) airport and the arrival (terminal) airport. If there is no direct flight it should populate with an itinerary of interconnected flights which would start from the departure (init) airport and end at the arrival (terminal) airport. for example if i wanted to travel from LGAV to KIAD and there was no direct flight it should give me an itinerary of flights that are operational by the VA like LGAV (Athens, GRE) to KJFK KJFK to KIAD it will enhance the sence of realism in the VA as far as booking flights don't you think? Yeah I know. I have been thinking about this but the code necessary would be massive (I think). I am still pondering it. If I can figure it out I will do it. Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 15, 2010 Report Share Posted May 15, 2010 When I use this it always says that the starting airport is Compiègne-Margny (LFAD). I have changed location to EGLL but it still shows the same as above. Am I missing something that I need to do? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 15, 2010 Report Share Posted May 15, 2010 When I use this it always says that the starting airport is Compiègne-Margny (LFAD). I have changed location to EGLL but it still shows the same as above. Am I missing something that I need to do? The starting point is your last location. So LFAD should be the last airport you landed at. Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 27, 2010 Report Share Posted May 27, 2010 Just ran this again and I get the following error: Warning: Invalid argument supplied for foreach() in /home/robinhoo/public_html/core/modules/RandomFlights/RandomFlights.php on line 30 I have just upated the the latest version of phpvms, is this the problem? Cheers Dale Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 27, 2010 Report Share Posted May 27, 2010 What is showing up in the "Current Location" box when you load the page? Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 27, 2010 Report Share Posted May 27, 2010 In the location box it has LDSP (Split). Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted May 27, 2010 Report Share Posted May 27, 2010 In the location box it has LDSP (Split). What do you mean (Split)? Do you have flights departing from LDSP in your schedule? Quote Link to comment Share on other sites More sharing options...
dale0404 Posted May 28, 2010 Report Share Posted May 28, 2010 Please ignore my last post *embarrassed*. Split is an airport on the coast of Croatia. Quote Link to comment Share on other sites More sharing options...
Serrador Posted August 8, 2010 Report Share Posted August 8, 2010 Gave Error Here Help Please I came to choose the place where I'm coming from and the number of scales, but when I press it to generate the error below this Warning: Invalid argument supplied for foreach() in /home/vhosts/airsulvirtual.ueuo.com/core/modules/RandomFlights/RandomFlights.php on line 30 Quote Link to comment Share on other sites More sharing options...
Valerio Cowboy Posted August 10, 2010 Report Share Posted August 10, 2010 'm in trouble, the pilot just register. he did not get the hub to start. how to solve? Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted August 10, 2010 Moderators Report Share Posted August 10, 2010 @ Wallace, you do have schedules in your system? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 10, 2010 Report Share Posted August 10, 2010 Wallace - Mark is correct. Do you have schedules? Do you have a starting location? Cowboy - You would need to change the code so that if the pilot does not have a last location to default to his/her hub or some other starting point Quote Link to comment Share on other sites More sharing options...
Valerio Cowboy Posted August 10, 2010 Report Share Posted August 10, 2010 people. I could do to show on screen the hub of the guy if he did not make any flight. not only managed to make it refer to it when asked to scale. someone who digs php help? help us all. open randomsearch.tpl <?php $pilotid = Auth::$userinfo->pilotid; $last_location = PIREPData::getLastReports($pilotid, 1); $last_name = OperationsData::getAirportInfo($last_location->arricao); $userinfo = PilotData::getpilotdata($userinfo->hub); ?> <table border = "0"> <tr> <th scope="col">Sistema de Reserva de Escala</th> </tr> <tr><form name="randomflights" id="randomflights" action="<?php echo SITE_URL?>/index.php/randomflights/getRandomFlights" method="post"> <td>Informe seu Local Atual </td> <table> <tr> <td width ="25%"><b>Aeroporto Atual:</b></td> <td width ="75%"><select id="depicao" name="depicao"> <?php if (!$last_location == null) { ?> <option value="<?php echo $last_location->arricao?>"> <?php echo $last_location->arricao?> (<?php echo $last_name->name?>)</option> <?php } else { ?> <option value="<?php echo $userinfo->hub?>"> <?php echo $userinfo->hub?> (<?php echo $userinfo->hub?>)</option> <?php } ?> </select> </td> </tr> <tr> <td width ="25%"><b>Você Vai Receber uma Reserva de :</b></td> <td width ="75%"><select id="count" name="count"> <option value="4">4</option> </select>Vôos</td> <td><input type="submit" name="submit" value="Gerar Escala"></td> </tr> </table> </form> </tr> </table> Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted August 10, 2010 Report Share Posted August 10, 2010 Try this <?php $pilotid = Auth::$userinfo->pilotid; $last_location = PIREPData::getLastReports($pilotid, 1); $last_name = OperationsData::getAirportInfo($last_location->arricao); $userinfo = PilotData::getPilotData($pilotid); if($last_location->arricao == '') $last_location->arricao = $userinfo->hub; ?> <table border = "0"> <tr> <th scope="col">Random Itinerary from Current Location</th> </tr> <tr><form name="randomflights" id="randomflights" action="<?php echo SITE_URL?>/index.php/randomflights/getRandomFlights" method="post"> <td>Current Location Preselected </td> <table> <tr> <td width ="25%"><b>Current Location:</b></td> <td width ="75%"><select id="depicao" name="depicao"> <option value="<?php echo $last_location->arricao?>"><?php echo $last_location->arricao?> (<?php echo $last_name->name?>)</option> </td> </tr> <tr> <td width ="25%"><b>Number of Flights:</b></td> <td width ="75%"><select id="count" name="count"> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> </select></td> <td><input type="submit" name="submit" value="Find Random Flights"></td> </tr> </table> </form> </tr> </table> Quote Link to comment Share on other sites More sharing options...
Serrador Posted August 13, 2010 Report Share Posted August 13, 2010 I have scales but the point is sbfz, do not know why this error is giving and the file that is giving this error /core/modules/RandomFlights/RandomFlights.php, is not the randomsearch.tpl Quote Link to comment Share on other sites More sharing options...
Valerio Cowboy Posted August 15, 2010 Report Share Posted August 15, 2010 I have scales but the point is sbfz, do not know why this error is giving and the file that is giving this error /core/modules/RandomFlights/RandomFlights.php, is not the randomsearch.tpl how many you have scales? they are interlinked? Quote Link to comment Share on other sites More sharing options...
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.