Colonia Posted July 5, 2010 Report Posted July 5, 2010 Thank you for the reply, Dave Have you assigned the pilots to a hub? - I built in a qualifier in the index template to put the pilot at their hub if they have never filed a PIREP. Yes, the pilots are assigned to the hub EDDK, also in the pilots table of the SQL database. And the qualifier is correct in my realschedulelite_index.tpl. But it doesn't work I tried the following in the realschedulelite_airport_details.tpl: //If pilot is logged in check their location //If the pilot is at this airport allow them to bid on flights if(Auth::LoggedIn() == true) { $location = PIREPData::getLastReports(Auth::$userinfo->pilotid, 1, ''); $location = RealScheduleLiteData::get_pilot_location(Auth::$userinfo->pilotid); if(!$location == $name->hub) { echo '<td><a id="'.$flight->id.'" class="addbid" href="'.actionurl('/schedules/addbid').'">Add to Bid</a></td>'; } else if($location->arricao == $name->icao) { echo '<td><a id="'.$flight->id.'" class="addbid" href="'.actionurl('/schedules/addbid').'">Add to Bid</a></td>'; } else { echo '<td>You are not at this airport</td>'; } } That way it works fine for new and also existed pilots At least for the moment, I'll continue testing... Quote
Jeff Posted July 5, 2010 Report Posted July 5, 2010 Somehow, my pilots that haven't flown yet are not at airport. But...once you fly your first route it will show up correctly. Quote
Colonia Posted July 5, 2010 Report Posted July 5, 2010 But...once you fly your first route it will show up correctly. Yes, that's correct. But the first flight can't book on my website via the hub EDDK. And that was the problem. If anyone of the new pilots take any random existing flight number it works. But I would that they start the first flight in EDDK or another chosen hub after registration and that them shown flights from the selected hub airport by REALScheduleLite. Quote
Administrators simpilot Posted July 5, 2010 Author Administrators Report Posted July 5, 2010 What version are you guys running? Maybe something has changed in the latest that is cracking this script, it has worked up till now. It is designed to fall back and place the pilot at their hub if they have never filed a PIREP. Quote
Jeff Posted July 5, 2010 Report Posted July 5, 2010 Dave, I'm running the latest update Version 2.1.943. Even when I first installed R.S.L. it appeared that way. Members will or have joined previously, and it always shows "You are here", but when they click on the Hub, they get "you are not at this airport". I haven't changed anything in the code what-so-ever. Do you think it should be uninstalled and re-installed again? Quote
Colonia Posted July 6, 2010 Report Posted July 6, 2010 I'm using the VMS 2.1.934 and the RSL beta 1.0. Because I've got this problem, I reinstalled both twice again, phpVMS and RSL, also the SQL tables. But the result with a fresh install was the same: "You are here" and "You are at XXXX" vs. "You are not at this airport". But with my posted code above it works fine for me. Quote
M-Queiroz Posted July 6, 2010 Report Posted July 6, 2010 hello simpilot with a quick question would show only the airports that have an aircraft if it has not stopped it shows nothing on the list would be nicer Quote
Administrators simpilot Posted July 8, 2010 Author Administrators Report Posted July 8, 2010 hello simpilot with a quick question would show only the airports that have an aircraft if it has not stopped it shows nothing on the list would be nicer At this point it would take a pretty big hack into the index template for the module. That function is buried well within the table, something to think about when/if there is another version written. Quote
selwynorren Posted July 9, 2010 Report Posted July 9, 2010 I think I broke it Everything works great, but when I click on the link to add the bid to goes to a blank page and says: No route passed Any Idea what I did wrong? Quote
TAV1702 Posted July 9, 2010 Report Posted July 9, 2010 hello simpilot with a quick question would show only the airports that have an aircraft if it has not stopped it shows nothing on the list would be nicer Yeah that's what I recommended some time ago too. But as Simpilot has stated, it would be quite the task to do. How about pagination (drop box) to choose page 1, 2, 3 etc. I am not sure how hard that would be. My list is way long and I have not even got half of my airports in yet. If I can hack an easy script up I will but my scripting is sloppy and slow. It would take me a while to figure it out. Quote
selwynorren Posted July 9, 2010 Report Posted July 9, 2010 TAV1702 I think what you are looking for can be found here: http://forum.phpvms.net/topic/3243-wondering-pagination-for-pireps-list/ Works brillinatly and can be adpated with very very little effort to any page with a long list Quote
selwynorren Posted July 9, 2010 Report Posted July 9, 2010 I think I broke it Everything works great, but when I click on the link to add the bid to goes to a blank page and says: No route passed Any Idea what I did wrong? My bad I just figured out the reason why, please ignore this error Quote
faraz Posted July 10, 2010 Report Posted July 10, 2010 Hi In get next flight only shown first flight and in get_airport show only first flight for each registration , I want show all flight for registration like get_aircraft page (Flight Routing) . Quote
Administrators simpilot Posted July 11, 2010 Author Administrators Report Posted July 11, 2010 Hi In get next flight only shown first flight and in get_airport show only first flight for each registration , I want show all flight for registration like get_aircraft page (Flight Routing) . If I al following you, the airport page would only show the next flight for the aircraft, that would be like in the real world, and when you click on the aircraft registration number it should bring up a page with all the routes the ac is assigned to and also mark its current location. I think that is how I coded it. Quote
TAV1702 Posted July 18, 2010 Report Posted July 18, 2010 TAV1702 I think what you are looking for can be found here: http://forum.phpvms.net/topic/3243-wondering-pagination-for-pireps-list/ Works brillinatly and can be adpated with very very little effort to any page with a long list DOH! I missed that one somehow. Thanks. Quote
selwynorren Posted July 19, 2010 Report Posted July 19, 2010 Hi Dave, Each aircraft in your inventory can only be assigned to one looped route. Is there a way to possibly remove this limitation? The scenario as follows. I have a very small charter based company, flying 22 routes with 4 aircraft. The are all short hops doing adventure safari type flights. At the moment we have 2 C172's and 2 C208's Everything is flown using these 4 aircraft. some of my routes are duplicated using different departure times (Duplicated as in same destination). I have removed all the Limit 1 part of the sql statements to see if that works, but I still cannot get it right. Is this at all possible? Quote
Administrators simpilot Posted July 19, 2010 Author Administrators Report Posted July 19, 2010 Not as it stands now. I can find a workaround for the next version when/if I write it. The module is looking for the location of the aircraft and then finding the next route for it from there, so if you have more than one route from the airfield it will show them all when you got to find the next flight for the aircraft. Probably have to use anbother db table to track each plane and work with departure times or something... Have to think about that one. Quote
selwynorren Posted July 19, 2010 Report Posted July 19, 2010 Hi Dave, Hmm I hear you. Sadly when I am at the hub, I see all the aircraft located there, but I am only seeing one route per aircraft. Anything I can do to twist your arms for an update :lol: Quote
BastiDE Posted August 21, 2010 Report Posted August 21, 2010 Yes, that's correct. But the first flight can't book on my website via the hub EDDK. And that was the problem. If anyone of the new pilots take any random existing flight number it works. But I would that they start the first flight in EDDK or another chosen hub after registration and that them shown flights from the selected hub airport by REALScheduleLite. I have the same problem. When one pilot dont have any flight, he cant become an flight in the shedule. It shows: You are not at this airport And the new code i have add. But it comes again. please help me. Quote
BastiDE Posted August 21, 2010 Report Posted August 21, 2010 FIXED. Wrong code.. Sorry. Nice WORK Quote
fabrice Posted September 14, 2010 Report Posted September 14, 2010 Using this and loving it. would love to see updates to it. Quote
Tom Posted September 16, 2010 Report Posted September 16, 2010 Hello, With this module is there a limit to how small a loop can be? i.e. can I make it EGKK->KMIA, KMIA->EGKK or would I have to do EGKK->KJFK, KJFK->KMIA, KMIA->EGKK or longer? Thanks Quote
Administrators simpilot Posted September 17, 2010 Author Administrators Report Posted September 17, 2010 You can create a loop using only two airfields - kjfk - klax - kjfk Quote
Nout - Zon Executive Posted September 30, 2010 Report Posted September 30, 2010 Would it be possible to make a google map of all the aircrafts positions? Since you know at what airport the aircraft are located and thus the GPS location of that airport could you render a map with a marker for each aircraft. Would help visualizing. Quote
CEO North Air Posted October 2, 2010 Report Posted October 2, 2010 Good eve Simpilot, short question, are you sure that a loop EDDH - EDDN - LEPA - EDDN - EDDH works without any problems? Thanks for a short reply! Quote
Administrators simpilot Posted October 3, 2010 Author Administrators Report Posted October 3, 2010 Good eve Simpilot, short question, are you sure that a loop EDDH - EDDN - LEPA - EDDN - EDDH works without any problems? Thanks for a short reply! Returning to EDDN before the final leg that returns to EDDH will hang the aircraft up on that leg the way the script is written now. It looks for the last flight of the aircraft and places it at the destination so if there are two flights from EDDN it will not know which one to display. Quote
Nout - Zon Executive Posted October 7, 2010 Report Posted October 7, 2010 Hey simpilot. The addon is working great for me. I have a question. Basically it has to do with restricting flights as per ranking. Some of my fleet is only flyable at a certain rank. Say I am at JFK, and there are two flights departing. One of them is a 747 to Amsterdam, the other an A320 to Chicago. With my rank I am officially only allowed to fly with A320s. But the module shows "Add to bid". Would it be possible for the system to not only look at your current location but also your ranks and at what rank certain aircrafts are allowed to be flown? So basically it would only show the link "Add to bid" if you ARE at that airport and if your rank allows you to fly the aircraft in question. I tried the following without success: <style> table.green, table.green td { border: 1px solid #008020; background-color: #D8FFCC; } </style> <?php //simpilotgroup addon module for phpVMS virtual airline system // //simpilotgroup addon modules are licenced under the following license: //Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) //To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/ // //@author David Clark (simpilot) //@copyright Copyright (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ echo '<br /><h3>Available Flights At '.$name->name.'</h3>'; ?> <br /> <table width="100%" border="1px" class="green" cellspacing="0px"> <tr> <th colspan="2">Airport Information</th> </tr> <tr> <td>ICAO:</td> <td><?php echo $name->icao; ?></td> </tr> <tr> <td>Country:</td> <td><?php echo $name->country; ?></td> </tr> <tr> <td>Latitude:</td> <td><?php echo $name->lat; ?></td> </tr> <tr> <td>Longitude:</td> <td><?php echo $name->lng; ?></td> </tr> <tr> <td>Flight Aware Charts Link: (USA Airfields Only)</td> <td><a href="http://flightaware.com/resources/airport/<?php echo $name->icao; ?>/procedures" target="_blank"><u><?php echo $name->icao; ?></u></a></td> </tr> </table> <hr /> <?php echo '<table width="100%" border="1px" class="green" cellspacing="0px">'; echo '<tr>'; echo '<th>Flight</th>'; echo '<th>Aircraft</th>'; echo '<th>Registration</th>'; echo '<th>Next Destination</th>'; echo '<th width="10%">Distance</th>'; echo '<th>Departure Time</th>'; if(Auth::LoggedIn() == true) { echo '<th>Add Bid</th>'; } echo '</tr>'; if(!$aircrafts) { echo '<tr><td colspan="6">The Airline Has No Aircraft</td></tr>'; } else { foreach ($aircrafts as $aircraft) { $location = RealScheduleLiteData::get_aircraft_location($aircraft->id); if(!$location) { $location = RealScheduleLiteData::get_aircraft_start($aircraft->id); $airfield = $location->depicao; } else { $airfield = $location->arricao; } if ($airfield == $name->icao) { $flight = RealScheduleLiteData::get_next_flight($aircraft->id, $airfield); $airfield = OperationsData::getAirportInfo($flight->arricao); echo '<tr>'; echo '<td>'.$flight->code.''.$flight->flightnum.'</td>'; echo '<td>'.$aircraft->fullname.'</td>'; echo '<td><a href="'.SITE_URL.'/index.php/RealScheduleLite/get_aircraft?id='.$aircraft->id.'" >'.$aircraft->registration.'</a></td>'; echo '<td>'.$airfield->icao.' - '.$airfield->name.' - '.$airfield->country.'</td>'; echo '<td>'.round($flight->distance).' nm</td>'; echo '<td>'.$flight->deptime.'</td>'; if($route->aircraftlevel < Auth::$userinfo->ranklevel) { //If pilot is logged in check their location //If the pilot is at this airport allow them to bid on flights if(Auth::LoggedIn() == true) { $location = RealScheduleLiteData::get_pilot_location(Auth::$userinfo->pilotid); if($location->arricao == $name->icao) { echo '<td><a id="'.$flight->id.'" class="addbid" href="'.actionurl('/schedules/addbid').'">Add to Bid</a></td>'; } else { echo '<td>You are not at this airport</td>'; } } } else { echo '<td>Rank Requirement not Met</td>'; } } echo '</tr>'; } } echo '</table>'; echo '<form><input class="mail" type="button" value="Go Back To Listing" onClick="history.go(-1);return true;"> </form>'; ?> If I replace the if($route->aircraftlevel < Auth::$userinfo->ranklevel) with if($route->aircraftlevel > Auth::$userinfo->ranklevel) then everywhere it writes "Rank Requirement not Met" instead of "Add to Bid". At the moment my whole fleet can be flown at any rank except for the aircraft with registration ZE-B01. My rank is lower than the minimum for the aircraft. After it works I will make all the aircraft at their respective minimum ranks Regards, Nout Quote
CEO North Air Posted October 7, 2010 Report Posted October 7, 2010 North Air Virtual Airlines still having the same problem. We´re also looking forward to fix that one, but unfortunately nothing works. Hopefully simpilot can help and paste some working code. Thanks a lot! Quote
Moderators mark1million Posted October 9, 2010 Moderators Report Posted October 9, 2010 I looked at this addon when it was released and had it on my dev server but never actually released it to the main, maybe its time to spend some time and get this up and running on my VA. Quote
Guest FWX001 Posted October 19, 2010 Report Posted October 19, 2010 Hi, I have this error core/templates/realschedulelite/realschedulelite_index.tpl on line 28 Regard FWX001 I have find my problem thx 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.