작업중 브랜치 이동

This commit is contained in:
nemoluv
2013-09-26 09:11:35 +09:00
parent 19979e9f10
commit 1b876ddd2e
3 changed files with 80 additions and 9 deletions

View File

@ -26,11 +26,13 @@ if (G5_IS_MOBILE) {
$g5['title'] = '배송지 목록';
include_once(G5_PATH.'/head.sub.php');
?>
$order_action_url = G5_HTTPS_SHOP_URL.'/orderaddress_update.php';
?>
<form name="forderaddress" method="post" action="<?php echo $order_action_url; ?>" autocomplete="off">
<div id="sod_addr_list" class="new_win">
<h1 id="new_win_title">배송지 목록</h1>
<h1 id="new_win_title">배송지 목록dd</h1>
<table class="basic_tbl">
<thead>
@ -53,9 +55,9 @@ include_once(G5_PATH.'/head.sub.php');
$addr = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_subject'];
?>
<tr>
<td class="td_chk"><label for="chk_<?php echo $i;?>" class="sound_only">배송지선택</label><input type="checkbox" name="chk" id="chk_<?php echo $i;?>"></td>
<td class="td_chk"><label for="chk_<?php echo $i;?>" class="sound_only">배송지선택</label><input type="checkbox" name="ad_id" value="<?php echo $i;?>" id="chk_<?php echo $i;?>"></td>
<td class="td_name"><input type="text" name="ad_subject" id="ad_subject" class="frm_input" size="10" maxlength="20" value="<?php echo $row['ad_subject']; ?>"></td>
<td class="td_basic"><label for="ad_basic<?php echo $i;?>" class="sound_only">기본배송지</label><input type="radio" name="ad_basic" id="ad_basic<?php echo $i;?>"></td>
<td class="td_basic"><label for="ad_basic<?php echo $i;?>" class="sound_only">기본배송지</label><input type="radio" name="ad_default" value="1" id="ad_basic<?php echo $i;?>"></td>
<td class="td_smallname"><?php echo $row['ad_name']; ?></td>
<td class="td_bignum"><?php echo $row['ad_tel']; ?><br><?php echo $row['ad_hp']; ?></td>
<td><?php echo sprintf('%s %s', $row['ad_addr1'], $row['ad_addr2']); ?></td>
@ -71,9 +73,10 @@ include_once(G5_PATH.'/head.sub.php');
</tbody>
</table>
<div class="btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="선택수정">
</div>
</div>
</form>
<script>
$(function() {

View File

@ -0,0 +1,66 @@
<?php
include_once('./_common.php');
if(get_magic_quotes_gpc())
{
$_GET = array_add_callback("stripslashes", $_GET);
$_POST = array_add_callback("stripslashes", $_POST);
}
$_GET = array_add_callback("mysql_real_escape_string", $_GET);
$_POST = array_add_callback("mysql_real_escape_string", $_POST);
// orderview 에서 사용하기 위해 session에 넣고
$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR);
set_session('ss_orderview_uid', $uid);
// 배송지처리
if($is_member && $ad_default) {
$sql = " select ad_id
from {$g5['g5_shop_order_address_table']}
where mb_id = '{$member['mb_id']}' ";
$row = sql_fetch($sql);
if($ad_default) {
$sql = " update {$g5['g5_shop_order_address_table']}
set ad_default = '0'
where mb_id = '{$member['mb_id']}' ";
sql_query($sql);
}
if($row['ad_id']) {
$sql = " update {$g5['g5_shop_order_address_table']}
set ";
if($ad_default)
$sql .= " ad_default = '$ad_default' ";
if($ad_subject)
$sql .= " , ad_subject = '$ad_subject' ";
$sql .= " where ad_id = '{$row['ad_id']}'
and mb_id = '{$member['mb_id']}' ";
sql_query($sql);
if(!$ad_default && $add_subject) {
$sql = " insert into {$g5['g5_shop_order_address_table']}
set mb_id = '{$member['mb_id']}',
ad_subject = '$ad_subject',
ad_default = '$ad_default',
ad_name = '$od_b_name',
ad_tel = '$od_b_tel',
ad_hp = '$od_b_hp',
ad_zip1 = '$od_b_zip1',
ad_zip2 = '$od_b_zip2',
ad_addr1 = '$od_b_addr1',
ad_addr2 = '$od_b_addr2' ";
sql_query($sql);
}
}
}
print_r ($row);
echo $member['mb_id']."멤버아이디<br>";
echo $ad_default."디폴트값<br>";
echo $ad_subject. "제목<br>";
echo $row['ad_id']. "고유 아이디<br>";
//goto_url(G5_SHOP_URL.'/orderaddress.php?od_id='.$od_id.'&amp;uid='.$uid);
?>

View File

@ -293,7 +293,7 @@ function get_intall_file()
alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php');
} else {
// 배송비 계산
$send_cost = get_sendcost($s_cart_id);
$send_cost = get_sendcost($tot_sell_price, $s_cart_id);
}
// 복합과세처리
@ -662,6 +662,11 @@ function get_intall_file()
// 배송지 이력
$addr_list = '';
$sep = chr(30);
// 주문자와 동일
$addr_list .= '<input type="radio" name="ad_sel_addr" id="ad_sel_addr_same">'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_same">주문자와 동일</label>'.PHP_EOL;
// 기본배송지
$sql = " select *
from {$g5['g5_shop_order_address_table']}
@ -673,9 +678,6 @@ function get_intall_file()
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_def">'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_def">기본배송지</label>'.PHP_EOL;
}
// 주문자와 동일
$addr_list .= '<input type="radio" name="ad_sel_addr" id="ad_sel_addr_same">'.PHP_EOL;
$addr_list .= '<label for="ad_sel_addr_same">주문자와 동일</label>'.PHP_EOL;
// 최근배송지
$sql = " select *