Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mark1million

  1. Also all of the pirep counts (flights) have been reset to 0 for every pilot.
  2. Nabeel, I noticed after an update the total hours are reporting wrong, I have reset from the maintenance script and, Now counting from PIREPS Found 838:59:59 total hours, updated From VA Central, 17212.1 hours. Also the pilot count is not increasing in VA Central.
  3. I had this , i changed some code and its was getting as far as the send mail, basically i broke it, just recheck your code.
  4. /core/common OFC Charts data class I will get overwritten if you update but just change it and copy it, call it backup so when you do update you can compare differences if any and restore back.
  5. since i have applied this update im no longer sending pilot numbers to vacentral neither is the news feed working
  6. To be honest i would use jquery to load all those images as it does take a bit of time to load that page, either that or reduce the amount of images on initial load, delay loading.
  7. If i remember right its in the core -> Common-> RegistrationData.class
  8. Have a look in the sql statement and change that.
  9. To be honest i have never tried that function, I use Dave's (SimPilot) mail system, notam to all pilots.
  10. I remember when i first started i was all bothered about the sequence of id's trust me dont worry about it you will spend your days re jigging your database then all of a sudden you break it.
  11. Ha thought you were talking to me there Was just about to launch a barrel of sh*t your way Thats what happens when people cant be bothered to learn, they steal your knowledge, or should i say borrow it (note to self, don't read this forum when you have had a few to drink lol.....)
  12. This is what i use minus the addresses, contact_form.tpl <h3>Contact Us</h3> <form method="post" action="<?php echo url('/contact'); ?>"> <table width='100%' border='0'> <tr> <td><strong>Name:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->firstname .' '.Auth::$userinfo->lastname.'" />'; } else { ?> <input type="text" name="name" value="" /> <?php } ?> </td> </tr> <tr> <td width="1%" nowrap><strong>E-Mail Address:</strong></td> <td> <?php if(Auth::LoggedIn()) { echo Auth::$userinfo->email; echo '<input type="hidden" name="name" value="'.Auth::$userinfo->email.'" />'; } else { ?> <input type="text" name="email" value="" /> <?php } ?> </td> </tr> <tr> <td><strong>Subject: </strong></td> <td><input type="text" name="subject" value="<?php echo $_POST['subject'];?>" /></td> <td></td> </tr> <td><strong>To whom:</strong></td> <td><select name="recipient"> <option value="emailaddresses_here" selected="selected">Name to Here</option> <option value="emailaddresses_here" selected="selected">Name to Here</option> <option value="emailaddresses_here" selected="selected">Name to Here</option> <option value="emailaddresses_here" selected="selected">Name to Here</option> </select> </td> <tr> <td><strong>Message:</strong></td> <td> <textarea name="message" cols='45' rows='5'><?php echo $_POST['message'];?></textarea> </td> </tr> <tr> <td width="1%" nowrap><strong>Captcha</strong></td> <td> <script type="text/javascript"> var RecaptchaOptions = { theme : 'white' }; </script> <?php echo recaptcha_get_html(Config::Get('RECAPTCHA_PUBLIC_KEY'), $captcha_error); ?> </td> </tr> <tr> <td> <input type="hidden" name="loggedin" value="<?php echo (Auth::LoggedIn())?'true':'false'?> Pilot ID = <?php echo Auth::PilotID(); ?>" /> </td> <td> <input type="hidden" name="ip" value="<?php echo $_SERVER['REMOTE_ADDR'] ?>"> <input type="submit" name="submit" value='Send Message'> </td> </tr> </table> </form></div> </div> </div> Contact.php <?php /** * phpVMS - Virtual Airline Administration Software * Copyright (c) 2008 Nabeel Shahzad * For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * * @author Nabeel Shahzad * @copyright Copyright (c) 2008, Nabeel Shahzad * @link http://www.phpvms.net * @license http://creativecommons.org/licenses/by-nc-sa/3.0/ */ class Contact extends CodonModule { public function index() { require_once CORE_LIB_PATH.'/recaptcha/recaptchalib.php'; if($this->post->submit) { if(Auth::LoggedIn() == false) { # Make sure they entered an email address if(trim($this->post->name) == '' || trim($this->post->email) == '') { $this->set('message', 'You must enter a name and email!'); $this->render('core_error.tpl'); return; } } $resp = recaptcha_check_answer (Config::Get('RECAPTCHA_PRIVATE_KEY'), $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); // Check the captcha thingy if(!$resp->is_valid) { $this->set('captcha_error', $resp->error); $this->set('message', 'You failed the captcha test!'); $this->render('contact_form.tpl'); return; } if($this->post->subject == '' || trim($this->post->message) == '') { $this->set('message', 'You must enter a subject and message!'); $this->render('core_error.tpl'); return; } $subject = 'New message from '.$this->post->name.' - "'.$this->post->subject.'"'; $message = DB::escape($this->post->message) . PHP_EOL . PHP_EOL; unset($_POST['recaptcha_challenge_field']); unset($_POST['recaptcha_response_field']); foreach($_POST as $field=>$value) { $message.="-$field = $value".PHP_EOL; } $message = nl2br($message); $message = utf8_encode($message); Util::SendEmail($this->post->recipient, $subject, $message); $this->render('contact_sent.tpl'); return; } # Just a simple addition $rand1 = rand(1, 10); $rand2 = rand(1, 10); $this->set('rand1', $rand1); $this->set('rand2', $rand2); $tot = $rand1 + $rand2; //echo "total: $tot <br />"; SessionManager::Set('captcha_sum', $tot); //echo 'output of $_SESSION: <br />'; //print_r($_SESSION); $this->render('contact_form.tpl'); } }
  13. I dont have the time to look in to this fully but have a look at the way phpvms registers users that will give you some ideas. Have you tried importing one user and assigning the user group and seeing what happens? If that works you can do it that way. How many pilots are you wanting to import?
  14. Don't matter, im getting stupid in my old age lol..... Found it where the rest are
  15. HI, How can i add the order by name asc, I cant find the sql query for this, can someone point me in the right direction Cheers. <?php /** * Award Table v1.0b * By Dimitris 4463 * greeceairwaysva.com/fss * Dimitris4463 on phpVMS forums */ class Awards extends CodonModule { public function index() { $this->set('awards', AwardsData::GetAllAwards()); $this->render('awards_allawards.tpl'); } } ?>
  16. That is not the default contact tpl, have a search here there is the code for what you want to achieve.
  17. Clearing the cache will work temporarily, just update the cache folder with full 777 permission,
  18. Ok so looking at this you could adapt this for every awards you just need to create a module to search the sql
  19. Looking this morning maybe you would be better creating a module that uses the existing registration system and creating a button that will post variables to the new system from the old, that way you can be sure that pilots would be created correctly in phpvms.
  20. Jeff you beat me to it lol need some sleep
  21. Search and yee shall find Found it sorry for the post......
  22. Hey guys im sure i have seen this about somewhere, im looking for an awards module that will display all the awards that the VA has, its getting a bit laborious adding then twice to the display page as well.
×
×
  • Create New...