} else {
                    $checked = '';
                    $param_value = '';
                }
                $result .= '<tr>';
                $result .= '<td width="20"><input type="checkbox" id="param_id_' . $param_code . $param_id . '" class="param_id" value="' . $param_id . '" ' . $checked . ' /></td>';
                $result .= '<td width="150"><label for="param_id_' . $param_code . $param_id . '">' . $param_name . '</label></td>';
                $result .= '<td><input type="text" id="param_value_' . $param_id . '" class="input param_value" value="' . $param_value . '" /></td>';
                $result .= '<td id="param_status_' . $param_code . $param_id . '"></td>';
                $result .= '</tr>';
            }
            $result .= '</table></div>';
        } elseif ($_GET['tab'] == 'N') {
            $result .= '<div style="margin-bottom:20px;">Top Category ' . CategoryTop::displayAsComboBox('cmb-topcat', '', '', '', '', false) . '</div><div id="subcat-container"></div>';
        } elseif ($_GET['tab'] == 'V') {
            $result .= '<div style="margin-bottom:20px;">Top Category ' . CategoryTop::displayAsComboBox('cmb-topcat-2', '', '', '', '', false) . '</div><div id="cat-container"></div>';
        } elseif ($_GET['tab'] == 'S') {
            $result = tableSellingPointMatrix($jng_sp_id);
        }
    }
    $result .= '<input type="hidden" name="param_code" value="' . $param_code . '" />';
    echo utf8_encode($result);
    exit;
}
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
    if ($_POST['me_action'] == 'SAVEPARAMS') {
        $param_code = tep_db_prepare_input($_POST['param_code']);
        $param_id = tep_db_prepare_input($_POST['param_id']);
        $param_id2 = tep_db_prepare_input($_POST['param_id2']);
        $param_value = tep_db_prepare_input(utf8_decode($_POST['param_value']));
        if ($param_code == 'BL') {
Beispiel #2
0
 $content .= '</div>';
 //    $content .= '<div id="cat-top" style="margin-bottom:20px;width:220px;">';
 //    $content .= '<fieldset>';
 //    $content .= '<legend>Top Categories</legend>';
 //    $content .= '<label class="bold">Select top category</label>';
 //    $content .= '<p>'.CategoryTop::displayAsComboBox('cmb-top-cat', '', '', '', '', false, '', false, '1').'<input type="button" class="input button" id="cat-top-button" value="Choose" style="width:70px;margin-left:10px;"></p>';
 //    $content .= '</fieldset>';
 //    $content .= '</div>';
 $content .= '<div style="margin-bottom:20px;width:350px;" id="generate-cat-div">';
 //DIV OPEN "generate-cat-div"
 $content .= '<fieldset>';
 if (SERVER_IS_LOCAL) {
     $content .= '<legend>Generate Catalog File</legend>';
     $content .= '<div id="cat-top" style="margin-bottom:20px;width:220px;">';
     $content .= '<label class="bold">Top Category</label>';
     $content .= '<p style="padding:0;margin:0;">' . CategoryTop::displayAsComboBox('cmb-top-cat', '', '', '', 'width:180px;', false, '', false, '1') . '</p>';
     $content .= '</div>';
     $content .= '<label class="bold">Catalog Status</label><p style="padding:0;margin:0;"><div id="catalog-status"></div></p>';
 }
 $content .= '<input id="btn-gen-catalog" type="button" name="generatexml" value="Generate Catalog File" />';
 if (is_array($last_success_full)) {
     $content .= '<div style="clear:both;padding:15px 0;">';
     $content .= '<div class="bold">Last Successfull Upload:</div>';
     //        $content .= '<div><table border="0" cellpadding="0" cellspacing="0">';
     $content .= '<p style="padding:0;margin:0;">';
     if (is_array($last_success_full)) {
         //            $content .= '<tr><td>'.date('d.m.Y H:i:s', strtotime($last_success_full['upload_time'])).'</td></tr>';
         $content .= date('d.m.Y H:i:s', strtotime($last_success_full['upload_time']));
     }
     //        $content .= '</table></div>';
     $content .= '</p>';
 /**
  * Build input for $filters
  * @return string
  */
 private function createFiltersInput()
 {
     // >,>=,=,<=,<
     $input .= $this->createInputTextRange('filters-prod-id', 'products id', '', '', '', '', true);
     $input .= $this->createInputTextRange('filters-prod-price', 'price', '', '', ' ' . DEFAULT_CURRENCY, 'currency');
     $input .= $this->createInputTextRange('filters-prod-age', 'days');
     $input .= $this->createInputTextRange('filters-prod-disc', 'discount % ', 3, '', '%');
     $input .= $this->createInputTextRange('filters-prod-vc', 'vc ');
     $input .= $this->createInputTextRange('filters-prod-vcpct', 'vc % ', '', '', '%');
     $input .= $this->createInputTextRange('filters-prod-margin', 'margin % ', '', '', '%');
     $input .= $this->createInputTextRange('filters-prod-soldlast30', 'pieces', '', '', ' pieces');
     $input .= $this->createInputTextRange('filters-prod-soldlast60', 'pieces', '', '', ' pieces');
     $input .= $this->createInputTextRange('filters-prod-soldlast90', 'pieces', '', '', ' pieces');
     for ($y = product::STATIC_LOG_YEAR_START; $y <= date('Y'); $y++) {
         $input .= $this->createInputTextRange('filters-prod-sold' . $y, 'pieces', '', '', ' pieces');
     }
     $input .= $this->createInputTextRange('filters-prod-totalsold', 'pieces', '', '', ' pieces');
     $input .= $this->createInputTextRange('filters-prod-stars', 'stars', '', '', ' stars');
     $input .= $this->createInputTextRange('filters-prod-matexp', 'amount on EUR', '', '', ' EUR');
     $input .= $this->createInputTextRange('filters-hh-stock', 'pieces', '', '', ' pieces');
     $input .= $this->createInputTextRange('filters-prod-deflength', 'default length');
     $input .= $this->createInputTextRange('filters-prod-returnrate', 'return %');
     $input .= $this->createInputTextRange('filters-pd2-ttlstones', 'pieces', '', '', ' pieces');
     $input .= $this->createInputTextRangeDate('filters-date-killed');
     $input .= $this->createInputTextRangeDate('filters-date-keep');
     $input .= $this->createInputTextRangeDate('filters-date-keep-exclude');
     $input .= $this->createInputTextRangeDate('filters-date-finalized');
     // =, != with input free text
     $input .= $this->createInputTextEqualOrNot('filters-el-used', 'elements id', '', '', '', true);
     $input .= $this->createInputTextEqualOrNot('filters-prod-ean', 'product ean', '', '', '', true);
     $input .= $this->createInputTextEqualOrNot('filters-prod-model', 'products model', '', '', '', true);
     // like %input%, not like %input%
     $input .= $this->createInputTextContainOrNot('filters-prod-name', 'name');
     $input .= $this->createInputTextContainOrNot('filters-prod-description', 'description');
     $input .= $this->createInputTextContainOrNot('filters-prod-promoname', 'promoname');
     // =, != with input drop down combo
     //prepare data combo
     $combo_element_finishing = $this->createCombo('filters-el-finishing', 'status', array('1' => 'Yellow Goldplate', '11' => 'Hammer', '111' => 'Brush', '1111' => 'Oxid', '11111' => 'Rose Goldplate'), null, null);
     $combo_prod_clearimage = $this->createCombo('filters-prod-clearimage', 'status', array('0' => 'Has NO Clear Image', '1' => 'Has a Clear Image'), null, null);
     $combo_prod_complexity = $this->createCombo('filters-prod-complexity', 'status', productComplexityName(), null, null);
     $combo_prod_content = $this->createCombo('filters-prod-content', 'status', array('0' => 'NOT Improved', '1' => 'Improved'), null, null);
     $combo_prod_discounted = $this->createCombo('filters-prod-discounted', 'status', array('0' => 'No', '1' => 'Yes'), null, null);
     $combo_prod_family = $this->createCombo('filters-prod-family', 'status', array('0' => 'Has NO Family', '1' => 'Has a Family'), null, null);
     $combo_prod_image = $this->createCombo('filters-prod-image', 'status', array('0' => 'NOT Improved', '1' => 'Improved'), null, null);
     $combo_prod_margin_status = $this->createCombo('filters-prod-margin-status', 'status', array('0' => 'Bad', '1' => 'Good'), null, null);
     $combo_prod_outsourced = $this->createCombo('filters-prod-outsourced', 'status', array('0' => 'No (Produce in House)', '1' => 'Yes (Outsourced)'), null, null);
     $combo_prod_wholesale = $this->createCombo('filters-prod-wholesale', 'status', array('0' => 'No', '1' => 'Yes'), null, null);
     //prepare input filters
     // =
     $input .= $this->createInputComboEqual('filters-prod-clearimage', '', '', '', '', null, '', '', false, $combo_prod_clearimage);
     $input .= $this->createInputComboEqual('filters-prod-content', '', '', '', '', null, '', '', false, $combo_prod_content);
     $input .= $this->createInputComboEqual('filters-prod-discounted', '', '', '', '', null, '', '', false, $combo_prod_discounted);
     $input .= $this->createInputComboEqual('filters-prod-family', '', '', '', '', null, '', '', true, $combo_prod_family);
     $input .= $this->createInputComboEqual('filters-prod-image', '', '', '', '', null, '', '', false, $combo_prod_image);
     $input .= $this->createInputComboEqual('filters-prod-outsourced', '', '', '', '', null, '', '', false, $combo_prod_outsourced);
     $input .= $this->createInputComboEqual('filters-prod-wholesale', '', '', '', '', null, '', '', false, $combo_prod_wholesale);
     // =, !=
     $input .= $this->createInputComboEqualOrNot('filters-el-finishing', 'finishing', '', '', '', null, '', '', false, $combo_element_finishing);
     $input .= $this->createInputComboEqualOrNot('filters-prod-brand', '', '', '', '', null, '', '', true, comboProductsBrand('filters-prod-brand', '', '', 'filters-val', 'style="display:none;margin-left:20px;"'));
     $input .= $this->createInputComboEqualOrNot('filters-prod-cat-top', '', '', '', '', null, '', '', true, CategoryTop::displayAsComboBox('filters-prod-cat-top', '', '', 'filters-val', 'display:none;margin-left:20px;'));
     $input .= $this->createInputComboEqualOrNot('filters-prod-cat', '', '', '', '', null, '', '', true, comboProductsCategory('filters-prod-cat', '', '', 'filters-val', 'style="display:none;margin-left:20px;"'));
     $input .= $this->createInputComboEqualOrNot('filters-prod-description-imp-stat', '', '', '', '', null, '', '', true, comboProductsDescriptionImprovedStatus('filters-prod-description-imp-stat', '', '', 'filters-val', 'style="display:none;margin-left:20px;"'));
     $input .= $this->createInputComboEqualOrNot('filters-prod-color', 'color', 'color_pattern_description', 'color_pattern_id', 'name', null, "languages_id = '1'", '', true);
     $input .= $this->createInputComboEqualOrNot('filters-prod-complexity', '', '', '', '', null, '', '', true, $combo_prod_complexity);
     $input .= $this->createInputComboEqualOrNot('filters-prod-margin-status', 'status', '', '', '', null, '', '', false, $combo_prod_margin_status);
     $input .= $this->createInputComboEqualOrNot('filters-prod-mat', 'material', 'products_materials', 'products_materials_id', 'material_name', null, '', '', true);
     $input .= $this->createInputComboEqualOrNot('filters-watchlist-of', '', '', '', '', null, '', '', true, comboWatchlistUsers('filters-watchlist-of', '', '', 'filters-val', 'style="display:none;margin-left:20px;"'));
     foreach ($this->class_styles->groups as $gk => $gv) {
         $input .= $this->createInputComboEqualOrNot("filters-prod-styles-{$gk}", 'attribute', 'styles s LEFT JOIN styles_description sd ON sd.styles_id=s.styles_id AND sd.languages_id=2', 's.styles_id', 'sd.name', null, "groups='{$gk}'", '', true);
     }
     return $input;
 }