-
Posts
2773 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by simpilot
-
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.
-
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.
-
Import pilots from a custom built system [SOLVED]
simpilot replied to vazquezjm's topic in Support Forum
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); } } -
My thoughts exactly.
-
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.
-
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.
-
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.
-
White space in one of your edited php files, many topics on this.
-
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.
-
<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>
-
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');
-
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.
-
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; }
-
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.
-
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.
-
Include Pilot ID in email_registrationaccepted.tpl (what variable to use)
simpilot replied to Aaron's topic in Support Forum
In the email_registration accepted template I use <?php echo PilotData::getPilotCode($pilot->code, $pilot->pilotid); ?> -
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.
-
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.
-
Quick fix: Sort schedules by departure time
simpilot replied to mischka's topic in Simpilot Group Addons
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. -
Are there still issues, I am guessing not since the post is marked solved.
-
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.
-
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.
-
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.
-
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);
-
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/