libdir . '/recaptcha/recaptchalib.php'); $publickey = "6LcgDMMSAAAAACoPBQHdaQFjZ8SuDYK7kMNGe_eW"; // Insider Global Key //reCAPTCHA /* form has been submitted, try to create the new user account */ if (match_referer() && isset($_POST)) { $frm = $_POST; $frm = pwnHaxors($frm); //$frm = pwnHaxorsMySQL($frm); $errormsg = validate_form($frm, $errors); if (empty($errormsg)) { //insert_user($frm); //insert_feedback($frm); email_form($frm); $DOC_TITLE = " Sent Successfully"; header('location: messagesent.html'); exit; } } ?> Contact Us - Gardeners Gold.co.uk
 

Please feel free to use the form below to send us an email.

Any information you give is held in the strictest confidence and will never be sold on to third parties.

Name, email and security question fields must be filled in, everything else is optional.

templatedir/form_header.php"); ?>
name);?>>Your name
" />

Reason for contact 

Company Name
" />

Daytime telephone number
" />

email);?>>Your email address
" />

Contact address

Message

Please tick this box if you wish to join our mailing list.  →   />

reCAPTCHA);?>>For security reasons, please type the two words into the box below with a space separating them. reCAPTCHA)?>

© GardenersGold.co.uk - Website by MathewWhite.com
is_valid) { $errors->reCAPTCHA = true; $msg .= "The security words did not match. Please go back and try it again.
"; } // ---- if (empty($frm["name"])) { $errors->name = true; $msg .= "You did not specify your name
"; } if (empty($frm["email"])) { $errors->email = true; $msg .= "You did not specify your email address
"; } elseif (!check_email_address($frm["email"])) { $errors->email = true; $msg .= "You did not specify a valid email address
"; } /* if (empty($frm["message"])) { $errors->firstname = true; $msg .= "You did not write a message"; } */ return $msg; } function email_form(&$frm) { /* resets the password for the user with the username $username, and sends it * to him/her via email */ global $CFG, $ME; /* email the user with the new account information */ $var = new Object; $var->name = $frm['name']; $var->email = $frm['email']; $var->phone = $frm['phone']; $var->address = nl2br($frm['address']); $var->subject = $frm['subject']; $var->company = $frm['company']; $var->mainMessage = nl2br($frm['mainMessage']); checked( $frm['join_mailinglist']); if($frm['join_mailinglist'] == 1){ $var->join_mailinglist = "Yes"; } else { $var->join_mailinglist = "No"; } $notice_text = "This is a multi-part message in MIME format."; // Send mail to Us $plain_text = my_read_template($CFG->templatedir . "/email/email_template.php", $var); $html_text = my_read_template($CFG->templatedir . "/email/html_email_template.php", $var); $semi_rand = md5(time()); $mime_boundary = "==MULTIPART_BOUNDARY_$semi_rand"; $mime_boundary_header = chr(34) . $mime_boundary . chr(34); //the person it goes to $to = "\"Niels Olesen\" "; $bcc = "\"Mathew White\" "; //$bcc = "You , Them "; //$from = "$var->name <$var->email>"; $from = "\"". unhtmlspecialchars($var->name) . "\" <$var->email>"; $subject = "Message via Website from " . unhtmlspecialchars($var->name) . ", $var->subject"; /* -- setup mime -- */ $body = "$notice_text --$mime_boundary Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit $plain_text --$mime_boundary Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit $html_text --$mime_boundary--"; /* -- end mime ------- */ mail($to, $subject, $body, "From: " . $from . "\n" . "bcc: " . $bcc . "\n" . "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative;\n" . " boundary=" . $mime_boundary_header); //send mail to them $plain_text = my_read_template($CFG->templatedir . "/email/email_template_autoresponse.php", $var); $html_text = my_read_template($CFG->templatedir . "/email/html_email_template_autoresponse.php", $var); $semi_rand = md5(time()); $mime_boundary = "==MULTIPART_BOUNDARY_$semi_rand"; $mime_boundary_header = chr(34) . $mime_boundary . chr(34); //$to = "Mathew White "; //$bcc = ""; //It goes to the person sending the form //$to = html_entity_decode($var->name) . " <" . html_entity_decode($var->email) . ">"; $to = "\"" . unhtmlspecialchars($var->name) . "\" <" . unhtmlspecialchars($var->email) . ">"; $bcc = ""; $from = "\"GardenersGold.co.uk Enquiries\" "; $subject = "Thankyou for your interest, " . unhtmlspecialchars($var->name); /* -- setup mime -- */ $body = "$notice_text --$mime_boundary Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit $plain_text --$mime_boundary Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit $html_text --$mime_boundary--"; /* -- end mime ------- */ mail($to, $subject, $body, "From: " . $from . "\n" . "bcc: " . $bcc . "\n" . "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative;\n" . " boundary=" . $mime_boundary_header); } function pwnHaxors(&$frm){ foreach($frm as $key => $val) { if(is_array($val)){ pwnHaxors($val); } else { $frm[$key] = stripslashes( strip_tags( htmlspecialchars($val,ENT_QUOTES) ) ); //echo $frm[$key] . "
"; } } return $frm; } function my_read_template($filename, &$var) { // Gets file into buffer . ob_start(); include($filename); $content = ob_get_contents(); ob_end_clean(); return $content; } function pwnHaxorsMySQL(&$frm){ foreach($frm as $key => $val) { if(is_array($val)){ pwnHaxorsMySQL($val); } else { //$frm[$key] = mysql_real_escape_string($frm[$key]); more secure $frm[$key] = mysql_escape_string($frm[$key]); //less secure //echo $frm[$key] . "
"; } } return $frm; } function unhtmlspecialchars( $string ){ $string = str_replace ( '&', '&', $string ); $string = str_replace ( ''', '\'', $string ); $string = str_replace ( '"', '\'', $string ); $string = str_replace ( '<', '[', $string ); $string = str_replace ( '>', ']', $string ); return $string; } ?> dirroot . '/counter/inline-count.php'); ?>