Viewing file: contact.php (3.71 KB) -rwxrwxr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include('ax5.inc'); require_once ("recaptchalib.php"); // get a key at http://mailhide.recaptcha.net/apikey $publickey = '6LfTa7oSAAAAAJPCOWyC6gAGjhq0u7QMBZY-ElpO'; $privatekey = '6LfTa7oSAAAAAE0Ye4UsbBK83TDfgpTmYijJKf0w'; disp_preamble('Ax Forum','Contact Us'); echo "<script type=\"text/javascript\" src=\"js/contact.js?v1\"></script>\n"; if ( $_REQUEST['action'] == "Send E-mail" ) { $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
if (!$resp->is_valid) { die ("<div id=\"contactResult\"><h2>The reCAPTCHA wasn't entered correctly.</h2><p>Click back in your browser and try it again.</p></div>"); } $mailstring = "-----------------------------------\n". "Email: ".$_POST['email']."\n". "Username: ".$_POST['ax_name']."\n". "Name: ".$_POST['real_name']."\n". "IP address: ".$_SERVER['REMOTE_ADDR']."\n". "-----------------------------------\n". "message: ".$_POST['note']."\n". "-----------------------------------\n"; mail('axteam@axkickboxing.com','Ax Contact Form: '.trim($ax_name)." | ".trim($real_name),$mailstring,"From: ".trim($_POST['email']) ); echo "<div id=\"contactResult\"><h2>Your Message has been sent to the Ax Team.</h2><p>We will contact you shortly.</p></div>"; } else { ?>
<div id="contact"> <form id="contactForm" action="<? echo $PHP_SELF; ?>" method="post"> <!-- used to protect against spam bots --> <input type="hidden" name="name" value="" /> <input type="text" name="email_address" value="" style="display: none;" /> <!-- used to protect against spam bots --> <ul> <li> <label for="ax_name">Ax UserName</label> <input type="text" name="ax_name" id="ax_name" value="<? echo $_COOKIE['name']; ?>" /> </li> <li> <label for="real_name">Real Name</label> <input type="text" name="real_name" id="real_name" /> </li> <!-- <li> <label for="phone">Phone</label> <input type="text" name="phone" id="phone" /> </li> --> <li> <label for="email">E-mail</label> <input type="text" name="email" id="email" /> </li> </ul> <ul> <li> <label for="note">Message:</label>
<textarea name="note" id="note" rows="10" cols="12"></textarea> </li> </ul> <div id="captcha"> <?php echo recaptcha_get_html($publickey); ?> </div> <div id="submitButton"><input id="getStartedSubmit" name="action" type="submit" value="Send E-mail" /></div> </form> </div>
<? } disp_tail(); ?>
|