Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. It depends on the server configuration and OS. Best thing to do is put a php info file in your site and open it up in a browser and see which/where the php.ini is being loaded from. You can also create your own php.ini file and place it in your server root with just the commands you want to apply.
  2. Depending on the version you are running you should have 29 to 32 tables in your database not including any tables for addons. If you only have 11 something has happened to your database. (corruption, accidental deletion, hacked, etc...) Replacing it with the latest backup will probably be your best remedy.
  3. I was wrong, your site is down I was looking at "airmaltavirtual.com" Check the database and see if the settings table has a value for the template name and it matches something in your skins folder.
  4. If you look at the existing code you are making use of you will find that it does not use any extra input and is sorting by ICAO; from OperationsData.class.php public static function getAllAirports() { $key = 'all_airports'; $all_airports = CodonCache::read($key); if ($all_airports === false) { $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'airports ORDER BY `icao` ASC'; $all_airports = DB::get_results($sql); if(!$all_airports) { $all_airports = array(); } CodonCache::write($key, $all_airports, 'long'); } return $all_airports; } You will probably have to write your own code, maybe something like; public static function getAllAirports_sorted() { $sql = 'SELECT * FROM ' . TABLE_PREFIX . 'airports ORDER BY `country` ASC'; return = DB::get_results($sql); } The only issue you will probably have is that the country field for airports is not always automatically filled using the api server so the airports with a null value in that position will end up in one group within the variable.
  5. When I have run in to that error it is usually a database issue, looks like your site is back up though now.
  6. Yes, that is another way to accomplish the function but that would bypass the use of the phpvms mail function which is tied to many other things in the system which is what I thought he was trying to achive. Guess I mis-understood.
  7. I applied some changes to the util.class.php file to achive this. In /core/classes/util.class.php line 293 should be; $mail->AddAddress($email); change this line to; if(is_array($email)) { foreach($email as $address) { $mail->AddAddress($address); } } else { $mail->AddAddress($email); } which will allow you to supply an array of emails to the function. To send an email to a singular address as normal you can continue to use something like; $email = 'email1@gmail.com'; $message = 'Your Message'; $subject = 'Email Subject'; Util::SendEmail($email, $subject, $message); but now you can also supply an array of addresses for the email to be sent to like this $email = array('email1@gmail.com', 'email2@yahoo.com', 'email3@msn.com'); $message = 'Your Message'; $subject = 'Email Subject'; Util::SendEmail($email, $subject, $message); Just remember that the changes to the util class will be overwritten in an update.
  8. Use the php round function to reduce the number of decimal places. echo round($my_variable); will give you no decimal places echo round($my_variable, 2); will give you 2 decimal places, and so on. You can also use the number format function if you want to add thousands seperators and such. http://php.net/manual/en/function.number-format.php
  9. You dont really need to do anything in that screen. When you created your app at twitter did you allow it both read and write access, I have seen some folks only allow read access which will stp the system from posting. I have attached a screenshot of the screen at twitter for your app settings. The two green squares show your access settings for your application. If they are set to read only change them to read and write then regenerate your oAuth keys to reflect the changes.
  10. I think this may be what you are looking for -> http://forum.phpvms.net/topic/5049-airline-logos-on-flights-completed-solved/page__view__findpost__p__33796
  11. I had changed some things from pulling it out of my VA and inadvertently reassigned the $data variable. Try this; // Check email for known spammer $url = 'http://www.stopforumspam.com/api?email='.$data['email'].'&ip='.$_SERVER['REMOTE_ADDR']; $file = new CodonWebService(); $contents = $file->get($url); $response = simplexml_load_string($contents); $reject = FALSE; foreach($response->appears as $row) { if($row == 'yes'){$reject = TRUE;} } if($reject == TRUE){ $this->set('message', 'Your email or IP address appears on our spam database, we therefore assume you are a spammer and are rejecting your registration request. If you feel this is incorrect please contact us.'); $this->render('core_error.tpl'); //send email that spam registration rejected $email = 'your email here'; $sub = 'Spam Registration Rejected';; $message = 'Spam pilot registration rejected using email '.$data['email'].' and IP address '.$_SERVER['REMOTE_ADDR'].' on '.date('m/d/Y', time()).' at '.date('g:ia', time()); Util::SendEmail($email, $sub, $message); return false; } //end spam check
  12. http://php.net/manual/en/function.round.php
  13. Try it like this, I adjusted the structure some so it should work on any phpvms site. // Check email for known spammer $url = 'http://www.stopforumspam.com/api?email='.$data['email'].'&ip='.$_SERVER['REMOTE_ADDR']; $file = new CodonWebService(); $contents = $file->get($url); $response = simplexml_load_string($contents); $reject = FALSE; foreach($response->appears as $data) { if($data == 'yes'){$reject = TRUE;} } if($reject == TRUE){ $this->set('message', 'Your email or IP address appears on our spam database, we therefore assume you are a spammer and are rejecting your registration request. If you feel this is incorrect please contact us.'); $this->render('core_error.tpl'); //send email that spam registration rejected $email = 'Your Email Here'; $sub = 'Spam Registration Rejected';; $message = 'Spam pilot registration rejected using email '.$data['email'].' and IP address '.$_SERVER['REMOTE_ADDR'].' on '.date('m/d/Y', time()).' at '.date('g:ia', time()); Util::SendEmail($email, $sub, $message); return false; } //end spam check
  14. It has been a while but I think this falls back to the pilot rank images and not using relative paths in the admin center. In the pilot ranks admin panel instead of /lib/images/ranks/newhire.png Use http://www.mysite.com/lib/images/ranks/newhire.png
  15. Have you changed your database tables prefix from the default "phpvms_"? I am thinking Yes. In /core/common/TopPilotData.class.php file change line 15 from query = "SELECT * FROM phpvms_pireps WHERE MONTH(submitdate) = '$month' AND YEAR(submitdate) = '$year'"; to query = "SELECT * FROM ".TABLE_PREFIX."pireps WHERE MONTH(submitdate) = '$month' AND YEAR(submitdate) = '$year'"; I have updated the code on github.
  16. Did you install the database file? If so, is there any data in it?
  17. I have added this script to my VA as well as I was getting the same problem with the roster filling up with spam accounts and have not had a real issue since. I also added a quick email function to send me an email each time a registration is rejected just to see if it was working and it is rejecting on average 10 a day from my site. No matter how detailed you get there will always be something that gets through but that is what website management is all about. The code I am using including the email function // Check email for known spammer $url = 'http://www.stopforumspam.com/api?email='.$data['email'].'&ip='.$_SERVER['REMOTE_ADDR']; $file = new CodonWebService(); $contents = $file->get($url); $response = simplexml_load_string($contents); if($response->email == 'yes' || $response->ip == 'yes'){ $this->set('message', 'Your email or IP address appears on our spam database, we therefore assume you are a spammer and are rejecting your registration request. If you feel this is incorrect please contact us.'); $this->render('core_error.tpl'); //send email that spam registration rejected $email = 'your email address'; $sub = 'Spam Registration Rejected'; $message = 'Spam pilot registration rejected using email '.$data['email'].' and IP address '.$_SERVER['REMOTE_ADDR'].' on '.date('m/d/Y', time()).' at '.date('g:ia', time()); Util::SendEmail($email, $sub, $message); return false; } //end spam check
  18. This might help you get started http://david-clark.net/phpvms-individual-aircraft-stats/
  19. Did you run the script to populate the database to start? Have you filed any PIREPS since installing the module to automatically run the script to populate the table?
  20. Did you install the sql file for the module? If so, is any of the information actually in the database, or is it empty? Do you have any PIREPS filed? Do the PIREPS filed have landing rates? This is usually caused by there being no information in the PIREP database regarding landing rates. This is not a script issue but a html/css design issue. Different browsers interpet css and html files slightly differently. Unfortunately, there is no easy solution for that. You should check the specifics of each browser that fails to display your website correctly and make the necessary adjustments to your code. This is one of the bigger hurdles for web designers. A good site to check what your site looks like on different browsers is http://browsershots.org - and also you can check your css code here at http://validator.w3....Validator%2F1.3 to get an idea of what needs to be changed. Often you must add a specific css file for IE fixes as well.
  21. I would check a number of things, In your original post of your config information there is a line missing - I am not sure if it was just omitted when you posted to the forum or if it is missing from your config; Config::Set('TWITTER_AIRLINE_ACCOUNT', 'account_name'); The complete twitter config should be, (with your specific information added) Config::Set('TWITTER_AIRLINE_ACCOUNT', ''); Config::Set('TWITTER_ENABLE_PUSH', TRUE); Config::Set('TWITTER_CONSUMER_KEY', ''); Config::Set('TWITTER_CONSUMER_SECRET', ''); Config::Set('TWITTER_OAUTH_TOKEN', ''); Config::Set('TWITTER_OAUTH_SECRET', ''); Verify that all your Twitter keys are correct. Verify that there is a line for the last Twitter update time in your phpvms_updates table. If there is not run the following in phpMyAdmin INSERT INTO `phpvms_updates` ( `id` , `name` , `lastupdate` ) VALUES ( NULL , 'TWITTER_UPDATE', '2012-05-01 07:41:36' ); Verify that you have the phpvms_activityfeed table in your database. Verify that you have the activitydata.class.php file in your core/common folder. If it is there verify that the Twitter function is in it. Around line 98 the function should start with; public static function pushToTwitter($params) {
  22. Try deleteing the module and downloading a fresh copy and reinstalling. I am not sure what you have going on.
  23. Did you install the included sql file? It sounds like there are no database tables.
  24. Your IP comes back to a shared IP for Steadfast Networks with at least 4 other sites on it, so that really is weird if you are on your own private server. If it is private you should have root access to the server, just empty the /tmp directory and that should help clean out the system so session data can be saved.
  25. Thats odd, have you downloaded the files and installed them into your system? It almost looks like you have put a link to the GitHub account in the page.
×
×
  • Create New...