Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. I have written the code (unreleased) to edit an existing tour but the issue becomes editing the tour when pilots have already flown routes within the tour. If you change a piece of the tour it then leaves a gap in the pilot record and defeats the "fly in order" theory of the tour system. I can set it to only allow edit if there are no pilot records attached to it as an option.
  2. Sorry, I think you have mis-understood me. I did not mean it was too hard to do, I meant that it would just take some work and getting the "what if's" prior to writing a bunch of code is always a plus and saves some headaches along the way. I have seen this request for auto awards many times and never have had anyone come up with a clear idea of "what" (hours, flights, miles, landing rates, hair color, number of girlfriends, etc..) should trigger the award. It depends on what the VA is trying to achieve, and with that the task becomes trying to capture all the different posibilities to trigger an award, applying the award is the easy part then. You will have to leave some room to allow for the guy that shows up at the end and wants it to apply an award for somethng that had not been brought up already as well.
  3. I just went to your site and used the url; http://angelairva.co.uk/index.php/popupnews and get the error that the module doesn't exist. Check and make sure both the module folder and the data class are in the file tree.
  4. Can you post the entire file to pastebin so I can look at it, I dont see a second foreach call that would be line 44.
  5. Been looking into it, was thinking some type of identifier for tour flights - a T or something. I just need to find a way to intergrate it without getting into the core files so it is not affected by an update of the core system.
  6. This could get fairly detailed. I would to ask what would trigger the auto award? Hours, flights, miles, landing rate, screenshot contests, all of the above? You will have to figure out an identifier to catch in order to apply the award, probably a multi-function listener would be best but, I think I would add it to the maintenace operations that way it would not run on every PIREP submittial or the same time and memory issues will probably appear that we have had in the PIREP approval process for airlines with large databases.
  7. You could just use the coding from the downloads section as an example and add a db table for the corolation and one column to the awards table for the section the award would be in. Probably a good thing to add to the feature requests thread.
  8. It is an error from running out of execution time and memory availability on your server. Pre-beta versions recalculate the va's hours on every PIREP approval and once you get a significant amount of PIREPs in the dtabase it becomes a long task. It has been chnaged in the beta version and the function has been moved elsewhere to avoid the issue. The quick fix is to comment out line 317 of your /admin/modules/PIREPadmin/PIREPadmin.php file; StatsData::UpdateTotalHours(); Doing this will cause your va's total hours not to advance on PIREP approval but you could build the function into the maintenance file if you are running it daily. Or you could incorporate the new functions from the beta into your install, or completely upgrade to the beta.
  9. Please open a support ticket on my site with the details -> http://www.simpilotgroup.com/hosting/submitticket.php Thanks
  10. Is it shared, dedicated, VPS? If you have access to the php.ini file you need to remove the restiction of file operators for the server.
  11. You can use the above referenced function and just ask for 1 return, that would give you the worst, then add a WHERE DAY(submitdate) = DAY(NOW()) or something like that into the function to granb the worst from that day. You will have to code for the reality of no data at all being found as well to avoid a foreach loop error.
  12. open_basedir restriction in effect What type of hosting are you on? If you have access to the php.ini the above needs to be changed to start.
  13. Hope you dont mind, I made a few changes to your code to use curl instead of open url and also not to use GET. Using it in this manner will save a copy of the ivao file to your own server and update it if it is more than 5 minutes old when the script looks for it. also to get the map now use: www.yoursite.com/index.php/liveflights/map/"ICAO OF AIRLINE YOU ARE LOOKING FOR" I posted it at pastebin for your review -> http://pastebin.com/h8Y38yDs
  14. You should be using cURL to open offsite files, allow_url_fopen creates a fairly large security risk for your site and gives even the most novice hackers an avenue to import script into your source code. allow_url_fopen is disabled by server administrators almost 100% of the time and cURL is now the standard. Nabeel has built cURL right into phpVMS to make it even easier as long as it is enabled on your server. There is no reason that any reputable host should not have cURL enabled, the free hosts are another story, as it is another reason for them to upsell you to paid hosting. instead of; $file = file($servers); you could use; $data = new CodonWebService(); $file = @$data->get($servers);
  15. Did you insert the tables for the exam center into your database?
  16. Thats going to try to pull from the controller, I am not sure how you have done it but if you just have it in the data model you can get the info direct from there; $data = TouchdownStatsData::top_landing_this_month('10'); Your function in the data model should look something like this if you after 10 records from the current month; public function top_landing_this_month($howmany) { $today = getdate(); $month = $today[mon]; $year = $today[year]; $query = "SELECT * FROM phpvms_pireps WHERE landingrate <'0' AND MONTH(submitdate) = '$month' AND YEAR(submitdate) = '$year' ORDER BY landingrate DESC LIMIT $howmany;"; return DB::get_results($query); }
  17. You need to rename one of the two occurances of get_all_stats
  18. I am removing the link to the AF site, locking the thread and suspending the account for 7 days, as you have stated you want your account removed anyway. Nabeel can make the decision as to deleteing the account in whole. As much as I do not agree with what you have done, we as a group just seem to continue to feed you what you ultimatly want, confrontation....
  19. There is a bracket or something missing in the file and you have the same name for two functions - get_all_stats - you need to rename one of them to something different but I can not see what you have missing without seeing the entire file. It could be a } or a ; missing somewhere above line 23.
  20. When you call it in your template, you will need to assign data to the $month and $year variable -> ie '8', '2011'
  21. Have you also added the line to the controller to load the variable into the template?
  22. I think this may be what you are looking for -> http://forum.phpvms.net/topic/2989-touchdownstats-10/page__view__findpost__p__21408
  23. Nabeel has done an excellent job in advancing the schedule search functions in the newest beta cersion including not loading all the schedules at first for those that have large schedule databases. IMO the beta is a better choice right now over the 934 stable if schedule searching is something that is at the top of your list, there are few other small bugs that are easily overcome and will be fixed in the near future I believe. I am building all the new sites I put out on the beta unless I am specifically asked not to. The latest beta download link is always in the build log board of the forum, or you can go directly to the downloads page and find it at http://downloads.phpvms.net BTW: Awesome integration of the Gooey menu on your site! Been thinking about using it myself.
  24. Are you passing the month and year to the $month and $year variables? If so, are there any PIREPS with landing rates for the month and year you are passing?
×
×
  • Create New...