Esempio n. 1
0
        } 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') {
            $class_pb->updateSPbrandID($jng_sp_id, $param_id, $param_value);
        } else {
            $q = $class_jpc->save($jng_sp_id, $param_code, $param_id, $param_value, $param_id2);
            $result = '';
        }
        if ($q !== false) {
            $result = $param_code . $param_id;
            if ($param_id2 > 0) {
                $result .= '-' . $param_id2;
            }
        }
        echo utf8_encode($result);
        exit;
    } elseif ($_POST['me_action'] == 'LOADSUBCATS') {
        $param_code = 'N';
        $category_top_id = tep_db_prepare_input($_POST['ctid']);
Esempio n. 2
0
     }
     $sda = array('brand_name' => $brand_name, 'brand_description' => $brand_description, 'active_status' => $active_status, 'need_repackaging' => $need_repackaging, 'seo_text' => $seo_text);
     if ($image_uploaded) {
         $sda['brand_image'] = $brand_image_file;
     }
     if ($brand_id == '') {
         $brand_id = $class_pb->insert($sda);
         $action = 'insert';
     } else {
         $class_pb->update($brand_id, $sda);
         $action = 'update';
         $brand = $class_pb->retrieveDetail($brand_id);
     }
     if (isset($_POST['sp_brand_id']) && is_array($_POST['sp_brand_id'])) {
         foreach ($_POST['sp_brand_id'] as $jng_sp_id => $sp_brand_id) {
             $class_pb->updateSPbrandID($jng_sp_id, $brand_id, $sp_brand_id);
         }
     }
     header("Location: ?open=products-brand&id={$brand_id}&action={$action}");
     exit;
 } elseif ($_POST['me_action'] == 'DELETEBRAND') {
     if ($id > 0) {
         if ($class_pb->delete($id) === false) {
             echo 'FAILED';
         } else {
             echo 'OK';
         }
     }
     exit;
 } elseif ($_POST['me_action'] == 'KILLBRAND') {
     $brand_id = $_POST['brand_id'];