From 3813b7b165bc251cd19de6d258c77eebf5760370 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Fri, 1 Feb 2013 17:10:20 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=EB=B6=84?= =?UTF-8?q?=EB=A5=98=20select=20option=20=EC=9D=84=20ul=20li=20=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/list.php | 8 ++++---- bbs/write.php | 1 + lib/common.lib.php | 10 +++++----- skin/board/neo/list.skin.php | 6 +++--- skin/board/neo/write.skin.php | 13 ++++++------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bbs/list.php b/bbs/list.php index c8d3add00..cd09299b9 100644 --- a/bbs/list.php +++ b/bbs/list.php @@ -8,10 +8,10 @@ if ($board['bo_use_category']) { $is_category = true; $category_location = './board.php?bo_table='.$bo_table.'&sca='; - $categorys = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음 - for ($i=0; $i'; + $categories = explode('|', $board['bo_category_list']); // 구분자가 , 로 되어 있음 + for ($i=0; $i'; } } diff --git a/bbs/write.php b/bbs/write.php index a5954a0e8..3341aa8f3 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -224,6 +224,7 @@ if ($is_guest || ($is_admin && $w == 'u' && $member['mb_id'] != $write['mb_id']) } $is_category = false; +$category_option = ''; if ($board['bo_use_category']) { $ca_name = ""; if (isset($write['ca_name'])) diff --git a/lib/common.lib.php b/lib/common.lib.php index 01b161511..4ecde76e5 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -797,17 +797,17 @@ function get_category_option($bo_table='', $ca_name='') { global $g4, $board; - $arr = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음 + $categories = explode("|", $board['bo_category_list']); // 구분자가 , 로 되어 있음 $str = ""; - for ($i=0; $i
- +
diff --git a/skin/board/neo/write.skin.php b/skin/board/neo/write.skin.php index 136dd0871..f870310b8 100644 --- a/skin/board/neo/write.skin.php +++ b/skin/board/neo/write.skin.php @@ -152,13 +152,12 @@ echo $option_hidden; // 관리자라면 분류 선택에 '공지' 옵션을 추가함 if ($is_admin) { - echo " - if (typeof(document.fwrite.ca_name) != 'undefined') - { - document.fwrite.ca_name.options.length += 1; - document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].value = '공지'; - document.fwrite.ca_name.options[document.fwrite.ca_name.options.length-1].text = '공지'; - }"; + echo ' + if (ca_name_select = document.getElementById("ca_name")) { + ca_name_select.options.length += 1; + ca_name_select.options[ca_name_select.options.length-1].value = "공지"; + ca_name_select.options[ca_name_select.options.length-1].text = "공지"; + }'; } ?> From 9db841d822f3abe36f777b9166f2f059de4b953a Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 1 Feb 2013 17:15:27 +0900 Subject: [PATCH 2/5] =?UTF-8?q?del=20=ED=95=A8=EC=88=98=20=EC=BA=90?= =?UTF-8?q?=EB=A6=AD=ED=84=B0=EC=85=8B=20=EC=B2=B4=ED=81=AC=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/common.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/common.js b/js/common.js index 091b1eb60..238e29a1f 100644 --- a/js/common.js +++ b/js/common.js @@ -124,10 +124,7 @@ function no_comma(data) function del(href) { if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) { - if (g4_charset.toUpperCase() == 'EUC-KR') - document.location.href = href; - else - document.location.href = encodeURI(href); + document.location.href = encodeURI(href); } } From c78311a7c19beb01db7e732f8a14cf29795fe28d Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 1 Feb 2013 17:16:10 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=EC=83=81=ED=92=88=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EC=8B=9C=20=EB=B0=9C=EC=83=9D=ED=95=A0=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/itemformupdate.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adm/shop_admin/itemformupdate.php b/adm/shop_admin/itemformupdate.php index cd96a0935..f5022419a 100644 --- a/adm/shop_admin/itemformupdate.php +++ b/adm/shop_admin/itemformupdate.php @@ -117,6 +117,9 @@ function itemdelete($it_id) // 디렉토리내 파일 리스트 배열로 얻기 function scan_dir($path) { + if(!is_dir($path)) + return; + $dir = opendir($path); while (false !== ($filename = readdir($dir))) { if($filename == "." || $filename == "..") From 3201dbf89d0460020f6b1ab2c12f70fbd6dbe1b9 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 1 Feb 2013 17:17:02 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=EC=83=81=ED=92=88=EB=B3=B5=EC=82=AC=20?= =?UTF-8?q?=EC=BF=BC=EB=A6=AC=20=EB=B0=8F=20=EC=83=81=ED=92=88=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=B3=B5=EC=82=AC=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/item_copy.php | 6 +-- adm/shop_admin/item_copy_update.php | 58 ++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/adm/shop_admin/item_copy.php b/adm/shop_admin/item_copy.php index 2ffb4815f..424b8de9d 100644 --- a/adm/shop_admin/item_copy.php +++ b/adm/shop_admin/item_copy.php @@ -5,14 +5,14 @@ include_once("./_common.php"); auth_check($auth[$sub_menu], "r"); $g4[title] = "상품 복사"; -include_once("$g4[path]/head.sub.php"); +include_once(G4_PATH.'/head.sub.php'); ?>
- + @@ -39,5 +39,5 @@ function _copy(link) \ No newline at end of file diff --git a/adm/shop_admin/item_copy_update.php b/adm/shop_admin/item_copy_update.php index 8cb6a45ba..40087271d 100644 --- a/adm/shop_admin/item_copy_update.php +++ b/adm/shop_admin/item_copy_update.php @@ -20,7 +20,7 @@ $cp = sql_fetch($sql); // 상품테이블의 필드가 추가되어도 수정하지 않도록 필드명을 추출하여 insert 퀴리를 생성한다. (상품코드만 새로운것으로 대체) $sql_common = ""; -$fields = mysql_list_fields($mysql_db, $g4[yc4_item_table]); +$fields = mysql_list_fields(G4_MYSQL_DB, $g4[yc4_item_table]); $columns = mysql_num_fields($fields); for ($i = 0; $i < $columns; $i++) { $fld = mysql_field_name($fields, $i); @@ -35,6 +35,13 @@ $sql = " insert $g4[yc4_item_table] sql_query($sql); // 선택옵션정보 copy +$opt_sql = " insert ignore into {$g4['yc4_option_table']} ( opt_id, it_id, opt_amount, opt_qty, opt_notice, opt_use ) + select opt_id, '$new_it_id', opt_amount, opt_qty, opt_notice, opt_use + from {$g4['yc4_option_table']} + where it_id = '$it_id' + order by opt_no asc "; +sql_query($opt_sql); +/* $opt_sql = " select * from `{$g4['yc4_option_table']}` where it_id = '$it_id' order by opt_no asc "; $opt_result = sql_query($opt_sql); for($j = 0; $opt_row = sql_fetch_array($opt_result); $j++) { @@ -48,8 +55,16 @@ for($j = 0; $opt_row = sql_fetch_array($opt_result); $j++) { opt_use = '{$opt_row['opt_use']}' "; sql_query($ins_sql); } +*/ // 추가옵션정보 copy +$sp_sql = " insert ignore into {$g4['yc4_supplement_table']} ( sp_id, it_id, sp_amount, sp_qty, sp_notice, sp_use ) + select sp_id, '$new_it_id', sp_amount, sp_qty, sp_notice, sp_use + from {$g4['yc4_supplement_table']} + where it_id = '$it_id' + order by sp_no asc "; +sql_query($sp_sql); +/* $sp_sql = " select * from `{$g4['yc4_supplement_table']}` where it_id = '$it_id' order by sp_no asc "; $sp_result = sql_query($sp_sql); for($j = 0; $sp_row = sql_fetch_array($sp_result); $j++) { @@ -63,23 +78,40 @@ for($j = 0; $sp_row = sql_fetch_array($sp_result); $j++) { sp_use = '{$sp_row['sp_use']}' "; sql_query($ins_sql); } +*/ -$img_path = "$g4[path]/data/item/"; +// 상품이미지 복사 +function copy_directory($src_dir, $dest_dir) +{ + if($src_dir == $dest_dir) + return false; -for($i=1; $i<6; $i++) { - $limg = $it_id."_l".$i; - if(is_file($img_path.$limg)) - copy($img_path.$limg,$img_path.$new_it_id."_l".$i); + if(!is_dir($dest_dir)) { + @mkdir($dest_dir, 0707); + @chmod($dest_dir, 0707); + } + $dir = opendir($src_dir); + while (false !== ($filename = readdir($dir))) { + if($filename == "." || $filename == "..") + continue; + + $files[] = $filename; + } + + for($i=0; $i