From d04a2caa76c9bceea99c9256a7a91963381f2b39 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 23 Oct 2013 17:16:27 +0900 Subject: [PATCH 01/14] =?UTF-8?q?=EB=B3=80=EA=B2=BD=EB=90=A0=20=EC=A3=BC?= =?UTF-8?q?=EB=AC=B8=EC=83=81=ED=83=9C=EB=A5=BC=20select=20box=20=EB=A1=9C?= =?UTF-8?q?=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/orderlist.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index 130dd25f5..f7c2026cf 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -398,16 +398,16 @@ $listall = '전체목록 - + + + + + + - 전체목록 - - + - + + + From 742fb05f691712bd4a16a70431a72b743829f0b6 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Tue, 29 Oct 2013 10:14:29 +0900 Subject: [PATCH 02/14] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderlist.php | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index 07f5cd90f..5e812f78e 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -397,42 +397,17 @@ $listall = '전체목록 -<<<<<<< HEAD - - - 주문상태 변경 >>>>>> master $change_status = ""; if ($od_status == '주문') $change_status = "입금"; if ($od_status == '입금') $change_status = "준비"; if ($od_status == '준비') $change_status = "배송"; if ($od_status == '배송') $change_status = "완료"; ?> - -<<<<<<< HEAD - - - - + - -======= - - - 주문상태에서만 삭제가 가능합니다. - ->>>>>>> master + 주문상태에서만 삭제가 가능합니다. From 35fb294cfc1e96a1869a666cf77ad7f21ff9a813 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 30 Oct 2013 10:27:56 +0900 Subject: [PATCH 03/14] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EC=84=9C=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/ordercartupdate.php | 57 +++++++++------------------ adm/shop_admin/orderform.php | 33 ++++++++++------ adm/shop_admin/orderreceiptupdate.php | 43 +++++++++++--------- 3 files changed, 63 insertions(+), 70 deletions(-) diff --git a/adm/shop_admin/ordercartupdate.php b/adm/shop_admin/ordercartupdate.php index 93c091282..5ad606345 100644 --- a/adm/shop_admin/ordercartupdate.php +++ b/adm/shop_admin/ordercartupdate.php @@ -8,34 +8,17 @@ $ct_chk_count = count($_POST['ct_chk']); if(!$ct_chk_count) alert('처리할 자료를 하나 이상 선택해 주십시오.'); -switch($_POST['act_button']) -{ - case '주문': - $ct_status = '주문'; - break; - case '상품준비중': - $ct_status = '준비'; - break; - case '배송중': - $ct_status = '배송'; - break; - case '완료': - $ct_status = '완료'; - break; - case '취소': - $ct_status = '취소'; - break; - case '반품': - $ct_status = '반품'; - break; - case '품절': - $ct_status = '품절'; - break; - default: - alert('변경할 상태가 올바르지 않습니다.'); - break; + +$status_normal = array('주문','입금','준비','배송','완료'); +$status_cancel = array('취소','반품','품절'); + +if (in_array($_POST['ct_status'], $status_normal) || in_array($_POST['ct_status'], $status_cancel)) { + ; // 통과 +} else { + alert('변경할 상태가 올바르지 않습니다.'); } + $mod_history = ''; $cnt = count($_POST['ct_id']); for ($i=0; $i<$cnt; $i++) @@ -43,9 +26,7 @@ for ($i=0; $i<$cnt; $i++) $k = $_POST['ct_chk'][$i]; $ct_id = $_POST['ct_id'][$k]; - $sql = " select * from {$g5['g5_shop_cart_table']} - where od_id = '$od_id' - and ct_id = '$ct_id' "; + $sql = " select * from {$g5['g5_shop_cart_table']} where od_id = '$od_id' and ct_id = '$ct_id' "; $ct = sql_fetch($sql); if(!$ct['ct_id']) continue; @@ -174,22 +155,20 @@ $sql = " update {$g5['g5_shop_order_table']} od_misu = '{$info['od_misu']}', od_tax_mny = '{$info['od_tax_mny']}', od_vat_mny = '{$info['od_vat_mny']}', - od_free_mny = '{$info['od_free_mny']}' - where od_id = '$od_id' "; + od_free_mny = '{$info['od_free_mny']}' "; +if ($mod_history) { // 수량변경 히스토리 기록 + $sql .= " , od_mod_history = CONCAT(od_mod_history,'$mod_history') "; +} +if (in_array($_POST['ct_status'], $status_normal)) { // 정상인 주문상태만 기록 + $sql .= " , od_status = '{$_POST['ct_status']}' "; +} +$sql .= " where od_id = '$od_id' "; sql_query($sql); $qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page"; $url = "./orderform.php?od_id=$od_id&$qstr"; -// 수량변경 히스토리 기록 -if($mod_history) { - $sql = " update {$g5['g5_shop_order_table']} - set od_mod_history = CONCAT(od_mod_history,'$mod_history') - where od_id = '$od_id' "; - sql_query($sql); -} - // 1.06.06 $od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); if ($od['od_receipt_point']) diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 4f6637bb8..722668683 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -110,7 +110,13 @@ $pg_anchor = '