From 3769d130c8b95bdb6f2ebe401d4ddb7a42e01ffb Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 12 Apr 2013 18:03:08 +0900 Subject: [PATCH] =?UTF-8?q?#66=20=EC=97=90=EB=94=B0=EB=A5=B8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=EB=A5=BC=20=20db=20=EC=A0=91=EC=86=8D=20=ED=9A=9F?= =?UTF-8?q?=EC=88=98=EB=A5=BC=20=EC=A4=84=EC=9C=84=EA=B8=B0=20=EC=9C=84?= =?UTF-8?q?=ED=95=B4=20=EC=BD=94=EB=93=9C=20=EC=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/deliverylist.php | 14 +++++++++++++- lib/shop.lib.php | 21 +++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/adm/shop_admin/deliverylist.php b/adm/shop_admin/deliverylist.php index daf5c68a2..90d6d0dac 100644 --- a/adm/shop_admin/deliverylist.php +++ b/adm/shop_admin/deliverylist.php @@ -9,6 +9,15 @@ include_once (G4_ADMIN_PATH.'/admin.head.php'); //sql_query(" update $g4[shop_cart_table] set ct_status = '완료' where ct_status = '배송' "); +// 배송회사리스트 --------------------------------------------- +$delivery_options = ''.PHP_EOL; +$sql = " select * from {$g4['shop_delivery_table']} order by dl_order "; +$result = sql_query($sql); +for($i=0; $row=sql_fetch_array($result); $i++) { + $delivery_options .= ''.PHP_EOL; +} +// 배송회사리스트 end --------------------------------------------- + $where = " where "; $sql_search = ""; if ($search != "") { @@ -155,7 +164,10 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌 - + + diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 68c437280..fdbfa988f 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -621,24 +621,13 @@ function alert_opener($msg='', $url='') exit; } -// 배송회사를 select 로 출력 -function print_delivery_company($no, $val) +// option 리스트에 selected 추가 +function conv_selected_option($options, $value) { - global $g4; + if(!$options) + return ''; - $delivery_options = ''; - $sql = " select * from {$g4['shop_delivery_table']} order by dl_order "; - $result = sql_query($sql); - for($i=0; $row=sql_fetch_array($result); $i++) { - $selected = get_selected($row['dl_id'], $val); - $delivery_options .= ''.PHP_EOL; - } - - $str = ''.PHP_EOL; - $str .= ''; + $str = str_replace('value="'.$value.'"', 'value="'.$value.'" selected="selected"', $options); return $str; }