'; $error_msg_table .= '
'; $error_msg_table .= ''; $error_msg_table .= ''; $error_msg_table .= ''; $error_msg_table .= ''; $error_msg_table .= ' '; $error_msg_table .= ' '; $error_msg_table .= ' '; $error_msg_table .= ' '; $error_msg_table .= ' '; $error_msg_table .= '
Oops, there was an error with your submission
Please correct the following errors before resubmitting:
'; $error_msg_table .= '
    '; $user_email = $sanitizer->prepare_user_input($_POST['email_address']); $results = $sanitizer->is_emailAddress_dodgey($_POST['email_address']); $resultsArray = split(':', $results); // Split the sucker into its components. $isEmailDodgey = $resultsArray[0]; // Retrieve the boolean component. $syntax = $resultsArray[1]; // Retrieve the customer id. $host = $resultsArray[2]; // Retrieve the encrypted password. (this contains the md5 hash of the password + the salt. if (strcmp($user_email, '') == 0) { $error_msg_table .= '
  • Please enter your email address.
  • '; $email_error = true; $errorExists = true; } else if ($isEmailDodgey) { $error_msg_table .= '
  • Your email address appears to be invalid. Please check and try again.
  • '; $email_error = true; $errorExists = true; } // First and Last name error checking. $user_first_name = $sanitizer->prepare_user_input($_POST['first_name']); if ($user_first_name == '') { $error_msg_table .= '
  • Please enter your first name.
  • '; $first_name_error = true; $errorExists = true; } else if ($sanitizer->check_field_length($user_first_name, FIELD_FIRSTNAME_LENGTH)) { $error_msg_table .= '
  • The name you entered must have more than ' . FIELD_FIRSTNAME_LENGTH . ' characters.
  • '; $first_name_error = true; $errorExists = true; } /*$user_last_name = $sanitizer->prepare_user_input($_POST['last_name']); if ($user_last_name == '') { $error_msg_table .= '
  • Please enter your last name.
  • '; $last_name_error = true; $errorExists = true; } else if ($sanitizer->check_field_length($user_last_name, FIELD_LASTNAME_LENGTH)) { $error_msg_table .= '
  • The last name you entered must have more than ' . FIELD_LASTNAME_LENGTH . ' characters.
  • '; $last_name_error = true; $errorExists = true; }*/ // Enquiry error checking. $classification = $sanitizer->prepare_user_input($_POST['classification']); if ($classification == 'Please Select') { $error_msg_table .= '
  • Please select the classification.
  • '; $classification_error = true; $errorExists = true; } $subject = $sanitizer->prepare_user_input($_POST['subject']); if ($subject == '') { $error_msg_table .= '
  • Please enter a subject.
  • '; $subject_error = true; $errorExists = true; } $user_email_data = $sanitizer->prepare_user_input($_POST['email_data']); if ($user_email_data == '') { $error_msg_table .= '
  • Please enter your enquiry.
  • '; $email_data_error = true; $errorExists = true; } $captcha_data = $sanitizer->prepare_user_input($_POST['captcha']); if ($captcha_data == '') { $error_msg_table .= '
  • Please enter the security characters.
  • '; $captcha_error = true; $errorExists = true; } else { $img = new Securimage(); $isValid = false; $isValid = $img->check($captcha_data); if(!$isValid) { $error_msg_table .= '
  • The security code you entered was incorrect
  • '; $captcha_error = true; $errorExists = true; } else if ($errorExists) { $captcha_error = true; $errorExists = true; } } $error_msg_table .= '
'; $error_msg_table .= '
'; $error_msg_table .= ''; $error_msg_table .= ''; $error_msg_table .= ''; $error_msg_table .= '
'; $error_msg_table .= ''; } if ($errorExists == false && (isset($_POST['action']) && strcmp($_POST['action'], "validate") == 0)) // If there are no errors then update database & we redirect to congrats page. { $heading = 'Your email was sent';// Set the appropriate heading depending on whether user has to enter data, or thankyou page. $browser_data = 'Browser Type : ' . $sanitizer->browser_type . "\r\n"; $ip_data = 'IP Address : ' . $sanitizer->ip . "\r\n\r\n"; if (isset($_COOKIE["key"])) $key_data = 'Cookie Key = ' . $_COOKIE["key"] . "\r\n\r\n"; else $key_data = 'HTTP Key = ' . $_GET["key"] . "\r\n\r\n"; $formatted_email_data = ''; $formatted_email_data .= "Name : " . $user_first_name . "\r\n"; //$formatted_email_data .= "Name : " . $user_first_name . ' ' . $user_last_name . "\r\n"; $formatted_email_data .= "Email : " . $user_email . "\r\n"; $formatted_email_data .= "Classification : " . $classification . "\r\n"; $formatted_email_data .= "Subject : " . $subject . "\r\n\r\n"; $formatted_email_data .= $_POST['email_data'] . "\r\n"; //mail(EMAIL_ADDRESS_ONLINE_SERVICE_SUPPORT, $subject, $browser_data . $ip_data . $cookie_data . "\r\n" . $formatted_email_data, "From:" . EMAIL_ADDRESS_ORDER_REPLY_TO . "\r\nReply-To:" . EMAIL_ADDRESS_ORDER_REPLY_TO); $headersCommon = ''; $headersCommon .= "Message-ID: <" . strtotime("now") . "root@" . $_SERVER['SERVER_NAME'] . ">" . "\n"; $headersCommon .= "X-Mailer: PHP v" . phpversion() . "\n"; $toOfficeHeaders = $headersCommon; $toOfficeHeaders .= "From: " . $user_email . "\n"; $toOfficeHeaders .= "Reply-To: " . $user_email . "\n"; $toCustomerFromSalesHeader = $headersCommon; $toCustomerFromSalesHeaders .= "From: " . EMAIL_ADDRESS_ORDER . "\n"; $toCustomerFromSalesHeaders .= "Reply-To: " . EMAIL_ADDRESS_ORDER . "\n"; $toCustomerFromSupportHeader = $headersCommon; $toCustomerFromSupportHeaders .= "From: " . EMAIL_ADDRESS_ONLINE_SERVICE_SUPPORT . "\n"; $toCustomerFromSupportHeaders .= "Reply-To: " . EMAIL_ADDRESS_ONLINE_SERVICE_SUPPORT . "\n"; $dateTimeNow = get_contact_form_datetime_now_noSpaces(); $uniqueID = md5(uniqid(rand() . ((double)microtime() * 1000000) . rand(1,1000), 1)); $messageID = $dateTimeNow . '-' . substr($uniqueID, 3, 4); $emailSubject = '[' . $classification . ' #' . $messageID . '] ' . $subject; $customerMessage = '*** This is an automated response from your friendly entoSupplies robot drone *** Thankyou for contacting entoSupplies.com.au. We have received your message loud and clear, and it is currently en-queue to be answered as quickly as possible. Your Ticket ID : ' . $messageID . ' Your Ticket Subject : ' . $subject . ' Our replies will be sent to : ' . $user_email . ' You message : ' . $_POST['email_data'] . ' Please make sure that the address above is available and able to receive email as all replies will be directed in that direction. Many thanks! Regards, entoSupplies.com.au.'; if (strcmp($classification, 'Problem') == 0) { mail('jim@entosupplies.com.au', $emailSubject, $browser_data . $ip_data . $key_data . $formatted_email_data, $toOfficeHeaders); mail(EMAIL_ADDRESS_ONLINE_SERVICE_SUPPORT, $emailSubject, $browser_data . $ip_data . $key_data . $formatted_email_data, $toOfficeHeaders); } else mail(EMAIL_ADDRESS_ORDER, $emailSubject, $browser_data . $ip_data . $formatted_email_data, $toOfficeHeaders); // Mail the customer as well if (strcmp($classification, 'Problem') == 0) mail($user_email, $emailSubject, $customerMessage, $toCustomerFromSupportHeaders); else mail($user_email, $emailSubject, $customerMessage, $toCustomerFromSalesHeaders); } else $heading = 'Contact Us'; include(FILENAME_COMMON_HEAD); // HTML header...included javascripts and ccs stuff. include(FILENAME_COMMON_BODY_UPPER_LOGO); // HTML BODY - contains the logo stuff in upper portion of screen. //include(FILENAME_COMMON_BODY_UPPER_NAVIGATION); // HTML BODY - contains navigation at top of screen.(javascript) include(FILENAME_COMMON_BODY_COLUMN_LEFT); // HTML BODY - Column on left of screen...navigation, etc. include(FILENAME_COMMON_BODY_MAIN_CONTACT_US); // HTML BODY - Contents on bulk of screen. Search results, etc. //include(FILENAME_COMMON_BODY_MAIN_CONTACT_US_AWAY); // HTML BODY - Contents on bulk of screen. Search results, etc. include(FILENAME_COMMON_BODY_COLUMN_RIGHT); // HTML BODY - Column on right of screen...navigation, etc. include(FILENAME_COMMON_FOOTER); // HTML BODY - footer of page, and end of html document. ?>