#301 작업중 브랜치 이동

This commit is contained in:
nemoluv
2013-09-24 18:08:22 +09:00
parent 73b4b2d834
commit 327ed2346b
2 changed files with 44 additions and 45 deletions

View File

@ -35,7 +35,11 @@ include_once(G5_PATH.'/head.sub.php');
<table class="basic_tbl"> <table class="basic_tbl">
<thead> <thead>
<tr> <tr>
<th scope="col">
<label for="chk_all" class="sound_only">전체선택</label><input type="checkbox" name="chk_all" id="chk_all">
</th>
<th scope="col">배송지명</th> <th scope="col">배송지명</th>
<th scope="col">기본<br>배송지</th>
<th scope="col">이름</th> <th scope="col">이름</th>
<th scope="col">전화번호</th> <th scope="col">전화번호</th>
<th scope="col">주소</th> <th scope="col">주소</th>
@ -49,7 +53,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']; $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> <tr>
<td class="td_name"><?php echo $row['ad_subject']; ?></td> <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_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_smallname"><?php echo $row['ad_name']; ?></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 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> <td><?php echo sprintf('%s %s', $row['ad_addr1'], $row['ad_addr2']); ?></td>
@ -64,6 +70,9 @@ include_once(G5_PATH.'/head.sub.php');
?> ?>
</tbody> </tbody>
</table> </table>
<div class="btn_list">
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
</div>
</div> </div>
<script> <script>

View File

@ -655,11 +655,6 @@ function get_intall_file()
<section id="sod_frm_taker"> <section id="sod_frm_taker">
<h2>받으시는 분</h2> <h2>받으시는 분</h2>
<div id="sod_frm_same">
<input type="checkbox" name="same" id="same" onclick="javascript:gumae2baesong(document.forderform);">
<label for="same">주문하시는 분과 받으시는 분의 정보가 동일한 경우 체크하십시오.</label>
</div>
<table class="frm_tbl"> <table class="frm_tbl">
<tbody> <tbody>
<?php <?php
@ -678,6 +673,9 @@ function get_intall_file()
$addr_list .= '<input type="radio" name="ad_sel_addr" value="'.$val1.'" id="ad_sel_addr_def">'.PHP_EOL; $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 .= '<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 * $sql = " select *
@ -706,12 +704,10 @@ function get_intall_file()
<th scope="row"><label for="ad_subject">배송지명</label></th> <th scope="row"><label for="ad_subject">배송지명</label></th>
<td> <td>
<input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20"> <input type="text" name="ad_subject" id="ad_subject" class="frm_input" maxlength="20">
<?php <?php if ($addr_list) {
if ($is_member) {
echo '<input type="checkbox" name="ad_default" id="ad_default" value="1">'.PHP_EOL.' echo '<input type="checkbox" name="ad_default" id="ad_default" value="1">'.PHP_EOL.'
<label for="ad_default">기본배송지로 설정</label>'; <label for="ad_default">기본배송지로 설정</label>';
} }?>
?>
</td> </td>
</tr> </tr>
<?php <?php
@ -739,16 +735,6 @@ function get_intall_file()
<label for="od_b_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label> <label for="od_b_zip2" class="sound_only">우편번호 뒷자리<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_b_zip2" id="od_b_zip2" required class="frm_input required" size="3" maxlength="3"> <input type="text" name="od_b_zip2" id="od_b_zip2" required class="frm_input required" size="3" maxlength="3">
<span id="od_winb_zip" style="display:block"></span> <span id="od_winb_zip" style="display:block"></span>
<?php if($addr_list) { ?>
<div>
<div>
<input type="checkbox" name="add_address" id="add_address" value="1">
<label for="add_address">배송지목록에 추가</label>
<input type="checkbox" name="ad_default" id="ad_default" value="1">
<label for="ad_default">기본배송지로 설정</label>
</div>
</div>
<?php } ?>
<label for="od_b_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label> <label for="od_b_addr1" class="sound_only">주소<strong class="sound_only"> 필수</strong></label>
<input type="text" name="od_b_addr1" id="od_b_addr1" required class="frm_input frm_address required" size="50"> <input type="text" name="od_b_addr1" id="od_b_addr1" required class="frm_input frm_address required" size="50">
<label for="od_b_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label> <label for="od_b_addr2" class="sound_only">상세주소<strong class="sound_only"> 필수</strong></label>
@ -1276,32 +1262,34 @@ $(function() {
// 배송지선택 // 배송지선택
$("input[name=ad_sel_addr]").on("click", function() { $("input[name=ad_sel_addr]").on("click", function() {
var addr = $(this).val().split(String.fromCharCode(30)); var addr = $(this).val().split(String.fromCharCode(30));
if ($(this).attr("id") == "ad_sel_addr_same"); // 이 아이디가 ad_sel_addr_same 일때는 아무런 실행도 하지 않는다.
if(addr[0] == "new") { else{ // 아닐땐 실행
for(i=0; i<8; i++) { if(addr[0] == "new") {
addr[i] = ""; for(i=0; i<8; i++) {
addr[i] = "";
}
} }
}
var f = document.forderform; var f = document.forderform;
f.od_b_name.value = addr[0]; f.od_b_name.value = addr[0];
f.od_b_tel.value = addr[1]; f.od_b_tel.value = addr[1];
f.od_b_hp.value = addr[2]; f.od_b_hp.value = addr[2];
f.od_b_zip1.value = addr[3]; f.od_b_zip1.value = addr[3];
f.od_b_zip2.value = addr[4]; f.od_b_zip2.value = addr[4];
f.od_b_addr1.value = addr[5]; f.od_b_addr1.value = addr[5];
f.od_b_addr2.value = addr[6]; f.od_b_addr2.value = addr[6];
f.ad_subject.value = addr[7]; f.ad_subject.value = addr[7];
var zip1 = addr[3].replace(/[^0-9]/g, ""); var zip1 = addr[3].replace(/[^0-9]/g, "");
var zip2 = addr[4].replace(/[^0-9]/g, ""); var zip2 = addr[4].replace(/[^0-9]/g, "");
if(zip1 != "" && zip2 != "") { if(zip1 != "" && zip2 != "") {
var code = String(zip1) + String(zip2); var code = String(zip1) + String(zip2);
if(zipcode != code) { if(zipcode != code) {
zipcode = code; zipcode = code;
calculate_sendcost(code); calculate_sendcost(code);
}
} }
} }
}); });
@ -1309,7 +1297,7 @@ $(function() {
// 배송지목록 // 배송지목록
$("#order_address").on("click", function() { $("#order_address").on("click", function() {
var url = this.href; var url = this.href;
window.open(url, "win_address", "left=100,top=100,width=650,height=500,scrollbars=1"); window.open(url, "win_address", "left=100,top=100,width=800,height=500,scrollbars=1");
return false; return false;
}); });
}); });
@ -1669,8 +1657,9 @@ function forderform_check(f)
} }
// 구매자 정보와 동일합니다. // 구매자 정보와 동일합니다.
function gumae2baesong(f) $("#ad_sel_addr_same").on("click", function(){
{ var f = document.forderform;
f.od_b_name.value = f.od_name.value; f.od_b_name.value = f.od_name.value;
f.od_b_tel.value = f.od_tel.value; f.od_b_tel.value = f.od_tel.value;
f.od_b_hp.value = f.od_hp.value; f.od_b_hp.value = f.od_hp.value;
@ -1680,7 +1669,8 @@ function gumae2baesong(f)
f.od_b_addr2.value = f.od_addr2.value; f.od_b_addr2.value = f.od_addr2.value;
calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value)); calculate_sendcost(String(f.od_b_zip1.value) + String(f.od_b_zip2.value));
} });
// 구매자 정보와 동일 함수 끝
<?php if ($default['de_hope_date_use']) { ?> <?php if ($default['de_hope_date_use']) { ?>
$(function(){ $(function(){