'', 'it_skin'=>'', 'it_mobile_skin'=>'', 'it_name'=>'', 'it_basic'=>'', 'it_order'=>0, 'it_type1'=>0, 'it_type2'=>0, 'it_type3'=>0, 'it_type4'=>0, 'it_type5'=>0, 'it_brand'=>'', 'it_model'=>'', 'it_tel_inq'=>0, 'it_use'=>0, 'it_nocoupon'=>0, 'ec_mall_pid'=>'', 'it_mobile_explan'=>'', 'it_sell_email'=>'', 'it_shop_memo'=>'', 'it_info_gubun'=>'', 'it_explan'=>'', 'it_point_type'=>0, 'it_cust_price'=>0, 'it_option_subject'=>'', 'it_price'=>0, 'it_point'=>0, 'it_supply_point'=>0, 'it_soldout'=>0, 'it_stock_sms'=>0, 'it_stock_qty'=>0, 'it_noti_qty'=>0, 'it_buy_min_qty'=>0, 'it_buy_max_qty'=>0, 'it_notax'=>0, 'it_supply_subject'=>'', 'it_sc_type'=>0, 'it_sc_method'=>0, 'it_sc_price'=>0, 'it_sc_minimum'=>0, 'it_sc_qty'=>0, 'it_img1'=>'', 'it_img2'=>'', 'it_img3'=>'', 'it_img4'=>'', 'it_img5'=>'', 'it_img6'=>'', 'it_img7'=>'', 'it_img8'=>'', 'it_img9'=>'', 'it_img10'=>'', 'it_head_html'=>'', 'it_tail_html'=>'', 'it_mobile_head_html'=>'', 'it_mobile_tail_html'=>'', ); for($i=0;$i<=10;$i++){ $it['it_'.$i.'_subj'] = ''; $it['it_'.$i] = ''; } if ($w == "") { $html_title .= "입력"; // 옵션은 쿠키에 저장된 값을 보여줌. 다음 입력을 위한것임 //$it[ca_id] = _COOKIE[ck_ca_id]; $it['ca_id'] = get_cookie("ck_ca_id"); $it['ca_id2'] = get_cookie("ck_ca_id2"); $it['ca_id3'] = get_cookie("ck_ca_id3"); if (!$it['ca_id']) { $sql = " select ca_id from {$g5['g5_shop_category_table']} order by ca_order, ca_id limit 1 "; $row = sql_fetch($sql); if (! (isset($row['ca_id']) && $row['ca_id'])) alert("등록된 분류가 없습니다. 우선 분류를 등록하여 주십시오.", './categorylist.php'); $it['ca_id'] = $row['ca_id']; } //$it[it_maker] = stripslashes($_COOKIE[ck_maker]); //$it[it_origin] = stripslashes($_COOKIE[ck_origin]); $it['it_maker'] = stripslashes(get_cookie("ck_maker")); $it['it_origin'] = stripslashes(get_cookie("ck_origin")); } else if ($w == "u") { $html_title .= "수정"; if ($is_admin != 'super') { $sql = " select it_id from {$g5['g5_shop_item_table']} a, {$g5['g5_shop_category_table']} b where a.it_id = '$it_id' and a.ca_id = b.ca_id and b.ca_mb_id = '{$member['mb_id']}' "; $row = sql_fetch($sql); if (!$row['it_id']) alert("\'{$member['mb_id']}\' 님께서 수정 할 권한이 없는 상품입니다."); } $it = get_shop_item($it_id); if(!$it) alert('상품정보가 존재하지 않습니다.'); if (function_exists('check_case_exist_title')) check_case_exist_title($it, G5_SHOP_DIR, false); if (! (isset($ca_id) && $ca_id)) $ca_id = $it['ca_id']; $sql = " select * from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; $ca = sql_fetch($sql); } else { alert(); } $qstr = $qstr.'&sca='.$sca.'&page='.$page; $g5['title'] = $html_title; include_once (G5_ADMIN_PATH.'/admin.head.php'); // 분류리스트 $category_select = ''; $script = ''; $sql = " select * from {$g5['g5_shop_category_table']} "; if ($is_admin != 'super') $sql .= " where ca_mb_id = '{$member['mb_id']}' "; $sql .= " order by ca_order, ca_id "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { $len = strlen($row['ca_id']) / 2 - 1; $nbsp = ""; for ($i=0; $i<$len; $i++) $nbsp .= " "; $category_select .= "\n"; $script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n"; $script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n"; //$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n"; $script .= "ca_sell_email['{$row['ca_id']}'] = '{$row['ca_sell_email']}';\n"; } // 재입고알림 설정 필드 추가 if(!sql_query(" select it_stock_sms from {$g5['g5_shop_item_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_stock_sms` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_stock_qty` ", true); } // 추가옵션 포인트 설정 필드 추가 if(!sql_query(" select it_supply_point from {$g5['g5_shop_item_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_supply_point` int(11) NOT NULL DEFAULT '0' AFTER `it_point_type` ", true); } // 상품메모 필드 추가 if(!sql_query(" select it_shop_memo from {$g5['g5_shop_item_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_shop_memo` text NOT NULL AFTER `it_use_avg` ", true); } // 지식쇼핑 PID 필드추가 // 상품메모 필드 추가 if(!sql_query(" select ec_mall_pid from {$g5['g5_shop_item_table']} limit 1 ", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `ec_mall_pid` varchar(255) NOT NULL AFTER `it_shop_memo` ", true); } $pg_anchor ='
'; // 쿠폰적용안함 설정 필드 추가 if(!sql_query(" select it_nocoupon from {$g5['g5_shop_item_table']} limit 1", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_nocoupon` tinyint(4) NOT NULL DEFAULT '0' AFTER `it_use` ", true); } // 스킨필드 추가 if(!sql_query(" select it_skin from {$g5['g5_shop_item_table']} limit 1", false)) { sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}` ADD `it_skin` varchar(255) NOT NULL DEFAULT '' AFTER `ca_id3`, ADD `it_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `it_skin` ", true); } ?>