Jump to content

Nout - Zon Executive

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Nout - Zon Executive

  1. Hey Guys, At the moment, with the routemap (../index.php/routemap) theres just a "title" above each of the markers with information on the airport name and ICAO. How can I get an Info Window/Bubble to show up with more information on the respective airport when clicking on the marker? ---EDIT--- Basically what I want to do, is that pilots open the routemap, click on an airport marker, view flights available and book them. Nice and visual approach. And interactive. Regards, Nout
  2. On the Schedules Details Routemap where it shows all waypoint what format do I need for it to show lat/lon points? 58/20 doesn't plot anything on the map
  3. Hello there, We have a system where pilots can submit schedules that they wish to add to our databases. They are then validated and added by one of the admins. Given that I know the pilot's ID is there a built in function/class that will allow me to send the pilot an email with i.e. "Hi there, your schedule request was accepted and added" Of course, there is the long way of sending an email with PHP, but phpvms has so many built in features, I am wondering if a mailing feature is also present. Nout
  4. Hi Guys, I have a question about the "mod_rewrite" in phpVMS. I'm not sure if I can call it exactly that, because I know that Apache's mod_rewrite makes site.com/page/cookies refer to site.com/index.php?page=cookies I was wondering how the URL system in phpVMS works such that i.e. www.site.com/index.php/pilots refers to www.site.com/core/modules/pilots/pilots.php Furthermore is there a way to manipulate this such that i.e. www.site.com/pilots has the same effect as www.site.com/index.php/pilots Cheers, Nout
  5. When I do the following: $query_count = "SELECT COUNT(*) FROM ".TABLE_PREFIX."schedules WHERE aircraft=".$aircraft->id." AND depicao='$location'"; $rowcount = DB::get_row($query_count); echo $rowcount; I get the error: Catchable fatal error: Object of class stdClass could not be converted to string in /Users/Nout/Desktop/ZE Site/core/templates/realschedulelite/realschedulelite_airport_details.tpl on line 56 What I have in place is a table of flights per airport which pilots can then book. Thus I use "foreach" to display a new table-row per flight. That works perfectly for any airport with more than one flight departing it. For an airport with only one flight departing it, the table is shown but above it theres an ugly error reading: Warning: Invalid argument supplied for foreach() in /Users/Nout/Desktop/ZE Site/core/templates/realschedulelite/realschedulelite_airport_details.tpl on line 133 So what I want is to count rows and if theres is only one applicable row I remove the foreach and use DB::get_row otherwise the foreach clause is used with DB::get_results. Cheers, Nout
  6. Hey Guys, I now that you can use mysql_num_rows but with phpVMS theres the custom mysql connect syntax that makes everything a lot cleaner. i.e. DB::get_results($query) How do I count rows? (i.e. count the number of schedules with B747-400 departing EHAM) Cheers, Nout
  7. I found that the solution lay within changing the local.config.php file. The local config seems to override the app config. Theres a configuration called Autorank, something like that. Set it to "false", then when you select a pilot in the admin panel theres a drop down next to his rank so you can manually select it.
  8. Ah I see. Place all the parsing code in the module and then send through the output to the template file which then renders my html table. That probably will work. I will try that. Yeap I use the phpvms database. Thanks, Nout
  9. Hi Guys, I have built a flightplan parser that does all sorts of things including reading airways and breaking them up into their constituent waypoints. To do this it directly references the X-Plane waypoint databases. Must easier than sending tons of queries to MySQL. Now I have it all working in parser.php but want to include it into a template file so that it neatly fits into my VA site. The database file's don't seem to be found even when i reference them with i.e. 'http://www.vasite.com/files/waypoints.idx' Basically how do I integrate the stuff I have into the Codon interface? Cheers, Nout
  10. Thats a very different philosophy to that used in the current RealScheduleLite module. It would require a nearly complete rewrite of the code. If you want one aircraft to fly multiple routes how will the system differentiate between the routes? you could add a letter to the flight number that does so. E.g 101A and 101B are different route loops but with the same aircraft. once again, it requires a rewrite of the code. cannot be done with the current system that is in place.
  11. However, in response to question number 1, isn't there a way for the code to see FIRST of there is an airplane at the airport BEFORE writing the row with that airport. I mean whats the point for pilots to see the airports where there are no airplanes and thus nothing can be done? Furthermore, any of you guys getting the thing where when you have 100 planes and 500 airports the page takes some time to load or is my provider slow? Nout
  12. I guess I have a very simple question: When will you release your newest Tour module? I have been trying to remake it myself however I think we would all appreciate the release as it saves us all time and ultimately gives us all a more fun VA experience
  13. Hey Guys, Anyway to get a small table that shows how many pilots from each country? For example: Germany -------- 23 USA ------------21 Spain -----------11
  14. If my loop for one of my aircraft is, as an example, the following: ZE101 KJFK - KMIA ZE102 KMIA - KJFK ZE103 KJFK - KORD ZE104 KORD - KJFK Then with the current system it would only show the route ZE101 KJFK - KMIA. Why not show both ZE101 and ZE103, then the pilot can choose which of the two routes departing KJFK he wishes to fly? Any ideas of how to get that working? Remove a certain if statement in the code? Nout
  15. This looks REALLY great! Do you ever plan on publicly releasing it?
  16. Is it possible to implement pages sub directories. Such as index.php/pages/training/b747 will show core/pages/b747.htm index.php/pages/operations/fleet will show core/pages/fleet.htm I am getting a lot, a lot and a lot of custom content, and being able to pop it all in sub directories would be very useful. Regards, Nout
  17. Hey, I am working on duplicating the pages module. Don't worry, I am being very careful (already managed duplicating the news module). Within SiteData.class.php in the function DeletePage its uses PAGE_PATH and PAGE_EXT PAGE_EXT I can find in the local.config.php however I cannot find PAGE_PATH in either local.config.php or app.config.php Where is it? For my duplicate pages module i'd like to have a separate folder for the respective pages. Cheers, Nout
  18. Hey Guys, All my cargo routes have flight numbers starting with 9. Currently www.zonexecutive.com/index.php/routemap shows ALL routes. I want a separate map maybe like www.zonexecutive.com/index.php/routemap/cargo that shows all schedules with a flight number with a first digit being 9. Any Ideas? Nout
  19. 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
  20. 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.
  21. Should work. Let me see what I can get to work. Im using your realschedulelite module as well, so ill need to integrate that as well. ACL?
  22. good point. but then it would still be progressive. so you have to acquire the type ratings in the correct order. e.g, i have the following three ranks: Name, Order B737, 0 B747, 1 A380, 2 I can set the rank selection to manual selection, does allowing me to assign ranks. If i set the B737 to by flying from rank 0, B747 from rank 1, A380 from rank 2 then it should work. However, because I can only set a minimum rank for aircraft, not a maximum rank, if the pilot only completes the exam for the 747 type rating, he/she would be able to fly the 737 and 747. So the pilot would HAVE to take the type ratings in the order 737 > 747 > 380. so we would need a maximum rank for aircraft as well, or some other system, made for this. nout
  23. Hey guys, any ideas on how to get a type rating system. So that pilots can only fly a 737 for example if they have passed necessary tests. Nout
  24. what happens when you DO recalculate distances?
  25. How would it be able to alter the code so it simply shows ALL routes in your database?
×
×
  • Create New...