Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. From the readme Aircraft and Routes EVERY aircraft must have a looping routing system, in other words, it must return to the airfield it first started at on its last flight leg or it will become stranded. It does not matter how many flight legs are in the route for the aircraft but it must only go to each airfield one time. example of a looping route: flight 1 - KBOS - KATL flight 2 - KATL - KDEN flight 3 - KDEN - KORD flight 4 - KORD - KBOS Each aircraft in your inventory can only be assigned to one looped route.
  2. That is up to Nabeel when he will make it a release or continue to develop it. I forked the system on GitHub made some changes and have been using it as a base for new va's.
  3. If you still need it, below is part of the code I use to convert IPS sites over to phpVMS, I also have scripts for VABase conversions. I build the functions right into the phpVMS system as a module, combine the two databases and then do my conversions, and then delete the tables from the other system. You may have to adjust some of the fields depending on what you are converting from. First I run this part to bring the pilot data over from the old system into the phpvms database. You will need to match the airline code and hub. function pilots() { $sql = "SELECT * FROM ".TABLE_PREFIX."ips_users"; $users = DB::get_results($sql); foreach($users as $user) { $name = explode(' ', $user->Name); $joindate = date('Y-m-d H:i:s'); $insert = "INSERT INTO ".TABLE_PREFIX."pilots (pilotid, firstname, lastname, email, code, location, hub, password, salt, transferhours, confirmed, joindate) VALUES('$user->ID', '$name[0]', '$name[1]', '$user->Email', 'SPG', '$user->Country', 'KIAD', '$user->Pass', '$user->Salt', '$user->TransferHours', '1', '$joindate')"; DB::query($insert); } } Then I run this code to reset everyones password and email them the new one when I am ready for them to styart using the site. function new_passwords(){ set_time_limit(0); $sql = "SELECT * FROM ".TABLE_PREFIX."pilots"; $pilots = DB::get_results($sql); foreach($pilots as $pilot) { $newpw = substr(md5(date('mdYhs')), 0, 6); RegistrationData::ChangePassword($pilot->pilotid, $newpw); $sub = 'New Site Details'; $message = 'Your password has been reset for the new system.<br />'; $message .= 'Your new login password is - '.$newpw; Util::SendEmail($pilot->email, $sub, $message); } }
  4. My thoughts exactly.
  5. The beta version on github is really quite stable and secure, I am using it as the base of quite a few websites. The latest update is v2.1.934-170 - The twitter feed is working, but it has to be set up correctly at twitter is what I have found. There are some FSFK issues that I have updated in my version in my github account but other than that most of the true bugs have been fixed, and the issues left are really new features more than bugs.
  6. I have everything working except the order of the waypoints on the airway. I just need to find some type of listing that has all the waypoints for each airway. simroutes has the listings but only one at a time, there has to be some type of data file available somewhere so it does not have to be done manually.
  7. It depends on the ACARS system you are using, FSACARS, FSPax, and xACARS are directed at their respective files within the /core/modules/acars folder. kACARS is directed at its own module within the /core/modules/ folder.
  8. White space in one of your edited php files, many topics on this.
  9. Look at all the php files that have been edited, especially if they were edited in cpanel. It is most likely a white space at the start of one of them prior to the opening tag as they have mentioned before but can also be a character, cpanel has a habit of inserting a period at the start of the file when it is saved.
  10. <p><img src="images/vatsim.gif" alt="VATSIM" width="100" /></p> will not work in a template file as it is trying to find the image in the wrong place as you are using a relative path to it. The best way I believe in phpvms templates to get an image to display is to use <p><img src="<?php echo SITE_URL; ?>/path to your image" alt="VATSIM" width="100" /></p>
  11. To use the native function you can add this to your controller function after the initial template call. $this->set('pirep_list', PIREPData::getAllReportsForPilot($Auth::$pilot->pilotid)); $this->render('pireps_viewall.tpl');
  12. I have a working script to parse all the xPlane data files into sql databases and then consolidate them into the phpvms data structure. My problem is trying to find the listing for the airway vs nav point sequences. The way I have it parsing right now to display an intended or suggested flight plan takes the script a while as I have to compare all the waypoints on the airway to each other in order to grab the next one in order. There is a sequence column in one of the xplane data files but it does not seem to line up with what they should be. BTW - I tried applying for access to the FAA data but was denied. You must supply some documentation for what you are going to do with it and why it is required.
  13. You could add a check in the ACARSData.class.php file, not the best way to do it but would work and cover all the ACARS. right after public static function FilePIREP($pilotid, $data) { if (!is_array($data)) { self::$lasterror = 'PIREP data must be array'; return false; } add # Reject PIREP if a bid does not exist $bidid = SchedulesData::GetBidWithRoute($pilotid, $data['code'], $data['flightnum']); if (!$bidid) { self::$lasterror = 'Bid Does Not Exist'; return false; }
  14. You can use the native permission system and tie your module to a certain usergroup and only allow access to that group. Something like if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { //your functions } } else { echo 'No Access'; } Just replace "ACCESS_ADMIN" with the permission you would like to use. If you so not allow the group access to the admin area but do allow the permission for a function below this will let them in your module but not in the admin section.
  15. To shorten the time a flight shows on the ACARS map change it in the local.config file. # ACARS options # Minutes, flights to show on the ACARS # Default is 720 minutes (12 hours) Config::Set('ACARS_LIVE_TIME', 720); Although I have to agree - Use kACARS, much better and less frustrating.
  16. In the email_registration accepted template I use <?php echo PilotData::getPilotCode($pilot->code, $pilot->pilotid); ?>
  17. The function is contained in the phpvmsadmin.js file in the admin lib folder. function lookupICAO() { icao = $("#airporticao").val(); if (icao.length != 4) { $("#statusbox").html("Please enter the full 4 letter ICAO"); return false; } $("#statusbox").html("Fetching airport data..."); $("#lookupicao").hide(); if (airport_lookup == "geonames") { url = geourl + "/searchJSON?style=medium&maxRows=10&featureCode=AIRP&type=json&q=" + icao + "&callback=?"; } else { url = phpvms_api_server + "/airport/get/" + icao + "&callback=?"; } $.getJSON(url, function(data) { if (data.totalResultsCount == 0) { $("#statusbox").html("Nothing found. Try entering the full 4 letter ICAO"); $("#lookupicao").show(); return; } if (data.geonames) { data.airports = data.geonames; } $.each(data.airports, function(i, item) { $("#airporticao").val(icao); $("#airportname").val(item.name); $("#airportcountry").val(item.countryName); $("#airportlat").val(item.lat); $("#airportlong").val(item.lng); $("#statusbox").html(""); $("#lookupicao").show(); }); }); return false; } It is called by the look up button in the ops_airportform.tpl file on line 6 <button id="lookupicao" onclick="lookupICAO(); return false;">Look Up</button> The script will look in one of two places for the information; if (airport_lookup == "geonames") { url = geourl + "/searchJSON?style=medium&maxRows=10&featureCode=AIRP&type=json&q=" + icao + "&callback=?"; } else { url = phpvms_api_server + "/airport/get/" + icao + "&callback=?"; } You set the resource in the app.config file and if you are changing it from the default you should move the code to your local.config file so it does not get over written. /* Can be 'geonames' or 'phpvms'. Geonames will use the geonames.org server to look up the airport info phpvms will use the phpVMS API server */ Config::Set('AIRPORT_LOOKUP_SERVER', 'phpvms'); Config::Set('PHPVMS_API_SERVER', 'http://api.phpvms.net'); Config::Set('PHPVMS_NEWS_FEED', 'http://feeds.feedburner.com/phpvms'); Config::Set('VACENTRAL_NEWS_FEED', 'http://feeds.feedburner.com/vacentral'); Config::Set('GEONAME_API_SERVER', 'http://ws.geonames.org'); There are a few oddities on the geonames and phpvms airport database's, namely KORD - Chicago O'Hare comes up as being in Iran. I am sure there are a few more as well.
  18. simpilot

    Routes

    I have written a script to collect and parse the information for live schedules from Flight Aware using their FlightXML API. I do sell these sets of schedules as a ready to import sql database, and am allowed to by their terms and conditions as the data gained from the FlightXML API is a service that the user has to pay for. I do know that you can not sell any items from their site that are collected by scraping or other such actions within the free content portions. There are a number of other sites that also have similar information available that have the same terms. ( quicktrip.com, flightstats.com, and flightarrivals.com are a few) I would be very careful in what information you are collecting to resell, the site owners will protect their own investment. Flight Aware Terms - http://flightaware.com/about/termsofuse 10 - Any intellectual property or content associated with FlightAware is the sole property of FlightAware. With the exception of data retrieved through the FlightXML service, you may not copy, reproduce, distribute, modify, lease, loan, sell, or create creative derivative works of any FlightAware content.
  19. Thank you for the contributiuon. I will add a link to yoru post in the readme for the module for anyone that desires the same result.
  20. Are there still issues, I am guessing not since the post is marked solved.
  21. Hi Lucas, I have replied to your ticket and I do apoligize for the delay in response. I have just returned home after spending most of the month of July on the road due to some family issues. I had posted a notice on my site here -> http://www.simpilotgroup.com/home/notice - but I should have posted something here as well. Again, My apoligies, unfortunatly the month of July has caused me to delay quite a few projects and responses, I can only hope everyone understands.
  22. and the link is now dead..... guess cpanel did not care for the use of their name. Always good to pull a whois record and any other information on a host before you commit.
  23. I have not done it but you should have no issue integrating it into the existing templates. For the main gallery display - screenshots_viewer.tpl - I would imagine you would just wrap the img code on line 50 in the jQuery div.
  24. In your local.config.php file adjust the center lat and long to your preference; # Google Map Options Config::Set('MAP_WIDTH', '800px'); Config::Set('MAP_HEIGHT', '600px'); # Valid types are G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP Config::Set('MAP_TYPE', 'G_PHYSICAL_MAP'); Config::Set('MAP_LINE_COLOR', '#ff0000'); Config::Set('MAP_CENTER_LAT', '45.484400'); Config::Set('MAP_CENTER_LNG', '-62.334821'); Config::Set('MAP_ZOOM_LEVEL', 12);
  25. Looking here -> http://www.virtualual.com/index.php/touchdownstats it looks as though the module is working correctly. How are you including it on your front page? It almost looks like you have just added the html from the stats template into the front page template and are not filling the variable. If this is the method you are using you need to fill the variable in your controller (module) file using something like; $this->set->('stats', TouchdownStatsData::get_stats('10')); or just call the function from within the template using something like; <?php MainController::Run('TouchDownStats', 'top_landings', '10'); ?> There are number of other ways to use the module as well listed here -> http://forum.phpvms.net/topic/2989-touchdownstats-10/
×
×
  • Create New...