Please enter your name.
";
}
if(!$landlordaddress) {
$fehler['landlordaddress'] = 'Please enter your address.
';
}
if(!$propertyaddress) {
$fehler['propertyaddress'] = 'Please enter the property address.
';
}
if (!preg_match("/^[0-9a-zA-ZÄÜÖ_.-]+@[0-9a-z.-]+\.[a-z]{2,6}$/", $email)) {
$fehler['email'] = "Please enter a e-mail-address.\n
";
}
if (!$mobilenumber) {
$fehler['mobilenumber'] = "Please enter a e-mail-address.\n
";
}
if (!$landlinenumber) {
$fehler['landlinenumber'] = "Please enter a e-mail-address.\n
";
}
if(!$propertydescription) {
$fehler['propertydescription'] = 'Please enter a message.
';
}
if($sicherheits_eingabe != $_SESSION['captcha_spam']){
unset($_SESSION['captcha_spam']);
$fehler['captcha'] = "You entered a wrong code.
";
}
if (!isset($fehler) || count($fehler) == 0) {
$error = false;
$errorMessage = '';
$uploadErrors = array();
$uploadedFiles = array();
$totalUploadSize = 0;
if ($cfg['UPLOAD_ACTIVE'] && in_array($_SERVER['REMOTE_ADDR'], $cfg['BLACKLIST_IP']) === true) {
$error = true;
$fehler['upload'] = 'You have no authorization to upload files.
';
}
if (!$error) {
for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {
if ($_FILES['f']['error'][$i] == UPLOAD_ERR_NO_FILE) {
continue;
}
$extension = explode('.', $_FILES['f']['name'][$i]);
$extension = strtolower($extension[count($extension)-1]);
$totalUploadSize += $_FILES['f']['size'][$i];
if ($_FILES['f']['error'][$i] != UPLOAD_ERR_OK) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
switch ($_FILES['f']['error'][$i]) {
case UPLOAD_ERR_INI_SIZE :
$uploadErrors[$j]['error'] = 'the file is too big (PHP-Ini directive).';
break;
case UPLOAD_ERR_FORM_SIZE :
$uploadErrors[$j]['error'] = 'the file is too big (MAX_FILE_SIZE in HTML-Formular).';
break;
case UPLOAD_ERR_PARTIAL :
if ($cfg['UPLOAD_ACTIVE']) {
$uploadErrors[$j]['error'] = 'the file has been uploaded partially.';
} else {
$uploadErrors[$j]['error'] = 'the file has been sent partially.';
}
break;
case UPLOAD_ERR_NO_TMP_DIR :
$uploadErrors[$j]['error'] = 'No temporarily folder has been found.';
break;
case UPLOAD_ERR_CANT_WRITE :
$uploadErrors[$j]['error'] = 'error during saving the file.';
break;
case UPLOAD_ERR_EXTENSION :
$uploadErrors[$j]['error'] = 'unknown error due to an extension.';
break;
default :
if ($cfg['UPLOAD_ACTIVE']) {
$uploadErrors[$j]['error'] = 'unknown error on uploading.';
} else {
$uploadErrors[$j]['error'] = 'unknown error on sending the email attachments.';
}
}
$j++;
$error = true;
}
else if ($totalUploadSize > $cfg['MAX_ATTACHMENT_SIZE']*1024) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
$uploadErrors[$j]['error'] = 'maximum upload reached ('.$cfg['MAX_ATTACHMENT_SIZE'].' KB).';
$j++;
$error = true;
}
else if ($_FILES['f']['size'][$i] > $cfg['MAX_FILE_SIZE']*1024) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
$uploadErrors[$j]['error'] = 'The file is too big (max. '.$cfg['MAX_FILE_SIZE'].' KB).';
$j++;
$error = true;
}
else if (!empty($cfg['BLACKLIST_EXT']) && strpos($cfg['BLACKLIST_EXT'], $extension) !== false) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
$uploadErrors[$j]['error'] = 'the file extension is not permitted.';
$j++;
$error = true;
}
else if (preg_match("=^[\\:*?<>|/]+$=", $_FILES['f']['name'][$i])) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
$uploadErrors[$j]['error'] = 'invalid symbols in the file name (\/:*?<>|).';
$j++;
$error = true;
}
else if ($cfg['UPLOAD_ACTIVE'] && file_exists($cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i])) {
$uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];
$uploadErrors[$j]['error'] = 'the file already exist.';
$j++;
$error = true;
}
else {
if ($cfg['UPLOAD_ACTIVE']) {
move_uploaded_file($_FILES['f']['tmp_name'][$i], $cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i]);
}
$uploadedFiles[] = $_FILES['f']['name'][$i];
}
}
}
if ($error) {
$errorMessage = 'following errors occured when sending the contact formular:'."\n";
if (count($uploadErrors) > 0) {
foreach ($uploadErrors as $err) {
$tmp .= ''.$err['name']."
\n- ".$err['error']."
\n";
}
$tmp = "
\n".$tmp;
}
$errorMessage .= $tmp.'';
$fehler['upload'] = $errorMessage;
}
}
// if no error, an email will be sent
if (!isset($fehler))
{
// header of the email
$recipient = "lettings@angelpropertymanagement.co.uk"; // please enter your email address here. ( between double quote )
$subject = "".$_POST["subject"]."";
$mailheaders = "From: \"".stripslashes($_POST["name"])."\" <".$_POST["email"].">\n";
$mailheaders .= "Reply-To: <".$_POST["email"].">\n";
$mailheaders .= "X-Mailer: PHP/" . phpversion() . "\n";
// display of the email
$msg = "The followig has been sent on ". $date ." by the formular:\n" . "-------------------------------------------------------------------------\n\n";
$msg .= "Name: " . $name . "\n";
$msg .= "E-Mail: " . $email . "\n";
$msg .= "Mobile Number: " . $mobilenumber . "\n";
$msg .= "Tel Number: " . $landlinenumber . "\n";
$msg .= "Landlord Address: " . $landlordaddress . "\n";
$msg .= "Property Address: " . $propertyaddress . "\n";
$msg .= "Rent Required: " . $rentrequired . "\n";
$msg .= "Property Description:\n" . $_POST['propertydescription'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['propertydescription']) . "\n";
$msg .= "Furnished?: " . $furnishedunfurnished . "\n";
$msg .= "Pets?: " . $petsallowed . "\n";
$msg .= "Children?: " . $childrenallowed . "\n";
$msg .= "Smokers?: " . $smokersallowed . "\n";
$msg .= "DSS?: " . $dssallowed . "\n";
$msg .= "Further Information: " . $furtherinformation . "\n";
"-------------------------------------------------------------------------\n\n";
if (count($uploadedFiles) > 0) {
if ($cfg['UPLOAD_ACTIVE']) {
$msg .= 'The following files have been uploaded:'."\n";
foreach ($uploadedFiles as $file) {
$msg .= ' - '.$cfg['DOWNLOAD_URL'].'/'.$cfg['UPLOAD_FOLDER'].'/'.$file."\n";
}
} else {
$msg .= 'The following files have been attached:'."\n";
foreach ($uploadedFiles as $file) {
$msg .= ' - '.$file."\n";
}
}
}
$msg .= "\n\nIP address: " . $ip . "\n";
$msg .= "Host: " . $host . "\n";
$msg .= "Browser and operating system: " . $UserAgent . "\n";
// Arrange the email attachments
// is only necessary if no upload is desired
if (!$cfg['UPLOAD_ACTIVE'] && count($uploadedFiles) > 0) {
$attachments = array();
for ($i = 0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {
if ($_FILES['f']['name'][$i] == UPLOAD_ERR_NO_FILE) {
continue;
}
$attachments[] = $_FILES['f']['tmp_name'][$i];
}
$boundary = md5(uniqid(rand(), true));
$mailheaders .= "MIME-Version: 1.0\n";
$mailheaders .= "Content-Transfer-Encoding: 8bit\n";
$mailheaders .= "Content-Type: multipart/mixed;\n\tboundary=\"".$boundary."\"\n";
$mailheaders .= "\n--".$boundary."\n";
$mailheaders .= "Content-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n";
$mailheaders .= "Content-Transfer-Encoding: 8bit\n";
for ($i = 0; $i < count($uploadedFiles); $i++) {
$file = fopen($attachments[$i],"r");
$content = fread($file,filesize($attachments[$i]));
fclose($file);
$encodedfile = chunk_split(base64_encode($content));
$msg .= "\n\n--".$boundary."\n";
$msg .= "Content-Type: application/octet-stream;\n\tname=\"".$uploadedFiles[$i]."\"\n";
$msg .= "Content-Transfer-Encoding: base64\n";
$msg .= "Content-Disposition: attachment;\n\tfilename=\"".$uploadedFiles[$i]."\"\n\n";
$msg .= $encodedfile."\n\n";
}
$msg .= "\n\n--".$boundary."--";
}
$msg = strip_tags ($msg);
// Thank you E-Mail
$dsubject = "Your request"; // Subject of the message
$dmailheaders = "From: <".$recipient.">\n";
$dmailheaders .= "Reply-To: <".$recipient.">\n";
$dmsg = "Thank you very much for your e-mail. We will reply as fast as we can.\n\n";
$dmsg .= "Summary: \n" .
"-------------------------------------------------------------------------\n\n";
$dmsg .= "Name: " . $name . "\n";
$dmsg .= "E-Mail: " . $email . "\n";
$dmsg .= "Mobile Mumber: " . $mobilenumber . "\n";
$dmsg .= "Tel Number: " . $landlinenumber . "\n";
$dmsg .= "Landlord Address:\n" . $_POST['landlordaddress'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['landlordaddress']) . "\n";
$dmsg .= "Property Address:\n" . $_POST['propertyaddress'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['propertyaddress']) . "\n";
$dmsg .= "Rent Required: " . $rentrequired . "\n";
$dmsg .= "propertydescription:\n" . $_POST['message'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['propertydescription']) . "\n";
$dmsg .= "Furnished?: " . $furnishedunfurnished . "\n";
$dmsg .= "Pets?: " . $petsallowed . "\n";
$dmsg .= "Children?: " . $childrenallowed . "\n";
$dmsg .= "Smokers?: " . $smokersallowed . "\n";
$dmsg .= "DSS?: " . $dssallowed . "\n";
$dmsg .= "Further Information: " . $furtherinformation . "\n";
if (count($uploadedFiles) > 0) {
$dmsg .= 'You have assigned the following files:'."\n";
foreach ($uploadedFiles as $file) {
$dmsg .= ' - '.$file."\n";
}
}
$dmsg .= "\n\nIP address: " . $ip . "\n";
$dmsg .= "Host: " . $host . "\n";
$dmsg .= "Browser and operating system: " . $UserAgent . "\n";
$dmsg = strip_tags ($dmsg);
if (mail($recipient,$subject,$msg,$mailheaders)) {
mail($email, $dsubject, $dmsg, $dmailheaders);
// thank you page, if email has been sent
echo "";
exit;
}
}
}
?>
properties to let,rent,Durham,Chester le Street,Birtley,Washington,Sunderland
Landlords Appraisel Form
If you have a property that you would like us to appraise please fill out the form below and click the submit button.
If you would like a no obligation free property appraisel then please click on the link below to go to our online property appraisel form.
To make a payment to Angel Property Management please select from the drop down list below and click on the button to be re-directed to paypal.