Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. 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.
  2. 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.
  3. Nice work guys!
  4. 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.
  5. 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.
  6. 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.
  7. Please open a support ticket on my site with the details -> http://www.simpilotgroup.com/hosting/submitticket.php Thanks
  8. 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.
  9. 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.
  10. 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.
  11. 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
  12. 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);
  13. Did you insert the tables for the exam center into your database?
  14. 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); }
  15. You need to rename one of the two occurances of get_all_stats
  16. 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....
  17. 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.
  18. When you call it in your template, you will need to assign data to the $month and $year variable -> ie '8', '2011'
  19. Have you also added the line to the controller to load the variable into the template?
  20. I think this may be what you are looking for -> http://forum.phpvms.net/topic/2989-touchdownstats-10/page__view__findpost__p__21408
  21. 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.
  22. 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?
  23. Are you runing beat or the 934 stable? If it is beta, there are some changes that affect the module and with the new search template youcan search by aircraft and airline in addition to departure and arrival so the module becomes somewhat dated.
  24. Please PM me your email address or open a support ticket on my site, Thank You.
  25. You can put it in any of the data class models really, where ever you would like it. If you put it in the touchdowndata.class.php file you can then just call it in your controller or view using; <?php $variable = TouchdownStatsData::get_monthly_landingrate('month', 'year', 'howmany'); ?> Then the $variable will be filled with your array to build your table with.
×
×
  • Create New...