function install() { if (isset($_GET['autoinstall']) && $_GET['autoinstall'] == '1') { // Module already installed if (defined('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_STATUS') && MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_STATUS == 'true') { xtc_redirect(xtc_href_link_admin('admin/modules.php', 'set=payment&module=pn_sofortueberweisung', 'SSL')); } print $this->autoinstall(); exit; } else { $user_id = !empty($_GET['user_id']) ? xtc_db_prepare_input($_GET['user_id']) : '10000'; $project_id = !empty($_GET['project_id']) ? xtc_db_prepare_input($_GET['project_id']) : '500000'; if (!empty($_GET['consumer_protection']) && xtc_db_prepare_input($_GET['consumer_protection']) == '1') { $consumer_protection = 'true'; } else { $consumer_protection = 'false'; } if (isset($_SESSION['pn_sofortueberweisung_pw']) && !empty($_SESSION['pn_sofortueberweisung_pw'])) { $project_password = $_SESSION['pn_sofortueberweisung_pw']; unset($_SESSION['pn_sofortueberweisung_pw']); } else { $project_password = ''; } if (isset($_SESSION['pn_sofortueberweisung_pw2']) && !empty($_SESSION['pn_sofortueberweisung_pw2'])) { $project_password2 = $_SESSION['pn_sofortueberweisung_pw2']; unset($_SESSION['pn_sofortueberweisung_pw2']); } else { $project_password2 = ''; } if (isset($_SESSION['pn_sofortueberweisung_hashAlgorithm']) && !empty($_SESSION['pn_sofortueberweisung_hashAlgorithm'])) { $hashAlgorithm = $_SESSION['pn_sofortueberweisung_hashAlgorithm']; unset($_SESSION['pn_sofortueberweisung_hashAlgorithm']); } else { $hashAlgorithm = $this->pnSofortueberweisung->getSupportedHashAlgorithm(); } xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_STATUS', 'true', '6', '3', 'xtc_cfg_select_option(array(\\'true\\', \\'false\\'), ', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_KS_STATUS', '" . $consumer_protection . "', '6', '3', 'xtc_cfg_select_option(array(\\'true\\', \\'false\\'), ', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_ALLOWED', '', '6', '0', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_USER_ID', '" . (int) $user_id . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_PROJECT_ID', '" . (int) $project_id . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_PROJECT_PASSWORD', '" . $project_password . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_PROJECT_NOTIF_PASSWORD', '" . $project_password2 . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_HASH_ALGORITHM', '" . $hashAlgorithm . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_SORT_ORDER', '1', '6', '20', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, use_function, set_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_ZONE', '0', '6', '2', 'xtc_get_zone_class_title', 'xtc_cfg_pull_down_zone_classes(', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_ORDER_STATUS_ID', '0', '6', '10', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_TMP_STATUS_ID', '0', '6', '8', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_UNC_STATUS_ID', '0', '6', '9', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_RECEIVED_STATUS_ID', '0', '6', '11', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, use_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_LOSS_STATUS_ID', '0', '6', '12', 'xtc_cfg_pull_down_order_statuses(', 'xtc_get_order_status_name', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_REASON_1', 'Nr. {{order_id}} Kd-Nr. {{customer_id}}', '6', '4', 'xtc_cfg_select_option(array(\\'Nr. {{order_id}} Kd-Nr. {{customer_id}}\\',\\'-TRANSACTION-\\'), ', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_TEXT_REASON_2', '" . addslashes(STORE_NAME) . "', '6', '4', now())"); xtc_db_query("INSERT INTO " . TABLE_CONFIGURATION . " ( configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_PN_SOFORTUEBERWEISUNG_IMAGE', 'Infographic', '6', '6', 'xtc_cfg_select_option(array(\\'Infographic\\',\\'Logo & Text\\',\\'Logo\\'), ', now())"); } }
//web28 - 2010-06-23 change unnecessary SSL to NONSSL } $orders_contents = substr($orders_contents, 0, -6); $customers_query = xtc_db_query("select count(*) as count from " . TABLE_CUSTOMERS); $customers = xtc_db_fetch_array($customers_query); $products_query = xtc_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'"); $products = xtc_db_fetch_array($products_query); $reviews_query = xtc_db_query("select count(*) as count from " . TABLE_REVIEWS); $reviews = xtc_db_fetch_array($reviews_query); $admin_image = '<a href="' . xtc_href_link_admin(FILENAME_START, '', 'NONSSL') . '">' . xtc_image_button('button_admin.gif', IMAGE_BUTTON_ADMIN) . '</a>'; //web28 - 2010-06-23 change unnecessary SSL to NONSSL if ($product->isProduct()) { $admin_link = '<a href="' . xtc_href_link_admin(FILENAME_EDIT_PRODUCTS, 'cPath=' . $cPath . '&pID=' . $product->data['products_id']) . '&action=new_product' . '" onclick="window.open(this.href); return false;">' . xtc_image_button('edit_product.gif', IMAGE_BUTTON_PRODUCT_EDIT) . '</a>'; } else { $admin_link = ''; //DokuMan - 2010-03-23 - set undefinded variable } $box_content = '<strong>' . BOX_TITLE_STATISTICS . '</strong><br />' . $orders_contents . '<br />' . BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br />' . BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br />' . BOX_ENTRY_REVIEWS . ' ' . $reviews['count'] . '<br />' . $admin_image . '<br />' . $admin_link; $box_content = ''; $box_content .= '<li><a href="' . xtc_href_link_admin(FILENAME_START, '', 'NONSSL') . '">' . IMAGE_BUTTON_ADMIN . '</a></li>'; if ($product->isProduct()) { $box_content .= '<li><a href="' . xtc_href_link_admin(FILENAME_EDIT_PRODUCTS, 'cPath=' . $cPath . '&pID=' . $product->data['products_id']) . '&action=new_product' . '" onclick="window.open(this.href); return false;">' . IMAGE_BUTTON_PRODUCT_EDIT . '</a></li>'; } if ($flag == true) { define('SEARCH_ENGINE_FRIENDLY_URLS', true); } $box_smarty->assign('BOX_CONTENT', $box_content); $box_smarty->caching = 0; $box_smarty->assign('language', $_SESSION['language']); $box_admin = $box_smarty->fetch(CURRENT_TEMPLATE . '/boxes/box_admin.html'); $smarty->assign('box_ADMIN', $box_admin);
include 'includes/application_top.php'; // create smarty elements $smarty = new Smarty(); // include boxes require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php'; // include needed functions require_once DIR_FS_INC . 'xtc_date_short.inc.php'; require_once DIR_FS_INC . 'xtc_image_button.inc.php'; require_once DIR_FS_INC . 'xtc_validate_email.inc.php'; require_once DIR_FS_INC . 'xtc_get_geo_zone_code.inc.php'; require_once DIR_FS_INC . 'xtc_get_customers_country.inc.php'; if (!isset($_SESSION['customer_id'])) { xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL')); } if ($_SESSION['customers_status']['customers_status_id'] == 0) { xtc_redirect(xtc_href_link_admin(FILENAME_CUSTOMERS, 'cID=' . $_SESSION['customer_id'] . '&action=edit', 'SSL')); } if (isset($_POST['action']) && $_POST['action'] == 'process') { if (ACCOUNT_GENDER == 'true') { $gender = xtc_db_prepare_input($_POST['gender']); } $firstname = xtc_db_prepare_input($_POST['firstname']); $lastname = xtc_db_prepare_input($_POST['lastname']); if (ACCOUNT_DOB == 'true') { $dob = xtc_db_prepare_input($_POST['dob']); } if (ACCOUNT_COMPANY_VAT_CHECK == 'true') { $vat = xtc_db_prepare_input($_POST['vat']); } $email_address = xtc_db_prepare_input($_POST['email_address']); $confirm_email_address = xtc_db_prepare_input($_POST['confirm_email_address']);