add('contact', ENTRY_EMAIL_ADDRESS_ISFROMDOMAIN_ERROR); } //// // BOF: Added to disable non-alphanumeric chars in name elseif (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send') && (valid_str($name, '50') == false)) { $error = true; $messageStack->add('contact', ENTRY_NAME_HAS_BAD_CHAR); } // EOF: Added to disable non-alphanumeric chars in name //// elseif (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { //--------Replaced for anti-spam solution END // // BOF: WebMakers.com Added: Shoppe Enhancement Controller - email settings // include IP and host name in queries //// // Begin fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay // OLD CODE BEGINS // // $name = tep_db_prepare_input($HTTP_POST_VARS['name']); // $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); // $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); // // OLD CODE ENDS $_POST['email'] = preg_replace( "/\n/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\n/", " ", $_POST['name'] ); $_POST['email'] = preg_replace( "/\r/", " ", $_POST['email'] ); $_POST['name'] = preg_replace( "/\r/", " ", $_POST['name'] ); $_POST['email'] = str_replace("Content-Type:","",$_POST['email']); $_POST['name'] = str_replace("Content-Type:","",$_POST['name']); $name = tep_db_prepare_input($_POST['name']); $email_address = tep_db_prepare_input($_POST['email']); $enquiry = tep_db_prepare_input($_POST['enquiry']); $enquiry = tep_db_prepare_input($enquiry . "\n\n IP: " . $_SERVER['REMOTE_ADDR']); // End fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay //// if (tep_validate_email($email_address)) { // MS2 tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); if(tep_session_is_registered('customer_id')) { $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $check_customer = tep_db_fetch_array($check_customer_query); $customer_email= $check_customer['customers_email_address']; $customer_name= $check_customer['customers_firstname'] . ' ' . $check_customer['customers_lastname']; } else { $customer_email='Not logged in'; $customer_name='Not logged in'; } tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, 'From:' . "\t" . $name . "\n" . 'email:' . "\t" . $email . "\n\n" . '------------------------------------------------------' . "\n\n" . //// // Begin fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay // // OLD CODE BEGINS // $HTTP_POST_VARS['enquiry'] . "\n\n" . // OLD CODE ENDS // $_POST['enquiry'] . "\n\n" . // End fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay //// '------------------------------------------------------' . "\n\n" . 'Office Use:' . "\t" . "\n" . 'Loggin Name:' . "\t" . $customer_name . "\n" . 'Loggin email:' . "\t" . $customer_email . "\n" . 'IP Address:' . "\t" . $REMOTE_ADDR . "\n" . 'Host Address:' . "\t" . gethostbyaddr($REMOTE_ADDR) . "\n", //// // Begin fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay // // OLD CODE BEGINS // $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']); // OLD CODE ENDS // $_POST['name'], $_POST['email']); // End fix http://www.anders.com/cms/75/Crack.Attempt/Spam.Relay //// tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } // default email and name if customer is logged in if(tep_session_is_registered('customer_id')) { $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'"); $check_customer = tep_db_fetch_array($check_customer_query); $email= $check_customer['customers_email_address']; $name= $check_customer['customers_firstname'] . ' ' . $check_customer['customers_lastname']; } // EOF: WebMakers.com Added: Shoppe Enhancement Controller - email settings $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); // Does not work on sent email only works on back button // BOF: WebMakers.com Added: Shoppe Enhancement Controller // login redirect to last page require(DIR_WS_INCLUDES . 'redirect_login_to.html'); // EOF: WebMakers.com Added: Shoppe Enhancement Controller ?> > <?php echo TITLE; ?>
size('contact') > 0) { ?>
output('contact'); ?>
' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . ''; ?>
?> // OLD CODE ENDS // // ?>


' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . ''; ?>