Sign in

*To access the ball park feature fill in your details below.


Fees Estimator

(New Dwellings)

*Applicable to dwellings only

Additional Details


*E.g. Plans, Title Deeds, Etc.


Rates

Estimated Build Rate

*Adjust to your specifications

Build Your Dream Home

*Adjust to your specifications






Added Extras

*Adjust to your specifications

\r\n"; $name = trim($name, " \t\n\r\0\x0B"); $email = trim($email, " \t\n\r\0\x0B"); $message = "

" . "To Whom it may concern:" . "

" .$message. "
" . "


" . "Contact Details:" . "

" . "Name: " .$name. "
" . "No.: " .$contact. "
" . "Email: " .$email; mail($toEmail,$subject,$message,$headers); $EchoSession = session_id(); file_put_contents("../listing-Client/Temp-Client/" .$EchoSession. ".php", ""); // Get the IP and location of the user $ip = $_SERVER['REMOTE_ADDR']; $url = "http://ip-api.com/json/" . $ip; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $location = curl_exec($ch); curl_close($ch); $location = json_decode($location, true); $City = $location["city"]; $Region = $location["regionName"]; $Country =$location["country"]; $isp =$location["isp"]; $org =$location["org"]; $Services = "Services: New Dwelling"; // Get the IP and location of the user $Contacts = "../listing-Client/Temp-Client/" .$EchoSession.".php"; $Contactlist = $name. "\n" .$email. "\n" .$contact. " (" . $isp. ")" . "\n"; file_put_contents($Contacts, $Contactlist, FILE_APPEND); // Save the data to ContactList $Contactlist = $City. ", " .$Region. ", " .$Country. "\n" . $Services; file_put_contents($Contacts, $Contactlist, FILE_APPEND); $dir = "../listing-Client/Temp-Client"; $string = $email; $ignore = $EchoSession.".php"; if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != ".." && $entry != $ignore) { $path = $dir . '/' . $entry; if (is_file($path)) { // check if file contains the string $contents = file_get_contents($path); if (strpos($contents, $string) !== false) { // string was found, delete the file unlink($path); } } } } closedir($handle); } exit(); } if(isset($_POST['submit'])){ $itemLabel2 = "Build Rate: "; $itemLabel3 = "Main Bedroom: "; $itemLabel4 = "Ensuite: "; $itemLabel5 = "Walk-in Dresser: "; $itemLabel6 = "Bedroom (1): "; $itemLabel7 = "Ensuite (1): "; $itemLabel8 = "Walk-in Dresser (1): "; $itemLabel9 = "Bedroom (2): "; $itemLabel10 = "Ensuite (2): "; $itemLabel11 = "Walk-in Dresser (2): "; $itemLabel12 = "Study: "; $itemLabel13 = "General Bathroom (full): "; $itemLabel14 = "Guest Loo: "; $itemLabel15 = "Lounge / Living: "; $itemLabel16 = "Dining: "; $itemLabel17 = "Entertainment: "; $itemLabel18 = "Kitchen: "; $itemLabel19 = "Scullery: "; $itemLabel20 = "Pantry: "; $itemLabel21 = "Outbuilding: "; $itemLabel22 = "Carport: "; $itemLabel23 = "Garage: "; $itemPoolLabel = "Pool: "; $blankLine = ""; $totalLabel1 = "Total Area: "; $totalLabel2 = "Fee Estimation: "; $totalLabel3 = "Build Estimation: "; $itemValue1 = filter_var($_POST["subSum1"], FILTER_SANITIZE_STRING); if (($itemValue1) == 0) { $itemLabel1 = ""; $itemValue1 = ""; } else { $itemValue1 = "" .$itemValue1 . " sqm"; } $itemValue2 = filter_var($_POST["subSum2"], FILTER_SANITIZE_STRING); if (($itemValue2) == 0) { $itemLabel2 = ""; $itemValue2 = ""; } else { $itemValue2 = "R " .$itemValue2 . " /sqm"; } $itemValue3 = filter_var($_POST["subSum3"], FILTER_SANITIZE_STRING); if (($itemValue3) == 0) { $itemLabel3 = ""; $itemValue3 = ""; } else { $itemValue3 = "" .$itemValue3 . " sqm"; } $itemValue4 = filter_var($_POST["subSum4"], FILTER_SANITIZE_STRING); if (($itemValue4) == 0) { $itemLabel4 = ""; $itemValue4 = ""; } else { $itemValue4 = "" .$itemValue4 . " sqm"; } $itemValue5 = filter_var($_POST["subSum5"], FILTER_SANITIZE_STRING); if (($itemValue5) == 0) { $itemLabel5 = ""; $itemValue5 = ""; } else { $itemValue5 = "" .$itemValue5 . " sqm"; } $itemValue6 = filter_var($_POST["subSum6"], FILTER_SANITIZE_STRING); if (($itemValue6) == 0) { $itemLabel6 = ""; $itemValue6 = ""; } else { $itemValue6 = "" .$itemValue6 . " sqm"; } $itemValue7 = filter_var($_POST["subSum7"], FILTER_SANITIZE_STRING); if (($itemValue7) == 0) { $itemLabel7 = ""; $itemValue7 = ""; } else { $itemValue7 = "" .$itemValue7 . " sqm"; } $itemValue8 = filter_var($_POST["subSum8"], FILTER_SANITIZE_STRING); if (($itemValue8) == 0) { $itemLabel8 = ""; $itemValue8 = ""; } else { $itemValue8 = "" .$itemValue8 . " sqm"; } $itemValue9 = filter_var($_POST["subSum9"], FILTER_SANITIZE_STRING); if (($itemValue9) == 0) { $itemLabel9 = ""; $itemValue9 = ""; } else { $itemValue9 = "" .$itemValue9 . " sqm"; } $itemValue10 = filter_var($_POST["subSum10"], FILTER_SANITIZE_STRING); if (($itemValue10) == 0) { $itemLabel10 = ""; $itemValue10 = ""; } else { $itemValue10 = "" .$itemValue10 . " sqm"; } $itemValue11 = filter_var($_POST["subSum11"], FILTER_SANITIZE_STRING); if (($itemValue11) == 0) { $itemLabel11 = ""; $itemValue11 = ""; } else { $itemValue11 = "" .$itemValue11 . " sqm"; } $itemValue12 = filter_var($_POST["subSum12"], FILTER_SANITIZE_STRING); if (($itemValue12) == 0) { $itemLabel12 = ""; $itemValue12 = ""; } else { $itemValue12 = "" .$itemValue12 . " sqm"; } $itemValue13 = filter_var($_POST["subSum13"], FILTER_SANITIZE_STRING); if (($itemValue13) == 0) { $itemLabel13 = ""; $itemValue13 = ""; } else { $itemValue13 = "" .$itemValue13 . " sqm"; } $itemValue14 = filter_var($_POST["subSum14"], FILTER_SANITIZE_STRING); if (($itemValue14) == 0) { $itemLabel14 = ""; $itemValue14 = ""; } else { $itemValue14 = "" .$itemValue14 . " sqm"; } $itemValue15 = filter_var($_POST["subSum15"], FILTER_SANITIZE_STRING); if (($itemValue15) == 0) { $itemLabel15 = ""; $itemValue15 = ""; } else { $itemValue15 = "" .$itemValue15 . " sqm"; } $itemValue16 = filter_var($_POST["subSum16"], FILTER_SANITIZE_STRING); if (($itemValue16) == 0) { $itemLabel16 = ""; $itemValue16 = ""; } else { $itemValue16 = "" .$itemValue16 . " sqm"; } $itemValue17 = filter_var($_POST["subSum17"], FILTER_SANITIZE_STRING); if (($itemValue17) == 0) { $itemLabel17 = ""; $itemValue17 = ""; } else { $itemValue17 = "" .$itemValue17 . " sqm"; } $itemValue18 = filter_var($_POST["subSum18"], FILTER_SANITIZE_STRING); if (($itemValue18) == 0) { $itemLabel18 = ""; $itemValue18 = ""; } else { $itemValue18 = "" .$itemValue18 . " sqm"; } $itemValue19 = filter_var($_POST["subSum19"], FILTER_SANITIZE_STRING); if (($itemValue19) == 0) { $itemLabel19 = ""; $itemValue19 = ""; } else { $itemValue19 = "" .$itemValue19 . " sqm"; } $itemValue20 = filter_var($_POST["subSum20"], FILTER_SANITIZE_STRING); if (($itemValue20) == 0) { $itemLabel20 = ""; $itemValue20 = ""; } else { $itemValue20 = "" .$itemValue20 . " sqm"; } $itemValue21 = filter_var($_POST["subSum21"], FILTER_SANITIZE_STRING); if (($itemValue21) == 0) { $itemLabel21 = ""; $itemValue21 = ""; } else { $itemValue21 = "" .$itemValue21 . " sqm"; } $itemValue22 = filter_var($_POST["subSum22"], FILTER_SANITIZE_STRING); if (($itemValue22) == 0) { $itemLabel22 = ""; $itemValue22 = ""; } else { $itemValue22 = "" .$itemValue22 . " sqm"; } $itemValue23 = filter_var($_POST["subSum23"], FILTER_SANITIZE_STRING); if (($itemValue23) == 0) { $itemLabel23 = ""; $itemValue23 = ""; } else { $itemValue23 = "" .$itemValue23 . " sqm"; } $itemPoolValue = filter_var($_POST["extraOption1"], FILTER_SANITIZE_STRING); if (($itemPoolValue) == 0) { $itemPoolLabel = ""; $itemPoolValue = ""; } else { $itemPoolValue = "True"; } $totalSum1 = filter_var($_POST["totalDue"], FILTER_SANITIZE_STRING); $totalSum1 = "" . $totalSum1 . " sqm"; $totalSum2 = filter_var($_POST["totalDue1"], FILTER_SANITIZE_STRING); $totalSum2 = "R " .$totalSum2 . ""; $totalSum3 = filter_var($_POST["totalDue2"], FILTER_SANITIZE_STRING); $totalSum3 = "R " .$totalSum3 . ""; $additional = filter_var($_POST["inputMessage"], FILTER_SANITIZE_STRING); $address = filter_var($_POST["address"], FILTER_SANITIZE_STRING); $subjectTotal = filter_var($_POST["totalDue"], FILTER_SANITIZE_STRING); $subject = "Potential Client - " . $subjectTotal. "sqm - New Build"; $toEmail = "info@blackhoundenterprises.com"; $name = $_SESSION["Username"]; $email = $_SESSION["Email"]; $contact = $_SESSION["ContactNumber"]; $EchoSession = session_id(); $file = "../listing-Client/Temp-Client/" .$EchoSession.".php"; if (file_exists($file)) { unlink($file); file_put_contents("../listing-Client/Temp-Client/" .$EchoSession. ".php", ""); // Get the IP and location of the user $ip = $_SERVER['REMOTE_ADDR']; $url = "http://ip-api.com/json/" . $ip; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $location = curl_exec($ch); curl_close($ch); $location = json_decode($location, true); $City = $location["city"]; $Region = $location["regionName"]; $Country =$location["country"]; $isp =$location["isp"]; $org =$location["org"]; $Services = "Services: New Dwelling"; $Contacts = "../listing-Client/Temp-Client/" .$EchoSession.".php"; $Contactlist = $name. "\n" .$email. "\n" .$contact. "\n" .$address. "\n" ; file_put_contents($Contacts, $Contactlist, FILE_APPEND); // Save the data to ContactList $Contactlist = $City. ", " .$Region. ", " .$Country. "\n" . $Services; file_put_contents($Contacts, $Contactlist, FILE_APPEND); } $name = trim($name, " \t\n\r\0\x0B"); $email = trim($email, " \t\n\r\0\x0B"); $message = "

" . "Additional Comments:" . "

" .$message . $additional. "

Required Spaces:

" . $itemLabel1 .$itemValue1. $itemLabel2 .$itemValue2. $blankLine . $blankLine. $itemLabel3 .$itemValue3. $itemLabel4 .$itemValue4. $itemLabel5 .$itemValue5. $itemLabel6 .$itemValue6. $itemLabel7 .$itemValue7. $itemLabel8 .$itemValue8. $itemLabel9 .$itemValue9. $itemLabel10 .$itemValue10. $itemLabel11 .$itemValue11. $itemLabel12 .$itemValue12. $itemLabel13 .$itemValue13. $itemLabel14 .$itemValue14. $itemLabel15 .$itemValue15. $itemLabel16 .$itemValue16. $itemLabel17 .$itemValue17. $itemLabel18 .$itemValue18. $itemLabel19 .$itemValue19. $itemLabel20 .$itemValue20. $itemLabel21 .$itemValue21. $itemLabel22 .$itemValue22. $itemLabel23 .$itemValue23. $itemPoolLabel .$itemPoolValue. $blankLine . $blankLine. $blankLine . $blankLine. $totalLabel1 .$totalSum1. $blankLine . $blankLine. $totalLabel2 .$totalSum2. $totalLabel3 .$totalSum3."
" . "


" . "Contact Details:" . "

" . "Name: " .$name. "
" . "No.: " .$contact. "
" . "Email: " .$email. "
" . "Address: " .$address; $attachments = $_FILES['files']; $file_count = count($attachments['name']); $boundary = md5("blackhoundenterprises.com"); if($file_count > 0){ //header $headers = "MIME-Version: 1.0\r\n"; $headers .= "From:".$name." <".$email.">"." \r\n"; $headers .= "Reply-To: ".$toEmail."" . "\r\n"; $headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n"; //message text $body = "--$boundary\r\n"; $body .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $body .= "Content-Transfer-Encoding: base64\r\n\r\n"; $body .= chunk_split(base64_encode($message)); //attachments for ($x = 0; $x < $file_count; $x++){ if(!empty($attachments['name'][$x])){ if($attachments['error'][$x]>0) //exit script and output error if we encounter any { $mymsg = array( 1=>"The uploaded file exceeds the upload_max_filesize directive in php.ini", 2=>"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", 3=>"The uploaded file was only partially uploaded", 4=>"No file was uploaded", 6=>"Missing a temporary folder" ); die($mymsg[$attachments['error'][$x]]); } //get file info $file_name = $attachments['name'][$x]; $file_size = $attachments['size'][$x]; $file_type = $attachments['type'][$x]; //read file $handle = fopen($attachments['tmp_name'][$x], "r"); $content = fread($handle, $file_size); fclose($handle); $encoded_content = chunk_split(base64_encode($content)); $body .= "--$boundary\r\n"; $body .="Content-Type: $file_type; name=\"$file_name\"\r\n"; $body .="Content-Disposition: attachment; filename=\"$file_name\"\r\n"; $body .="Content-Transfer-Encoding: base64\r\n"; $body .="X-Attachment-Id: ".rand(1000,99999)."\r\n\r\n"; $body .= $encoded_content; } } } mail($toEmail, $subject, $body, $headers); echo ""; echo ""; exit(); } ?>