示例#1
0
         $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>';
 } else {
     $params_raw = $class_jpc->load($jng_sp_id, $param_code);
     $params = array();
     foreach ($params_raw as $pr) {
         $params[$pr['param_id']] = $pr['param_value'];
     }
     if ($_GET['tab'] == 'C') {
         use_service('color_pattern');
         $class_cp = new color_pattern();
         $cp_list = $class_cp->retrieveListGrid(SERVICECLIENTCODE, null, LANGUAGEID);
         $result .= '<div><table class="form" border="0" cellpadding="0" cellspacing="0">';
         foreach ($cp_list['Data'] as $cp) {
             $param_id = $cp['color_pattern_id'];
             $param_name = $cp['name'];
             if (isset($params[$cp['color_pattern_id']])) {
                 $checked = 'checked="checked"';
                 $param_value = $params[$cp['color_pattern_id']];
             } 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>';
use_class('products_minierp');
use_class('products_articles');
use_class('products_brand');
use_class('element');
use_class('jng_sp');
use_class('jng_sp_catalog');
use_service('color_pattern');
use_class('production_instruction_manual');
use_class('styles');
use_class('design');
$class_pm = new products_minierp();
$class_pa = new products_articles();
$class_pb = new products_brand();
$class_sp = new jng_sp();
$class_jc = new jng_sp_catalog();
$class_cp = new color_pattern();
$class_s = new styles();
$class_d = new design();
$default_SP = array('1', '2', '3');
$target_group['1'] = $NAV_TARGET_GROUP_NMDE;
$target_group['2'] = $NAV_TARGET_GROUP_OTDE;
$colpaterns = $class_cp->retrieveListGrid(SERVICECLIENTCODE, null, LANGUAGEID);
$colpats = $colpaterns['Data'];
function getDetailData($products_id, $type)
{
    global $class_pm, $class_pa, $class_pb, $class_sp, $target_group, $colpats, $class_s;
    $result = array();
    $detail_is_complete = false;
    $r_dt = '';
    switch ($type) {
        case 'checkname':
/**
 * Description of productdetaildescription1
 *
 * @author IT TEAM BONOFACTUM
 * @created May 29, 2013 5:11:09 PM
 */
use_class('products_minierp');
use_class('products_materials');
use_class('jng_sp_catalog');
use_class('jng_sp_catalog_params');
$class_pm = new products_minierp();
$class_pmat = new products_materials();
$class_jc = new jng_sp_catalog();
$class_jcp = new jng_sp_catalog_params();
use_service('color_pattern');
$class_cp = new color_pattern();
$products_id = tep_db_prepare_input($_GET['id']);
$topic = $class_pm->getTopicList();
//POST ACTION
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
    if ($_POST['me_action'] == "SAVENAME") {
        $languages_id = tep_db_prepare_input($_POST['languages_id']);
        $name = tep_db_prepare_input($_POST['name']);
        $description = tep_db_prepare_input($_POST['description']);
        $keywords = tep_db_prepare_input($_POST['keywords']);
        $sellingpoints = tep_db_prepare_input($_POST['sellingpoints']);
        $sellingpointsamde = tep_db_prepare_input($_POST['sellingpointsamde']);
        $sellingpointslaid = tep_db_prepare_input($_POST['sellingpointslaid']);
        if ($sellingpointslaid != '') {
            if ($sellingpoints == '' && $languages_id == 3) {
                $sellingpoints = $sellingpointslaid;