add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURNS));
$error = false;
$border = '';
$border_gender = '';
$border_streetaddress = '';
$border_townaddress = '';
$border_firstname = '';
$border_lastname = '';
$border_date_delivered = '';
$border_date_ordered = '';
$the_message = '';
$gneder_error = false;
$email_error = false;
$streetaddress_error = false;
$townaddress_error = false;
$firstname_error = false;
$lastname_error = false;
$date_delivered_error = false;
$date_ordered_error = false;
if ($_POST['send_widerruf'] == 'send')
{
include_once 'securimage/securimage.php';
$securimage = new Securimage();
if ($securimage->check($_POST['captcha_code']) == false) {
// the code was incorrect
// you should handle the error so that the form processor doesn't continue
// or you can use the following code if there is no validation or you do not know how
$the_message = SECURITY_CODE_ERROR;
$error = true;
// exit;
}
if (tep_validate_email($_POST['customer_email']) == false) {
$email_error = true;
$error = true;
$border = 'border: 1px solid red;';
}
if ($_POST['customer_gender'] == '---') {
$gender_error = true;
$error = true;
$border_gender = 'border: 1px solid red;';
}
if ($_POST['customer_streetadress'] == '') {
$streetaddress_error = true;
$error = true;
$border_streetaddress = 'border: 1px solid red;';
}
if ($_POST['customer_townadress'] == '') {
$townaddress_error = true;
$error = true;
$border_townaddress = 'border: 1px solid red;';
}
if ($_POST['customer_firstname'] == '') {
$firstname_error = true;
$error = true;
$border_firstname = 'border: 1px solid red;';
}
if ($_POST['customer_lastname'] == '') {
$lastname_error = true;
$error = true;
$border_lastname = 'border: 1px solid red;';
}
if ($_POST['date_ordered'] == '') {
$date_ordered_error = true;
$error = true;
$border_date_ordered = 'border: 1px solid red;';
}
else if ($error == false)
{
if ($_POST['customer_country'] == COUNTRY_REMARK)
{
$_POST['customer_country'] = '';
}
else
{
$_POST['customer_country'] = ' ,' . $_POST['customer_country'];
}
if ($_POST['date_delivered'] == '')
{
$_POST['date_delivered'] = NO_INFOS;
}
$insert_sql_data = array('returns_customer_first_name' => $_POST['customer_firstname'],
'returns_customer_last_name' => $_POST['customer_lastname'],
'returns_customer_gender' => $_POST['customer_gender'],
'returns_customers_id' => $_POST['customer_id'],
'returns_customer_adress' => $_POST['customer_streetadress'] . ', ' . $_POST['customer_townadress'],
'returns_date_ordered' => $_POST['date_ordered'],
'returns_date_received' => $_POST['date_delivered'],
'returns_date_valid' => $_POST['date_valid'],
'returns_customer_comments' => $_POST['comments'],
'returns_customer_country' => $_POST['customer_country'],
'returns_customer_email' => $_POST['customer_email']);
if (SEND_RETURNS_EMAIL == 'true')
{
$email_data = array('returns_sent_mail' => '1');
}
else
{
$email_data = array('returns_sent_mail' => '0');
}
$sql_data_array = array_merge($insert_sql_data, $email_data);
tep_db_perform(TABLE_RETURNS, $sql_data_array);
$name = $_POST['customer_firstname'] . ' ' . $_POST['customer_lastname'];
$email_address = $_POST['customer_email'];
if ($_POST['customer_gender'] == 'm')
{
$anrede = CUSTOMER_GREETING_M . $_POST['customer_lastname'] ;
}
if ($_POST['customer_gender'] == 'f')
{
$anrede = CUSTOMER_GREETING_F . $_POST['customer_lastname'] ;
}
$email_query = tep_db_query("select * from " . TABLE_RETURNS_EMAIL . " WHERE language_id = '2'");
$email_results = tep_db_fetch_array($email_query);
$file_contents = $email_results['status_text_one'];
$phone_icon = '';
$company_logo = '';
$conditions_link = '' . CONDITIONS . '';
$account_link = '' . ACCOUNT . '';
$file_contents = preg_replace('/<-COMPANY_LOGO->/', $company_logo, $file_contents);
$file_contents = preg_replace('/<-CUSTOMER_GREETING->/', $anrede, $file_contents);
$file_contents = preg_replace('/<-GV_AMOUNT->/', $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT), $file_contents);
$file_contents = preg_replace('/<-GV_CODE->/', $the_email_code, $file_contents);
$file_contents = preg_replace('/<-STORE_EMAIL->/', STORE_OWNER_EMAIL_ADDRESS, $file_contents);
$file_contents = preg_replace('/<-STORE_NAME->/', STORE_NAME, $file_contents);
$file_contents = preg_replace('/<-GV_LINK->/', tep_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $the_email_code,'NONSSL', false) , $file_contents);
$file_contents = preg_replace('/<-EMAIL->/', $email_address, $file_contents);
$file_contents = preg_replace('/<-CONDITIONS_LINK->/', $conditions_link, $file_contents);
$file_contents = preg_replace('/<-INVOICE_URL->/', $account_link, $file_contents);
$file_contents = preg_replace('/<-STORE_EMAIL->/', STORE_OWNER_EMAIL_ADDRESS, $file_contents);
$file_contents = preg_replace('/<-FIRMENANSCHRIFT->/', STORE_NAME_ADDRESS, $file_contents);
$file_contents = preg_replace('/<-FINANZAMT->/', OWNER_BANK_FA, $file_contents);
$file_contents = preg_replace('/<-RETURNS_DATE->/', $_POST['date_valid'], $file_contents);
$file_contents = preg_replace('/<-PURCHASE_DATE->/', $_POST['date_ordered'], $file_contents);
$file_contents = preg_replace('/<-CUSTOMER_NAME->/', $_POST['customer_firstname'] . ' ' . $_POST['customer_lastname'], $file_contents);
$file_contents = preg_replace('/<-CUSTOMER_ADRESS->/', $_POST['customer_streetadress'] . ', ' . $_POST['customer_townadress'] . ', ' . $_POST['customer_country'], $file_contents);
$file_contents = preg_replace('/<-CUSTOMER_EMAIL->/', $_POST['customer_email'], $file_contents);
$file_contents = preg_replace('/<-RETURNS_COMMENTS->/', $_POST['comments'], $file_contents);
$file_contents = preg_replace('/<-RECEIVED_DATE->/', $_POST['date_delivered'], $file_contents);
$file_contents = preg_replace('/<-STEUERNUMMER->/', OWNER_BANK_TAX_NUMBER, $file_contents);
$file_contents = preg_replace('/<-USTID->/', OWNER_BANK_UST_NUMBER, $file_contents);
$file_contents = preg_replace('/<-BANKNAME->/', OWNER_BANK_NAME, $file_contents);
$file_contents = preg_replace('/<-KONTOINHABER->/', OWNER_BANK_ACCOUNT, $file_contents);
$file_contents = preg_replace('/<-BLZ->/', STORE_OWNER_BLZ, $file_contents);
$file_contents = preg_replace('/<-KONTONUMMER->/', OWNER_BANK, $file_contents);
$file_contents = preg_replace('/<-SWIFT->/', OWNER_BANK_SWIFT, $file_contents);
$file_contents = preg_replace('/<-IBAN->/', OWNER_BANK_IBAN, $file_contents);
$file_contents = preg_replace('/<-STORE_ADRESS->/', STORE_NAME_ADDRESS, $file_contents);
$file_contents = preg_replace('/<-CUSTOMER_ID->/', $customer_id, $file_contents);
$file_contents = preg_replace('/<-DATE_NOW->/', strftime(DATE_FORMAT_LONG), $file_contents);
$file_contents = preg_replace('/<-PHONE_ICON->/', $phone_icon, $file_contents);
//$email_text = $st_text;
$email_text = $file_contents;
// $email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
// ICW - CREDIT CLASS CODE BLOCK ADDED ******************************************************* END
if (SEND_RETURNS_EMAIL == 'true')
{
tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
}
tep_redirect(tep_href_link(FILENAME_RETURNS_SUCCESS, 'email=' . $email_address, 'SSL'));
}
}
?>
>
| |
|
|
|
|
|
|
' . STORE_OWNER_EMAIL_ADDRESS;?> |
|
|
|
|
|
|
|
|
* |
' . FIELD_ERROR .'';
}
?>
|
|
' . FIELD_ERROR .'';
}
?>
|
|
|
*
|
|
* |
' . FIELD_ERROR .'';
}
?>
|
* |
' . FIELD_ERROR .'';
}
?>
|
|
|
*
|
' . FIELD_ERROR .'';
}
?>
|
*
|
' . FIELD_ERROR .'';
}
?>
|
|
|
|
|
* |
' . CHECK_EMAIL . '';
}
?>
|
|
|
|
|
|
|
|
|
|
|
|
|