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; }