/
home
/
shalala
/
buyonegetonefritz.com
/
Upload File
HOME
<?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "website@buyonegetonefritz.com"; $email_subject = "[i want to hire you]"; function died($error) { // your error code can go here echo "<HTML> <HEAD> <TITLE>Errors</TITLE> <META HTTP-EQUIV='refresh' CONTENT='5;URL=http://www.buyonegetonefritz.com'> <style type='text/css'> <!-- body { background-color: #232323; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(wp-content/themes/eng/images/oops.gif); background-repeat: no-repeat; background-position:center top; } body,td,th { font-family: Georgia, Times New Roman, Times, serif; font-size: 14px; color: #FFF; } #valeu { width: 800px; margin: auto; } #seliga { padding: 120px 0 0 40px; float: left; width: 450px; } a:link { color: e5ded6; text-decoration: none; } a:visited { text-decoration: none; color: e5ded6; } a:hover { text-decoration: none; color: e9e7e3; } a:active { text-decoration: none; color: e5ded6; } --> </style><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></HEAD> <body> <div id='valeu'> <div id='seliga'> "; echo $error."<br /><br />"; echo "In 5 seconds you'll be redirected and maybe, try again.<br /><br />"; echo "</div> </div> </body> </html>"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['email']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form your submitted.'); } $first_name = $_POST['first_name']; // required $email_from = $_POST['email']; // required $comments = $_POST['comments']; // required $error_message = ""; $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$"; if(!eregi($email_exp,$email_from)) { $error_message .= 'Your email does not appear to be valid. I need to be able to contact you :)<br /><br />'; } $string_exp = "^[a-z .'-]+$"; if(!eregi($string_exp,$first_name)) { $error_message .= 'Your name does not appear to be valid - funny but true.<br /><br />'; } if(strlen($comments) < 2) { $error_message .= 'The message you entered do not appear to be valid. Write something... anything, ok?<br /><br />'; } if(strlen($error_message) > 0) { died($error_message); } function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($first_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> <HTML> <HEAD> <TITLE>Thank You</TITLE> <META HTTP-EQUIV="refresh" CONTENT="10;URL=http://www.buyonegetonefritz.com"> <style type="text/css"> <!-- body { background-color: #232323; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(wp-content/themes/eng/images/thankyou.gif); background-repeat: no-repeat; background-position:center top; } body,td,th { font-family: Georgia, Times New Roman, Times, serif; font-size: 14px; color: #FFF; } #valeu { width: 800px; margin: auto; } #seliga { padding: 120px 0 0 40px; float: left; width: 450px; } a:link { color: e5ded6; text-decoration: none; } a:visited { text-decoration: none; color: e5ded6; } a:hover { text-decoration: none; color: e9e7e3; } a:active { text-decoration: none; color: e5ded6; } --> </style><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> <body> <div id="valeu"> <div id="seliga"> Thank you for your contact,<br> I really appreciate it. <br><br> I'm redirecting you back<br> to my website in 10 seconds. <br><br> If you aren't forwarded, please <a href="http://www.buyonegetonefritz.com">click here</a>.<br> </div> </div> </body> </html> <? } ?>