Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. The site that the live pricing was being drawn from blocked the VACentral API server and will not allow it to pull any more data from it. The owners I believe accused Nabeel and the system of being some type of link manager that was hurting their site. I would not expect a new solution any time soon, if ever.
  2. There are a number of ways to do this; 1 - If you are just wanting a static page to be shown when someone goes to your site the first time, create a seperate index.html page. Most servers will show the index.html page before the index.php page. Then in your opening html page just link to the index.php page for the phpvms system. 2 - If you want to use data from the phpvms system your best bet is to edit the frontpage_main.tpl file to your liking, removing all the default features and adding your about us text for example. 3 - If you are against having the frontpage conroller being the default controller you can change line 41 in index.php define('CODON_DEFAULT_MODULE', 'Frontpage'); to the controller and function that you want to be shown by default, for example define('CODON_DEFAULT_MODULE', 'pages/aboutus');
  3. If you are trying not to include the core config file to avoid conflicts and they are using the remember me function when they login you should be able to grab their cookie using $_COOKIE['VMSAUTH'] and find something like this ["VMSAUTH"]=> "24|1|127.0.0.1" The second position is their raw pilot id number from the database. If they are not using the remember me function you are going to have to grab the session id out of the cookie and match the id to a session id in the sessions atble of phpVMS and then get the pilot id from there.
  4. 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.
  5. 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.
  6. 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); } }
  7. 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.
  8. 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.
  9. 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.
  10. White space in one of your edited php files, many topics on this.
  11. 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.
  12. <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>
  13. 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');
  14. 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.
  15. 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; }
  16. 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.
  17. 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.
  18. In the email_registration accepted template I use <?php echo PilotData::getPilotCode($pilot->code, $pilot->pilotid); ?>
  19. 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.
  20. 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.
  21. 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.
  22. Are there still issues, I am guessing not since the post is marked solved.
  23. 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.
  24. 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.
×
×
  • Create New...