Jump to content

Tylor Eddy

Members
  • Posts

    275
  • Joined

  • Last visited

Everything posted by Tylor Eddy

  1. I've made a break through with the code, if all goes to plan, i'll share what i did sometime tomorrow i have a fully functional form, but i cannot for the life of me get the captcha to work, you dont even have to fill it in and the form will still send :S
  2. G'day Mattia, Just tried you code, it's using a mail application to send the form, and that's not what i want it to do, i'd prefer it to just send it out after its filled out with the information
  3. aha, i get you now, ill let you know how i go, when i have a go later this afternoon.
  4. G'day Mattia, Not sure how you are calling this on your website, is it a module ?
  5. How did you call the fields, that's where i'm having the trouble. I'd be happy to see how you've done it, especially if its easier haha
  6. I looked into using one off the internet, I ran into trouble when it came to integrating it as a module. I've already created the forms, customised from the contact.tpl form, all that i need now is to customise the .php backend to send out the email with the new fields
  7. I want to be able to use seperate forms for different area's within my site, that relay different information to various people in my management team, that's why i would like to have these two different forms.
  8. To make it a bit easier for myself, i am intending on editing a duplicate of the contact for, sending of the form data to my support staff once its filled out. It's basic, but will do the job sufficiently
  9. G'day Guys, I am attempting to create 2 duplicates of the Contact form, and its php file, to create a training request form, and also a management positions application. I am able to create the forms, they are the easy bit. What i'm stuck on is editing the contact.php (now training.php for the new module) to show the different fields in the form, and also display it differently in the email sent out after the form is completed. This is what i have so far, to help explain what i wish to change. <?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 Training 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('training_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('training_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('training_form.tpl'); } } Near the center it says to display -$fields I would like to change these fields so it displays different names for what is being presented, instead of subject & message in the email sent out. As it will confuse the staff member who gets the email Also how can i call an extra field ? Hopefully i've made sense here with what i've said haha Cheers Tylor Currently the email looks like this: 12:30 -name = Tylor Eddy -email = email here -recipient = recipient email -subject = 28.7.11 -message = 12:30 -loggedin = true -submit = Send Message i would like to change the fields to say 12:30 -name = Tylor Eddy -email = email here -recipient = recipient email -Date = 28.7.11 -Time = 12:30 -loggedin = true -submit = Send Message and also get rid of the 12:30 displaying above the email
  10. I was actually also considering this, but as a ticketing system for practical lessons, giving pilots the ability to book an instructor for a lesson, not using software package though
  11. No worries, im facing a new issue now, that's affecting flights within the site. I recieved emails stating that pireps were filed, but a member stated that it wouldnt go through to the airline, he also attempted a manual submission, but that wouldnt work either ?
  12. G'day Guys, I've got some interesting issues with the BETA version whilst trying to install, firstly after going to update.php, i got that a table was missing, so i re-ran it and all seems fine now, but my pireps are missing now, i have taken backups, but they still seem to be in the database, but are not displaying on my CG map, or with pilots profiles Also after checking checkinstall.php i have these errors [Checksum failed] /install/dbtest.php did not match, possibly corrupt or out of date [Checksum failed] /install/fixtures/install.sql did not match, possibly corrupt or out of date [Checksum failed] /core/common/ActivityData.class.php did not match, possibly corrupt or out of date [Checksum failed] /core/templates/activity_list.tpl did not match, possibly corrupt or out of date [Checksum failed] /core/templates/pireps_airportdropdown.tpl did not match, possibly corrupt or out of date [Checksum failed] /core/modules/kACARS_Free/kACARS_Free.php did not match, possibly corrupt or out of date Ok i see what it has done, all the data is still displaying, but all the recent pireps are gone, and my map located on my homepage has no data to display. Im just not sure of the errors above now.
  13. Thanks for the link, ill look into updating soon, and yes, my menu turned out great, im really happy with the outcome, was a big learning curve for me too
  14. I am still running 934 stable, am i better off just moving onto the beta ? If you recon its better to move on, where is it located?, can't seem to find it anywhere, or was it only given out to a select few ? Thanks
  15. G'day Simpilot, I have come back to this module in an attempt to try and get it working within my site, everytime i attempt a search, i recieve this error: Warning: Invalid argument supplied for foreach() in /home/qantasvi/public_html/lib/skins/brilliancev1/schedule_results.tpl on line 58 I have also noticed that no aircraft display under the aircraft list If you can give me some advice in fixing this up, that would be greatly appreciated, as it's driving my head in haha Cheers Tylor
  16. Ok, thanks to Stuart in another post, i have got the minimum rank working, now how should i go about displaying the airline and aircraft flies for?, i intend on displaying a small image of the airline's logo within my fleet table, to get a bitter picture of what i mean, my fleet table can be found here: http://qantasvirtual.com/index.php/fleet How i attempted to unsuccessfully do this can be seen in the first post help with this would be great, as it's got me stumped
  17. This sounds like a great addition to any VA, if you still need beta testers, i am more than willing to give you a hand
  18. Thanks very much for this Stuart, works wonderfully +1 rep for your great help
  19. G'day Simpilot, I have an idea for you, i would really like to know how i can add the documentation required for my exams into the examcenter module, on the pilot's side, i would like to have the exam description as a link to the pilot resource, but i'm not sure how i could code that, possibly with exam id's or something ? Thanks Tylor
  20. Thanks for having a look at it, very much appreciated
  21. I would also like to implement this feature too, if anyone can help
  22. G'day Mark, Thanks for your reply I have had a look around on google for some javascript validation code, what has me stumped is how to implement it into the custom fields, is it possible to add to the errors given that come with the site, like the one given if you don't enter anything in the other fields such as first name for example ? are the errors sourced from a file within the site ?
  23. Ok to get the menu to span across as far as you like, you need to add this to div#menu ul { width: 100%; or in the case of the brilliance skin, use 880px, instead of 100%
  24. G'day Selwyn Would you be able to explain what you did ? I have this long list of downloads, having a dropdown to display one category at a time would be great, is that what you did ? Cheers Tylor
×
×
  • Create New...