#66 에 따른 print_delivery_company 함수 추가

This commit is contained in:
chicpro
2013-04-12 16:53:54 +09:00
parent c9785dcb5b
commit 2ffac4aea8
2 changed files with 23 additions and 14 deletions

View File

@ -9,15 +9,6 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
//sql_query(" update $g4[shop_cart_table] set ct_status = '완료' where ct_status = '배송' ");
// 배송회사리스트 ---------------------------------------------
$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++) {
$delivery_options .= '<option value="'.$row['dl_id'].'">'.$row['dl_company'].'</option>';
}
// 배송회사리스트 end ---------------------------------------------
$where = " where ";
$sql_search = "";
if ($search != "") {
@ -164,11 +155,7 @@ if ($search) // 검색렬일 때만 처음 버튼을 보여줌
<td><?=$hope_date?></td>
<td><input type="text" name="od_invoice_time[<?=$i?>]" value="<?=$invoice_time?>" class="frm_input" size="20" maxlength="19"></td>
<td>
<label for="dl_id_<?=$i?>">배송업체</label>
<select name="dl_id[<?=$i?>]" id="dl_id_<?=$i?>">
<option value="">선택하세요</option>
<?=$delivery_options?>
</select>
<?=print_delivery_company($i, $row['dl_id'])?>
</td>
<td>
<!-- 값이 바뀌었는지 비교하기 위하여 저장 -->

View File

@ -621,6 +621,28 @@ function alert_opener($msg='', $url='')
exit;
}
// 배송회사를 select 로 출력
function print_delivery_company($no, $val)
{
global $g4;
$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 .= '<option value="'.$row['dl_id'].'"'.$selected.'>'.$row['dl_company'].'</option>'.PHP_EOL;
}
$str = '<label for="dl_id_'.$no.'">배송업체</label>'.PHP_EOL;
$str .= '<select name="dl_id['.$no.']" id="dl_id_'.$no.'">'.PHP_EOL;
$str .= '<option value="">선택하세요</option>'.PHP_EOL;
$str .= $delivery_options;
$str .= '</select>';
return $str;
}
// 주문서 번호를 얻는다.
function get_new_od_id()
{