function xtc_display_banner($action, $identifier)
{
    if ($action == 'dynamic') {
        $banners_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
        $banners = xtc_db_fetch_array($banners_query);
        if ($banners['count'] > 0) {
            $banner = xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'");
        } else {
            return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>';
        }
    } elseif ($action == 'static') {
        if (is_array($identifier)) {
            $banner = $identifier;
        } else {
            $banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . xtc_db_input($identifier) . "'");
            if (xtc_db_num_rows($banner_query)) {
                $banner = xtc_db_fetch_array($banner_query);
            } else {
                return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>';
            }
        }
    } else {
        return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</strong>';
    }
    if (xtc_not_null($banner['banners_html_text'])) {
        $banner_string = $banner['banners_html_text'];
    } else {
        $banner_string = '<a href="' . xtc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . xtc_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
    }
    xtc_update_banner_display_count($banner['banners_id']);
    return $banner_string;
}
 function __construct($var)
 {
     if (!isset($_var) && !is_array($var)) {
         xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
     } else {
         $this->response_string = array();
         $this->response_string['response'] = $var['response'];
         $this->response_string['order_id'] = $var['order_id'];
         $this->response_string['payment_method'] = $var['payment_method'];
         $this->response_string['lang'] = $var['lang'];
         $this->response_string['controlkey'] = $var['controlkey'];
         if ($this->checkResponse()) {
             if (isset($_SESSION['cart_Masterpayment_ID']) && !empty($_SESSION['cart_Masterpayment_ID']) or substr($_SESSION['payment'], 0, strpos($_SESSION['payment'], '_')) == 'masterpayment') {
                 if ($this->response_string['response'] == 'success') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'NONSSL'));
                 } elseif ($this->response_string['response'] == 'failed') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=masterpayment_' . $this->response_string['payment_method'], 'NONSSL'));
                 } elseif ($this->response_string['response'] == 'cancelled') {
                     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'NONSSL'));
                 }
             } elseif ($this->response_string['response'] == 'success') {
                 $this->sendMail();
             }
         } else {
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'NONSSL'));
         }
     }
 }
 function displaySettings()
 {
     $contents = xtc_draw_form('modules', 'easymarketing.php', 'content=save', 'post');
     $module_keys = $this->keys();
     $keys_extra = array();
     for ($j = 0, $k = sizeof($module_keys); $j < $k; $j++) {
         $key_value_query = xtc_db_query("SELECT configuration_key,\n                                              configuration_value,\n                                              use_function,\n                                              set_function\n                                         FROM " . TABLE_CONFIGURATION . "\n                                        WHERE configuration_key = '" . $module_keys[$j] . "'");
         $key_value = xtc_db_fetch_array($key_value_query);
         if ($key_value['configuration_key'] != '') {
             $keys_extra[$module_keys[$j]]['title'] = constant(strtoupper($key_value['configuration_key'] . '_TITLE'));
         }
         $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
         if ($key_value['configuration_key'] != '') {
             $keys_extra[$module_keys[$j]]['description'] = constant(strtoupper($key_value['configuration_key'] . '_DESC'));
         }
         $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
         $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
     }
     $module_info['keys'] = $keys_extra;
     while (list($key, $value) = each($module_info['keys'])) {
         $contents .= '<b>' . $value['title'] . '</b><br />' . $value['description'] . '<br />';
         if ($value['set_function']) {
             eval('$contents .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
         } else {
             $contents .= xtc_draw_input_field('configuration[' . $key . ']', $value['value']);
         }
         $contents .= '<br/><br/>';
     }
     $contents .= '<br/>' . xtc_button(BUTTON_SAVE);
     $contents .= '<hr />' . xtc_button_link(MODULE_EM_UNINSTALL_BUTTON, xtc_href_link('easymarketing.php', xtc_get_all_get_params(array('content')) . 'content=check_uninstall'));
     return $contents;
 }
 function payment_action()
 {
     global $order, $insert_id;
     if (!isset($insert_id) || $insert_id == '') {
         $insert_id = $_SESSION['tmp_oID'];
     }
     $this->payone->log("(pre-)authorizing {$this->code} payment");
     $standard_parameters = parent::_standard_parameters();
     $this->personal_data = new Payone_Api_Request_Parameter_Authorization_PersonalData();
     parent::_set_customers_standard_params();
     $this->delivery_data = new Payone_Api_Request_Parameter_Authorization_DeliveryData();
     parent::_set_customers_shipping_params();
     $this->payment_method = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
     $this->payment_method->setWallettype('PPE');
     $this->payment_method->setSuccessurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PROCESS . '?' . xtc_session_name() . '=' . xtc_session_id());
     $this->payment_method->setBackurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PAYMENT . '?' . xtc_session_name() . '=' . xtc_session_id());
     $this->payment_method->setErrorurl((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . FILENAME_CHECKOUT_PAYMENT . '?' . xtc_session_name() . '=' . xtc_session_id() . '&payment_error=' . $this->code);
     // set order_id for deleting canceld order
     $_SESSION['tmp_payone_oID'] = $_SESSION['tmp_oID'];
     $request_parameters = parent::_request_parameters('wlt');
     $this->params = array_merge($standard_parameters, $request_parameters);
     $this->builder = new Payone_Builder($this->payone->getPayoneConfig());
     parent::_build_service_authentification('wlt');
     parent::_parse_response_payone_api();
     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
 }
function get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $cPath = '')
{
    if ($parent_id == 0) {
        $cPath = '';
    } else {
        $cPath .= $parent_id . '_';
    }
    if (!is_array($category_tree_array)) {
        $category_tree_array = array();
    }
    if (sizeof($category_tree_array) < 1 && $exclude != '0') {
        $category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
    }
    if ($include_itself) {
        //     $category_query = "select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_status = '1' and cd.categories_id = '" . $parent_id . "'";
        $category_query = xtDBquery($category_query);
        $category_query = "select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_status = '1' and cd.categories_id = '" . $parent_id . "'  order by cd.categories_name ";
        $category = xtc_db_fetch_array($category_query, true);
        $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
    }
    $categories_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $_SESSION['languages_id'] . "' and c.parent_id = '" . $parent_id . "' and c.categories_status = '1' order by cd.categories_name";
    $categories_query = xtDBquery($categories_query);
    while ($categories = xtc_db_fetch_array($categories_query, true)) {
        $SEF_link = xtc_href_link(FILENAME_DEFAULT, xtc_category_link($categories['categories_id'], $categories['categories_name']));
        if ($exclude != $categories['categories_id']) {
            $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'link' => $SEF_link);
        }
        $category_tree_array = get_category_tree($categories['categories_id'], $spacing . '&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array, false, $cPath);
    }
    return $category_tree_array;
}
function xtc_create_sort_heading($sortby, $colnum, $heading)
{
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = '<a href="' . xtc_href_link(basename($_SERVER['PHP_SELF']), xtc_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
    }
    return $sort_prefix . $heading . $sort_suffix;
}
function productRedirect()
{
    // Wenn wir auf ner Produkt-Info-Seite sind
    if (basename($_SERVER['SCRIPT_NAME']) == FILENAME_PRODUCT_INFO) {
        //BOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
        global $actual_products_id, $request_type;
        //EOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
        // Link zum Weiterleiten (MIT Session-ID)
        //$RedirectionLink = xtc_href_link(FILENAME_PRODUCT_INFO,xtc_product_link($actual_products_id));
        $RedirectionLink = ProductRedirectionLink(intval($actual_products_id));
        // Wenn es den Artikel gibt
        if ($RedirectionLink) {
            // Gewünschter Link (OHNE http/https-Zeug, Session-ID und weitere $_GET-Parameter)
            $ProductLink = str_replace(array(HTTP_SERVER, HTTPS_SERVER), '', preg_replace("/([^\\?]*)(\\?.*)/", "\$1", $RedirectionLink));
            // Angefragte Adresse (OHNE Session-ID und weitere $_GET-Parameter)
            $CurrentLink = preg_replace("/([^\\?]*)(\\?.*)/", "\$1", $_SERVER['REQUEST_URI']);
            // 301er-Weiterleitung mit Unterscheidung SSL / kein SSL
            if (strpos(urldecode($ProductLink), urldecode($CurrentLink)) === false) {
                //BOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
                //if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on' || getenv('HTTPS') == '1') ) { // Bei aktivem SSL
                if (ENABLE_SSL == true && $request_type == 'SSL') {
                    // We are loading an SSL page
                    //EOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
                    if (substr($RedirectionLink, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) {
                        $RedirectionLink = HTTPS_SERVER . substr($RedirectionLink, strlen(HTTP_SERVER));
                    }
                }
                header('HTTP/1.1 301 Moved Permanently');
                // BOF - Hetfield - 2009-11-19 - replaced deprecated function eregi_replace with preg_replace to be ready for PHP >= 5.3
                // header('Location: '.eregi_replace("[\r\n]+(.*)$","",$RedirectionLink));
                header('Location: ' . preg_replace("/[\r\n]+(.*)\$/i", "", $RedirectionLink));
                // EOF - Hetfield - 2009-11-19 - replaced deprecated function eregi_replace with preg_replace to be ready for PHP >= 5.3
            }
            // Wenn es den Artikel nicht gibt
        } else {
            // 404er-Weiterleitung
            $DefaultLink = xtc_href_link(FILENAME_DEFAULT);
            // <-- Hier Fehlerseite festlegen ...
            //BOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
            //if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on' || getenv('HTTPS') == '1') ) { // Bei aktivem SSL
            if (ENABLE_SSL == true && $request_type == 'SSL') {
                // We are loading an SSL page
                //EOF - web28 - 2010-08-16 - New SSL  handling  defined by $request_type
                if (substr($DefaultLink, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) {
                    $DefaultLink = HTTPS_SERVER . substr($DefaultLink, strlen(HTTP_SERVER));
                }
            }
            header('HTTP/1.1 404 Not Found');
            // BOF - Hetfield - 2009-11-19 - replaced deprecated function eregi_replace with preg_replace to be ready for PHP >= 5.3
            // header('Location: '.eregi_replace("[\r\n]+(.*)$","",$DefaultLink));
            header('Location: ' . preg_replace("/[\r\n]+(.*)\$/i", "", $DefaultLink));
            // EOF - Hetfield - 2009-11-19 - replaced deprecated function eregi_replace with preg_replace to be ready for PHP >= 5.3
        }
    }
}
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     global $PHP_SELF;
     if (xtc_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = xtc_draw_form('pages', basename($PHP_SELF), '', 'get');
         if ($current_page_number > 1) {
             //$display_links .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=1') . '" class="splitPageLink">' . PREVNEXT_BUTTON_FIRST . ' </a>&nbsp;';
             $display_links .= '<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, xtc_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
             //$display_links .= '&nbsp;<a href="' . xtc_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . $num_pages) . '" class="splitPageLink">' . PREVNEXT_BUTTON_LAST . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= xtc_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= xtc_draw_hidden_field(session_name(), session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
 function credit_risk_check()
 {
     $config = $this->_payone->getConfig();
     if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['noconfirm'])) {
         if ($config['credit_risk']['timeofcheck'] == 'before') {
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'p1crskip=1', 'SSL'));
         } else {
             $_SESSION['payone_error'] = CREDIT_RISK_FAILED;
             xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL'));
         }
     }
     // A/B testing: only perform scoring every n-th time
     $do_score = true;
     if ($config['credit_risk']['abtest']['active'] == 'true') {
         $ab_value = max(1, (int) $config['credit_risk']['abtest']['value']);
         $score_count = (int) MODULE_PAYMENT_PAYONE_AB_TESTING;
         $do_score = $score_count % $ab_value == 0;
         xtc_db_query("UPDATE " . TABLE_CONFIGURATION . " SET configuration_value='" . ($score_count + 1) . "', last_modified = NOW() where configuration_key='MODULE_PAYMENT_PAYONE_AB_TESTING'");
     }
     if ($do_score) {
         $score = $this->_payone->scoreCustomer($_SESSION['billto']);
     } else {
         $score = false;
     }
     if ($score instanceof Payone_Api_Response_Consumerscore_Valid) {
         switch ((string) $score->getScore()) {
             case 'G':
                 $_SESSION['payone_cr_result'] = 'green';
                 break;
             case 'Y':
                 $_SESSION['payone_cr_result'] = 'yellow';
                 break;
             case 'R':
                 $_SESSION['payone_cr_result'] = 'red';
                 break;
             default:
                 $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault'];
         }
         $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']);
     } else {
         // could not get a score value
         $_SESSION['payone_cr_result'] = $config['credit_risk']['newclientdefault'];
         $_SESSION['payone_cr_hash'] = $this->_payone->getAddressHash($_SESSION['billto']);
     }
 }
 function confirmation()
 {
     global $order;
     $confirmation = parent::confirmation();
     $this->fastCheckout->setFastCheckoutFlag($this->fastCheckoutFlag);
     $payment = $this->getPayment($_SESSION['customer_id']);
     $script = $this->getScript();
     $script .= '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>' . '<script type="text/javascript">' . 'var elvlogging = "' . MODULE_PAYMENT_PAYMILL_ELV_LOGGING . '";' . 'var sepaActive ="' . MODULE_PAYMENT_PAYMILL_ELV_SEPA . '";' . 'var elv_account_number_invalid = "' . html_entity_decode(MODULE_PAYMENT_PAYMILL_ELV_TEXT_ACCOUNT_INVALID) . '";' . 'var elv_bank_code_invalid = "' . html_entity_decode(MODULE_PAYMENT_PAYMILL_ELV_TEXT_BANKCODE_INVALID) . '";' . 'var elv_bank_owner_invalid = "' . html_entity_decode(MODULE_PAYMENT_PAYMILL_ELV_TEXT_ACCOUNT_HOLDER_INVALID) . '";' . 'var elv_iban_invalid = "' . html_entity_decode(MODULE_PAYMENT_PAYMILL_ELV_TEXT_IBAN_INVALID) . '";' . 'var elv_bic_invalid = "' . html_entity_decode(MODULE_PAYMENT_PAYMILL_ELV_TEXT_BIC_INVALID) . '";' . 'var paymill_account_name = ' . json_encode($order->billing['firstname'] . ' ' . $order->billing['lastname']) . ';' . 'var paymill_elv_code = "' . $payment['code'] . '";' . 'var paymill_elv_holder = "' . utf8_decode($payment['holder']) . '";' . 'var paymill_elv_iban = "' . utf8_decode($payment['iban']) . '";' . 'var paymill_elv_bic = "' . utf8_decode($payment['bic']) . '";' . 'var paymill_elv_account = "' . $payment['account'] . '";' . 'var paymill_elv_fastcheckout = ' . ($this->fastCheckout->canCustomerFastCheckoutElv($_SESSION['customer_id']) ? 'true' : 'false') . ';' . 'var checkout_payment_link = "' . xtc_href_link(FILENAME_CHECKOUT_PAYMENT, 'step=step2&payment_error=' . $this->code . '&error=', 'SSL', true, false) . '";' . '</script>' . '<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/Iban.js"></script>' . '<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/elv.js"></script>';
     array_push($confirmation['fields'], array('title' => $script . '<div class="paymill-label-field">' . MODULE_PAYMENT_PAYMILL_ELV_TEXT_ACCOUNT_HOLDER . '</div>', 'field' => '<span id="account-name-field"></span><span id="elv-holder-error" class="paymill-error"></span>'));
     if (MODULE_PAYMENT_PAYMILL_ELV_SEPA == 'True') {
         array_push($confirmation['fields'], array('title' => '<div class="paymill-label-field">' . MODULE_PAYMENT_PAYMILL_ELV_TEXT_IBAN . '</div>', 'field' => '<span id="iban-field"></span><span id="elv-iban-error" class="paymill-error"></span>'));
         array_push($confirmation['fields'], array('title' => '<div class="paymill-label-field">' . MODULE_PAYMENT_PAYMILL_ELV_TEXT_BIC . '</div>', 'field' => '<span id="bic-field"></span><span id="elv-bic-error" class="paymill-error"></span>'));
     } else {
         array_push($confirmation['fields'], array('title' => '<div class="paymill-label-field">' . MODULE_PAYMENT_PAYMILL_ELV_TEXT_ACCOUNT . '</div>', 'field' => '<span id="account-number-field"></span><span id="elv-account-error" class="paymill-error"></span>'));
         array_push($confirmation['fields'], array('title' => '<div class="paymill-label-field">' . MODULE_PAYMENT_PAYMILL_ELV_TEXT_BANKCODE . '</div>', 'field' => '<span id="bank-code-field"></span><span id="elv-bankcode-error" class="paymill-error"></span>'));
     }
     array_push($confirmation['fields'], array('field' => '<form id="paymill_form" action="' . xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . '" method="post" style="display: none;"></form>'));
     return $confirmation;
 }
function xtc_customer_greeting()
{
    if (isset($_SESSION['customer_last_name']) && isset($_SESSION['customer_id'])) {
        if (!isset($_SESSION['customer_gender'])) {
            $check_customer_query = "select customers_gender FROM  " . TABLE_CUSTOMERS . " where customers_id = '" . xtc_db_input((int) $_SESSION['customer_id']) . "'";
            $check_customer_query = xtDBquery($check_customer_query);
            $check_customer_data = xtc_db_fetch_array($check_customer_query, true);
            $_SESSION['customer_gender'] = $check_customer_data['customers_gender'];
        }
        if ($_SESSION['customer_gender'] == 'f') {
            $greeting_string = sprintf(TEXT_GREETING_PERSONAL, FEMALE . '&nbsp;' . $_SESSION['customer_first_name'] . '&nbsp;' . $_SESSION['customer_last_name'], xtc_href_link(FILENAME_PRODUCTS_NEW));
        } else {
            $greeting_string = sprintf(TEXT_GREETING_PERSONAL, MALE . '&nbsp;' . $_SESSION['customer_first_name'] . '&nbsp;' . $_SESSION['customer_last_name'], xtc_href_link(FILENAME_PRODUCTS_NEW));
        }
    } else {
        $greeting_string = sprintf(TEXT_GREETING_GUEST, xtc_href_link(FILENAME_LOGIN, '', 'SSL'), xtc_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
    }
    return $greeting_string;
}
 function payment_action()
 {
     global $order, $insert_id;
     if (!isset($insert_id) || $insert_id == '') {
         $insert_id = $_SESSION['tmp_oID'];
     }
     $this->payone->log("(pre-)authorizing {$this->code} payment");
     $standard_parameters = parent::_standard_parameters();
     $this->personal_data = new Payone_Api_Request_Parameter_Authorization_PersonalData();
     parent::_set_customers_standard_params();
     $this->delivery_data = new Payone_Api_Request_Parameter_Authorization_DeliveryData();
     parent::_set_customers_shipping_params();
     $this->payment_method = array();
     $request_parameters = parent::_request_parameters('vor');
     unset($request_parameters['payment']);
     $this->params = array_merge($standard_parameters, $request_parameters);
     $this->builder = new Payone_Builder($this->payone->getPayoneConfig());
     parent::_build_service_authentification('vor');
     parent::_parse_response_payone_api();
     xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'));
 }
echo 'templates/' . CURRENT_TEMPLATE;
?>
/javascript/bootstrap.min.js" type="text/javascript"></script>
<script src="<?php 
echo 'templates/' . CURRENT_TEMPLATE;
?>
/javascript/bootstrap-add.js" type="text/javascript"></script>
<script src="<?php 
echo 'templates/' . CURRENT_TEMPLATE;
?>
/javascript/ekko-lightbox.min.js" type="text/javascript"></script>

<?php 
if (SHOW_COOKIE_NOTE == 'true') {
    if (is_numeric(COOKIE_NOTE_CONTENT_ID) && COOKIE_NOTE_CONTENT_ID != 0) {
        $cookie_content_link = xtc_href_link(FILENAME_CONTENT, 'coID=' . COOKIE_NOTE_CONTENT_ID);
    } else {
        $cookie_content_link = NULL;
    }
    ?>
<script src="<?php 
    echo 'templates/' . CURRENT_TEMPLATE;
    ?>
/javascript/cookieconsent.min.js"></script>
<script type="text/javascript">
    window.cookieconsent_options = {"message":"<?php 
    echo COOKIE_NOTE_TEXT;
    ?>
","dismiss":"<?php 
    echo COOKIE_NOTE_DISMISS_TEXT;
    ?>
        echo '<table class="infoBoxHeading" width="100%">
                                <tr>
                                  <td width="150" align="center">
                                    <a class="btn btn-default" href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=21', 'NONSSL') . '">Afterbuy</a>
                                  </td>
                                  <td width="1">|</td>
                                  <td width="150" align="center">
                                    <a class="btn btn-default" href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=19', 'NONSSL') . '">Google Conversion</a>
                                  </td>
                                  <td width="1">|</td>
                                  <td width="150" align="center">
                                    <a class="btn btn-default" class="btn btn-default" href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=111125', 'NONSSL') . '">PayPal</a>
                                  </td>
                                  <td width="1">|</td>
                                  <td width="150" align="center">
                                    <a class="btn btn-default" href="' . xtc_href_link(FILENAME_CONFIGURATION, 'gID=31', 'NONSSL') . '">Moneybookers.com</a>
                                  </td>
                                  <td width="1">|</td>
                                  <td></td>
                                </tr>
                              </table>';
        if ($_GET['gID'] == '31') {
            echo MB_INFO;
        }
        break;
}
?>
                  <tr>
                    <td valign="top" align="right">
                      <?php 
echo xtc_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . (int) $_GET['gID'] . '&action=save');
<?php

/* -----------------------------------------------------------------------------------------
   $Id: paypalcart.php 10343 2016-10-26 11:54:18Z GTB $

   modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$lang_array = array('MODULE_PAYMENT_PAYPALCART_TEXT_TITLE' => 'PayPal Cart', 'MODULE_PAYMENT_PAYPALCART_TEXT_INFO' => '<img src="https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif" />', 'MODULE_PAYMENT_PAYPALCART_TEXT_DESCRIPTION' => 'After "confirm" your will be routet to PayPal to pay your order.<br />Back in shop you will get your order-mail.<br />PayPal is the safer way to pay online. We keep your details safe from others and can help you get your money back if something ever goes wrong.', 'MODULE_PAYMENT_PAYPALCART_ALLOWED_TITLE' => 'Allowed zones', 'MODULE_PAYMENT_PAYPALCART_ALLOWED_DESC' => 'Please enter the zones <b>separately</b> which should be allowed to use this module (e.g. AT,DE (leave empty if you want to allow all zones))', 'MODULE_PAYMENT_PAYPALCART_STATUS_TITLE' => 'Enable PayPal module', 'MODULE_PAYMENT_PAYPALCART_STATUS_DESC' => 'Do you want to accept PayPal payments?', 'MODULE_PAYMENT_PAYPALCART_SORT_ORDER_TITLE' => 'Sort order', 'MODULE_PAYMENT_PAYPALCART_SORT_ORDER_DESC' => 'Sort order of the view. Lowest numeral will be displayed first', 'MODULE_PAYMENT_PAYPALCART_ZONE_TITLE' => 'Payment zone', 'MODULE_PAYMENT_PAYPALCART_ZONE_DESC' => 'If a zone is choosen, the payment method will be valid for this zone only.', 'MODULE_PAYMENT_PAYPALCART_LP' => '<br /><br /><a target="_blank" href="http://www.paypal.com/de/webapps/mpp/referral/paypal-business-account2?partner_id=EHALBVD4M2RQS"><strong>Create PayPal account now.</strong></a>', 'MODULE_PAYMENT_PAYPALCART_TEXT_EXTENDED_DESCRIPTION' => '<strong><font color="red">ATTENTION:</font></strong> Please setup PayPal configuration under "Partner Modules" -> "PayPal" -> <a href="' . xtc_href_link('paypal_config.php') . '"><strong>"PayPal Configuration"</strong></a>!', 'MODULE_PAYMENT_PAYPALCART_TEXT_ERROR_HEADING' => 'Note', 'MODULE_PAYMENT_PAYPALCART_TEXT_ERROR_MESSAGE' => 'PayPal payment has been canceled', 'TEXT_PAYPAL_CART_ACCOUNT_CREATED' => 'We have created a customer account with your PayPal E-Mail address. You can request the password for your new customer account later using the "Forgotten Password" function.');
foreach ($lang_array as $key => $val) {
    defined($key) or define($key, $val);
}
        $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
        $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_TITLE . '<br />' . xtc_draw_input_field('tax_class_title', $tcInfo->tax_class_title));
        $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br />' . xtc_draw_input_field('tax_class_description', $tcInfo->tax_class_description));
        $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '">' . BUTTON_CANCEL . '</a>');
        break;
    case 'delete':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_TAX_CLASS . '</b>');
        $contents = array('form' => xtc_draw_form('classes', FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $tcInfo->tax_class_title . '</b>');
        $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_DELETE . '"/>&nbsp;<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '">' . BUTTON_CANCEL . '</a>');
        break;
    default:
        if (is_object($tcInfo)) {
            $heading[] = array('text' => '<b>' . $tcInfo->tax_class_title . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '">' . BUTTON_EDIT . '</a> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xtc_date_short($tcInfo->date_added));
            $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . xtc_date_short($tcInfo->last_modified));
            $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br />' . $tcInfo->tax_class_description);
        }
        break;
}
if (xtc_not_null($heading) && xtc_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
示例#17
0
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommercebased on original files from OSCommerce CVS 2.2 2002/08/28 02:14:35 www.oscommerce.com 
   (c) 2003 nextcommerce (loginbox.php,v 1.10 2003/08/17); www.nextcommerce.org
   (c) 2006 XT-Commerce

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contributions:
   Loginbox V1.0          Aubrey Kilian <*****@*****.**>

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
if (!isset($_SESSION['customer_id'])) {
    require_once DIR_FS_INC . 'xtc_image_submit.inc.php';
    require_once DIR_FS_INC . 'xtc_draw_password_field.inc.php';
    $box_smarty = new smarty();
    $box_smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $box_smarty->assign('FORM_ACTION', '<form id="loginbox" method="post" action="' . xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . '">');
    $box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="50" style="width: 100%!important;""'));
    $box_smarty->assign('FIELD_PWD', xtc_draw_password_field('password', '', 'maxlength="30" style="width: 100%!important;""'));
    $box_smarty->assign('BUTTON', xtc_image_submit('button_login_small.gif', IMAGE_BUTTON_LOGIN));
    $box_smarty->assign('LINK_LOST_PASSWORD', xtc_href_link(FILENAME_PASSWORD_DOUBLE_OPT, '', 'SSL'));
    $box_smarty->assign('FORM_END', '</form>');
    $box_smarty->assign('BOX_CONTENT', '');
    $box_smarty->caching = 0;
    $box_smarty->assign('language', $_SESSION['language']);
    $box_loginbox = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_login.html');
    $smarty->assign('box_LOGIN', $box_loginbox);
}
 /**
  * get the cancel-URL
  * @param $paymentMethod - assign $this->code
  * @param array (optional) $errors with error-codes
  */
 function getCancelUrl($paymentMethod, $errors = array())
 {
     /*
     $session = session_name().'='.session_id();
     if (ENABLE_SSL == true)
     	$server = HTTPS_SERVER;
     else
     	$server = HTTP_SERVER;
     
     $cancelUrl = $server.DIR_WS_CATALOG.FILENAME_CHECKOUT_PAYMENT.'?payment_error='.$paymentMethod.'&'.$session;
     */
     $message = array();
     if (xtc_not_null($paymentMethod)) {
         $message[] = 'payment_error=' . $paymentMethod;
     }
     //if errors are given, add them to the url
     if ($errors) {
         $errorCodes = array();
         foreach ($errors as $oneError) {
             $errorCodes[] = $oneError['code'];
         }
         if ($errorCodes) {
             $message[] = 'error_codes=' . implode(',', $errorCodes);
         }
     }
     //$message = implode('&', $message);
     //return $cancelUrl;
     return xtc_href_link(FILENAME_CHECKOUT_PAYMENT, implode('&', $message), 'SSL');
 }
        $newpass = xtc_create_random_value(ENTRY_PASSWORD_MIN_LENGTH);
        $crypted_password = xtc_encrypt_password($newpass);
        xtc_db_query("update " . TABLE_AFFILIATE . " set affiliate_password = '******' where affiliate_id = '" . $check_affiliate['affiliate_id'] . "'");
        xtc_php_mail(AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, $_POST['email_address'], $check_affiliate['affiliate_firstname'] . " " . $check_affiliate['affiliate_lastname'], '', AFFILIATE_EMAIL_ADDRESS, STORE_OWNER, '', '', EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)));
        if (!isset($mail_error)) {
            xtc_redirect(xtc_href_link(FILENAME_AFFILIATE, 'info_message=' . urlencode(TEXT_PASSWORD_SENT), 'SSL', true, false));
        } else {
            echo $mail_error;
        }
    } else {
        xtc_redirect(xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'email=nonexistent', 'SSL'));
    }
} else {
    $breadcrumb->add(NAVBAR_TITLE, xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
    $breadcrumb->add(NAVBAR_TITLE_PASSWORD_FORGOTTEN, xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', 'SSL'));
    require DIR_WS_INCLUDES . 'header.php';
    $smarty->assign('FORM_ACTION', xtc_draw_form('password_forgotten', xtc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, 'action=process', 'SSL')));
    $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email_address', '', 'maxlength="96"'));
    $smarty->assign('LINK_AFFILIATE', '<a href="' . xtc_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
    $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
    if (isset($_GET['email']) && $_GET['email'] == 'nonexistent') {
        $smarty->assign('email_nonexistent', 'true');
    }
}
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/affiliate_password_forgotten.html');
$smarty->assign('main_content', $main_content);
$smarty->assign('language', $_SESSION['language']);
$smarty->caching = 0;
$smarty->display(CURRENT_TEMPLATE . '/index.html');
            echo "</ul></li>";
        }
        echo '</ul>';
        echo '</li>';
    }
    echo '</ul>';
    ?>
		<ul class="hidden-lg nav navbar-nav navbar-right hidden-xs">
			<li class="topicon"><a href="<?php 
    echo xtc_href_link('../index.php', '', 'NONSSL');
    ?>
" data-toggle="tooltip" data-placement="bottom" title="zum Shop"><span class="glyphicon glyphicon-globe"></span></a></li>			
			<li class="topicon"><a href="<?php 
    echo xtc_href_link('credits.php', '', 'NONSSL');
    ?>
" data-toggle="tooltip" data-placement="bottom" title=" <?php 
    echo BOX_CREDITS;
    ?>
"><span class="glyphicon glyphicon-info-sign"></span></a></li>
			<li class="topicon"><a href="http://www.shophelfer.com/wiki/index.php" target="_blank" data-toggle="tooltip" data-placement="bottom" title="Wiki"><span class="glyphicon glyphicon-book"></span></a></li>
			<li class="topicon"><a href="<?php 
    echo xtc_href_link('../logoff.php', '', 'NONSSL');
    ?>
" data-toggle="tooltip" data-placement="bottom" title=" <?php 
    echo BOX_LOGOUT;
    ?>
"><span class="glyphicon glyphicon-log-out"></span></a></li>
		</ul>
<?php 
    echo '</div>';
}
 }
 // elari cs v3.x changed for added iplog module
 $contents[] = array('align' => 'center', 'text' => '<table>
                                         <tr>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '">' . BUTTON_ORDERS . '</a>
                                           </td>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . BUTTON_EMAIL . '</a>
                                           </td>
                                         </tr>
                                         <tr>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=iplog') . '">' . BUTTON_IPLOG . '</a></td>
                                           <td style="text-align: center;">
                                             <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=new_order') . '" onclick="return confirm(\'' . NEW_ORDER . '\')">' . BUTTON_NEW_ORDER . '</a>
                                           </td>
                                         </tr>
                                       </table>');
 //BOF - DokuMan - 2010-11-02 - Workaround for customer details not showing on iplog-Box
 if ($action == 'iplog') {
     $info_query = xtc_db_query("SELECT\n                                                          customers_info_date_account_created as date_account_created,\n                                                          customers_info_date_account_last_modified as date_account_last_modified,\n                                                          customers_info_date_of_last_logon as date_last_logon,\n                                                          customers_info_number_of_logons as number_of_logons\n                                                     FROM " . TABLE_CUSTOMERS_INFO . " WHERE customers_info_id = '" . $cInfo->customers_id . "'");
     $info = xtc_db_fetch_array($info_query);
     $country_query = xtc_db_query("SELECT countries_name FROM " . TABLE_COUNTRIES . " WHERE countries_id = '" . (int) $cInfo->entry_country_id . "'");
     $country = xtc_db_fetch_array($country_query);
     $reviews_query = xtc_db_query("SELECT COUNT(*) as number_of_reviews FROM " . TABLE_REVIEWS . " WHERE customers_id = '" . (int) $cInfo->customers_id . "'");
     $reviews = xtc_db_fetch_array($reviews_query);
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . xtc_date_short($info['date_account_created']));
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . xtc_date_short($info['date_account_last_modified']));
     $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . xtc_date_short($info['date_last_logon']));
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $info['number_of_logons']);
<?php

/* -----------------------------------------------------------------------------------------
   $Id: paypalplus.php 10346 2016-10-26 13:17:10Z GTB $

   modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$lang_array = array('MODULE_PAYMENT_PAYPALPLUS_TEXT_TITLE' => 'PayPal Plus', 'MODULE_PAYMENT_PAYPALPLUS_TEXT_INFO' => '<div style="padding: 15px;text-align: center;margin: 10px 0px -13px;color: #003087;">Please select one of the payment methods listed here by clicking.</div>', 'MODULE_PAYMENT_PAYPALPLUS_TEXT_DESCRIPTION' => 'After "confirm" your will be routet to PayPal to pay your order.<br />Back in shop you will get your order-mail.<br />PayPal is the safer way to pay online. We keep your details safe from others and can help you get your money back if something ever goes wrong.', 'MODULE_PAYMENT_PAYPALPLUS_ALLOWED_TITLE' => 'Allowed zones', 'MODULE_PAYMENT_PAYPALPLUS_ALLOWED_DESC' => 'Please enter the zones <b>separately</b> which should be allowed to use this module (e.g. AT,DE (leave empty if you want to allow all zones))', 'MODULE_PAYMENT_PAYPALPLUS_STATUS_TITLE' => 'Enable PayPal module', 'MODULE_PAYMENT_PAYPALPLUS_STATUS_DESC' => 'Do you want to accept PayPal payments?', 'MODULE_PAYMENT_PAYPALPLUS_SORT_ORDER_TITLE' => 'Sort order', 'MODULE_PAYMENT_PAYPALPLUS_SORT_ORDER_DESC' => 'Sort order of the view. Lowest numeral will be displayed first', 'MODULE_PAYMENT_PAYPALPLUS_ZONE_TITLE' => 'Payment zone', 'MODULE_PAYMENT_PAYPALPLUS_ZONE_DESC' => 'If a zone is choosen, the payment method will be valid for this zone only.', 'MODULE_PAYMENT_PAYPALPLUS_LP' => '<br /><br /><a target="_blank" href="http://www.paypal.com/de/webapps/mpp/referral/paypal-business-account2?partner_id=EHALBVD4M2RQS"><strong>Create PayPal account now.</strong></a>', 'MODULE_PAYMENT_PAYPALPLUS_TEXT_EXTENDED_DESCRIPTION' => '<strong><font color="red">ATTENTION:</font></strong> Please setup PayPal configuration under "Partner Modules" -> "PayPal" -> <a href="' . xtc_href_link('paypal_config.php') . '"><strong>"PayPal Configuration"</strong></a>!', 'MODULE_PAYMENT_PAYPALPLUS_TEXT_ERROR_HEADING' => 'Note', 'MODULE_PAYMENT_PAYPALPLUS_TEXT_ERROR_MESSAGE' => 'PayPal payment has been canceled', 'MODULE_PAYMENT_PAYPALPLUS_INVOICE' => 'Pay upon Invoice');
foreach ($lang_array as $key => $val) {
    defined($key) or define($key, $val);
}
<?php

/* -----------------------------------------------------------------------------------------
   $Id$

   modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$lang_array = array('MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_TITLE' => 'PayPal Plus Link', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_INFO' => '<img src="https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif" />', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_DESCRIPTION' => 'Sie werden nach dem "Best&auml;tigen" zu PayPal geleitet um hier Ihre Bestellung zu bezahlen.<br />Danach gelangen Sie zur&uuml;ck in den Shop und erhalten Ihre Bestell-Best&auml;tigung.<br />Jetzt schneller bezahlen mit unbegrenztem PayPal-K&auml;uferschutz - nat&uuml;rlich kostenlos.', 'MODULE_PAYMENT_PAYPALPLUSLINK_ALLOWED_TITLE' => 'Erlaubte Zonen', 'MODULE_PAYMENT_PAYPALPLUSLINK_ALLOWED_DESC' => 'Geben Sie <b>einzeln</b> die Zonen an, welche f&uuml;r dieses Modul erlaubt sein sollen. (z.B. AT,DE (wenn leer, werden alle Zonen erlaubt))', 'MODULE_PAYMENT_PAYPALPLUSLINK_STATUS_TITLE' => 'PayPal Modul aktivieren', 'MODULE_PAYMENT_PAYPALPLUSLINK_STATUS_DESC' => 'M&ouml;chten Sie Zahlungen per PayPal akzeptieren?', 'MODULE_PAYMENT_PAYPALPLUSLINK_SORT_ORDER_TITLE' => 'Anzeigereihenfolge', 'MODULE_PAYMENT_PAYPALPLUSLINK_SORT_ORDER_DESC' => 'Reihenfolge der Anzeige. Kleinste Ziffer wird zuerst angezeigt', 'MODULE_PAYMENT_PAYPALPLUSLINK_ZONE_TITLE' => 'Zahlungszone', 'MODULE_PAYMENT_PAYPALPLUSLINK_ZONE_DESC' => 'Wenn eine Zone ausgew&auml;hlt ist, gilt die Zahlungsmethode nur f&uuml;r diese Zone.', 'MODULE_PAYMENT_PAYPALPLUSLINK_LP' => '<br /><br /><a target="_blank" href="http://www.paypal.com/de/webapps/mpp/referral/paypal-business-account2?partner_id=EHALBVD4M2RQS"><strong>Jetzt PayPal Konto hier erstellen.</strong></a>', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_EXTENDED_DESCRIPTION' => '<strong><font color="red">ACHTUNG:</font></strong> Bitte nehmen Sie noch die Einstellungen unter "Partner Module" -> "PayPal" -> <a href="' . xtc_href_link('paypal_config.php') . '"><strong>"PayPal Konfiguration"</strong></a> vor!', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_ERROR_HEADING' => 'Hinweis', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_ERROR_MESSAGE' => 'PayPal Zahlung wurde abgebrochen', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_SUCCESS' => 'Jetzt mit PayPal bezahlen. Klicken Sie bitte auf den folgenden Link:<br/> %s', 'MODULE_PAYMENT_PAYPALPLUSLINK_TEXT_COMPLETED' => 'Vielen Dank f&uuml;r die Bezahlung mit PayPal.');
foreach ($lang_array as $key => $val) {
    defined($key) or define($key, $val);
}
   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// include needed functions
require_once DIR_FS_INC . 'xtc_date_short.inc.php';
// create smarty elements
$smarty = new Smarty();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
if (!isset($_SESSION['affiliate_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
}
$breadcrumb->add(NAVBAR_TITLE, xtc_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_PAYMENT, xtc_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL'));
if (!isset($_GET['page'])) {
    $_GET['page'] = 1;
}
$affiliate_payment_raw = "select p.* , s.affiliate_payment_status_name\n           from " . TABLE_AFFILIATE_PAYMENT . " p, " . TABLE_AFFILIATE_PAYMENT_STATUS . " s \n           where p.affiliate_payment_status = s.affiliate_payment_status_id \n           and s.affiliate_language_id = '" . $_SESSION['languages_id'] . "'\n           and p.affiliate_id =  '" . $_SESSION['affiliate_id'] . "'\n           order by p.affiliate_payment_id DESC";
$affiliate_payment_split = new splitPageResults($affiliate_payment_raw, $_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
require DIR_WS_INCLUDES . 'header.php';
$smarty->assign('affiliate_payment_split_number', $affiliate_payment_split->number_of_rows);
$affiliate_payment_table = '';
if ($affiliate_payment_split->number_of_rows > 0) {
    $affiliate_payment_values = xtc_db_query($affiliate_payment_split->sql_query);
    $number_of_payment = 0;
    while ($affiliate_payment = xtc_db_fetch_array($affiliate_payment_values)) {
        $number_of_payment++;
        if ($number_of_payment / 2 == floor($number_of_payment / 2)) {
            $affiliate_payment_table .= '<tr class="productListing-even">';
   modified eCommerce Shopsoftware
   http://www.modified-shop.org

   Copyright (c) 2009 - 2013 [www.modified-shop.org]
   -----------------------------------------------------------------------------------------
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
chdir('../../');
include 'includes/application_top.php';
// include needed classes
require_once DIR_WS_CLASSES . 'order.php';
require_once DIR_FS_EXTERNAL . 'paypal/classes/PayPalPayment.php';
$paypal = new PayPalPayment('paypalcart');
$paypal->validate_payment_paypalcart();
if (!isset($_SESSION['customer_id'])) {
    xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
}
// shipping
$_SESSION['shipping'] = '';
$order = new order();
if ($order->content_type == 'virtual' || $order->content_type == 'virtual_weight' || $_SESSION['cart']->count_contents_virtual() == 0) {
    $_SESSION['shipping'] = false;
    $_SESSION['sendto'] = false;
}
// payment
$_SESSION['payment'] = 'paypalcart';
// billto
$_SESSION['billto'] = $_SESSION['customer_default_address_id'];
xtc_redirect(xtc_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'conditions=true', 'NONSSL'));
 function display()
 {
     $customers_statuses_array = xtc_get_customers_statuses();
     // build Currency Select
     $curr = '';
     $currencies = xtc_db_query("SELECT code FROM " . TABLE_CURRENCIES);
     while ($currencies_data = xtc_db_fetch_array($currencies)) {
         $curr .= xtc_draw_radio_field('currencies', $currencies_data['code'], true) . $currencies_data['code'] . '<br />';
     }
     $campaign_array = array(array('id' => '', 'text' => TEXT_NONE));
     $campaign_query = xtc_db_query("select campaigns_name, campaigns_refID from " . TABLE_CAMPAIGNS . " order by campaigns_id");
     while ($campaign = xtc_db_fetch_array($campaign_query)) {
         $campaign_array[] = array('id' => 'refID=' . $campaign['campaigns_refID'] . '&', 'text' => $campaign['campaigns_name']);
     }
     return array('text' => EXPORT_STATUS_TYPE . '<br />' . EXPORT_STATUS . '<br />' . xtc_draw_pull_down_menu('status', $customers_statuses_array, '1') . '<br />' . CURRENCY . '<br />' . CURRENCY_DESC . '<br />' . $curr . CAMPAIGNS . '<br />' . CAMPAIGNS_DESC . '<br />' . xtc_draw_pull_down_menu('campaign', $campaign_array) . '<br />' . EXPORT_TYPE . '<br />' . EXPORT . '<br />' . xtc_draw_radio_field('export', 'no', false) . EXPORT_NO . '<br />' . xtc_draw_radio_field('export', 'yes', true) . EXPORT_YES . '<br />' . '<br />' . xtc_button(BUTTON_EXPORT) . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=preisauskunft')));
 }
 function payment_action()
 {
     xtc_redirect(xtc_href_link('checkout_payment_iframe.php', '', 'SSL'));
 }
        if (xtc_not_null($history['delivery_name'])) {
            $order_type = TEXT_ORDER_SHIPPED_TO;
            $order_name = $history['delivery_name'];
        } else {
            $order_type = TEXT_ORDER_BILLED_TO;
            $order_name = $history['billing_name'];
        }
        $module_content[] = array('ORDER_ID' => $history['orders_id'], 'ORDER_STATUS' => $history['orders_status_name'], 'ORDER_DATE' => xtc_date_long($history['date_purchased']), 'ORDER_PRODUCTS' => $products['count'], 'ORDER_TOTAL' => strip_tags($history['order_total']), 'ORDER_BUTTON' => '<a href="' . xtc_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'page=' . (empty($_GET['page']) ? "1" : (int) $_GET['page']) . '&order_id=' . $history['orders_id'], 'SSL') . '">' . xtc_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>');
        require_once DIR_FS_INC . 'xtc_get_tracking_link.php';
        $module_content[count($module_content) - 1]['TRACKING_LINKS'] = xtc_get_tracking_link($history['orders_id']);
    }
}
if ($orders_total > 0) {
    $smarty->assign('SPLIT_BAR', '
	          <div class="smallText" style="clear:both;"><div style="float:left;">' . $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS) . '</div>
              <div align="right">' . TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, xtc_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</div>
              </div>');
}
$smarty->assign('order_content', $module_content);
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>');
$smarty->caching = 0;
$main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/account_history.html');
$smarty->assign('language', $_SESSION['language']);
$smarty->assign('main_content', $main_content);
$smarty->caching = 0;
if (!defined('RM')) {
    $smarty->load_filter('output', 'note');
}
$smarty->display(CURRENT_TEMPLATE . '/index.html');
include 'includes/application_bottom.php';
if (isset(${$_SESSION}['payment']->form_action_url) && !${$_SESSION}['payment']->tmpOrders) {
    $form_action_url = ${$_SESSION}['payment']->form_action_url;
} else {
    $form_action_url = xtc_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
}
$smarty->assign('CHECKOUT_FORM', xtc_draw_form('checkout_confirmation', $form_action_url, 'post'));
$checkout_payment_button = '';
if (isset($checkout_payment_modules->modules) && is_array($checkout_payment_modules->modules)) {
    $checkout_payment_button .= $checkout_payment_modules->process_button();
}
$smarty->assign('MODULE_BUTTONS', $checkout_payment_button);
$smarty->assign('CHECKOUT_BUTTON', xtc_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n");
if ($order->info['shipping_method']) {
    $smarty->assign('SHIPPING_METHOD', $order->info['shipping_method']);
    //$smarty->assign('SHIPPING_EDIT', xtc_href_link(FILENAME_PAYPAL_CHECKOUT_SHIPPING, '', 'SSL'));
    $smarty->assign('SHIPPING_EDIT', xtc_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    //DokuMan - 2012-05-29 - assume FILENAME_CHECKOUT_SHIPPING here
}
$smarty->assign('COMMENTS', xtc_draw_textarea_field('comments', 'soft', '60', '5', isset($_SESSION['comments']) ? $_SESSION['comments'] : '') . xtc_draw_hidden_field('comments_added', 'YES'));
//Dokuman - 2012-05-31 - fix paypal_checkout notices
$smarty->assign('ADR_checkbox', '<input type="checkbox" value="address" name="check_address" />');
//check if display conditions on checkout page is true
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    if (GROUP_CHECK == 'true') {
        $group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
    }
    $shop_content_query = xtc_db_query("SELECT\n                                      content_title,\n                                      content_heading,\n                                      content_text,\n                                      content_file\n                                      FROM " . TABLE_CONTENT_MANAGER . "\n                                      WHERE content_group='3' " . $group_check . "\n                                      AND languages_id='" . $_SESSION['languages_id'] . "'");
    $shop_content_data = xtc_db_fetch_array($shop_content_query);
    if ($shop_content_data['content_file'] != '') {
        /* BOF - Hetfield - 2010-01-22 - Bugfix including contentfiles at SSL-Proxy */
        //$conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="300">';
示例#30
0
 function display()
 {
     $interval_array = array(array('id' => '86400', 'text' => '24 Stunden'), array('id' => '43200', 'text' => '12 Stunden'), array('id' => '21600', 'text' => '6 Stunden'), array('id' => '10800', 'text' => '3 Stunden'), array('id' => '3600', 'text' => '1 Stunden'));
     return array('text' => '<br/><b>' . MODULE_JANOLAW_UPDATE_INTERVAL_TITLE . '</b>
                         <br/>' . MODULE_JANOLAW_UPDATE_INTERVAL_DESC . '<br/>' . xtc_draw_pull_down_menu('configuration[MODULE_JANOLAW_UPDATE_INTERVAL]', $interval_array, MODULE_JANOLAW_UPDATE_INTERVAL) . '<br />' . '<br /><div align="center">' . xtc_button('OK') . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=janolaw')) . "</div>");
 }