Company Details
Kieran Mullin Developments Ltd
|
Address
(Reg office) |
58 Babington Lane
Derby
England
DE1 1SX |
Phone |
01332 369144 |
Fax |
01332 360612 |
Email |
kieranmullin@yahoo.co.uk |
Reg No |
3451561 |
Company Secretary |
Richard Collier
|
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
$form_block = "
";
// validate email address
function check_email_address($email) {
// check that there's one @ symbol, and that the lengths are right
if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) {
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
return false;
}
$email_array = explode("@", $email);
$local_array = explode(".", $email_array[0]);
for ($i = 0; $i < sizeof($local_array); $i++) {
if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
return false;
}
}
if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
$domain_array = explode(".", $email_array[1]);
if (sizeof($domain_array) < 2) {
return false;
}
for ($i = 0; $i < sizeof($domain_array); $i++) {
if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
return false;
}
}
}
return true;
}
if($_POST[op] != "ds") {
//show the form
echo "$form_block";
}
else if($_POST[op] == "ds") {
//check value of $_POST[name]
if( $_POST[name] == "") {
$name_err= "Please enter your name! ";
$send="no";
}
//check value of $_POST[email]
if( $_POST[email] == "") {
$email_err= "Please enter your email address! ";
$send="no";
}
//check value of $_POST[comments]
if( $_POST[comments] == "") {
$comments_err= "Please enter your comments! ";
$send="no";
}
if($send != "no") {
//build email to kmt
$todayis = date("l, F j, Y, g:i a") ;
$comments = stripcslashes($comments);
$to="kieranmullin@yahoo.co.uk";
//$to="super_mario@att.net";
$headers .= "From: feedback@KMDevs.co.uk\r\n";
$headers .= "Reply-To: $_POST[email]\r\n";
$headers .= "Bcc: webwizny@att.net\r\n";
$subject="Feedback from KMDevs.co.uk";
$msg= "$todayis\n\n";
$msg.= "Name: $_POST[name]\n";
$msg.= "Email Address: $_POST[email]\n";
$msg.= "Comments: $_POST[comments]\n\n";
$msg.= "IP Address: $ip \n";
//send the mail to kmt
mail($to, $subject, $msg, $headers);
//display confirmation to user
echo "Thank you for your feedback.
Your message was sent to KM Developments representatives. We will respond to you as soon as we can!
Thank you very much for your time! ";
//buiild email to user
$to2="$_POST[email]";
$headers2 = "From: kieranmullin@yahoo.co.uk\r\n";
$subject2="Thank you for contacting kmdevs.co.uk";
$msg2= "$todayis\n\n";
$msg2.= "Thank you for contacting KM Developments at www.kmdevs.co.uk.\n\n";
$msg2.= "Your message was sent to KM Developments representatives. We will respond to you as soon as we can!\n\n";
$msg2.= "Thank you very much for your time!\n\n";
$msg2.= "Best Regards,\n";
$msg2.= "KM Developments";
//send the mail to user
mail($to2, $subject2, $msg2, $headers2);
} else if ($send == "no") {
//print error commentss
echo "$name_err";
echo "$email_err";
echo "$comments_err";
echo "$form_block";
} //else
}
?>
|