LeConte-Woodmanston Foundation Contact Form
Contact us by submitting the form below or you can send us a letter or even telephone us.
Fields marked with * are required.
What is your contact preference
';
$arr = array('Email','Phone');
for($i = 0; $i < count($arr); $i++) {
$selected = ($arr[$i] == $contactby) ? 'checked="checked"' : '';
echo '
';
}
echo '
'; } function formatPhone($phone = '', $convert = false, $trim = true) { // If we have not entered a phone number just return empty if (empty($phone)) { return ''; } // Strip out any extra characters that we do not need only keep letters and numbers $phone = preg_replace("/[^0-9A-Za-z]/", "", $phone); // Do we want to convert phone numbers with letters to their number equivalent? // Samples are: 1-800-TERMINIX, 1-800-FLOWERS, 1-800-Petmeds if ($convert == true) { $replace = array('2'=>array('a','b','c'), '3'=>array('d','e','f'), '4'=>array('g','h','i'), '5'=>array('j','k','l'), '6'=>array('m','n','o'), '7'=>array('p','q','r','s'), '8'=>array('t','u','v'), '9'=>array('w','x','y','z')); // Replace each letter with a number // Notice this is case insensitive with the str_ireplace instead of str_replace foreach($replace as $digit=>$letters) { $phone = str_ireplace($letters, $digit, $phone); } } // If we have a number longer than 11 digits cut the string down to only 11 // This is also only ran if we want to limit only to 11 characters if ($trim == true && strlen($phone)>11) { $phone = substr($phone, 0, 11); } // Perform phone number formatting here if (strlen($phone) == 7) { return preg_replace("/([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/", "$1-$2", $phone); } elseif (strlen($phone) == 10) { return preg_replace("/([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/", "($1) $2-$3", $phone); } elseif (strlen($phone) == 11) { return preg_replace("/([0-9a-zA-Z]{1})([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/", "$1($2) $3-$4", $phone); } // Return original phone if not 7, 10 or 11 digits long return $phone; } //No bot hijaak if(isset($_POST['submit']) && empty($_POST[$cfrecipient]) && empty($_POST[$cfredirect])) { $cfat = "@"; $cfhy = "-"; $cfdom = ".org"; $cftitle1 = "leconte"; $cftitle2 = "woodman"; $cftitle3 = "ston"; $cftitle4 = "foundation"; $mailFrom = $cftitle1.$cfhy.$cftitle2.$cftitle3.$cfdom; // The address that will receive form submissions $mailSubject = "Contact Us Form"; // Whatever you want $phone = formatPhone($_POST['phone'],true); if(get_magic_quotes_gpc()){ $name = Trim(stripslashes($_POST['cfname'])); $email = Trim(stripslashes($_POST['cfemail'])); $message = Trim(stripslashes($_POST['cfmessage'])); $reason = Trim(stripslashes($_POST['reason'])); $contactby = Trim(stripslashes($_POST['contactby'])); $required = Trim(stripslashes($_POST['required'])); } else { $name = Trim($_POST['cfname']); $email = Trim($_POST['cfemail']); $message = Trim($_POST['cfmessage']); $reason = Trim($_POST['reason']); $contactby = Trim($_POST['contactby']); $required = Trim($_POST['required']); } if(empty($name) || empty($email) || empty($message )) { $warning = true; $err = 'Required fields are missing'; } // A simple yet reasonably effective email address validator. if(!$warning) { if ((!ereg(".+\@.+\..+", $email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $email))) { $warning = true; $err = 'Invalid email'; } } // If there are errors redisplay with error if($warning) { echo "
$err
"; form_display($name,$email,$phone,$reason,$contactby,$message); } else { switch($reason){ case "General Information": //info $cfnom="info"; break; case "Donation": //info $cfnom="info"; break; case "Membership": //info $cfnom="info"; break; case "Volunteer": //volunteer $cfnom="volunteer"; break; case "Programs": //programs $cfnom="programs"; break; case "Education Outreach": //Education Outreach $cfnom="programs"; break; default: $cfnom="webmaster"; break; } $dest = $cfnom.$cfat.$cftitle1.$cfhy.$cftitle2.$cftitle3.$cfdom; // include the time/date useful for record-keeping. putenv("TZ=US/Eastern"); $now = date("F j, Y, g:i a"); // prepare email body text $content = ""; $content .= "Name: "; $content .= $name; $content .= "\n"; $content .= "Email: "; $content .= $email; $content .= "\n"; $content .= "Telephone: "; $content .= $phone; $content .= "\n"; $content .= "Contact preference: "; $content .= $contactby; $content .= "\n"; $content .= "Reason for contact: "; $content .= $reason; $content .= "\n"; $content .= "Message: "; $content .= $message; $content .= "\n"; $content .= "Date sent: "; $content .= $now; $content .= "\n"; require_once("Mail.php"); $headers["From"] = $mailFrom; $headers["To"] = $dest; $headers["Subject"] = $mailSubject; $mail_object =& Mail::factory("mail"); $send = $mail_object->send($dest, $headers, $content); if (PEAR::isError($send)) { $senderr = $send->getMessage(); echo "$senderr
"; } else { echo "Your message has been sent. Thank You"; } form_display(); } } else { form_display(); } ?>
- Mailing address:
- LeConte-Woodmanston Foundation
- P.O. Box 179
- Midway, GA 31320
- USA
- Physical address:
- LeConte-Woodmanston Plantation and Botanical Gardens
- 4918 Barrington Ferry Road
- Riceboro, Georgia 31323
- Telephone:
- (912) 884-6500
- Privacy policy:
- Any and all personal details collected via this site, including email addresses and telephone numbers, will only be used for the purpose of getting in touch with you as appropriate. Under no circumstances will any details be passed on to third-party organizations.