assign("mailsend",""); $publickey = "6LfHQNoSAAAAAIRyJnVnZiJMluvNjpc6A2FnHYkY"; $privatekey ="6LfHQNoSAAAAACPAWMZccuBr8O14VMHZfSzWs437"; $captchahtml = recaptcha_get_html($publickey); if(sizeof($_POST)>0) { if(isset($_POST["recaptcha_challenge_field"])) { $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $smarty->assign("ErrorCapcha", "Bad Capcha"); } else { $to = 'info@wsdata.com'; $subject = "WSChanges : contact (".$lng.")"; $message = 'Name : '.$_POST["contact-name"]."\r\n"; $message .= 'Email : '.$_POST["contact-email"]."\r\n"; $message .= 'Domaine : '.$_POST["contact-domain"]."\r\n"; $message .= 'Comment : '.$_POST["contact-comment"]."\r\n"; $message .= 'IP : '.$_SERVER["REMOTE_ADDR"]."\r\n"; $headers = 'From: '.$_POST["contact-email"]. "\r\n" . 'Reply-To: '.$_POST["contact-email"]. "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers) or die("Erreur envois"); $smarty->assign("mailsend",true); } } } $smarty->assign("adult",false); $smarty->assign("sitelng",$lng); $smarty->assign("Captcha", $captchahtml); $smarty->assign("SiteHost",GetHost()); $smarty->assign("pge","contact"); $smarty->assign("pgeurl", $_SERVER["REQUEST_URI"]); $smarty->display("templates/gen/contact.tpl"); ?>