예제 #1
0
   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';
//split page results
if (!defined('MAX_DISPLAY_LIST_CUSTOMERS')) {
    define('MAX_DISPLAY_LIST_CUSTOMERS', 100);
}
// BOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
// EOF - JUNG GESTALTEN - 27.11.2008 - KUNDENUMSÄTZE
$customers_statuses_array = xtc_get_customers_statuses();
//BOC web28 2011-10-31 - FIX customer groups
$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];
}
//changes all $customers_statuses_array[xx] to $customers_statuses_id_array[xx]  in html section
//EOC web28 2011-10-31 - FIX customer groups
$processed = false;
$error = false;
$entry_vat_error_text = '';
$action = isset($_GET['action']) ? $_GET['action'] : '';
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, 'cID=' . (int) $_GET['cID'] . '&action=edit'));
 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')));
 }
예제 #3
0
 public function display()
 {
     $tools = new idealo_csv_tools();
     $missing_config_db = $tools->getConfigurationValue('MODULE_IDEALO_CSV_MISSING_CONFIG');
     $missing_config_file = '';
     $missing_config_separator = '';
     $missing_config_separator_to_long = '';
     $missing_config_shipping = '';
     $missing_config_payment = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_format_idealo_AT_shipping = '';
     $missing_config_format_idealo_AT_shipping = '';
     if ($missing_config_db != '') {
         if (strpos($missing_config_db, "file") !== false) {
             $missing_config_file = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "separator") !== false) {
             $missing_config_separator = IDEALO_TEXT_MISSING_SEPARATOR . '<br><br>';
         }
         if (strpos($missing_config_db, "to_long") !== false) {
             $missing_config_separator_to_long = IDEALO_TEXT_MISSING_SEPARATOR_TO_LONG . '<br><br>';
         }
         if (strpos($missing_config_db, "shipping") !== false && strpos($missing_config_db, "shippingDE") === false) {
             $missing_config_shipping = IDEALO_TEXT_MISSING_SHIPPING;
         }
         if (strpos($missing_config_db, "payment") !== false) {
             $missing_config_payment = IDEALO_TEXT_MISSING_PAYMENT;
         }
         if (strpos($missing_config_db, "idealo_DE_active") !== false) {
             $missing_config_costs_idealo_DE_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "idealo_AT_active") !== false) {
             $missing_config_costs_idealo_AT_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "shippingDElenght") !== false || strpos($missing_config_db, "shippingDEone") !== false) {
             $missing_config_format_idealo_DE_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_DE . '</b></font>';
         }
         if (strpos($missing_config_db, "shippingATlenght") !== false || strpos($missing_config_db, "shippingATone") !== false) {
             $missing_config_format_idealo_AT_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_AT . '</b></font>';
         }
     }
     $button_text = 'Exportieren';
     $customers_statuses_array = xtc_get_customers_statuses();
     $ship_text = '';
     $tools->getShipping();
     $this->shipping = $tools->shipping;
     foreach ($this->shipping as $ship) {
         if ($ship['country'] == 'DE') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_DE_active, $missing_config_format_idealo_DE_shipping);
         }
         if ($ship['country'] == 'AT') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_AT_active, $missing_config_format_idealo_AT_shipping);
         }
     }
     $payment_text = '';
     $tools->getPayment();
     $this->payment = $tools->payment;
     foreach ($this->payment as $payment) {
         $payment_text .= $this->getDisplayPayment($payment);
     }
     $article_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $article_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $article_filter = IDEALO_CSV_ARTICLE_FILTER . '<br>' . IDEALO_CSV_ARTICLE_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('article_filter', $article_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_ARTICLE_FILTER')) . '<br><br>' . IDEALO_CSV_ARTICLE_FILTER_TEXT . '<br>' . xtc_draw_input_field('article_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_ARTICLE_FILTER_VALUE')) . '<br><br>';
     $brand_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $brand_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $brand_filter = IDEALO_CSV_BRAND_FILTER . '<br>' . IDEALO_CSV_BRAND_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('brand_filter', $brand_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_BRAND_FILTER')) . '<br><br>' . IDEALO_CSV_BRAND_FILTER_TEXT . '<br>' . xtc_draw_input_field('brand_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_BRAND_FILTER_VALUE')) . '<br><br>';
     $cat_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $cat_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $cat_filter = IDEALO_CSV_CAT_FILTER . '<br>' . IDEALO_CSV_CAT_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('cat_filter', $cat_filter_array, $tools->getConfigurationValue('MODULE_IDEALO_CSV_CAT_FILTER')) . '<br><br>' . IDEALO_CSV_CAT_FILTER_TEXT . '<br>' . xtc_draw_input_field('cat_filter_value', $tools->getConfigurationValue('MODULE_IDEALO_CSV_CAT_FILTER_VALUE')) . '<br><br>';
     $tools->getMinorderValues();
     $minOrderDisplay = IDEALO_CSV_MIN_ORDER_TITLE . '<br><br>' . IDEALO_CSV_MIN_ORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_csv_minOrder_input', $tools->minOrder) . '<br>' . IDEALO_CSV_MIN_ORDER_TEXT . '<br><br>' . IDEALO_CSV_MIN_EXTRA_COSTS . '<br>' . xtc_draw_input_field('idealo_csv_minOrderPrice_input', $tools->minOrderPrice) . '<br>' . IDEALO_CSV_MIN_ORDER_PRICE_TEXT . '<br>' . IDEALO_CSV_MIN_ORDER_BORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_csv_minOrderBorder_input', $tools->minorderBorder) . '<br>' . IDEALO_CSV_MIN_ORDER_BORDER_TEXT;
     return array('text' => $missing_config_file . '<br>' . FIELDSEPARATOR . '<br>' . FIELDSEPARATOR_HINT_IDEALO . '<br>' . xtc_draw_small_input_field('idealo_csv_separator_input', IDEALO_CSV_SEPARATOR) . '<br><br>' . $missing_config_separator . $missing_config_separator_to_long . QUOTING . '<br>' . QUOTING_HINT . '<br><br>' . xtc_draw_small_input_field('idealo_csv_quoting_input', IDEALO_CSV_QUOTECHAR) . '<br><br>' . SHIPPING . '<br>' . $missing_config_shipping . '<br><br>' . $ship_text . SHIPPINGCOMMENT . '<br>' . SHIPPINGCOMMENT_HINT . '<br>' . xtc_draw_input_field('shippingcomment_input', $tools->getConfigurationValue('MODULE_IDEALO_CSV_SHIPPINGCOMMENT')) . '<br><br>' . PAYMENT . '<br>' . $missing_config_payment . '<br><br>' . $payment_text . $article_filter . $brand_filter . $cat_filter . $minOrderDisplay . '<br><br>' . $this->displayExportKonfigs() . IDEALO_CSV_EXPORT_TEXT . xtc_button(BUTTON_EXPORT) . '<font size="+1">*</font> ' . '<input id ="export" type="hidden" name="export" value="yes">' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=idealo')) . EXPORT . '<br><br>' . TEXT_WARANTY_IDEALO_CSV);
 }
}
// default open navigation box
if (!isset($_SESSION['selected_box'])) {
    $_SESSION['selected_box'] = 'configuration';
} else {
    if (!empty($_GET['selected_box'])) {
        $_SESSION['selected_box'] = $_GET['selected_box'];
    }
}
// the following cache blocks are used in the Tools->Cache section
// ('language' in the filename is automatically replaced by available languages)
$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true));
// 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_href_link(FILENAME_LOGIN));
}
if (xtc_check_permission($pagename) == '0') {
    xtc_redirect(xtc_href_link(FILENAME_LOGIN));
}
// Include Template Engine
require DIR_FS_CATALOG . DIR_WS_CLASSES . 'Smarty_2.6.27/Smarty.class.php';
예제 #5
0
/**
 * xtc_cfg_pull_down_customers_status_list()
 *
 * @param mixed $customers_status_id
 * @param string $key
 * @return
 */
function xtc_cfg_pull_down_customers_status_list($customers_status_id, $key = '')
{
    $name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
    return xtc_draw_pull_down_menu($name, xtc_get_customers_statuses(), $customers_status_id);
}
예제 #6
0
 function xtcExport($filename)
 {
     $this->catDepth = 6;
     $this->languages = $this->get_lang();
     $this->filename = $filename;
     $this->CAT = array();
     $this->PARENT = array();
     $this->counter = array('prod_exp' => 0);
     $this->time_start = time();
     $this->man = $this->getManufacturers();
     $this->TextSign = CSV_TEXTSIGN;
     $this->seperator = CSV_SEPERATOR;
     if (CSV_SEPERATOR == '') {
         $this->seperator = "\t";
     }
     if (CSV_SEPERATOR == '\\t') {
         $this->seperator = "\t";
     }
     $this->Groups = xtc_get_customers_statuses();
 }
 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 />';
     }
     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 . 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=preisroboter')));
     //EOF - Tomcraft - 2009-07-21 - Exclude xtc_image_submit.inc.php as it is allready declared in /admin/includes/functions/general.php
 }
    </td>
    <td class="dataTableContent" align="left">
    <?php 
    echo xtc_draw_pull_down_menu('customers_country_id', xtc_get_countries('', 1), $customer_countries_id);
    ?>
    </td>    
</tr>
<tr class="dataTableRow">
    <td class="dataTableContent" align="left">
    <?php 
    echo TEXT_CUSTOMER_GROUP;
    ?>
    </td>
    <td class="dataTableContent" align="left" colspan="3">
    <?php 
    echo xtc_draw_pull_down_menu('customers_status', xtc_get_customers_statuses(), $order->info['status']) . TEXT_CUSTOMER_GROUP_INFO;
    ?>
    </td>
</tr>
<tr class="dataTableRow">
    <td class="dataTableContent" align="left">
    <?php 
    echo TEXT_CUSTOMER_CID;
    ?>
    </td>
    <td class="dataTableContent" align="left" colspan="3">
    <?php 
    echo xtc_draw_input_field('customers_cid', $order->customer['csID']);
    ?>
    </td>
</tr>
예제 #9
0
 function create_permission_checkboxes($t_array)
 {
     $customers_statuses_array = xtc_get_customers_statuses();
     $customers_statuses_array = array_merge(array(array('id' => 'all', 'text' => TXT_ALL)), $customers_statuses_array);
     $input = '';
     for ($i = 0, $n = sizeof($customers_statuses_array); $i < $n; $i++) {
         $checked = $t_array['group_permission_' . $customers_statuses_array[$i]['id']] == 1 ? 'checked ' : '';
         $preselect = $i == 0 ? true : false;
         //preselect all
         //$preselect = $customers_statuses_array[$i]['id']=='0' ? true : false; //preselect admin
         if (!isset($_GET['pID']) && !isset($_GET['cID']) && $preselect) {
             $checked = 'checked ';
         }
         $input .= '<input type="checkbox" name="groups[]" value="' . $customers_statuses_array[$i]['id'] . '"' . $checked . '> ' . $customers_statuses_array[$i]['text'] . '<br />' . PHP_EOL;
     }
     return $input;
 }
예제 #10
0
 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']);
     }
     $text = EXPORT_STATUS_TYPE . '<br>' . EXPORT_STATUS . '<br>' . xtc_draw_pull_down_menu('status', $customers_statuses_array, '1') . '<br>' . '<br><b>W&auml;hrung</b><br>' . $curr . '<br><b>Kampagne</b><br>' . xtc_draw_pull_down_menu('campaign', $campaign_array) . '<br>' . '<br><b>Speicherart</b><br>' . xtc_draw_radio_field('export', 'no', true) . EXPORT_NO . '<br>' . xtc_draw_radio_field('export', 'yes', false) . EXPORT_YES . '<br>' . '<br>' . xtc_button(BUTTON_EXPORT);
     $text = str_replace('<hr noshade>', '<br>', $text);
     $text = str_replace('<b>Kundengruppe:</b>', '<b>Kundengruppe</b>', $text);
     $text = str_replace('Bitte w&auml;hlen Sie die Kundengruppe, die Basis f&uuml;r den Exportierten Preis bildet. (Falls Sie keine Kundengruppenpreise haben, w&auml;hlen Sie <i>Gast</i>):</b>', 'Standard ist Gast', $text);
     return array('text' => $text);
 }
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_MIN_ORDER_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_MIN_ORDER . ' ' . xtc_draw_input_field('customers_status_min_order', $cInfo->customers_status_min_order));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_MAX_ORDER_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_MAX_ORDER . ' ' . xtc_draw_input_field('customers_status_max_order', $cInfo->customers_status_max_order));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE . ' ' . xtc_draw_pull_down_menu('customers_status_show_price', $customers_status_show_price_array, $cInfo->customers_status_show_price));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_SHOW_PRICE_TAX_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_SHOW_PRICE_TAX . ' ' . xtc_draw_pull_down_menu('customers_status_show_price_tax', $customers_status_show_price_tax_array, $cInfo->customers_status_show_price_tax));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_ADD_TAX_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_ADD_TAX . ' ' . xtc_draw_pull_down_menu('customers_status_add_tax_ot', $customers_status_add_tax_ot_array, $cInfo->customers_status_add_tax_ot));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE_INTRO . '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . '<br />' . xtc_draw_input_field('customers_status_discount', $cInfo->customers_status_discount));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_OT_XMEMBER_INTRO . '<br /> ' . ENTRY_OT_XMEMBER . ' ' . xtc_draw_pull_down_menu('customers_status_ot_discount_flag', $customers_status_ot_discount_flag_array, $cInfo->customers_status_ot_discount_flag) . '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_PRICE . '<br />' . xtc_draw_input_field('customers_status_ot_discount', $cInfo->customers_status_ot_discount));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_GRADUATED_PRICES_INTRO . '<br />' . ENTRY_GRADUATED_PRICES . ' ' . xtc_draw_pull_down_menu('customers_status_graduated_prices', $customers_status_graduated_prices_array, $cInfo->customers_status_graduated_prices));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_DISCOUNT_ATTRIBUTES . ' ' . xtc_draw_pull_down_menu('customers_status_discount_attributes', $customers_status_discount_attributes_array, $cInfo->customers_status_discount_attributes));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_PAYMENT_UNALLOWED_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_PAYMENT_UNALLOWED . ' ' . xtc_draw_input_field('customers_status_payment_unallowed', $cInfo->customers_status_payment_unallowed));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_SHIPPING_UNALLOWED_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_SHIPPING_UNALLOWED . ' ' . xtc_draw_input_field('customers_status_shipping_unallowed', $cInfo->customers_status_shipping_unallowed));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_FSK18_INTRO . '<br />' . ENTRY_CUSTOMERS_FSK18 . ' ' . xtc_draw_pull_down_menu('customers_fsk18', $customers_fsk18_array, $cInfo->customers_fsk18));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_FSK18_DISPLAY_INTRO . '<br />' . ENTRY_CUSTOMERS_FSK18_DISPLAY . ' ' . xtc_draw_pull_down_menu('customers_fsk18_display', $customers_fsk18_display_array, $cInfo->customers_fsk18_display));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_WRITE_REVIEWS_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_WRITE_REVIEWS . ' ' . xtc_draw_pull_down_menu('customers_status_write_reviews', $customers_status_write_reviews_array, $cInfo->customers_status_write_reviews));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_READ_REVIEWS_INTRO . '<br />' . ENTRY_CUSTOMERS_STATUS_READ_REVIEWS . ' ' . xtc_draw_pull_down_menu('customers_status_read_reviews', $customers_status_read_reviews_array, $cInfo->customers_status_read_reviews));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_BASE . '<br />' . ENTRY_CUSTOMERS_STATUS_BASE . '<br />' . xtc_draw_pull_down_menu('customers_base_status', xtc_get_customers_statuses()));
     $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
     $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_INSERT . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page']) . '">' . BUTTON_CANCEL . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_CUSTOMERS_STATUS . '</b>');
     $contents = array('form' => xtc_draw_form('status', FILENAME_CUSTOMERS_STATUS, 'page=' . $_GET['page'] . '&cID=' . $cInfo->customers_status_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $customers_status_inputs_string = '';
     $languages = xtc_get_languages();
     for ($i = 0; $i < sizeof($languages); $i++) {
         $customers_status_inputs_string .= '<br />' . xtc_image(DIR_WS_CATALOG . 'lang/' . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . xtc_draw_input_field('customers_status_name[' . $languages[$i]['id'] . ']', xtc_get_customers_status_name($cInfo->customers_status_id, $languages[$i]['id']));
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_CUSTOMERS_STATUS_NAME . $customers_status_inputs_string);
     // BOF - Tomcraft - 2010-04-08 - Removed line break for better layout
     //$contents[] = array('text' => '<br />' . xtc_image(DIR_WS_ICONS . $cInfo->customers_status_image, $cInfo->customers_status_name) . '<br />' . DIR_WS_ICONS . '<br /><b>' . $cInfo->customers_status_image . '</b>');
예제 #12
0
 public function display()
 {
     $tools = new tools();
     $missing_config_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_MISSING_CONFIG' LIMIT 1");
     $missing_config_db = xtc_db_fetch_array($missing_config_query);
     $missing_config_db = $missing_config_db['configuration_value'];
     $missing_config_user = '';
     $missing_config_url_input = '';
     $missing_config_shop_id_input = '';
     $missing_config_password_input = '';
     $missing_config_pagesize_input = '';
     $missing_config_shipping = '';
     $missing_config_payment = '';
     $missing_config_costs_idealo_DE_active = '';
     $missing_config_costs_idealo_DE_active = '';
     if ($missing_config_db != '') {
         if (strpos($missing_config_db, "user") !== false) {
             $missing_config_user = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "url_input") !== false) {
             $missing_config_url_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "shop_id_input") !== false) {
             $missing_config_shop_id_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "password_input") !== false) {
             $missing_config_password_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "pagesize_input") !== false) {
             $missing_config_page_size_input = IDEALO_TEXT_MISSING_CONFIG;
         }
         if (strpos($missing_config_db, "shipping") !== false && strpos($missing_config_db, "shippingDE") === false) {
             $missing_config_shipping = IDEALO_TEXT_MISSING_SHIPPING;
         }
         if (strpos($missing_config_db, "payment") !== false) {
             $missing_config_payment = IDEALO_TEXT_MISSING_PAYMENT;
         }
         if (strpos($missing_config_db, "idealo_DE_active") !== false) {
             $missing_config_costs_idealo_DE_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "idealo_AT_active") !== false) {
             $missing_config_costs_idealo_AT_active = IDEALO_TEXT_MISSING_COSTS_IDEALO_DE;
         }
         if (strpos($missing_config_db, "shippingDElenght") !== false || strpos($missing_config_db, "shippingDEone") !== false) {
             $missing_config_format_idealo_DE_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_DE . '</b></font>';
         }
         if (strpos($missing_config_db, "shippingATlenght") !== false || strpos($missing_config_db, "shippingATone") !== false) {
             $missing_config_format_idealo_AT_shipping = '<font color="#FF0000"><b>* ' . IDEALO_TEXT_WRONG_COSTS_FORMAT_AT . '</b></font>';
         }
     }
     $realtime_link = $path = HTTP_CATALOG_SERVER . DIR_WS_CATALOG . IDEALO_REALTIME_LINK;
     $shipping_input_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_SHIPPINGCOMMENT' LIMIT 1");
     $shipping_comment_db = xtc_db_fetch_array($shipping_input_query);
     $shipping_comment_text = $shipping_comment_db !== false ? $shipping_comment_db['configuration_value'] : '';
     $shop_id_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_SHOP_ID' LIMIT 1");
     $shop_id_db = xtc_db_fetch_array($shop_id_query);
     $shop_id = $shop_id_db['configuration_value'];
     $password_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_PASSWORD' LIMIT 1");
     $password_db = xtc_db_fetch_array($password_query);
     $password = $password_db['configuration_value'];
     $pagesize_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_PAGESIZE' LIMIT 1");
     $pagesize_db = xtc_db_fetch_array($pagesize_query);
     $pagesize = $pagesize_db['configuration_value'];
     $customers_statuses_array = xtc_get_customers_statuses();
     $campaign_array[] = array('id' => '0', 'text' => 'no');
     $campaign_array[] = array('id' => 'refID=' . CAMPAIGN . '&', 'text' => '94511215 (idealo)');
     $campaign_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_CAMPAIGN' LIMIT 1");
     $campaign_db = xtc_db_fetch_array($campaign_query);
     $campaign = $campaign_db['configuration_value'];
     $ship_text = '';
     $tools->getShipping();
     $this->shipping = $tools->shipping;
     foreach ($this->shipping as $ship) {
         if ($ship['country'] == 'DE') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_DE_active, $missing_config_format_idealo_DE_shipping);
         }
         if ($ship['country'] == 'AT') {
             $ship_text .= $this->getDisplayShip($ship, $missing_config_costs_idealo_AT_active, $missing_config_format_idealo_AT_shipping);
         }
     }
     $payment_text = '';
     $tools->getPayment();
     $this->payment = $tools->payment;
     foreach ($this->payment as $payment) {
         $payment_text .= $this->getDisplayPayment($payment);
     }
     $testmode_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_TESTMODE' LIMIT 1");
     $testmode_db = xtc_db_fetch_array($testmode_query);
     $testmode_db = $testmode_db['configuration_value'];
     $textfile_array[] = array('id' => 'yes', 'text' => 'ja');
     $textfile_array[] = array('id' => 'no', 'text' => 'nein');
     $certificate_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CERTIFICATE' LIMIT 1");
     $certificate_db = xtc_db_fetch_array($certificate_query);
     $certificate_db = $certificate_db['configuration_value'];
     $certificate_array[] = array('id' => '1', 'text' => 'ja');
     $certificate_array[] = array('id' => '0', 'text' => 'nein');
     $testmode = IDEALO_REALTIME_TESTMODE_ACTIVE . '<br>' . xtc_draw_pull_down_menu('testmode', $textfile_array, $testmode_db) . '<br>';
     $article_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $article_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $article_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_ARTICLE_FILTER' LIMIT 1");
     $article_filter_db = xtc_db_fetch_array($article_filter_query);
     $article_value = $article_filter_db['configuration_value'];
     $article_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_ARTICLE_FILTER_VALUE' LIMIT 1");
     $article_filter_value_db = xtc_db_fetch_array($article_filter_value_query);
     $article_filter_value = $article_filter_value_db['configuration_value'];
     $article_filter = IDEALO_REALTIME_ARTICLE_FILTER . '<br>' . IDEALO_REALTIME_ARTICLE_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('article_filter', $article_filter_array, $article_value) . '<br><br>' . IDEALO_REALTIME_ARTICLE_FILTER_TEXT . '<br>' . xtc_draw_input_field('article_filter_value', $article_filter_value) . '<br><br>';
     $brand_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $brand_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $brand_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_BRAND_FILTER' LIMIT 1");
     $brand_filter_db = xtc_db_fetch_array($brand_filter_query);
     $brand_value = $brand_filter_db['configuration_value'];
     $brand_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_BRAND_FILTER_VALUE' LIMIT 1");
     $brand_filter_value_db = xtc_db_fetch_array($brand_filter_value_query);
     $brand_filter_value = $brand_filter_value_db['configuration_value'];
     $brand_filter = IDEALO_REALTIME_BRAND_FILTER . '<br>' . IDEALO_REALTIME_BRAND_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('brand_filter', $brand_filter_array, $brand_value) . '<br><br>' . IDEALO_REALTIME_BRAND_FILTER_TEXT . '<br>' . xtc_draw_input_field('brand_filter_value', $brand_filter_value) . '<br><br>';
     $cat_filter_array[] = array('id' => 'filter', 'text' => 'filtern');
     $cat_filter_array[] = array('id' => 'export', 'text' => 'exportieren');
     $cat_filter_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CAT_FILTER' LIMIT 1");
     $cat_filter_db = xtc_db_fetch_array($cat_filter_query);
     $cat_value = $cat_filter_db['configuration_value'];
     $cat_filter_value_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_IDEALO_REALTIME_CAT_FILTER_VALUE' LIMIT 1");
     $cat_filter_value_db = xtc_db_fetch_array($cat_filter_value_query);
     $cat_filter_value = $cat_filter_value_db['configuration_value'];
     $cat_filter = IDEALO_REALTIME_CAT_FILTER . '<br>' . IDEALO_REALTIME_CAT_FILTER_SELECTION . '<br>' . xtc_draw_pull_down_menu('cat_filter', $cat_filter_array, $cat_value) . '<br><br>' . IDEALO_REALTIME_CAT_FILTER_TEXT . '<br>' . xtc_draw_input_field('cat_filter_value', $cat_filter_value) . '<br><br>';
     $tools->getMinorderValues();
     $minOrderDisplay = IDEALO_REALTIME_MIN_ORDER_TITLE . '<br><br>' . IDEALO_REALTIME_MIN_ORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_realtime_minOrder_input', $tools->minOrder) . '<br>' . IDEALO_REALTIME_MIN_ORDER_TEXT . '<br><br>' . IDEALO_REALTIME_MIN_EXTRA_COSTS . '<br>' . xtc_draw_input_field('idealo_realtime_minOrderPrice_input', $tools->minOrderPrice) . '<br>' . IDEALO_REALTIME_MIN_ORDER_BORDER_TEXT . '<br>' . IDEALO_REALTIME_MIN_ORDER_BORDER_VALUE . '<br>' . xtc_draw_input_field('idealo_realtime_minOrderBorder_input', $tools->idealoMinorderBorder) . '<br>' . IDEALO_REALTIME_MIN_ORDER_PRICE_TEXT;
     return array('text' => $missing_config_user . '<br><br>' . $testmode . '<br>' . SHOP_ID . '<br>' . SHOP_ID_HINT . '<br>' . xtc_draw_input_field('shop_id_input', $shop_id) . '<br>' . $missing_config_shop_id_input . '<br><br>' . PASSWORT . '<br>' . PASSWORT_HINT . '<br>' . xtc_draw_password_field('password_input', $password) . '<br>' . $missing_config_password_input . '<br><br>' . PAGESIZE . '<br>' . PAGESIZE_HINT . '<br>' . xtc_draw_input_field('pagesize_input', $pagesize) . '<br>' . $missing_config_page_size_input . '<br><br>' . CERTIFICATE_TEXT . '<br>' . CERTIFICATE_TEXT_DESCRIPTION . '<br>' . xtc_draw_pull_down_menu('certificate', $certificate_array, $certificate_db) . '<br>' . SHIPPING . '<br>' . $missing_config_shipping . '<br><br>' . $ship_text . PAYMENT . '<br>' . $missing_config_payment . '<br><br>' . $payment_text . SHIPPINGCOMMENT . '<br>' . SHIPPINGCOMMENT_HINT . '<br>' . xtc_draw_input_field('shippingcomment_input', $shipping_comment_text) . '<br><br>' . CAMPAIGNS . '<br>' . CAMPAIGNS_DESC . '<br>' . xtc_draw_pull_down_menu('campaign', $campaign_array, $campaign) . '<br><br>' . $article_filter . $brand_filter . $cat_filter . $minOrderDisplay . $this->displayExportKonfigs() . IDEALO_REALTIME_EXPORT_TEXT . '<br>' . REAL_TEXT . '<br><br>' . $realtime_link . '<br><br>' . xtc_draw_checkbox_field('hardReset', '', $checked = false) . IDEALO_TEXT_HARD_RESET_BUTTON_TEXT . '<br>' . IDEALO_TEXT_HARD_RESET_TEXT . '<br>' . xtc_button(IDEALO_TEXT_SOFT_RESET_BUTTON_TEXT) . '<font size="+1">*</font> ' . '<br>' . IDEALO_TEXT_SOFT_RESET_TEXT . '<br><br>' . xtc_button_link(BUTTON_CANCEL, xtc_href_link(FILENAME_MODULE_EXPORT, 'set=' . $_GET['set'] . '&module=idealo_real')) . '<input id ="come_from" type="hidden" name="come_from" value="' . $_SERVER['HTTP_REFERER'] . '"> <br><br>' . EXPORT . '<br><br>' . TEXT_WARANTY_IDEALO_REALTIME);
 }
예제 #13
0
 function display()
 {
     /* Auswahl Kundengruppe vorbeiten */
     $customers_statuses_array = xtc_get_customers_statuses();
     /* Auswahl Währung vorbereiten */
     $curr = '';
     $currencies = xtc_db_query("SELECT code FROM " . TABLE_CURRENCIES . " ORDER BY currencies_id DESC");
     while ($currencies_data = xtc_db_fetch_array($currencies)) {
         $curr .= xtc_draw_radio_field('currencies', $currencies_data['code'], true) . $currencies_data['code'] . '<br>';
     }
     /* Auswahl Sprachen vorbereiten (ich)*/
     $lang = '';
     $languages = xtc_db_query("SELECT languages_id, name FROM " . TABLE_LANGUAGES . " ORDER BY sort_order ASC");
     while ($languages_data = xtc_db_fetch_array($languages)) {
         $lang .= xtc_draw_radio_field('languages_id', $languages_data['languages_id'], true) . $languages_data['name'] . '<br>';
     }
     /* Auswahl Kampagnen vorbereiten */
     $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']);
     }
     /* Ausgabe */
     return array('text' => EXPORT_STATUS_TYPE . '<br>' . EXPORT_STATUS . '<br>' . xtc_draw_pull_down_menu('status', $customers_statuses_array, '1') . '<br>' . LANGUAGE . '<br>' . LANGUAGE_DESC . '<br>' . $lang . 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=billiger')) . '');
 }