Index: admin/includes/modules/customers_edit.php
===================================================================
--- admin/includes/modules/customers_edit.php	(nonexistent)
+++ admin/includes/modules/customers_edit.php	(revision 1)
@@ -0,0 +1,526 @@
+<?php
+ /*-------------------------------------------------------------
+   $Id: customers_edit.php 13419 2021-02-09 15:13:48Z GTB $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   --------------------------------------------------------------
+   Released under the GNU General Public License
+   --------------------------------------------------------------*/
+  
+  defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
+
+
+      if (isset($_GET['edit']) && $_GET['edit'] != '') {
+        $check = "a.address_book_id = '". (int) $_GET['edit']."'";
+        $customers_default_address_id_checkbox = xtc_draw_checkbox_field('primary', 'on', false);
+      } else {
+        $check = "c.customers_default_address_id = a.address_book_id";
+      }
+
+      if (!isset($cInfo) || !is_object($cInfo)) {
+        $customers_query = xtc_db_query("SELECT c.customers_id,
+                                                c.customers_cid,
+                                                c.customers_vat_id,
+                                                c.customers_vat_id_status,
+                                                c.customers_status,
+                                                c.customers_dob,
+                                                c.customers_email_address,
+                                                c.customers_default_address_id,
+                                                c.customers_telephone,
+                                                c.customers_fax,
+                                                c.member_flag,
+                                                c.payment_unallowed,
+                                                c.shipping_unallowed,
+                                                a.address_book_id,
+                                                a.entry_gender AS customers_gender,
+                                                a.entry_firstname AS customers_firstname,
+                                                a.entry_lastname AS customers_lastname,
+                                                a.entry_company,
+                                                a.entry_street_address,
+                                                a.entry_suburb,
+                                                a.entry_postcode,
+                                                a.entry_city,
+                                                a.entry_state,
+                                                a.entry_country_id,
+                                                a.entry_zone_id,
+                                                cgc.amount
+                                           FROM ".TABLE_CUSTOMERS." c
+                                      LEFT JOIN ".TABLE_ADDRESS_BOOK." a
+                                                ON ".$check."
+                                                   AND a.customers_id = c.customers_id
+                                      LEFT JOIN ".TABLE_COUPON_GV_CUSTOMER." cgc
+                                             ON c.customers_id = cgc.customer_id
+                                          WHERE c.customers_id = '".(int)$_GET['cID']."'"
+                                       );
+        $customers = xtc_db_fetch_array($customers_query);
+        if (xtc_db_num_rows($customers_query) != 0) {
+          $cInfo = new objectInfo($customers);
+        }
+      }
+      $newsletter_array = array (array ('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array ('id' => '0', 'text' => ENTRY_NEWSLETTER_NO));
+
+      require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'xtcPrice.php');
+      $xtPrice = new xtcPrice(DEFAULT_CURRENCY,$cInfo->customers_status);
+      ?>
+      <div class="pageHeadingImage"><?php echo xtc_image(DIR_WS_ICONS.'heading/icon_customers.png'); ?></div>
+      <div class="flt-l">
+        <div class="pageHeading"><?php echo $cInfo->customers_lastname.' '.$cInfo->customers_firstname; ?></div>
+        <div class="main pdg2"><?php echo BOX_HEADING_CUSTOMERS; ?></div>
+      </div>
+      <div class="clear"></div>
+      <div class="div_box mrg5">
+        <div class="customers-groups">
+          <div class="flt-l"><?php if ($customers_statuses_id_array[$cInfo->customers_status]['csa_image'] != '') { echo xtc_image(DIR_WS_CATALOG.DIR_WS_ICONS . $customers_statuses_id_array[$cInfo->customers_status]['csa_image'], ''); } ?></div>
+          <div class="main" style="margin:12px 0;"><b><?php echo HEADING_TITLE_STATUS  .':</b> ' . $customers_statuses_id_array[$cInfo->customers_status]['text'] ; ?></div>
+        </div>
+        <div class="clear"></div>
+        <?php echo xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action')) . 'action=update', 'post') .
+                   xtc_draw_hidden_field('customers_default_address_id', $cInfo->customers_default_address_id) .
+                   xtc_draw_hidden_field('address_book_id', $cInfo->address_book_id) .
+                   xtc_draw_hidden_field('customers_status', $cInfo->customers_status); ?>
+        <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_PERSONAL; ?></span></div>
+        <div class="formAreaC">
+          <table class="tableConfig borderall">
+            <?php
+              if (ACCOUNT_GENDER == 'true') {
+            ?>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_GENDER; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_gender_error == true) ? ' col-error' : ''); ?>">
+              <?php
+              if ($error == true) {
+                if ($entry_gender_error == true) {
+                  echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender).'&nbsp;'.ENTRY_GENDER_ERROR;
+                } else {
+                  echo get_customers_gender($cInfo->customers_gender);
+                  echo xtc_draw_hidden_field('customers_gender', $cInfo->customers_gender);
+                }
+              } else {
+                echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender);
+              }
+              ?>
+              </td>
+
+            </tr>
+            <?php
+              }
+            echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>';
+            ?>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_CID; ?></td>
+              <td class="dataTableConfig col-single-right bg_notice">
+                <?php
+                echo xtc_draw_input_field('customers_cid', $cInfo->customers_cid, 'maxlength="32"', false);
+                ?>
+              </td>
+
+            </tr>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_FIRST_NAME; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_firstname_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_firstname_error == true) {
+                    echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"').'&nbsp;'.ENTRY_FIRST_NAME_ERROR;
+                  } else {
+                    echo $cInfo->customers_firstname.xtc_draw_hidden_field('customers_firstname', $cInfo->customers_firstname);
+                  }
+                } else {
+                  echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_LAST_NAME; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_lastname_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_lastname_error == true) {
+                    echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"').'&nbsp;'.ENTRY_LAST_NAME_ERROR;
+                  } else {
+                    echo $cInfo->customers_lastname.xtc_draw_hidden_field('customers_lastname', $cInfo->customers_lastname);
+                  }
+                } else {
+                  echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+            <?php
+            if (ACCOUNT_DOB == 'true') {
+              echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>';
+            ?>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_date_of_birth_error == true) ? ' col-error' : ''); ?>">
+                 <?php
+                if ($error == true) {
+                  if ($entry_date_of_birth_error == true) {
+                    echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"').'&nbsp;'.ENTRY_DATE_OF_BIRTH_ERROR;
+                  } else {
+                    echo xtc_date_short($cInfo->customers_dob).xtc_draw_hidden_field('customers_dob', xtc_date_short($cInfo->customers_dob));
+                  }
+                } else {
+                  echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+            <?php
+            }
+             echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>';
+            ?>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_email_address_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_email_address_error == true) {
+                    echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').'&nbsp;'.ENTRY_EMAIL_ADDRESS_ERROR;
+                  } elseif ($entry_email_address_check_error == true) {
+                    echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').'&nbsp;'.ENTRY_EMAIL_ADDRESS_CHECK_ERROR;
+                  } elseif ($entry_email_address_exists == true) {
+                    echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').'&nbsp;'.ENTRY_EMAIL_ADDRESS_ERROR_EXISTS;
+                  } else {
+                    echo $cInfo->customers_email_address.xtc_draw_hidden_field('customers_email_address', $cInfo->customers_email_address);
+                  }
+                } else {
+                  echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+          </table>
+        </div>
+        <?php
+          if (ACCOUNT_COMPANY == 'true') {
+        ?>
+        <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_COMPANY; ?></span></div>
+        <div class="formAreaC">
+          <table class="tableConfig borderall">
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_COMPANY; ?></td>
+              <td class="dataTableConfig col-single-right">
+                <?php
+                  echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="64"');
+                ?>
+              </td>
+
+            </tr>
+            <?php
+            if(ACCOUNT_COMPANY_VAT_CHECK == 'true'){
+              if ($action == 'edit' && $cInfo->customers_vat_id != '') {
+                switch ($cInfo->customers_vat_id_status) {
+                  case '0' :
+                    $entry_vat_error_text = TEXT_VAT_FALSE;
+                    break;
+                  case '1' :
+                    $entry_vat_error_text = TEXT_VAT_TRUE;
+                    break;
+                  case '8' :
+                    $entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY;
+                    break;
+                  case '94' :
+                    $entry_vat_error_text = TEXT_VAT_INVALID_INPUT;
+                    break;
+                  case '95' :
+                    $entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE;
+                    break;
+                  case '96' :
+                    $entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE;
+                    break;
+                  case '97' :
+                    $entry_vat_error_text = TEXT_VAT_TIMEOUT;
+                    break;
+                  case '98' :
+                    $entry_vat_error_text = TEXT_VAT_SERVER_BUSY;
+                    break;
+                  case '99' :
+                    $entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT;
+                    break;
+                }
+              }
+              echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>';
+              ?>
+                <td class="dataTableConfig col-left"><?php echo ENTRY_VAT_ID; ?></td>
+                <td class="dataTableConfig col-single-right">
+                  <?php
+                    echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').'&nbsp;'.$entry_vat_error_text;
+                    /*
+                    if ($error == true) {
+                      if ($entry_vat_error == true) {
+                        echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').'&nbsp;'.$entry_vat_error_text;
+                      } else {
+                        echo $cInfo->customers_vat_id.xtc_draw_hidden_field('customers_vat_id');
+                      }
+                    } else {
+                      echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"');
+                    }
+                    */
+                    ?>
+                  </td>
+                </tr>
+              <?php
+              }
+              ?>
+            </table>
+          </div>
+        <?php
+          }
+        ?>
+
+        <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_ADDRESS; ?></span></div>
+        <div class="formAreaC">
+         <table class="tableConfig borderall">
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_STREET_ADDRESS; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_street_address_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_street_address_error == true) {
+                    echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"').'&nbsp;'.ENTRY_STREET_ADDRESS_ERROR;
+                  } else {
+                    echo $cInfo->entry_street_address.xtc_draw_hidden_field('entry_street_address', $cInfo->entry_street_address);
+                  }
+                } else {
+                  echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+            <?php
+              if (ACCOUNT_SUBURB == 'true') {
+            ?>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_SUBURB; ?></td>
+              <td class="dataTableConfig col-single-right">
+                <?php
+                  echo xtc_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"');
+                ?>
+              </td>
+
+            </tr>
+            <?php
+              }
+            ?>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_POST_CODE; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_post_code_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_post_code_error == true) {
+                    echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"').'&nbsp;'.ENTRY_POST_CODE_ERROR;
+                  } else {
+                    echo $cInfo->entry_postcode.xtc_draw_hidden_field('entry_postcode', $cInfo->entry_postcode);
+                  }
+                } else {
+                  echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true);
+                }
+              ?>
+              </td>
+
+            </tr>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_CITY; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_city_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_city_error == true) {
+                    echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"').'&nbsp;'.ENTRY_CITY_ERROR;
+                  } else {
+                    echo $cInfo->entry_city.xtc_draw_hidden_field('entry_city', $cInfo->entry_city);
+                  }
+                } else {
+                  echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true);
+                }
+                ?>
+              </td>
+
+            </tr>
+            
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_COUNTRY; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_country_error == true) ? ' col-error' : ''); ?>">
+                <?php
+                if ($error == true) {
+                  if ($entry_country_error == true) {
+                    echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"').'&nbsp;'.ENTRY_COUNTRY_ERROR;
+                  } else {
+                    echo xtc_get_country_name($cInfo->entry_country_id).xtc_draw_hidden_field('entry_country_id', $cInfo->entry_country_id);
+                  }
+                } else {
+                  echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"');
+                }
+                ?>
+              </td>
+            </tr>
+            <?php
+            if (ACCOUNT_STATE == 'true') {
+            ?>
+            <tr id="states">
+              <td class="dataTableConfig col-left"><?php echo ENTRY_STATE; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_state_error == true) ? ' col-error' : ''); ?>" id="entry_state">
+                <?php
+                $entry_state = xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state);
+                if ($error == true) {
+                  if ($entry_state_error == true) {
+                    if ($entry_state_has_zones == true) {
+                      $zones_array = array ();
+                      $zones_query = xtc_db_query("SELECT zone_name FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($cInfo->entry_country_id)."' order by zone_name");
+                      while ($zones_values = xtc_db_fetch_array($zones_query)) {
+                        $zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
+                      }
+                      echo xtc_draw_pull_down_menu('entry_state', $zones_array ,'', 'style="width:250px"').'&nbsp;'.ENTRY_STATE_ERROR;
+                    } else {
+                      echo xtc_draw_input_field('entry_state', xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)).'&nbsp;'.ENTRY_STATE_ERROR;
+                    }
+                  } else {
+                    echo $entry_state.xtc_draw_hidden_field('entry_zone_id', $cInfo->entry_zone_id).xtc_draw_hidden_field('entry_state', $cInfo->entry_state);
+                  }
+                } else {
+                  echo xtc_draw_input_field('entry_state', xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state));
+                }
+                ?>
+              </td>
+            </tr>
+            <?php
+            }
+            ?>
+
+          </table>
+        </div>
+        <?php
+        if ($cInfo->customers_default_address_id == $cInfo->address_book_id) {
+        ?>
+
+        <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_CONTACT; ?></span></div>
+
+        <?php
+        }
+        $style = ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? ' style="display:none;"' : '';
+        ?>
+        <div class="formAreaC"<?php $style;?>>
+          <table class="tableConfig borderall">
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
+              <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_telephone_error == true) ? ' col-error' : ''); ?>">
+              <?php
+                if ($error == true) {
+                  if ($entry_telephone_error == true) {
+                    echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"').'&nbsp;'.ENTRY_TELEPHONE_NUMBER_ERROR;
+                  } else {
+                    echo $cInfo->customers_telephone.xtc_draw_hidden_field('customers_telephone', $cInfo->customers_telephone);
+                  }
+                } else {
+                  echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', (ACCOUNT_TELEPHONE_OPTIONAL == 'false'));
+                }
+              ?>
+              </td>
+
+            </tr>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_FAX_NUMBER; ?></td>
+              <td class="dataTableConfig col-single-right">
+              <?php
+                if ($processed == true) {
+                  echo $cInfo->customers_fax.xtc_draw_hidden_field('customers_fax', $cInfo->customers_fax);
+                } else {
+                  echo xtc_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"');
+                }
+              ?>
+              </td>
+
+            </tr>
+          </table>
+        </div>
+        <?php
+        if ($cInfo->customers_default_address_id == $cInfo->address_book_id) {
+        ?>
+
+        <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_OPTIONS; ?></span></div>
+        <div class="formAreaC">
+          <table class="tableConfig borderall">
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_PAYMENT_UNALLOWED; ?></td>
+              <td class="dataTableConfig col-single-right">
+              <?php
+                echo xtc_cfg_checkbox_unallowed_module('payment', 'payment_unallowed', $cInfo->payment_unallowed);
+              ?>
+              </td>
+            </tr>
+            <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_SHIPPING_UNALLOWED; ?></td>
+              <td class="dataTableConfig col-single-right">
+              <?php
+                echo xtc_cfg_checkbox_unallowed_module('shipping', 'shipping_unallowed', $cInfo->shipping_unallowed);
+              ?>
+              </td>
+           </tr>
+           <tr>
+              <td class="dataTableConfig col-left"><?php echo ENTRY_NEW_PASSWORD; ?></td>
+              <td class="dataTableConfig col-single-right bg_notice<?php echo (($error == true && $entry_password_error == true) ? ' col-error' : ''); ?>">
+              <?php
+                if ($error == true) {
+                  if ($entry_password_error == true) {
+                    echo xtc_draw_password_field('customers_password', $cInfo->customers_password, false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"').'&nbsp;'.ENTRY_PASSWORD_ERROR;
+                  } else {
+                    echo xtc_draw_password_field('customers_password', $cInfo->customers_password, false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"');
+                  }
+                } else {
+                  echo xtc_draw_password_field('customers_password', '', false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"');
+                }
+                ?>
+              </td>
+           </tr>
+           <?php
+           if (ACTIVATE_GIFT_SYSTEM=='true') {
+           ?>
+           <tr>
+            <td class="dataTableConfig col-left"><?php echo TABLE_HEADING_AMOUNT; ?></td>
+            <td class="dataTableConfig col-single-right">
+            <?php  echo $xtPrice->xtcFormatCurrency($cInfo->amount).xtc_draw_hidden_field('amount', $cInfo->amount);
+              /*
+              if ($processed == true) {
+                echo $cInfo->amount.xtc_draw_hidden_field('amount', $cInfo->amount);
+              } else {
+                echo xtc_draw_input_field('amount', $cInfo->amount);
+              }
+              */
+              ?>
+            </td>
+           </tr>
+           <?php
+           }
+           ?>
+           <tr>
+             <?php
+             include(DIR_WS_MODULES . FILENAME_CUSTOMER_MEMO);
+             ?>
+           </tr>
+          </table>
+        </div>
+        <?php
+        }
+        ?>
+
+        <div class="main mrg5"><input type="submit" class="button" onclick="this.blur();" value="<?php echo BUTTON_UPDATE; ?>"><?php echo ' <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action', 'edit'))) .'">' . BUTTON_CANCEL . '</a>'; ?></div>
+
+      </form>
+    </div>
+    
+    <?php require(DIR_WS_INCLUDES . 'javascript/jquery.entry_state.js.php'); ?>    
+    <script>
+      $(document).ready(function () {
+        create_states($('select[name="entry_country_id"]').val(), 'entry_state');
+    
+        $('select[name="entry_country_id"]').change(function() {
+          create_states($(this).val(), 'entry_state');
+        });
+      });
+    </script>
\ No newline at end of file
Index: admin/includes/application_top.php
===================================================================
--- admin/includes/application_top.php	(nonexistent)
+++ admin/includes/application_top.php	(revision 1)
@@ -0,0 +1,280 @@
+<?php
+/* --------------------------------------------------------------
+   $Id: application_top.php 13484 2021-04-01 08:50:12Z GTB $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   --------------------------------------------------------------
+   based on:
+   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
+   (c) 2002-2003 osCommerce(application_top.php,v 1.158 2003/03/22); www.oscommerce.com
+   (c) 2003 nextcommerce (application_top.php,v 1.46 2003/08/24); www.nextcommerce.org
+   (c) 2006 XT-Commerce (application_top.php 1323 2005-10-27) ; www.xt-commerce.com
+
+   Released under the GNU General Public License
+   --------------------------------------------------------------
+   Third Party contribution:
+
+   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist
+
+   Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
+   http://www.oscommerce.com/community/contributions,282
+   Copyright (c) Strider | Strider@oscworks.com
+   Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
+   Copyright (c) Andre ambidex@gmx.net
+   Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
+
+   Released under the GNU General Public License
+   --------------------------------------------------------------*/
+
+//Run Mode
+define('RUN_MODE_ADMIN',true);
+
+// Start the clock for the page parse time log
+define('PAGE_PARSE_START_TIME', microtime(true));
+
+// set the level of error reporting
+@ini_set('display_errors', false);
+error_reporting(0);
+
+// security
+define('_VALID_XTC',true);
+
+// Disable use_trans_sid as xtc_href_link() does this manually
+if (function_exists('ini_set')) {
+  @ini_set('session.use_trans_sid', 0);
+}
+
+// configuration parameters
+if (file_exists('../includes/local/configure.php')) {
+  include_once('../includes/local/configure.php');
+} else {
+  include_once('../includes/configure.php');
+}
+
+// minimum requirement
+if (version_compare(PHP_VERSION, '5.6', '<')) {
+  die('<h1>Minimum requirement PHP Version 5.6</h1>');
+}
+
+// default time zone
+date_default_timezone_set('Europe/Berlin');
+
+// new error handling
+if (is_file(DIR_FS_CATALOG.DIR_WS_INCLUDES.'error_reporting.php')) {
+  require_once (DIR_FS_CATALOG.DIR_WS_INCLUDES.'error_reporting.php');
+}
+
+// security inputfilter for GET/POST/COOKIE
+require (DIR_FS_CATALOG.DIR_WS_CLASSES.'inputfilter.php');
+$inputfilter = new Inputfilter();
+$_GET = $inputfilter->validate($_GET);
+$_POST = $inputfilter->validate($_POST);
+$_REQUEST = $inputfilter->validate($_REQUEST);
+
+// auto include
+require_once (DIR_FS_INC . 'auto_include.inc.php');
+
+// project versison
+require_once (DIR_WS_INCLUDES.'version.php');
+
+// Base/PHP_SELF/SSL-PROXY
+require_once(DIR_FS_INC . 'set_php_self.inc.php');
+$PHP_SELF = set_php_self();
+
+define('TAX_DECIMAL_PLACES', 0);
+
+// include the list of project filenames
+require (DIR_FS_ADMIN.DIR_WS_INCLUDES.'filenames.php');
+
+// list of project database tables
+require_once(DIR_FS_CATALOG.DIR_WS_INCLUDES.'database_tables.php');
+
+// Database
+require_once (DIR_FS_INC.'db_functions_'.DB_MYSQL_TYPE.'.inc.php');
+require_once (DIR_FS_INC.'db_functions.inc.php');
+
+// include needed functions
+require_once(DIR_FS_INC . 'xtc_get_ip_address.inc.php');
+require_once(DIR_FS_INC . 'xtc_setcookie.inc.php');
+require_once(DIR_FS_INC . 'xtc_validate_email.inc.php');
+require_once(DIR_FS_INC . 'xtc_not_null.inc.php');
+require_once(DIR_FS_INC . 'xtc_add_tax.inc.php');
+require_once(DIR_FS_INC . 'xtc_get_tax_rate.inc.php');
+require_once(DIR_FS_INC . 'xtc_get_qty.inc.php');
+require_once(DIR_FS_INC . 'xtc_product_link.inc.php');
+require_once(DIR_FS_INC . 'xtc_cleanName.inc.php');
+require_once(DIR_FS_INC . 'xtc_get_top_level_domain.inc.php');
+require_once(DIR_FS_INC . 'html_encoding.php'); //new function for PHP5.4
+require_once(DIR_FS_INC . 'xtc_backup_restore_configuration.php');
+require_once(DIR_FS_INC . 'xtc_check_agent.inc.php');
+require_once(DIR_FS_INC . 'xtc_parse_category_path.inc.php');
+require_once(DIR_FS_INC . 'xtc_input_validation.inc.php');
+require_once(DIR_FS_INC . 'xtc_get_category_path.inc.php');
+
+foreach(auto_include(DIR_FS_ADMIN.'includes/extra/functions/','php') as $file) require ($file);
+
+// design layout (wide of boxes in pixels) (default: 125)
+define('BOX_WIDTH', 125);
+
+// make a connection to the database... now
+xtc_db_connect() or die('Unable to connect to database server!');
+
+// set application wide parameters
+define('DB_CACHE', 'false');
+$duplicate_configuration = array();
+$configuration_query = xtc_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . '');
+while ($configuration = xtc_db_fetch_array($configuration_query)) {
+  if ($configuration['cfgKey'] != 'DB_CACHE' && $configuration['cfgKey'] != 'STORE_DB_TRANSACTIONS') {
+    if (!defined($configuration['cfgKey'])) {
+      define($configuration['cfgKey'], stripslashes($configuration['cfgValue']));
+    } else {
+      $duplicate_configuration[] = $configuration['cfgKey'];
+    }
+  }
+}
+
+foreach(auto_include(DIR_FS_ADMIN.'includes/extra/application_top/application_top_begin/','php') as $file) require ($file);
+
+define('FILENAME_IMAGEMANIPULATOR',IMAGE_MANIPULATOR);
+
+// initialize the logger class
+require(DIR_WS_CLASSES . 'logger.php');
+
+// shopping cart class
+require(DIR_WS_CLASSES . 'shopping_cart.php');
+
+// todo
+require(DIR_WS_FUNCTIONS . 'general.php');
+
+// define how the session functions will be used
+require(DIR_WS_FUNCTIONS . 'sessions.php');
+
+  // define our general functions used application-wide
+require(DIR_WS_FUNCTIONS . 'html_output.php');
+
+// set the type of request (secure or not)
+if (file_exists(DIR_WS_INCLUDES . 'request_type.php')) {
+  include (DIR_WS_INCLUDES . 'request_type.php');
+} else {
+  $request_type = 'NONSSL';
+}
+
+// set the top level domains
+$http_domain_arr = xtc_get_top_level_domain(HTTP_SERVER);
+$https_domain_arr = xtc_get_top_level_domain(HTTPS_SERVER);
+$http_domain = $http_domain_arr['domain'];
+$https_domain = $https_domain_arr['domain'];
+$current_domain = (($request_type == 'NONSSL') ? $http_domain : $https_domain);
+
+// set the top level domains to delete
+$current_domain_delete = (($request_type == 'NONSSL') ? $http_domain_arr['delete'] : $https_domain_arr['delete']);
+
+// set the session name and save path
+// set the session cookie parameters
+// set the session ID if it exists
+// start the session
+// Redirect search engines with session id to the same url without session id to prevent indexing session id urls
+// check for Cookie usage
+// check the Agent
+include (DIR_FS_CATALOG.DIR_WS_MODULES.'set_session_and_cookie_parameters.php');
+
+// verify the ssl_session_id if the feature is enabled
+// verify the browser user agent if the feature is enabled
+// verify the IP address if the feature is enabled
+include (DIR_FS_CATALOG.DIR_WS_MODULES.'verify_session.php');
+
+// set the language
+include (DIR_FS_CATALOG.DIR_WS_MODULES.'set_language_sessions.php');
+
+// include the language translations
+require_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$_SESSION['language'] . '.php');
+require_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/buttons.php');
+$current_page = basename($PHP_SELF);
+if (is_file(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/' . $current_page)) {
+  require_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/' . $current_page);
+}
+
+// write customers status in session
+require(DIR_FS_CATALOG.DIR_WS_INCLUDES.'write_customers_status.php');
+
+// call from filemanager
+if (defined('_IS_FILEMANAGER')) return;
+
+// check permission
+if (is_file(DIR_FS_ADMIN.$current_page) == false || $_SESSION['customers_status']['customers_status_id'] !== '0') {
+  xtc_redirect(xtc_catalog_href_link(FILENAME_LOGIN));
+}
+
+// define our localization functions
+require(DIR_WS_FUNCTIONS . 'localization.php');
+
+// setup our boxes
+require(DIR_WS_CLASSES . 'table_block.php');
+require(DIR_WS_CLASSES . 'box.php');
+
+// initialize the message stack for output messages
+require(DIR_WS_CLASSES . 'message_stack.php');
+$messageStack = new messageStack();
+
+// verfiy CSRF Token
+if (CSRF_TOKEN_SYSTEM == 'true') {
+  require_once(DIR_FS_INC . 'csrf_token.inc.php');
+}
+
+// split-page-results
+require(DIR_WS_CLASSES . 'split_page_results.php');
+
+// entry/item info classes
+require(DIR_WS_CLASSES . 'object_info.php');
+
+// file uploading class
+require(DIR_WS_CLASSES . 'upload.php');
+
+// content, product, category - sql group_check/fsk_lock
+require (DIR_FS_CATALOG.DIR_WS_INCLUDES.'define_conditions.php');
+
+// add_select
+require (DIR_FS_CATALOG.DIR_WS_INCLUDES.'define_add_select.php');
+
+// calculate category path
+$cPath = isset($_GET['cPath']) ? $_GET['cPath'] : '';
+if (strlen($cPath) > 0) {
+  $cPath_array = xtc_parse_category_path($cPath);
+  $current_category_id = end($cPath_array);
+} else {
+  $current_category_id = 0;
+}
+
+// check if a default currency is set
+if (!defined('DEFAULT_CURRENCY')) {
+  $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
+}
+
+// check if a default language is set
+if (!defined('DEFAULT_LANGUAGE')) {
+  $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
+}
+
+// for Customers Status
+xtc_get_customers_statuses();
+
+$pagename = strtok($current_page, '.');
+if (!isset($_SESSION['customer_id'])) {
+  xtc_redirect(xtc_catalog_href_link(FILENAME_LOGIN));
+}
+
+xtc_check_permission($pagename);
+
+// set which precautions should be checked
+defined('WARN_CONFIG_WRITEABLE') OR define('WARN_CONFIG_WRITEABLE', 'true');
+defined('WARN_FILES_WRITEABLE') OR define('WARN_FILES_WRITEABLE', 'true');
+defined('WARN_DIRS_WRITEABLE') OR define('WARN_DIRS_WRITEABLE', 'true');
+
+foreach(auto_include(DIR_FS_ADMIN.'includes/extra/application_top/application_top_end/','php') as $file) require ($file);
+
+//compatibility for modified eCommerce Shopsoftware 1.06 files
+defined('DIR_WS_BASE') OR define('DIR_WS_BASE', '');
+?>
\ No newline at end of file
Index: admin/includes/column_left.php
===================================================================
--- admin/includes/column_left.php	(nonexistent)
+++ admin/includes/column_left.php	(revision 1)
@@ -0,0 +1,238 @@
+<?php
+  /* --------------------------------------------------------------
+   $Id: column_left.php 13490 2021-04-01 10:15:45Z Tomcraft $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   --------------------------------------------------------------
+   based on:
+   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
+   (c) 2002-2003 osCommerce(column_left.php,v 1.15 2002/01/11); www.oscommerce.com
+   (c) 2003 nextcommerce (column_left.php,v 1.25 2003/08/19); www.nextcommerce.org
+   (c) 2006 XT-Commerce (content_manager.php 1304 2005-10-12)
+
+   Released under the GNU General Public License
+   --------------------------------------------------------------*/
+defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' );
+
+$admin_access = array();
+if (($_SESSION['customers_status']['customers_status_id'] == '0')) {
+  $admin_access_query = xtc_db_query("SELECT * FROM " . TABLE_ADMIN_ACCESS . " WHERE customers_id = ".(int)$_SESSION['customer_id']);
+  $admin_access = xtc_db_fetch_array($admin_access_query); 
+}
+
+//begin----------------------------functions----------------------------------------------------------------------------------
+
+// mainMenue($box_title);
+if (!function_exists('mainMenue')) { // erste ebene
+  function mainMenue($box_title) {
+    $html  = '<li>';            
+    if (defined('NEW_ADMIN_STYLE')) {
+      $html .= '<div class="dataNavHeadingContent"><a href="#"><strong>'.$box_title.'</strong></a></div>';
+    } else {
+      $html .= '<div class="dataNavHeadingContent"><strong>'.$box_title.'</strong></div>';
+    }
+    $html .= PHP_EOL .'<ul>'.PHP_EOL;
+    return $html;
+  }
+}
+
+// endMenue($box_title);
+if (!function_exists('endMenue')) { // menue schliessen
+  function endMenue($box_title) {    
+    $html = '</ul>'.PHP_EOL;
+    $html .= '</li>'.PHP_EOL;
+    // extra menu
+    if (function_exists('dynamicsAdds')) {
+      $html  = dynamicsAdds($box_title) . $html;
+    }
+    return $html;
+  }
+}
+
+//end----------------------------functions----------------------------------------------------------------------------------
+
+// extra menu
+if(file_exists(DIR_WS_INCLUDES.'extra_menu.php')) {
+  require_once(DIR_WS_INCLUDES.'extra_menu.php');
+}
+
+//begin--------------------------HTML----------------------------------------------------------------------------------
+
+echo '<div id="cssmenu" class="suckertreemenu">';
+echo '<ul id="treemenu1">';
+
+//---------------------------Ausgewaehlte Admin Sprache als Flagge
+echo '<li><div id="lang_flag">' . xtc_image('../lang/' .  $_SESSION['language'] .'/admin/images/' . 'icon.gif', $_SESSION['language']). '</div></li>';
+
+//---------------------------STARTSEITE
+echo '<li><a href="' . xtc_href_link('start.php', '', 'NONSSL') . '" id="current"><b>' . TEXT_ADMIN_START . '</b></a></li>'; 
+
+//---------------------------KUNDEN
+echo mainMenue(BOX_HEADING_CUSTOMERS);
+    if ($admin_access['customers'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CUSTOMERS . '</a></li>';
+    if ($admin_access['customers_status'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CUSTOMERS_STATUS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CUSTOMERS_STATUS . '</a></li>';
+    if ($admin_access['customers_group'] == '1' && GROUP_CHECK == 'true') echo '<li><a href="' . xtc_href_link('customers_group.php', '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CUSTOMERS_GROUP . '</a></li>';
+    if ($admin_access['orders'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_ORDERS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ORDERS . '</a></li>';
+    if ($admin_access['module_export'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_EXPORT, 'set=export&module=dsgvo_export', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_DSGVO_EXPORT . '</a></li>';
+echo endMenue(BOX_HEADING_CUSTOMERS);
+
+//---------------------------ARTIKELKATALOG
+echo mainMenue(BOX_HEADING_PRODUCTS);
+    if ($admin_access['categories'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CATEGORIES . '</a></li>';
+    if ($admin_access['products_attributes'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_ATTRIBUTES . '</a></li>';
+    if ($admin_access['products_tags'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PRODUCTS_TAGS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_TAGS . '</a></li>';
+    if ($admin_access['manufacturers'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_MANUFACTURERS . '</a></li>';
+    if ($admin_access['reviews'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_REVIEWS . '</a></li>';
+    if ($admin_access['specials'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_SPECIALS . '</a></li>';
+    if ($admin_access['products_expected'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_EXPECTED . '</a></li>';
+    if ($admin_access['stats_stock_warning'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_STATS_STOCK_WARNING, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_STOCK_WARNING . '</a></li>';
+echo endMenue(BOX_HEADING_PRODUCTS);
+
+//---------------------------MODULE
+echo mainMenue(BOX_HEADING_MODULES);
+    if ($admin_access['modules'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULES, 'set=payment', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PAYMENT . '</a></li>';
+    if ($admin_access['modules'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULES, 'set=shipping', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_SHIPPING . '</a></li>';
+    if ($admin_access['modules'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULES, 'set=ordertotal', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ORDER_TOTAL . '</a></li>';
+    if ($admin_access['modules'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULES, 'set=categories', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_MODULE_TYPE . '</a></li>';
+    if ($admin_access['module_export'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_EXPORT, 'set=export&module=sitemaporg', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GOOGLE_SITEMAP . '</a></li>';
+    if ($admin_access['module_export'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_EXPORT, 'set=system', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_MODULE_SYSTEM . '</a></li>';
+    if ($admin_access['module_export'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_EXPORT, 'set=export', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_MODULE_EXPORT . '</a></li>';
+echo endMenue(BOX_HEADING_MODULES);
+
+//---------------------------PARTNER
+echo mainMenue(BOX_HEADING_PARTNER_MODULES);
+    if (isset($admin_access['janolaw']) && $admin_access['janolaw'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_JANOLAW, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_JANOLAW . '</a></li>';
+    if (isset($admin_access['it_recht_kanzlei']) && $admin_access['it_recht_kanzlei'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_IT_RECHT_KANZLEI, '') . '" class="menuBoxContentLink"> -' . BOX_IT_RECHT_KANZLEI . '</a></li>';
+    if (isset($admin_access['haendlerbund']) && $admin_access['haendlerbund'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_HAENDLERBUND, '') . '" class="menuBoxContentLink"> -' . BOX_HAENDLERBUND . '</a></li>';
+    if (isset($admin_access['protectedshops']) && $admin_access['protectedshops'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PROTECTEDSHOPS, '') . '" class="menuBoxContentLink"> -' . BOX_PROTECTEDSHOPS . '</a></li>';
+    if (isset($admin_access['cleverreach']) && $admin_access['cleverreach'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CLEVERREACH, '') . '" class="menuBoxContentLink"> -' . BOX_CLEVERREACH . '</a></li>';
+    if (isset($admin_access['supermailer']) && $admin_access['supermailer'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SUPERMAILER, '') . '" class="menuBoxContentLink"> -' . BOX_SUPERMAILER . '</a></li>';
+    if (isset($admin_access['trustedshops']) && $admin_access['trustedshops'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_TRUSTEDSHOPS, '') . '" class="menuBoxContentLink"> -' . BOX_TRUSTEDSHOPS . '</a></li>';
+
+    ## PayPal
+    include(DIR_FS_EXTERNAL.'paypal/modules/column_left.php');
+
+    ## shipcloud
+    include(DIR_FS_EXTERNAL.'shipcloud/column_left.php');
+    
+    ## Magnalister
+    if(defined('MODULE_MAGNALISTER_STATUS') && MODULE_MAGNALISTER_STATUS=='True') {
+      if (isset($admin_access['magnalister']) && $admin_access['magnalister'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MAGNALISTER."", '', 'NONSSL') . '" class="menuBoxContentLink"> -'.BOX_MAGNALISTER.'</a></li>';
+    } else {
+      if ($admin_access['modules'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_EXPORT, 'set=system&module=magnalister', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_MAGNALISTER . '</a></li>';
+    }
+    
+    ## Payone
+    include(DIR_FS_EXTERNAL.'payone/modules/column_left.php');
+    
+    ## Shopgate
+    if(defined('MODULE_PAYMENT_SHOPGATE_STATUS') && MODULE_PAYMENT_SHOPGATE_STATUS=='True') {
+      include_once (DIR_FS_CATALOG.'includes/external/shopgate/base/admin/includes/column_left.php');
+    } else {
+      if ($admin_access['shopgate'] == '1') echo '<li><a href="' . xtc_href_link('shopgate.php', 'sg_option=info', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_SHOPGATE . '</a></li>';
+    }
+    
+    ## SEMKNOX
+    if (isset($admin_access['semknox']) && $admin_access['semknox'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SEMKNOX, '') . '" class="menuBoxContentLink"> -' . BOX_SEMKNOX . '</a></li>';
+echo endMenue(BOX_HEADING_PARTNER_MODULES);
+
+//---------------------------STATISTIKEN
+echo mainMenue(BOX_HEADING_STATISTICS);
+    if ($admin_access['stats_products_viewed'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_VIEWED . '</a></li>';
+    if ($admin_access['stats_products_purchased'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_PURCHASED . '</a></li>';
+    if ($admin_access['stats_customers'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_STATS_CUSTOMERS . '</a></li>';
+    if ($admin_access['stats_sales_report'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SALES_REPORT, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_SALES_REPORT . '</a></li>';
+    if ($admin_access['stats_campaigns'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CAMPAIGNS_REPORT, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CAMPAIGNS_REPORT . '</a></li>';
+echo endMenue(BOX_HEADING_STATISTICS);
+
+//---------------------------HILFSPROGRAMME
+echo mainMenue(BOX_HEADING_TOOLS);
+    if (defined('MODULE_NEWSLETTER_STATUS') && MODULE_NEWSLETTER_STATUS == 'true') {
+      if ($admin_access['newsletter_recipients'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_NEWSLETTER_RECIPIENTS) . '" class="menuBoxContentLink"> -' . BOX_NEWSLETTER_RECIPIENTS . '</a></li>';
+      if ($admin_access['module_newsletter'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_MODULE_NEWSLETTER) . '" class="menuBoxContentLink"> -' . BOX_MODULE_NEWSLETTER . '</a></li>';
+    }
+    if ($admin_access['content_manager'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CONTENT_MANAGER) . '" class="menuBoxContentLink"> -' . BOX_CONTENT . '</a></li>';
+    if ($admin_access['removeoldpics'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_REMOVEOLDPICS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_REMOVEOLDPICS . '</a></li>';
+    if ($admin_access['backup'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_BACKUP) . '" class="menuBoxContentLink"> -' . BOX_BACKUP . '</a></li>';
+    if (defined('MODULE_BANNER_MANAGER_STATUS') && MODULE_BANNER_MANAGER_STATUS == 'true') {
+      if ($admin_access['banner_manager'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_BANNER_MANAGER) . '" class="menuBoxContentLink"> -' . BOX_BANNER_MANAGER . '</a></li>';
+    }
+    if ($admin_access['server_info'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SERVER_INFO) . '" class="menuBoxContentLink"> -' . BOX_SERVER_INFO . '</a></li>';
+    if ($admin_access['whos_online'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_WHOS_ONLINE) . '" class="menuBoxContentLink"> -' . BOX_WHOS_ONLINE . '</a></li>';
+    if ($admin_access['csv_backend'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CSV_BACKEND) . '" class="menuBoxContentLink"> -' . BOX_IMPORT . '</a></li>';
+    if ($admin_access['parcel_carriers'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PARCEL_CARRIERS) . '" class="menuBoxContentLink"> -' . BOX_PARCEL_CARRIERS . '</a></li>';
+    if ($admin_access['logs'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_LOGS) . '" class="menuBoxContentLink"> -' . BOX_LOGS . '</a></li>';
+    if ($admin_access['blacklist_logs'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_BLACKLIST_LOGS) . '" class="menuBoxContentLink"> -' . BOX_BLACKLIST_LOGS . '</a></li>';
+echo endMenue(BOX_HEADING_TOOLS);
+
+//---------------------------GUTSCHEINE
+if (ACTIVATE_GIFT_SYSTEM=='true') {
+echo mainMenue(BOX_HEADING_GV_ADMIN);
+    if ($admin_access['coupon_admin'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_COUPON_ADMIN, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_COUPON_ADMIN . '</a></li>';
+    if ($admin_access['gv_queue'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_GV_QUEUE, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GV_ADMIN_QUEUE . '</a></li>';
+    if ($admin_access['gv_mail'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_GV_MAIL, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GV_ADMIN_MAIL . '</a></li>';
+    if ($admin_access['gv_sent'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_GV_SENT, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GV_ADMIN_SENT . '</a></li>';
+    if ($admin_access['gv_customers'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_GV_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GV_CUSTOMERS . '</a></li>';
+echo endMenue(BOX_HEADING_GV_ADMIN); 
+}
+
+//---------------------------LAND / STEUER
+echo mainMenue(BOX_HEADING_ZONE);
+    if ($admin_access['languages'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_LANGUAGES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_LANGUAGES . '</a></li>';
+    if ($admin_access['countries'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_COUNTRIES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_COUNTRIES . '</a></li>';
+    if ($admin_access['currencies'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CURRENCIES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CURRENCIES. '</a></li>';
+    if ($admin_access['zones'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_ZONES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ZONES . '</a></li>';
+    if ($admin_access['geo_zones'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_GEO_ZONES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_GEO_ZONES . '</a></li>';
+    if ($admin_access['tax_classes'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_TAX_CLASSES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_TAX_CLASSES . '</a></li>';
+    if ($admin_access['tax_rates'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_TAX_RATES, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_TAX_RATES . '</a></li>';
+echo endMenue(BOX_HEADING_ZONE);
+
+//---------------------------KONFIGURATION
+echo mainMenue(BOX_HEADING_CONFIGURATION);
+    if ($admin_access['configuration'] == '1') {
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=1', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_1 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=1000', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_1000 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=2', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_2 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=3', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_3 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=4', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_4 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=5', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_5 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=7', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_7 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=8', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_8 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=9', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_9 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=12', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_12 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=13', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_13 . '</a></li>';
+    }
+    if ($admin_access['orders_status'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_ORDERS_STATUS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ORDERS_STATUS . '</a></li>';
+    if (ACTIVATE_SHIPPING_STATUS=='true' && $admin_access['shipping_status'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_SHIPPING_STATUS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_SHIPPING_STATUS . '</a></li>';
+    if ($admin_access['products_vpe'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_PRODUCTS_VPE . '</a></li>';
+    if ($admin_access['campaigns'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_CAMPAIGNS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CAMPAIGNS . '</a></li>';
+    if ($admin_access['cross_sell_groups'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_XSELL_GROUPS, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_ORDERS_XSELL_GROUP . '</a></li>';
+    if (isset($admin_access['cookie_consent']) && $admin_access['cookie_consent'] == '1') echo '<li><a href="' . xtc_href_link(FILENAME_COOKIE_CONSENT, '', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_COOKIE_CONSENT . '</a></li>';
+echo endMenue(BOX_HEADING_CONFIGURATION);
+
+//---------------------------KONFIGURATION 2
+echo mainMenue(BOX_HEADING_CONFIGURATION2);
+    if ($admin_access['shop_offline'] == '1') echo '<li><a href="' . xtc_href_link('shop_offline.php', '', 'NONSSL') . '" class="menuBoxContentLink"> -'.'Shop online/offline'.'</a></li>';
+    if ($admin_access['configuration'] == '1') {
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=10', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_10 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=11', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_11 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=14', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_14 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=15', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_15 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=16', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_16 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=17', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_17 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=18', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_18 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=19', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_19 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=22', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_22 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=40', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_40 . '</a></li>'; 
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=24', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_24 . '</a></li>';
+      echo '<li><a href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=25', 'NONSSL') . '" class="menuBoxContentLink"> -' . BOX_CONFIGURATION_25 . '</a></li>';
+    }
+echo endMenue(BOX_HEADING_CONFIGURATION2);
+
+echo '</ul>'; 
+echo '</div>';
+
+//end----------------------------HTML----------------------------------------------------------------------------------
\ No newline at end of file
Index: admin/customers.php
===================================================================
--- admin/customers.php	(nonexistent)
+++ admin/customers.php	(revision 1)
@@ -0,0 +1,715 @@
+<?php
+  /* --------------------------------------------------------------
+   $Id: customers.php 13419 2021-02-09 15:13:48Z GTB $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   --------------------------------------------------------------
+   based on:
+   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
+   (c) 2002-2003 osCommerce(customers.php,v 1.76 2003/05/04); www.oscommerce.com
+   (c) 2003   nextcommerce (customers.php,v 1.22 2003/08/24); www.nextcommerce.org
+   (c) 2006 XT-Commerce (customers.php 1296 2005-10-08)
+
+   Released under the GNU General Public License
+   --------------------------------------------------------------
+   Third Party contribution:
+   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist
+
+   Released under the GNU General Public License
+   --------------------------------------------------------------*/
+
+  require ('includes/application_top.php');
+  
+  require_once (DIR_FS_INC.'xtc_validate_vatid_status.inc.php');
+  require_once (DIR_FS_INC.'xtc_get_geo_zone_code.inc.php');
+  require_once (DIR_FS_INC.'xtc_encrypt_password.inc.php');
+  require_once (DIR_FS_INC.'xtc_js_lang.php');
+  require_once (DIR_FS_INC.'ip_clearing.inc.php');
+  require_once (DIR_FS_INC.'get_customers_gender.inc.php');
+  
+  require(DIR_WS_INCLUDES . 'get_states.php');
+
+  // split page results
+  if(!defined('MAX_DISPLAY_LIST_CUSTOMERS')) {
+    define('MAX_DISPLAY_LIST_CUSTOMERS', 100);
+  }
+
+  // customers totals
+  require(DIR_WS_CLASSES . 'currencies.php');
+  $currencies = new currencies();
+
+  $customers_statuses_array = xtc_get_customers_statuses();
+  // changes all $customers_statuses_array[xx] to $customers_statuses_id_array[xx]  in html section
+  $customers_statuses_id_array = array();
+  for ($i=0;$n=sizeof($customers_statuses_array),$i<$n;$i++) {
+    $customers_statuses_id_array[$customers_statuses_array[$i]['id']] = $customers_statuses_array[$i];
+  }
+
+  $processed = false;
+  $error = false;
+  $entry_vat_error_text = '';
+  $action = (isset($_GET['action']) ? $_GET['action'] : '');
+  $customers_id = (isset($_GET['cID']) ? (int)$_GET['cID'] : 0);
+  $page = (isset($_GET['page']) ? (int)$_GET['page'] : 1);
+
+  if (isset($_GET['special']) && $_GET['special'] == 'remove_memo') {
+    $mID = xtc_db_prepare_input($_GET['mID']);
+    xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_MEMO." WHERE memo_id = '".(int)$mID."'");
+    xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'special')).'cID='.$customers_id.'&action=edit'));
+  }
+
+  if (($action == 'edit' || $action == 'update') && !(($customers_id == 1 && $_SESSION['customer_id'] == 1) || $customers_id != 1)) {
+    xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, ''));
+  }
+
+  if ($action) {
+    switch ($action) {
+      case 'new_order_confirm':
+        // customers
+        $customers1_query = xtc_db_query("SELECT * FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".$customers_id."'");
+        $customers1 = xtc_db_fetch_array($customers1_query);
+
+        // customers default address
+        $customers_query = xtc_db_query("SELECT * FROM ".TABLE_ADDRESS_BOOK."
+                                          WHERE customers_id = '".$customers_id."'
+                                            AND address_book_id =  '".$customers1['customers_default_address_id']."'");
+        $customers = xtc_db_fetch_array($customers_query);
+
+        // countries
+        $country_query = xtc_db_query("SELECT countries_name, countries_iso_code_2, address_format_id
+                                         FROM ".TABLE_COUNTRIES."
+                                        WHERE countries_id = '".$customers['entry_country_id']."'");
+        $country = xtc_db_fetch_array($country_query);
+
+        // customers status
+        $stat_query = xtc_db_query("SELECT * FROM ".TABLE_CUSTOMERS_STATUS." WHERE customers_status_id = '".(int)$customers1['customers_status']."' AND language_id = '".(int)$_SESSION['languages_id']."'");
+        $stat = xtc_db_fetch_array($stat_query);
+
+        if (file_exists(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/' . $_POST['shipping'] . '.php')) {
+          require_once(DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/' . $_POST['shipping'] . '.php');
+        }
+
+        $sql_data_array = array (
+            'customers_id' => xtc_db_prepare_input($customers['customers_id']),
+            'customers_cid' => xtc_db_prepare_input($customers1['customers_cid']),
+            'customers_vat_id' => xtc_db_prepare_input($customers1['customers_vat_id']),
+            'customers_status' => xtc_db_prepare_input($customers1['customers_status']),
+            'customers_status_name' => xtc_db_prepare_input($stat['customers_status_name']),
+            'customers_status_image' => xtc_db_prepare_input($stat['customers_status_image']),
+            'customers_status_discount' => xtc_db_prepare_input($stat['customers_status_discount']),
+            'customers_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']),
+            'customers_lastname' => xtc_db_prepare_input($customers['entry_lastname']),
+            'customers_firstname' => xtc_db_prepare_input($customers['entry_firstname']),
+            'customers_gender' => xtc_db_prepare_input($customers['entry_gender']),
+            'customers_company' => xtc_db_prepare_input($customers['entry_company']),
+            'customers_street_address' => xtc_db_prepare_input($customers['entry_street_address']),
+            'customers_suburb' => xtc_db_prepare_input($customers['entry_suburb']),
+            'customers_city' => xtc_db_prepare_input($customers['entry_city']),
+            'customers_postcode' => xtc_db_prepare_input($customers['entry_postcode']),
+            'customers_state' => xtc_db_prepare_input(xtc_get_zone_code($customers['entry_country_id'], $customers['entry_zone_id'], $customers['entry_state'])),
+            'customers_country' => xtc_db_prepare_input($country['countries_name']),
+            'customers_telephone' => xtc_db_prepare_input($customers1['customers_telephone']),
+            'customers_email_address' => xtc_db_prepare_input($customers1['customers_email_address']),
+            'customers_country_iso_code_2' => xtc_db_prepare_input($country['countries_iso_code_2']),
+            'customers_address_format_id' => xtc_db_prepare_input($country['address_format_id']),
+            'delivery_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']),
+            'delivery_lastname' => xtc_db_prepare_input($customers['entry_lastname']),
+            'delivery_firstname' => xtc_db_prepare_input($customers['entry_firstname']),
+            'delivery_gender' => xtc_db_prepare_input($customers['entry_gender']),
+            'delivery_company' => xtc_db_prepare_input($customers['entry_company']),
+            'delivery_street_address' => xtc_db_prepare_input($customers['entry_street_address']),
+            'delivery_suburb' => xtc_db_prepare_input($customers['entry_suburb']),
+            'delivery_city' => xtc_db_prepare_input($customers['entry_city']),
+            'delivery_postcode' => xtc_db_prepare_input($customers['entry_postcode']),
+            'delivery_state' => xtc_db_prepare_input(xtc_get_zone_code($customers['entry_country_id'], $customers['entry_zone_id'], $customers['entry_state'])),
+            'delivery_country' => xtc_db_prepare_input($country['countries_name']),
+            'delivery_country_iso_code_2' => xtc_db_prepare_input($country['countries_iso_code_2']),
+            'delivery_address_format_id' => xtc_db_prepare_input($country['address_format_id']),
+            'billing_name' => xtc_db_prepare_input($customers['entry_firstname'].' '.$customers['entry_lastname']),
+            'billing_lastname' => xtc_db_prepare_input($customers['entry_lastname']),
+            'billing_firstname' => xtc_db_prepare_input($customers['entry_firstname']),
+            'billing_gender' => xtc_db_prepare_input($customers['entry_gender']),
+            'billing_company' => xtc_db_prepare_input($customers['entry_company']),
+            'billing_street_address' => xtc_db_prepare_input($customers['entry_street_address']),
+            'billing_suburb' => xtc_db_prepare_input($customers['entry_suburb']),
+            'billing_city' => xtc_db_prepare_input($customers['entry_city']),
+            'billing_postcode' => xtc_db_prepare_input($customers['entry_postcode']),
+            'billing_state' => xtc_db_prepare_input(xtc_get_zone_code($customers['entry_country_id'], $customers['entry_zone_id'], $customers['entry_state'])),
+            'billing_country' => xtc_db_prepare_input($country['countries_name']),
+            'billing_country_iso_code_2' => xtc_db_prepare_input($country['countries_iso_code_2']),
+            'billing_address_format_id' => xtc_db_prepare_input($country['address_format_id']),
+            'payment_method' => xtc_db_prepare_input($_POST['payment']),
+            'comments' => '',
+            'date_purchased' => 'now()',
+            'orders_status' => DEFAULT_ORDERS_STATUS_ID,
+            'currency' => DEFAULT_CURRENCY,
+            'currency_value' => '1.0000',
+            'account_type' => $customers1['account_type'],
+            'payment_class' => xtc_db_prepare_input($_POST['payment']),
+            'shipping_method' => constant('MODULE_SHIPPING_'.strtoupper($_POST['shipping']).'_TEXT_TITLE'),
+            'shipping_class' => xtc_db_prepare_input($_POST['shipping']).'_'.xtc_db_prepare_input($_POST['shipping']),
+            'customers_ip' => ip_clearing($_SESSION['tracking']['ip']),
+            'language' => $_SESSION['language'],
+            'languages_id' => $_SESSION['languages_id']
+          );
+
+        xtc_db_perform(TABLE_ORDERS, $sql_data_array);
+        $orders_id = xtc_db_insert_id();
+
+        $sql_data_array = array (
+            'orders_id' => (int)$orders_id,
+            'orders_status_id' => DEFAULT_ORDERS_STATUS_ID,
+            'date_added' => 'now()',
+            'customer_notified' => '0',
+            'comments' => '',
+          );
+        xtc_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
+
+        require_once (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_total.php');
+        $sql_data_array = array(
+            'orders_id' => (int)$orders_id,
+            'title' => MODULE_ORDER_TOTAL_TOTAL_TITLE.':',
+            'text' => '0',
+            'value' => '0',
+            'class' => 'ot_total',
+            'sort_order' => MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER
+          );
+        xtc_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
+
+        require_once (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_shipping.php');
+        $sql_data_array = array(
+            'orders_id' => (int)$orders_id,
+            'title' => constant('MODULE_SHIPPING_'.strtoupper($_POST['shipping']).'_TEXT_TITLE').':',
+            'text' => '0',
+            'value' => '0',
+            'class' => 'ot_shipping',
+            'sort_order' => MODULE_ORDER_TOTAL_SHIPPING_SORT_ORDER
+          );
+        xtc_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
+
+        require_once (DIR_FS_LANGUAGES.$_SESSION['language'].'/modules/order_total/ot_subtotal.php');
+        $sql_data_array = array(
+            'orders_id' => (int)$orders_id,
+            'title' => MODULE_ORDER_TOTAL_SUBTOTAL_TITLE.':',
+            'text' => '0',
+            'value' => '0',
+            'class' => 'ot_subtotal',
+            'sort_order' => MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER
+          );
+        xtc_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
+
+        xtc_redirect(xtc_href_link(FILENAME_ORDERS, 'oID='.(int)$orders_id.'&action=edit'));
+        break;
+
+      case 'delete_confirm_adressbook' :
+          xtc_db_query("DELETE FROM ".TABLE_ADDRESS_BOOK."
+                              WHERE address_book_id = '".(int) $_GET['address_book_id']."'
+                                AND customers_id = '".$customers_id."'");
+          xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action', 'delete_confirm_adressbook')).'cID='.(int)$customers_id));
+          break;
+
+       case 'update_default_adressbook' :
+          $address_book_query = xtc_db_query("SELECT entry_gender AS customers_gender,
+                                                     entry_firstname AS customers_firstname,
+                                                     entry_lastname AS customers_lastname
+                                                FROM ".TABLE_ADDRESS_BOOK."
+                                               WHERE address_book_id = '".(int) $_GET['default']."'
+                                                 AND customers_id = '".$customers_id."'");
+          $address_book_array = xtc_db_fetch_array($address_book_query);
+
+          if (ACCOUNT_GENDER != 'true') {
+            unset($address_book_array['customers_gender']);
+          }
+
+          $sql_data_array = array (
+              'customers_default_address_id' => (int) $_GET['default'],
+              'customers_last_modified' => 'now()'
+            );
+          $sql_data_array = array_merge($address_book_array,$sql_data_array);
+          xtc_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '". $customers_id ."'");
+
+          xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action', 'update_default_adressbook', 'default')).'cID='.$customers_id.'&action=address_book'));
+          break;
+
+      case 'statusconfirm' :    
+        if (!isset($_POST['multi_customers_confirm']) && (int)$customers_id > 0) {
+          $_POST['multi_customers_confirm'] = array($customers_id);
+        }
+        
+        if (isset($_POST['multi_customers_confirm']) && is_array($_POST['multi_customers_confirm'])) {
+          foreach ($_POST['multi_customers_confirm'] as $customers_id) {
+            $error = false;
+            $check_status_query = xtc_db_query("SELECT customers_firstname,
+                                                       customers_lastname,
+                                                       customers_email_address,
+                                                       customers_status,
+                                                       member_flag
+                                                  FROM ".TABLE_CUSTOMERS."
+                                                 WHERE customers_id = '".$customers_id."'");
+            $check_status = xtc_db_fetch_array($check_status_query);
+            if ($check_status['customers_status'] != (int)$_POST['customers_status']) {
+              $sql_data_array = array('customers_status' => (int)$_POST['customers_status']);
+          
+              $sql_add_data_array['account_type'] = '1';                        
+              if ($_POST['customers_status'] != DEFAULT_CUSTOMERS_STATUS_ID_GUEST) {
+                $sql_add_data_array['account_type'] = '0';
+              }
+          
+              // check existing account
+              if ($sql_add_data_array['account_type'] == '0') {
+                $check_existing_customer_query = xtc_db_query("SELECT customers_id
+                                                                 FROM ".TABLE_CUSTOMERS."
+                                                                WHERE customers_email_address = '".xtc_db_input($check_status['customers_email_address'])."'
+                                                                  AND account_type = '0'
+                                                                  AND customers_id != '".$customers_id."'");
+                if (xtc_db_num_rows($check_existing_customer_query) > 0) {
+                  $error = true;
+                  $messageStack->add_session(WARNING_CUSTOMER_ALREADY_EXISTS, 'warning');
+                }
+              }
+          
+              if ($error === false) {
+                xtc_db_perform(TABLE_CUSTOMERS, array_merge($sql_data_array, $sql_add_data_array), 'update', "customers_id = '".$customers_id."'"); 
+
+                // update customers status in newsletters_recipients
+                xtc_db_perform(TABLE_NEWSLETTER_RECIPIENTS, $sql_data_array, 'update', "customers_id = '".$customers_id."'"); 
+                    
+                // create insert for admin access table if customers status is set to 0
+                if ($_POST['customers_status'] == 0) {
+                  xtc_db_query("INSERT INTO  ".TABLE_ADMIN_ACCESS." (customers_id) VALUES ('".$customers_id."')");
+                } else {
+                  xtc_db_query("DELETE FROM ".TABLE_ADMIN_ACCESS." WHERE customers_id = '".$customers_id."'");
+                }
+                $sql_data_array = array('customers_id' => $customers_id,
+                                        'new_value' => (int)$_POST['customers_status'],
+                                        'old_value' => $check_status['customers_status'],
+                                        'date_added' => 'now()',
+                                        'customer_notified' => '0');
+                xtc_db_perform(TABLE_CUSTOMERS_STATUS_HISTORY, $sql_data_array);  
+              }        
+            }
+          }
+        }
+        xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')).'cID='.$customers_id));
+        break;
+
+      case 'update' :
+        $customers_cid = xtc_db_prepare_input($_POST['customers_cid']);
+        $customers_vat_id = xtc_db_prepare_input($_POST['customers_vat_id']);
+        $customers_vat_id_status = (isset($_POST['customers_vat_id_status']) ? xtc_db_prepare_input($_POST['customers_vat_id_status']) : '');
+        $customers_firstname = xtc_db_prepare_input($_POST['customers_firstname']);
+        $customers_lastname = xtc_db_prepare_input($_POST['customers_lastname']);
+        $customers_email_address = xtc_db_prepare_input($_POST['customers_email_address']);
+        $customers_telephone = xtc_db_prepare_input($_POST['customers_telephone']);
+        $customers_fax = xtc_db_prepare_input($_POST['customers_fax']);
+        if (ACCOUNT_GENDER == 'true') $customers_gender = xtc_db_prepare_input($_POST['customers_gender']);
+        if (ACCOUNT_DOB == 'true') $customers_dob = xtc_db_prepare_input($_POST['customers_dob']);
+        $customers_default_address_id = xtc_db_prepare_input($_POST['customers_default_address_id']);
+        $address_book_id = xtc_db_prepare_input($_POST['address_book_id']);
+        $entry_street_address = xtc_db_prepare_input($_POST['entry_street_address']);
+        if (ACCOUNT_SUBURB == 'true') $entry_suburb = xtc_db_prepare_input($_POST['entry_suburb']);
+        $entry_postcode = xtc_db_prepare_input($_POST['entry_postcode']);
+        $entry_city = xtc_db_prepare_input($_POST['entry_city']);
+        $entry_country_id = xtc_db_prepare_input($_POST['entry_country_id']);
+        if (ACCOUNT_COMPANY == 'true') $entry_company = xtc_db_prepare_input($_POST['entry_company']);
+        if (ACCOUNT_STATE == 'true') $entry_state = xtc_db_prepare_input($_POST['entry_state']);
+        if (ACCOUNT_STATE == 'true') $entry_zone_id = xtc_db_prepare_input($_POST['entry_zone_id']);
+        $memo_title = xtc_db_prepare_input($_POST['memo_title']);
+        $memo_text = xtc_db_prepare_input($_POST['memo_text']);
+        $payment_unallowed = implode(',', (isset($_POST['payment_unallowed']) && is_array($_POST['payment_unallowed']) ? $_POST['payment_unallowed'] : array()));
+        $shipping_unallowed = implode(',', (isset($_POST['shipping_unallowed']) && is_array($_POST['shipping_unallowed']) ? $_POST['shipping_unallowed'] : array()));
+        $password = xtc_db_prepare_input($_POST['customers_password']);
+        /*
+        $amount = xtc_db_prepare_input($_POST['amount']);
+        if ($amount != '') {
+          $sql_data_array = array('customer_id' => $customers_id,
+                                  'amount' => $amount
+                                  );
+          $check_gv_query = xtc_db_query("SELECT * FROM " . TABLE_COUPON_GV_CUSTOMER . " WHERE customer_id = '".$customers_id."'");
+          if (xtc_db_num_rows($check_gv_query) > 0) {
+            xtc_db_perform(TABLE_COUPON_GV_CUSTOMER, $sql_data_array, 'update', "customer_id = '".$customers_id."'");
+          } else {
+            xtc_db_perform(TABLE_COUPON_GV_CUSTOMER, $sql_data_array);
+          }
+        }*/
+
+        // reset error flag
+        $error = false;
+        
+        $entry_memo_title_error = false;
+        $entry_memo_text_error = false;
+        if ($memo_text != '' || $memo_title != '') {
+          if ($memo_text != '' && $memo_title == '') {
+            $error = true;
+            $entry_memo_title_error = true;
+          }
+          if ($memo_text == '' && $memo_title != '') {
+            $error = true;
+            $entry_memo_text_error = true;
+          }
+          if ($error === false) {
+            $sql_data_array = array ('customers_id' => $customers_id,
+                                     'memo_date' => date("Y-m-d"),
+                                     'memo_title' => $memo_title,
+                                     'memo_text' => $memo_text,
+                                     'poster_id' => (int)$_SESSION['customer_id']
+                                    );
+            xtc_db_perform(TABLE_CUSTOMERS_MEMO, $sql_data_array);
+          }
+        }
+        
+        if (strlen($customers_firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
+          $error = true;
+          $entry_firstname_error = true;
+        } else {
+          $entry_firstname_error = false;
+        }
+
+        if (strlen($customers_lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
+          $error = true;
+          $entry_lastname_error = true;
+        } else {
+          $entry_lastname_error = false;
+        }
+
+        if (ACCOUNT_GENDER == 'true') {
+          if (($customers_gender == '')) {
+            $error = true;
+            $entry_gender_error = true;
+          } else {
+            $entry_gender_error = false;
+          }
+        }
+
+        if (ACCOUNT_DOB == 'true') {
+          if (checkdate(substr(xtc_date_raw($customers_dob), 4, 2), substr(xtc_date_raw($customers_dob), 6, 2), substr(xtc_date_raw($customers_dob), 0, 4))) {
+            $entry_date_of_birth_error = false;
+          } else {
+            $error = true;
+            $entry_date_of_birth_error = true;
+          }
+        }
+
+        // New VAT Check
+        if (xtc_get_geo_zone_code($entry_country_id) != '6') {
+          require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'vat_validation.php');
+          $vatID = new vat_validation($customers_vat_id, $customers_id, '', $entry_country_id);
+          $customers_vat_id_status = isset($vatID->vat_info['vat_id_status']) ? $vatID->vat_info['vat_id_status'] : '';
+          // display correct error code of VAT ID check
+          switch ($customers_vat_id_status) {
+            case '0' :// 'VAT invalid'
+              $entry_vat_error_text = TEXT_VAT_FALSE;
+              break;
+            case '1' :// 'VAT valid'
+              $entry_vat_error_text = TEXT_VAT_TRUE;
+              break;
+            case '2' :// 'SOAP ERROR: Connection to host not possible, europe.eu down?'
+              $entry_vat_error_text = TEXT_VAT_CONNECTION_NOT_POSSIBLE;
+              break;
+            case '8' :// 'unknown country'
+              $entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY;
+              break;
+            case '94' :// 'INVALID_INPUT' => 'The provided CountryCode is invalid or the VAT number is empty'
+              $entry_vat_error_text = TEXT_VAT_INVALID_INPUT;
+              break;
+            case '95' :// 'SERVICE_UNAVAILABLE' => 'The SOAP service is unavailable, try again later'
+              $entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE;
+              break;
+            case '96' :// 'MS_UNAVAILABLE' => 'The Member State service is unavailable, try again later or with another Member State'
+              $entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE;
+              break;
+            case '97' :// 'TIMEOUT' => 'The Member State service could not be reached in time, try again later or with another Member State',
+              $entry_vat_error_text = TEXT_VAT_TIMEOUT;
+              break;
+            case '98' :// 'SERVER_BUSY' => 'The service cannot process your request. Try again later.'
+              $entry_vat_error_text = TEXT_VAT_SERVER_BUSY;
+              break;
+            case '99' :// 'no PHP5 SOAP support'
+              $entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT;
+              break;
+            default:
+              $entry_vat_error_text = '';
+              break;
+          }
+          if (isset($vatID->vat_info['error']) && $vatID->vat_info['error']==1){
+            $entry_vat_error = true;
+            $error = true;
+          }
+        }
+
+        if (strlen($customers_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
+          $error = true;
+          $entry_email_address_error = true;
+        } else {
+          $entry_email_address_error = false;
+        }
+
+        if (!xtc_validate_email($customers_email_address)) {
+          $error = true;
+          $entry_email_address_check_error = true;
+        } else {
+          $entry_email_address_check_error = false;
+        }
+
+        if (strlen($entry_street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) {
+          $error = true;
+          $entry_street_address_error = true;
+        } else {
+          $entry_street_address_error = false;
+        }
+
+        if (strlen($entry_postcode) < ENTRY_POSTCODE_MIN_LENGTH) {
+          $error = true;
+          $entry_post_code_error = true;
+        } else {
+          $entry_post_code_error = false;
+        }
+
+        if (strlen($entry_city) < ENTRY_CITY_MIN_LENGTH) {
+          $error = true;
+          $entry_city_error = true;
+        } else {
+          $entry_city_error = false;
+        }
+
+        if ($entry_country_id == false) {
+          $error = true;
+          $entry_country_error = true;
+        } else {
+          $entry_country_error = false;
+        }
+
+        if (ACCOUNT_STATE == 'true') {
+          if ($entry_country_error == true) {
+            $entry_state_error = true;
+          } else {
+            $entry_zone_id = 0;
+            $entry_state_error = false;
+            $check_query = xtc_db_query("SELECT count(*) as total 
+                                           FROM ".TABLE_ZONES." 
+                                          WHERE zone_country_id = '".xtc_db_input($entry_country_id)."'");
+            $check_value = xtc_db_fetch_array($check_query);
+            $entry_state_has_zones = ($check_value['total'] > 0);
+            if ($entry_state_has_zones == true) {
+              $zone_query = xtc_db_query("SELECT zone_id 
+                                            FROM ".TABLE_ZONES." 
+                                           WHERE zone_country_id = '".xtc_db_input($entry_country_id)."' 
+                                             AND zone_name = '".xtc_db_input($entry_state)."'");
+              if (xtc_db_num_rows($zone_query) == 1) {
+                $zone_values = xtc_db_fetch_array($zone_query);
+                $entry_zone_id = $zone_values['zone_id'];
+              } else {
+                $zone_query = xtc_db_query("SELECT zone_id 
+                                              FROM ".TABLE_ZONES." 
+                                             WHERE zone_country_id = '".xtc_db_input($entry_country_id)."' 
+                                               AND zone_code = '".xtc_db_input($entry_state)."'");
+                if (xtc_db_num_rows($zone_query) >= 1) {
+                  $zone_values = xtc_db_fetch_array($zone_query);
+                  $entry_zone_id = $zone_values['zone_id'];
+                } else {
+                  $error = true;
+                  $entry_state_error = true;
+                }
+              }
+            } else {
+              if ($entry_state == false) {
+                $error = true;
+                $entry_state_error = true;
+              }
+            }
+          }
+        }
+
+        if (ACCOUNT_TELEPHONE_OPTIONAL == 'false' && strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
+          $error = true;
+          $entry_telephone_error = true;
+        } else {
+          $entry_telephone_error = false;
+        }
+
+        if (strlen($password) > 0 && strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) {
+          $error = true;
+          $entry_password_error = true;
+        } else {
+          $entry_password_error = false;
+        }
+
+        $check_email = xtc_db_query("SELECT customers_email_address
+                                      FROM ".TABLE_CUSTOMERS."
+                                     WHERE customers_email_address = '".xtc_db_input($customers_email_address)."'
+                                       AND account_type = '0'
+                                       AND customers_id != '".$customers_id."'");
+        if (xtc_db_num_rows($check_email)) {
+          $error = true;
+          $entry_email_address_exists = true;
+        } else {
+          $entry_email_address_exists = false;
+        }
+
+        if ($error == false) {
+          $sql_data_array = array (
+              'customers_firstname' => $customers_firstname,
+              'customers_cid' => $customers_cid,
+              'customers_vat_id' => $customers_vat_id,
+              'customers_vat_id_status' => $customers_vat_id_status,
+              'customers_lastname' => $customers_lastname,
+              'customers_email_address' => $customers_email_address,
+              'customers_telephone' => $customers_telephone,
+              'customers_fax' => $customers_fax,
+              'payment_unallowed' => $payment_unallowed,
+              'shipping_unallowed' => $shipping_unallowed,
+              'customers_last_modified' => 'now()'
+            );
+
+          if ($password != '') {
+            $sql_data_array['customers_password'] = xtc_encrypt_password($password);
+            $sql_data_array['customers_password_time'] = time();
+            if ($_SESSION['customer_id'] == $customers_id) {
+              $_SESSION['customer_time'] = $sql_data_array['customers_password_time'];
+            }
+          }
+          if (ACCOUNT_GENDER == 'true') {
+            $sql_data_array['customers_gender'] = $customers_gender;
+          }
+          if (ACCOUNT_DOB == 'true') {
+            $sql_data_array['customers_dob'] = xtc_date_raw($customers_dob);
+          }
+
+          xtc_db_perform(TABLE_CUSTOMERS, $sql_data_array, 'update', "customers_id = '".$customers_id."' AND customers_default_address_id = '".$address_book_id."'");
+
+          xtc_db_query("UPDATE ".TABLE_CUSTOMERS_INFO."
+                           SET customers_info_date_account_last_modified = now()
+                         WHERE customers_info_id = '".$customers_id."'");
+
+          $sql_data_array = array (
+              'entry_firstname' => $customers_firstname,
+              'entry_lastname' => $customers_lastname,
+              'entry_street_address' => $entry_street_address,
+              'entry_postcode' => $entry_postcode,
+              'entry_city' => $entry_city,
+              'entry_country_id' => $entry_country_id,
+              'address_last_modified' => 'now()'
+            );
+
+          if (ACCOUNT_GENDER == 'true') {
+            $sql_data_array['entry_gender'] = $customers_gender;
+          }
+          if (ACCOUNT_COMPANY == 'true') {
+            $sql_data_array['entry_company'] = $entry_company;
+          }
+          if (ACCOUNT_SUBURB == 'true') {
+            $sql_data_array['entry_suburb'] = $entry_suburb;
+          }
+          if (ACCOUNT_STATE == 'true') {
+            if ($entry_zone_id > 0) {
+              $entry_state = '';
+            }
+            $sql_data_array['entry_zone_id'] = (int)$entry_zone_id;
+            $sql_data_array['entry_state'] = $entry_state;
+          }
+          if ($address_book_id == 0) {
+            $sql_data_array['address_date_added'] = 'now()';
+            $sql_data_array['customers_id'] = $customers_id;
+            xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'insert');
+          } else {
+            xtc_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '".$customers_id."' AND address_book_id = '".xtc_db_input($address_book_id)."'");
+          }
+          xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action')).'cID='.$customers_id));
+
+        }  elseif ($error == true) {
+
+          // unset memo to avoid duplicate entry
+          if ($entry_memo_title_error === false && $entry_memo_text_error === false) {
+            unset($_POST['memo_title']);
+            unset($_POST['memo_text']);
+          }
+          
+          // unallowd payment/shipping must be comma separated
+          $_POST['payment_unallowed'] = $payment_unallowed;
+          $_POST['shipping_unallowed'] = $shipping_unallowed;
+
+          $cInfo = new objectInfo($_POST);
+          $processed = true;
+        }
+        break;
+
+      case 'deleteconfirm' :
+        if (!isset($_POST['multi_customers_confirm']) && (int)$customers_id > 0) {
+          $_POST['multi_customers_confirm'] = array($customers_id);
+        }
+        
+        if (isset($_POST['multi_customers_confirm']) && is_array($_POST['multi_customers_confirm'])) {
+          foreach ($_POST['multi_customers_confirm'] as $customers_id) {
+            if (isset($_POST['delete_reviews']) && $_POST['delete_reviews'] == 'on') {
+              $reviews_query = xtc_db_query("SELECT reviews_id FROM ".TABLE_REVIEWS." WHERE customers_id = '".$customers_id."'");
+              while ($reviews = xtc_db_fetch_array($reviews_query)) {
+                xtc_db_query("DELETE FROM ".TABLE_REVIEWS_DESCRIPTION." WHERE reviews_id = '".$reviews['reviews_id']."'");
+              }
+              xtc_db_query("DELETE FROM ".TABLE_REVIEWS." WHERE customers_id = '".$customers_id."'");
+            } else {
+              xtc_db_query("UPDATE ".TABLE_REVIEWS." SET customers_id = null WHERE customers_id = '".$customers_id."'");
+            }
+            xtc_db_query("DELETE FROM ".TABLE_ADDRESS_BOOK." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_INFO." WHERE customers_info_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_BASKET_ATTRIBUTES." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_PRODUCTS_NOTIFICATIONS." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_WHOS_ONLINE." WHERE customer_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_STATUS_HISTORY." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_CUSTOMERS_IP." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_ADMIN_ACCESS." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_NEWSLETTER_RECIPIENTS." WHERE customers_id = '".$customers_id."'");
+            xtc_db_query("DELETE FROM ".TABLE_COUPON_GV_CUSTOMER." WHERE customer_id = '".$customers_id."'");
+          }
+        }
+        xtc_redirect(xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array ('cID', 'action'))));
+        break;
+    }
+  }
+
+  require (DIR_WS_INCLUDES.'head.php');
+  ?>
+  <script type="text/javascript" src="includes/general.js"></script>
+  <script type="text/javascript" src="includes/javascript/categories.js"></script>
+</head>
+<body>
+  <!-- header //-->
+  <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
+  <!-- header_eof //-->
+  <!-- body //-->
+  <table class="tableBody">
+    <tr>
+      <?php //left_navigation
+      if (USE_ADMIN_TOP_MENU == 'false') {
+        echo '<td class="columnLeft2">'.PHP_EOL;
+        echo '<!-- left_navigation //-->'.PHP_EOL;
+        require_once(DIR_WS_INCLUDES . 'column_left.php');
+        echo '<!-- left_navigation eof //-->'.PHP_EOL;
+        echo '</td>'.PHP_EOL;
+      }
+      ?>
+      <!-- body_text //-->
+      <td class="boxCenter">
+      <?php
+      if ($action == 'edit' || $action == 'update') {
+        include (DIR_WS_MODULES.'customers_edit.php');
+      } else {
+        include (DIR_WS_MODULES.'customers_listing.php');
+      }
+      ?>
+      </td>
+      <!-- body_text_eof //-->
+    </tr>
+  </table>
+  <!-- body_eof //-->
+  <!-- footer //-->
+  <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
+  <!-- footer_eof //-->
+  <br />
+</body>
+</html>
+<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
\ No newline at end of file
Index: inc/xtc_php_mail.inc.php
===================================================================
--- inc/xtc_php_mail.inc.php	(nonexistent)
+++ inc/xtc_php_mail.inc.php	(revision 1)
@@ -0,0 +1,281 @@
+<?php
+/* -----------------------------------------------------------------------------------------
+   $Id: xtc_php_mail.inc.php 13147 2021-01-11 16:00:32Z GTB $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   -----------------------------------------------------------------------------------------
+   based on:
+   (c) 2003 nextcommerce (xtc_php_mail.inc.php,v 1.17 2003/08/24); www.nextcommerce.org
+   (c) 2006 XT-Commerce (xtc_php_mail.inc.php)
+
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+
+use PHPMailer\PHPMailer\PHPMailer;
+use PHPMailer\PHPMailer\Exception;
+
+require_once(DIR_FS_CATALOG.'includes/classes/class.logger.php');
+
+// include the mail classes
+function xtc_php_mail($from_email_address, $from_email_name,
+                      $to_email_address, $to_name, $forwarding_to,
+                      $reply_address, $reply_address_name,
+                      $path_to_attachments, $path_to_more_attachments,
+                      $email_subject, $message_body_html, $message_body_plain,
+                      $priority = null
+                     )
+{
+  global $order, $main, $LogLevel;
+
+  // include needed function
+  require_once(DIR_FS_INC.'xtc_not_null.inc.php');
+  require_once(DIR_FS_INC.'parse_multi_language_value.inc.php');
+  
+  // includes main class
+  if (!is_object($main)) {
+    require_once(DIR_FS_CATALOG.'includes/classes/main.php');
+    $main = new main();
+  }
+
+  if (!class_exists('Smarty')) {
+    require (DIR_FS_EXTERNAL.'smarty/smarty_2/Smarty.class.php');
+  }
+  $mailsmarty= new Smarty;
+  $mailsmarty->compile_dir = DIR_FS_CATALOG.'templates_c';
+  
+  //set language parameters
+  $lang_data = array();
+  $lang_data['directory'] = isset($_SESSION['language']) ? $_SESSION['language'] : '';
+  $lang_data['language_charset'] = isset($_SESSION['language_charset']) ? $_SESSION['language_charset'] : '';
+  $lang_data['code'] = isset($_SESSION['language_code']) ? $_SESSION['language_code'] : '';
+  $lang_data['languages_id'] = isset($_SESSION['languages_id']) ? $_SESSION['languages_id'] : '';
+  $where= '';
+  if (empty($lang_data['directory']) || empty($lang_data['language_charset']) || empty($lang_data['code'])) {
+     $where = " WHERE code = '".DEFAULT_LANGUAGE."'";
+  }
+  if (isset($order) && is_object($order)) {
+    $where = " WHERE directory = '".$order->info['language']."'";
+    $customers_status = $order->info['status'];
+  }
+
+  if ($where) {
+    $lang_query = xtc_db_query("SELECT * 
+                                  FROM ".TABLE_LANGUAGES." 
+                                  ".$where."
+                               ");
+    $lang_data = xtc_db_fetch_array($lang_query);
+  }
+  
+  // set parameters
+  $from_email_address = parse_multi_language_value($from_email_address, $lang_data['code']);
+  $from_email_name = parse_multi_language_value($from_email_name, $lang_data['code']);
+  $to_email_address = parse_multi_language_value($to_email_address, $lang_data['code']);
+  $to_name = parse_multi_language_value($to_name, $lang_data['code']);
+  $forwarding_to = parse_multi_language_value($forwarding_to, $lang_data['code']);
+  $reply_address = parse_multi_language_value($reply_address, $lang_data['code']);
+  $reply_address_name = parse_multi_language_value($reply_address_name, $lang_data['code']);
+  $path_to_attachments = parse_multi_language_value($path_to_attachments, $lang_data['code']);
+  $email_subject = parse_multi_language_value($email_subject, $lang_data['code']);
+      
+  // load the signatures only, if the appropriate file(s) exists
+  $html_signatur = '';
+  $txt_signatur = '';
+  if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.html')) {
+    $shop_content_data = $main->getContentData(EMAIL_SIGNATURE_ID, $lang_data['languages_id'], ((isset($customers_status)) ? $customers_status : DEFAULT_CUSTOMERS_STATUS_ID_GUEST));    
+    $mailsmarty->assign('SIGNATURE_HTML', $shop_content_data['content_text']);
+    $html_signatur = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.html'); 
+  }
+  if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.txt')) {
+    $shop_content_data = $main->getContentData(EMAIL_SIGNATURE_ID, $lang_data['languages_id'], ((isset($customers_status)) ? $customers_status : DEFAULT_CUSTOMERS_STATUS_ID_GUEST));
+    $mailsmarty->assign('SIGNATURE_TXT', $shop_content_data['content_text']);
+    $txt_signatur = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/signatur.txt'); 
+  }
+
+  $html_widerruf = '';
+  $txt_widerruf = '';
+  if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.html')) {
+    $html_widerruf = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.html'); 
+  }
+  if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.txt')) {
+    $txt_widerruf = $mailsmarty->fetch(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/mail/'.$lang_data['directory'].'/widerruf.txt'); 
+  }  
+
+  //Platzhalter [WIDERRUF] durch Widerruf Text ersetzen
+  if (strpos($message_body_html,'[WIDERRUF]') !== false) {
+    $message_body_html = str_replace('[WIDERRUF]', $html_widerruf, $message_body_html);
+  } elseif ($html_widerruf != '') {
+    $html_widerruf = '<br />'.$html_widerruf;
+  }
+  if (strpos($message_body_plain,'[WIDERRUF]') !== false) {
+    $message_body_plain = str_replace('[WIDERRUF]', $txt_widerruf, $message_body_plain);
+  } elseif ($txt_widerruf != '') {
+    $txt_widerruf = "\n".$txt_widerruf;  
+  }
+
+  //Platzhalter [NOSIGNATUR] falls keine Signatir notwendig (zB Newsletter)
+  if (strpos($message_body_html,'[NOSIGNATUR]') !== false) {
+    $message_body_html = str_replace('[NOSIGNATUR]', '', $message_body_html);
+    $message_body_plain = str_replace('[NOSIGNATUR]', '', $message_body_plain);
+    $html_signatur = '';
+    $txt_signatur = '';
+  }
+
+  //Platzhalter [SIGNATUR] durch Signatur Text ersetzen
+  if (strpos($message_body_html,'[SIGNATUR]') !== false) {
+    $message_body_html = str_replace('[SIGNATUR]', $html_signatur, $message_body_html);
+    $html_signatur = '';
+  } elseif ($html_signatur != '') {
+    $html_signatur = '<br />'.$html_signatur;
+  }
+  if (strpos($message_body_plain,'[SIGNATUR]') !== false) {
+    $message_body_plain = str_replace('[SIGNATUR]', $txt_signatur, $message_body_plain);
+    $txt_signatur = '';
+  } elseif ($txt_signatur != '') {
+    $txt_signatur = "\n".$txt_signatur;  
+  }
+
+  // decode html2txt
+  $html_array = array('<br />', '<br/>', '<br>');
+  $txt_array = array(" \n", " \n", " \n");
+  $message_body_plain = str_replace($html_array, $txt_array, $message_body_plain.$txt_signatur);//DPW Signatur ergänzt.
+  
+  // remove html tags
+  $message_body_plain = strip_tags($message_body_plain);
+  $message_body_plain = html_entity_decode($message_body_plain, ENT_NOQUOTES, $lang_data['language_charset']);
+
+  require_once (DIR_FS_EXTERNAL.'phpmailer/PHPMailer.php');
+  require_once (DIR_FS_EXTERNAL.'phpmailer/Exception.php');
+
+  $mail = new PHPMailer(false);
+  $mail->Debugoutput = new LoggingManager(DIR_FS_LOG.'mod_mailer_%s_'.((defined('RUN_MODE_ADMIN')) ? 'admin_' : '').'%s.log', 'mailer', (($LogLevel != '') ? $LogLevel : 'info'));
+  $mail->CharSet = $lang_data['language_charset'];
+  $mail->Priority = $priority;
+  $mail->UseSendmailOptions = ((defined('USE_SENDMAIL_OPTIONS') && USE_SENDMAIL_OPTIONS != 'true') ? false : true);
+  
+  if (EMAIL_TRANSPORT == 'smtp') {
+    require_once (DIR_FS_EXTERNAL.'phpmailer/SMTP.php');
+    
+    $mail->IsSMTP();
+    $mail->SMTPKeepAlive = true;
+    $mail->SMTPAuth = (SMTP_AUTH == 'true') ? true : false;
+    $mail->SMTPSecure = (defined('SMTP_SECURE') && SMTP_SECURE != 'none') ? SMTP_SECURE : '';
+    $mail->Port = SMTP_PORT;
+    $mail->Username = SMTP_USERNAME;
+    $mail->Password = SMTP_PASSWORD;
+    $mail->Host = SMTP_MAIN_SERVER.';'.SMTP_BACKUP_SERVER;
+    $mail->SMTPAutoTLS = (defined('SMTP_AUTO_TLS') && SMTP_AUTO_TLS == 'true') ? true : false;
+    $mail->SMTPDebug = (defined('SMTP_DEBUG')) ? (int)SMTP_DEBUG : 0;
+    $mail->SMTPOptions = array(
+      'ssl' => array(
+        'verify_peer' => false,
+        'verify_peer_name' => false,
+        'allow_self_signed' => true
+      )
+    );
+  }
+
+  if (EMAIL_TRANSPORT == 'sendmail') {
+    $mail->isSendmail();
+    $mail->Sendmail = SENDMAIL_PATH;
+  }
+
+  if (EMAIL_TRANSPORT == 'mail') {
+    $mail->isMail();
+  }
+
+  //Recipients
+  $mail->setFrom($from_email_address, $from_email_name);
+  $mail->addAddress($to_email_address, $to_name);
+  $mail->addReplyTo($reply_address, $reply_address_name);
+
+  if ($forwarding_to != '') {
+    $forwarding = explode(',', $forwarding_to);
+    foreach ($forwarding as $forwarding_address) {
+      $mail->addBCC(trim($forwarding_address));
+    }
+  }
+  if (defined('EMAIL_ARCHIVE_ADDRESS')) {
+    $email_archive_address = parse_multi_language_value(trim(EMAIL_ARCHIVE_ADDRESS), $lang_data['code']);
+    if (trim($email_archive_address) != '') {
+      $mail->addBCC(trim($email_archive_address));
+    }
+  }
+
+  //create attachments array for better handling
+  $attachments = attachments_array($path_to_attachments,$path_to_more_attachments);
+  
+  $included_files = get_included_files();
+  if (is_array($included_files)) {
+    $conditions = CONTENT_CONDITIONS;
+    if (defined('RUN_MODE_ADMIN') && GROUP_CHECK == 'true') {
+      $conditions = " AND group_ids LIKE '%c_".((isset($customers_status)) ? $customers_status : DEFAULT_CUSTOMERS_STATUS_ID_GUEST)."_group%' ";
+    }
+    $email_query = xtc_db_query("SELECT *
+                                   FROM ".TABLE_EMAIL_CONTENT."
+                                  WHERE languages_id = '".$lang_data['languages_id']."'
+                                        ".$conditions);
+    while ($email = xtc_db_fetch_array($email_query)) {
+      foreach ($included_files as $files) {
+        if (strpos($files, $email['email_id'].'.html') !== false) {
+          if (is_file(DIR_FS_CATALOG.'media/content/'.$email['content_file'])) {
+            $attachments[] = DIR_FS_CATALOG.'media/content/'.$email['content_file'];
+          }
+        }
+      }
+    }
+  }
+  $attachments = array_unique($attachments); 
+
+  // add attachments
+  for( $i = 0, $n = count($attachments); $i < $n; $i++) {
+    $mail->addAttachment($attachments[$i]);
+  }
+
+  //Content
+  $mail->Subject = encode_utf8($email_subject);
+  $mail->setWordWrap((int)EMAIL_WORD_WRAP);
+  if (EMAIL_USE_HTML == 'true') { // set email format to HTML
+    $mail->IsHTML(true);
+    $mail->Body = $message_body_html.$html_signatur;//DPW Signatur ergänzt.
+    $mail->AltBody = $message_body_plain;
+  } else {
+    $mail->IsHTML(false);
+    $mail->Body = $message_body_plain;
+  }
+
+  require_once(DIR_FS_INC.'auto_include.inc.php');
+  foreach(auto_include(DIR_FS_CATALOG.'includes/extra/php_mail/','php') as $file) require ($file);
+
+  if (!$mail->Send()) {
+    trigger_error('Mailer Error - '.$mail->ErrorInfo, E_USER_WARNING);
+    return false;
+  }
+  return true;
+}
+
+function attachments_array($path_to_attachments,$path_to_more_attachments)
+{
+  $attachments = array();
+  $attachments = check_attachments($attachments,$path_to_attachments);
+  $attachments = check_attachments($attachments,$path_to_more_attachments);
+  return $attachments;
+}
+
+function check_attachments($attachments, $path_to_attachments)
+{
+  if ($path_to_attachments != '') {
+    $path_to_attachments = is_array($path_to_attachments) ? $path_to_attachments : explode(',',$path_to_attachments);
+    $num = count($path_to_attachments);
+    for($i=0; $i <$num; $i++) {
+      $path_to_attachments[$i] = ((strpos($path_to_attachments[$i], DIR_FS_DOCUMENT_ROOT)===false) ? DIR_FS_DOCUMENT_ROOT:'') . trim($path_to_attachments[$i]);
+      if (file_exists($path_to_attachments[$i])) {
+        $attachments[] = $path_to_attachments[$i];
+      }
+    }
+  }
+  return $attachments;
+}
+?>
\ No newline at end of file
Index: includes/application_top.php
===================================================================
--- includes/application_top.php	(nonexistent)
+++ includes/application_top.php	(revision 1)
@@ -0,0 +1,350 @@
+<?php
+/* -----------------------------------------------------------------------------------------
+   $Id: application_top.php 13492 2021-04-01 10:57:43Z GTB $
+
+   modified eCommerce Shopsoftware
+   http://www.modified-shop.org
+
+   Copyright (c) 2009 - 2013 [www.modified-shop.org]
+   -----------------------------------------------------------------------------------------
+   based on:
+   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
+   (c) 2002-2003 osCommerce(application_top.php,v 1.273 2003/05/19); www.oscommerce.com
+   (c) 2003 nextcommerce (application_top.php,v 1.54 2003/08/25); www.nextcommerce.org
+   (c) 2006 XT-Commerce (application_top.php 1194 2010-08-22)
+
+   Released under the GNU General Public License
+   -----------------------------------------------------------------------------------------
+   Third Party contribution:
+   Add A Quickie v1.0 Autor  Harald Ponce de Leon
+
+   Credit Class/Gift Vouchers/Discount Coupons (Version 5.10)
+   http://www.oscommerce.com/community/contributions,282
+   Copyright (c) Strider | Strider@oscworks.com
+   Copyright (c) Nick Stanko of UkiDev.com, nick@ukidev.com
+   Copyright (c) Andre ambidex@gmx.net
+   Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org
+
+   Released under the GNU General Public License
+   ---------------------------------------------------------------------------------------*/
+
+// xss secure
+if (is_file('includes/xss_secure.php')) {
+  include_once ('includes/xss_secure.php');
+}
+
+// start the timer for the page parse time log
+define('PAGE_PARSE_START_TIME', microtime(true));
+
+// set the level of error reporting
+@ini_set('display_errors', false);
+error_reporting(0);
+
+// configuration parameters
+if (file_exists('includes/local/configure.php')) {
+  include_once ('includes/local/configure.php');
+} else {
+  include_once ('includes/configure.php');
+}
+
+// call Installer
+if ((DB_DATABASE == '' || !defined('DB_MYSQL_TYPE')) && is_dir('./_installer')) {
+  header("Location: ./_installer");
+  exit();
+}
+
+// minimum requirement
+if (version_compare(PHP_VERSION, '5.6', '<')) {
+  die('<h1>Minimum requirement PHP Version 5.6</h1>');
+}
+
+// default time zone
+date_default_timezone_set('Europe/Berlin');
+
+// new error handling
+if (is_file(DIR_WS_INCLUDES.'error_reporting.php')) {
+  require_once (DIR_WS_INCLUDES.'error_reporting.php');
+}
+
+// security inputfilter for GET/POST/COOKIE
+require_once (DIR_FS_INC.'html_encoding.php');
+require_once (DIR_WS_CLASSES.'class.inputfilter.php');
+$InputFilter = new InputFilter();
+
+$_GET = $InputFilter->process($_GET);
+$_POST = $InputFilter->process($_POST);
+$_REQUEST = $InputFilter->process($_REQUEST);
+$_GET = $InputFilter->safeSQL($_GET);
+$_POST = $InputFilter->safeSQL($_POST);
+$_REQUEST = $InputFilter->safeSQL($_REQUEST);
+
+// auto include
+require_once (DIR_FS_INC . 'auto_include.inc.php');
+
+// include the list of project filenames
+require_once (DIR_WS_INCLUDES.'filenames.php');
+
+// Debug-Log-Class - thx to franky
+include_once (DIR_WS_CLASSES.'class.debug.php');
+$log = new debug;
+
+// project version
+define('PROJECT_VERSION', 'modified eCommerce Shopsoftware');
+
+define('TAX_DECIMAL_PLACES', 0);
+
+// set the type of request (secure or not)
+if (file_exists(DIR_WS_INCLUDES.'request_type.php')) {
+  include_once (DIR_WS_INCLUDES.'request_type.php');
+} else {
+  $request_type = 'NONSSL';
+}
+
+// Base/PHP_SELF/SSL-PROXY
+require_once (DIR_FS_INC . 'set_php_self.inc.php');
+$PHP_SELF = set_php_self();
+
+// list of project database tables
+require_once (DIR_WS_INCLUDES.'database_tables.php');
+
+// graduated prices model or products assigned ?
+define('GRADUATED_ASSIGN', 'true');
+
+// Database
+require_once (DIR_FS_INC.'db_functions_'.DB_MYSQL_TYPE.'.inc.php');
+require_once (DIR_FS_INC.'db_functions.inc.php');
+
+// html basics
+require_once (DIR_FS_INC.'xtc_href_link.inc.php');
+require_once (DIR_FS_INC.'xtc_php_mail.inc.php');
+
+require_once (DIR_FS_INC.'xtc_product_link.inc.php');
+require_once (DIR_FS_INC.'xtc_category_link.inc.php');
+require_once (DIR_FS_INC.'xtc_manufacturer_link.inc.php');
+
+// html functions
+require_once (DIR_FS_INC.'xtc_draw_checkbox_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_form.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_hidden_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_input_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_password_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_pull_down_menu.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_radio_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_selection_field.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_separator.inc.php');
+require_once (DIR_FS_INC.'xtc_draw_textarea_field.inc.php');
+require_once (DIR_FS_INC.'xtc_image_button.inc.php');
+require_once (DIR_FS_INC.'xtc_image_submit.inc.php');
+
+require_once (DIR_FS_INC.'xtc_not_null.inc.php');
+require_once (DIR_FS_INC.'xtc_update_whos_online.inc.php');
+require_once (DIR_FS_INC.'xtc_activate_banners.inc.php');
+require_once (DIR_FS_INC.'xtc_expire_banners.inc.php');
+require_once (DIR_FS_INC.'xtc_expire_specials.inc.php');
+require_once (DIR_FS_INC.'xtc_parse_category_path.inc.php');
+require_once (DIR_FS_INC.'xtc_get_product_path.inc.php');
+require_once (DIR_FS_INC.'xtc_get_top_level_domain.inc.php');
+require_once (DIR_FS_INC.'xtc_get_category_path.inc.php');
+require_once (DIR_FS_INC.'xtc_get_content_path.inc.php');
+
+require_once (DIR_FS_INC.'xtc_get_parent_categories.inc.php');
+require_once (DIR_FS_INC.'xtc_redirect.inc.php');
+require_once (DIR_FS_INC.'xtc_get_uprid.inc.php');
+require_once (DIR_FS_INC.'xtc_get_all_get_params.inc.php');
+require_once (DIR_FS_INC.'xtc_has_product_attributes.inc.php');
+require_once (DIR_FS_INC.'xtc_image.inc.php');
+require_once (DIR_FS_INC.'xtc_check_stock.inc.php');
+require_once (DIR_FS_INC.'xtc_check_stock_attributes.inc.php');
+require_once (DIR_FS_INC.'xtc_currency_exists.inc.php');
+require_once (DIR_FS_INC.'xtc_remove_non_numeric.inc.php');
+require_once (DIR_FS_INC.'xtc_get_ip_address.inc.php');
+require_once (DIR_FS_INC.'xtc_setcookie.inc.php');
+require_once (DIR_FS_INC.'xtc_check_agent.inc.php');
+require_once (DIR_FS_INC.'xtc_count_cart.inc.php');
+require_once (DIR_FS_INC.'xtc_get_qty.inc.php');
+require_once (DIR_FS_INC.'create_coupon_code.inc.php');
+require_once (DIR_FS_INC.'xtc_gv_account_update.inc.php');
+require_once (DIR_FS_INC.'xtc_get_tax_rate_from_desc.inc.php');
+require_once (DIR_FS_INC.'xtc_get_tax_rate.inc.php');
+require_once (DIR_FS_INC.'xtc_add_tax.inc.php');
+require_once (DIR_FS_INC.'xtc_cleanName.inc.php');
+require_once (DIR_FS_INC.'xtc_calculate_tax.inc.php');
+require_once (DIR_FS_INC.'xtc_input_validation.inc.php');
+require_once (DIR_FS_INC.'xtc_js_lang.php');
+require_once (DIR_FS_INC.'xtc_backup_restore_configuration.php');
+require_once (DIR_FS_INC.'xtc_hide_session_id.inc.php');
+require_once (DIR_FS_INC.'xtc_get_manufacturers.inc.php');
+require_once (DIR_FS_INC.'get_messages.inc.php');
+require_once (DIR_FS_INC.'xtc_get_products_stock.inc.php');
+
+foreach(auto_include(DIR_FS_CATALOG.'includes/extra/functions/','php') as $file) require_once ($file);
+
+// make a connection to the database... now
+xtc_db_connect() or die('Unable to connect to database server!');
+
+// load configuration
+$configuration_query = xtc_db_query('SELECT configuration_key, configuration_value FROM '.TABLE_CONFIGURATION);
+while ($configuration = xtc_db_fetch_array($configuration_query)) {
+  if (function_exists('extra_configuration')) extra_configuration();
+  defined($configuration['configuration_key']) OR define($configuration['configuration_key'], stripslashes($configuration['configuration_value']));
+}
+
+foreach(auto_include(DIR_FS_CATALOG.'includes/extra/application_top/application_top_begin/','php') as $file) require ($file);
+
+// Set the length of the redeem code, the longer the more secure
+// Kommt eigentlich schon aus der Table configuration
+if(!defined('SECURITY_CODE_LENGTH')) {
+  define('SECURITY_CODE_LENGTH', '10');
+}
+
+function CacheCheck() {
+  if (USE_CACHE == 'false'
+      || !isset($_COOKIE['MODsid'])
+      || (isset($GLOBALS['disable_smarty_cache']) 
+          && $GLOBALS['disable_smarty_cache'] === true
+          )
+      )
+  {
+    return false;
+  }
+  return true;
+}
+
+// if gzip_compression is enabled start to buffer the output
+if (GZIP_COMPRESSION == 'true' && $ext_zlib_loaded = extension_loaded('zlib')) {
+  require_once (DIR_FS_INC.'xtc_gzip_output.inc.php');
+  require_once (DIR_FS_INC.'xtc_check_gzip.inc.php');
+  if (($ini_zlib_output_compression = (int) ini_get('zlib.output_compression')) < 1) {
+    ob_start('ob_gzhandler');
+  } else {
+    ini_set('zlib.output_compression_level', GZIP_LEVEL);
+  }
+}
+
+// set the top level domains
+$http_domain_arr = xtc_get_top_level_domain(HTTP_SERVER);
+$https_domain_arr = xtc_get_top_level_domain(HTTPS_SERVER);
+$http_domain = $http_domain_arr['domain'];
+$https_domain = $https_domain_arr['domain'];
+$current_domain = (($request_type == 'NONSSL') ? $http_domain : $https_domain);
+
+// set the top level domains to delete
+$current_domain_delete = (($request_type == 'NONSSL') ? $http_domain_arr['delete'] : $https_domain_arr['delete']);
+
+// include shopping cart class
+require_once (DIR_WS_CLASSES.'shopping_cart.php');
+
+// define how the session functions will be used
+require_once (DIR_WS_FUNCTIONS.'sessions.php');
+
+// set the session name and save path
+// set the session cookie parameters
+// set the session ID if it exists
+// start the session
+// Redirect search engines with session id to the same url without session id to prevent indexing session id urls
+// check for Cookie usage
+// check the Agent
+include_once (DIR_WS_MODULES.'set_session_and_cookie_parameters.php');
+
+// user tracking
+include_once (DIR_WS_INCLUDES.'tracking.php');
+
+// verify the ssl_session_id if the feature is enabled
+// verify the browser user agent if the feature is enabled
+// verify the IP address if the feature is enabled
+include_once (DIR_WS_MODULES.'verify_session.php');
+
+// set the language
+include_once (DIR_WS_MODULES.'set_language_sessions.php');
+
+// language translations
+require_once (DIR_WS_LANGUAGES.$_SESSION['language'].'/'.$_SESSION['language'].'.php');
+
+// currency
+include_once (DIR_WS_MODULES.'set_currency_session.php');
+
+// write customers status in session
+require_once (DIR_WS_INCLUDES.'write_customers_status.php');
+
+// content, product, category - sql group_check/fsk_lock
+require_once (DIR_WS_INCLUDES.'define_conditions.php');
+
+// add_select
+require_once (DIR_WS_INCLUDES.'define_add_select.php');
+
+// shippingcost shoppingcart
+if (strpos($PHP_SELF, FILENAME_SHOPPING_CART) === false) {
+  unset($_SESSION['country']);
+}
+
+// main class
+require_once (DIR_WS_CLASSES.'main.php');
+$main = new main();
+
+// price class
+require_once (DIR_WS_CLASSES.'xtcPrice.php');
+$xtPrice = new xtcPrice($_SESSION['currency'], $_SESSION['customers_status']['customers_status_id']);
+
+// create the shopping cart & fix the cart if necesary
+if (!isset($_SESSION['cart']) || !is_object($_SESSION['cart'])) {
+  $_SESSION['cart'] = new shoppingCart();
+}
+
+// create the wishlist
+if (defined('MODULE_WISHLIST_SYSTEM_STATUS') && MODULE_WISHLIST_SYSTEM_STATUS == 'true') {
+  if (!isset($_SESSION['wishlist']) || !is_object($_SESSION['wishlist'])) {
+    $_SESSION['wishlist'] = new shoppingCart('wishlist');
+  }
+}
+
+// econda tracking
+if (TRACKING_ECONDA_ACTIVE == 'true') {
+  require(DIR_FS_EXTERNAL . 'econda/class.econda.php');
+  require(DIR_FS_EXTERNAL . 'econda/emos.php');
+  $econda = new econda();
+}
+
+// initialize the message stack for output messages
+require_once (DIR_WS_CLASSES.'message_stack.php');
+$messageStack = new messageStack;
+
+require_once (DIR_WS_INCLUDES.FILENAME_CART_ACTIONS);
+
+// who's online functions
+xtc_update_whos_online();
+
+// split-page-results
+require_once (DIR_WS_CLASSES.'split_page_results.php');
+
+// auto expire special products
+xtc_expire_specials();
+
+// class product
+require_once (DIR_WS_CLASSES.'product.php');
+
+// set $actual_products_id,  $current_category_id, $cPath, $_GET['manufacturers_id']
+include_once (DIR_WS_MODULES.'set_ids_by_url_parameters.php');
+
+// breadcrumb class and start the breadcrumb trail
+require_once (DIR_WS_CLASSES.'breadcrumb.php');
+$breadcrumb = new breadcrumb;
+include_once (DIR_WS_MODULES.'create_breadcrumb.php');
+
+// set which precautions should be checked
+defined('WARN_INSTALL_EXISTENCE') OR define('WARN_INSTALL_EXISTENCE', 'true');
+defined('WARN_CONFIG_WRITEABLE') OR define('WARN_CONFIG_WRITEABLE', 'true');
+defined('WARN_FILES_WRITEABLE') OR define('WARN_FILES_WRITEABLE', 'true');
+defined('WARN_DIRS_WRITEABLE') OR define('WARN_DIRS_WRITEABLE', 'true');
+defined('WARN_SESSION_DIRECTORY_NOT_WRITEABLE') OR define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
+defined('WARN_SESSION_AUTO_START') OR define('WARN_SESSION_AUTO_START', 'true');
+defined('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE') OR define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
+
+// modification for nre graduated system
+unset ($_SESSION['actual_content']);
+xtc_count_cart();
+
+foreach(auto_include(DIR_FS_CATALOG.'includes/extra/application_top/application_top_end/','php') as $file) require_once ($file);
+
+//compatibility for modified eCommerce Shopsoftware 1.06 files
+defined('DIR_WS_BASE') OR define('DIR_WS_BASE', '');
+?>
\ No newline at end of file
