다음 주소 API 적용 및 기타 수정
This commit is contained in:
@ -31,17 +31,17 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<th scope="row"><label for="reg_mb_id">아이디<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<span class="frm_info">영문자, 숫자, _ 만 입력 가능. 최소 3자이상 입력하세요.</span>
|
||||
<input type="text" name="mb_id" value="<?php echo $member['mb_id'] ?>" id="reg_mb_id" class="frm_input minlength=3 <?php echo $required ?> <?php echo $readonly ?>" maxlength="20" <?php echo $required ?> <?php echo $readonly ?>>
|
||||
<input type="text" name="mb_id" value="<?php echo $member['mb_id'] ?>" id="reg_mb_id" class="frm_input <?php echo $required ?> <?php echo $readonly ?>" minlength="3" maxlength="20" <?php echo $required ?> <?php echo $readonly ?>>
|
||||
<span id="msg_mb_id"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" name="mb_password" id="reg_mb_password" class="frm_input minlength=3 <?php echo $required ?>" maxlength="20" <?php echo $required ?>></td>
|
||||
<td><input type="password" name="mb_password" id="reg_mb_password" class="frm_input <?php echo $required ?>" minlength="3" maxlength="20" <?php echo $required ?>></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_password_re">비밀번호 확인<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="password" name="mb_password_re" id="reg_mb_password_re" class="frm_input minlength=3 <?php echo $required ?>" maxlength="20" <?php echo $required ?>></td>
|
||||
<td><input type="password" name="mb_password_re" id="reg_mb_password_re" class="frm_input <?php echo $required ?>" minlength="3" maxlength="20" <?php echo $required ?>></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@ -150,11 +150,11 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_addr1" class="sound_only">주소<?php echo $config['cf_req_addr']?'<strong class="sound_only"> 필수</strong>':''; ?></label>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $member['mb_addr1'] ?>" id="reg_mb_addr1" <?php echo $config['cf_req_addr']?"required":""; ?> class="frm_input frm_address <?php echo $config['cf_req_addr']?"required":""; ?>" size="50"><br>
|
||||
<label for="reg_mb_addr2" class="sound_only">상세주소</label>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50"><br>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $member['mb_addr2'] ?>" id="reg_mb_addr2" class="frm_input frm_address" size="50">
|
||||
<br>
|
||||
<label for="reg_mb_addr3" class="sound_only">참고항목</label>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" readonly="readonly" class="frm_input frm_address" size="50">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>"><br>
|
||||
<span id="mb_addr_jibeon"><?php echo ($member['mb_addr_jibeon'] ? '지번주소 : '.$member['mb_addr_jibeon'] : ''); ?></span>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $member['mb_addr3'] ?>" id="reg_mb_addr3" class="frm_input frm_address" size="50" readonly="readonly">
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $member['mb_addr_jibeon']; ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@ -262,7 +262,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<script>
|
||||
$(function() {
|
||||
$("#reg_zip_find").css("display", "inline-block");
|
||||
$("#reg_mb_zip1, #reg_mb_zip2, #reg_mb_addr1").attr("readonly", true);
|
||||
|
||||
<?php if($config['cf_cert_use'] && $config['cf_cert_ipin']) { ?>
|
||||
// 아이핀인증
|
||||
|
||||
@ -190,22 +190,5 @@
|
||||
#profile .sv_wrap a {margin:0 0 5px;padding:0;font-weight:bold;line-height:10px}
|
||||
|
||||
/* 우편번호 검색 */
|
||||
#post_code #code_sel {margin:0 20px 20px}
|
||||
#post_code #code_sel label {display:inline-block;margin:0 15px 0 0}
|
||||
#post_code p {margin:0 0 10px}
|
||||
#post_code #zip_search_frm {margin:0 20px}
|
||||
#post_code #code_sch #sch_q {position:relative;margin:5px 0 0}
|
||||
#post_code #code_sch .frm_input {height:22px}
|
||||
#post_code #code_sch .btn_submit {padding:0 8px;height:24px}
|
||||
#post_code #result_b4 {display:block;padding:30px 0;border-bottom:1px solid #dde4e9;text-align:center}
|
||||
#post_code #result .result_msg {padding:15px 0}
|
||||
#post_code #result .result_fail {border:1px solid #dde4e9;background:#f0f5fc;color:#ff3061;text-align:center}
|
||||
#post_code #result ul {margin:0;padding:0;border-bottom:1px solid #dde4e9;background:#f0f5fc;list-style:none}
|
||||
#post_code #result li {padding:10px;border:1px solid #dde4e9;border-bottom:0}
|
||||
#post_code #result li div {margin:4px 0 0;color:#738D94}
|
||||
#post_code #result li div {color:#738D94}
|
||||
#post_code #result li div:before {content:"▶ "}
|
||||
#post_code #zip_direct_frm {display:none;margin:0 20px}
|
||||
#post_code #zip_direct_frm .frm_input {margin:0 0 5px}
|
||||
#post_code #zip_direct_frm .frm_addr {width:99%}
|
||||
#post_code #zip_direct_frm #sch_dq {padding:10px 0 20px;text-align:center}
|
||||
#daum_juso_wrap{width:100%;height:100%}
|
||||
html.daum_juso_body ,body.daum_juso_body {height:100%;overflow:hidden}
|
||||
@ -5,158 +5,47 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<!-- 우편번호 찾기 시작 { -->
|
||||
<script src="<?php echo G5_JS_URL; ?>/zip.js"></script>
|
||||
|
||||
<div id="post_code" class="new_win mbskin">
|
||||
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
|
||||
|
||||
<div id="code_sel">
|
||||
<input type="radio" name="sch_sel" id="sch_sel_1" value="search" checked="checked">
|
||||
<label for="sch_sel_1">주소검색</label>
|
||||
<input type="radio" name="sch_sel" id="sch_sel_0" value="direct">
|
||||
<label for="sch_sel_0">직접입력</label>
|
||||
</div>
|
||||
|
||||
<div id="zip_search_frm" class="zip_frm">
|
||||
<p>
|
||||
시도 및 시군구 선택없이 도로명, 읍/면/동, 건물명 등으로 검색하실 수 있습니다.<br>
|
||||
만약 검색결과에 찾으시는 주소가 없을 때는 시도와 시군구를 선택하신 후 다시 검색해 주십시오.<br>
|
||||
(검색결과는 최대 1,000건만 표시됩니다.)
|
||||
</p>
|
||||
|
||||
<form name="fzip" method="get" onsubmit="search_call(); return false;" autocomplete="off">
|
||||
<!-- 검색어 입력 시작 { -->
|
||||
<div id="code_sch">
|
||||
<label for="sido" class="sound_only">시도선택</label>
|
||||
<select name="sido" id="sido">
|
||||
<option value="">- 시도 선택 -</option>
|
||||
</select>
|
||||
<label for="gugun" class="sound_only">시군구</label>
|
||||
<select name="gugun" id="gugun">
|
||||
<option value="">- 시군구 선택 -</option>
|
||||
</select>
|
||||
<div id="sch_q">
|
||||
<label for="q" class="sound_only">검색어</label>
|
||||
<input type="text" name="q" value="" id="q" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</div>
|
||||
</div>
|
||||
<!-- } 검색어 입력 끝 -->
|
||||
</form>
|
||||
|
||||
<div id="result"><span id="result_b4">검색어를 입력해주세요.</span></div>
|
||||
</div>
|
||||
<div id="zip_direct_frm" class="zip_frm">
|
||||
<p>직접 주소를 입력하실 경우 우편번호와 기본주소는 반드시 입력하셔야 합니다.</p>
|
||||
<form name="fzip2">
|
||||
우편번호
|
||||
<label for="frm_zip1" class="sound_only">우편번호앞자리</label>
|
||||
<input type="text" name="frm_zip1" id="frm_zip1" class="required frm_input" size="3" maxlength="3"> -
|
||||
<label for="frm_zip2" class="sound_only">우편번호뒷자리</label>
|
||||
<input type="text" name="frm_zip2" id="frm_zip2" class="required frm_input" size="3" maxlength="3"><br>
|
||||
<label for="frm_addr1" class="sound_only">기본주소</label>
|
||||
<input type="text" name="frm_addr1" placeholder="기본주소" id="frm_addr1" class="required frm_input frm_addr"><br>
|
||||
<label for="frm_addr2" class="sound_only">상세주소</label>
|
||||
<input type="text" name="frm_addr2" placeholder="상세주소" id="frm_addr2" class="frm_input frm_addr"><br>
|
||||
<label for="frm_addr3" class="sound_only">참고항목</label>
|
||||
<input type="text" name="frm_addr3" placeholder="참고항목" id="frm_addr3" class="frm_input frm_addr"><br>
|
||||
<label for="frm_jibeon" class="sound_only">지번주소</label>
|
||||
<input type="text" name="frm_jibeon" placeholder="지번주소" id="frm_jibeon" class="frm_input frm_addr">
|
||||
|
||||
<div id="sch_dq">
|
||||
<button type="button" id="put_addr" class="btn_submit">주소입력</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="win_btn">
|
||||
<button type="button" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="daum_juso_wrap" class="daum_juso_wrap"></div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("input[name='sch_sel']").click(function() {
|
||||
var val = $(this).val();
|
||||
jQuery(function($){
|
||||
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
|
||||
if(!is_chrome) { //모바일 크롬에서 먹통되는 현상이 있음
|
||||
$("html, body").addClass("daum_juso_body");
|
||||
}
|
||||
|
||||
$(".zip_frm").hide();
|
||||
$("#zip_"+val+"_frm").show();
|
||||
});
|
||||
function put_data2(zip1, zip2, addr1, addr2, addr3, jibeon)
|
||||
{
|
||||
var of = window.opener.document.<?php echo $frm_name; ?>;
|
||||
|
||||
var msg_alert = true;
|
||||
$("input#q").bind("focusin", function() {
|
||||
if(!msg_alert) {
|
||||
return false;
|
||||
} else {
|
||||
alert("정확하고 빠른 검색을 위해 아래의 예시처럼 입력해 주세요.\n\n입력예1) 강남대로37길 24-6\n입력예2) 서초동 1362-19\n입력예3) 서초2동 1362-19");
|
||||
msg_alert = false;
|
||||
of.<?php echo $frm_zip1; ?>.value = zip1;
|
||||
of.<?php echo $frm_zip2; ?>.value = zip2;
|
||||
of.<?php echo $frm_addr1; ?>.value = addr1;
|
||||
of.<?php echo $frm_addr2; ?>.value = addr2;
|
||||
of.<?php echo $frm_addr3; ?>.value = addr3;
|
||||
|
||||
if( jibeon ){
|
||||
if(of.<?php echo $frm_jibeon; ?> !== undefined){
|
||||
of.<?php echo $frm_jibeon; ?>.value = jibeon;
|
||||
}
|
||||
}
|
||||
});
|
||||
of.<?php echo $frm_addr3; ?>.focus(); //안드로이드 4.3 기본브라우져에서 가끔 안나오는 현상이 있어서 일부러 적용
|
||||
of.<?php echo $frm_addr2; ?>.focus();
|
||||
window.close();
|
||||
}
|
||||
|
||||
$("#put_addr").click(function() {
|
||||
var zip1 = $.trim($("#frm_zip1").val());
|
||||
var zip2 = $.trim($("#frm_zip2").val());
|
||||
var addr1 = $.trim($("#frm_addr1").val());
|
||||
var addr2 = $.trim($("#frm_addr2").val());
|
||||
var addr3 = $.trim($("#frm_addr3").val());
|
||||
var jibeon = $.trim($("#frm_jibeon").val());
|
||||
|
||||
if(zip1.length < 1) {
|
||||
alert("우편번호 앞자리를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(zip2.length < 1) {
|
||||
alert("우편번호 뒷자리를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(addr1.length < 1) {
|
||||
alert("기본주소를 입력해 주십시오.");
|
||||
return false;
|
||||
}
|
||||
|
||||
put_data2(zip1, zip2, addr1, addr2, addr3, jibeon);
|
||||
});
|
||||
var el_id = document.getElementById('daum_juso_wrap');
|
||||
new daum.Postcode({
|
||||
oncomplete: function(data) {
|
||||
var address1 = data.address1,
|
||||
address2 = "";
|
||||
if(data.addressType == "R"){ //도로명이면
|
||||
address2 = data.address2;
|
||||
}
|
||||
put_data2(data.postcode1, data.postcode2, address1, '', address2, data.addressType);
|
||||
},
|
||||
width : '100%',
|
||||
height : '100%'
|
||||
}).embed(el_id);
|
||||
});
|
||||
|
||||
function put_data(zip1, zip2, addr1, addr3, jibeon)
|
||||
{
|
||||
var of = window.opener.document.<?php echo $frm_name; ?>;
|
||||
|
||||
of.<?php echo $frm_zip1; ?>.value = zip1;
|
||||
of.<?php echo $frm_zip2; ?>.value = zip2;
|
||||
of.<?php echo $frm_addr1; ?>.value = addr1;
|
||||
of.<?php echo $frm_addr2; ?>.value = "";
|
||||
of.<?php echo $frm_addr3; ?>.value = addr3;
|
||||
|
||||
window.opener.$("#<?php echo $frm_jibeon; ?>").text("지번주소 : "+jibeon);
|
||||
|
||||
if(of.<?php echo $frm_jibeon; ?> !== undefined)
|
||||
of.<?php echo $frm_jibeon; ?>.value = jibeon;
|
||||
|
||||
of.<?php echo $frm_addr2; ?>.focus();
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
function put_data2(zip1, zip2, addr1, addr2, addr3, jibeon)
|
||||
{
|
||||
var of = window.opener.document.<?php echo $frm_name; ?>;
|
||||
|
||||
of.<?php echo $frm_zip1; ?>.value = zip1;
|
||||
of.<?php echo $frm_zip2; ?>.value = zip2;
|
||||
of.<?php echo $frm_addr1; ?>.value = addr1;
|
||||
of.<?php echo $frm_addr2; ?>.value = addr2;
|
||||
of.<?php echo $frm_addr3; ?>.value = addr3;
|
||||
|
||||
window.opener.$("#<?php echo $frm_jibeon; ?>").text("지번주소 : "+jibeon);
|
||||
if(of.<?php echo $frm_jibeon; ?> !== undefined)
|
||||
of.<?php echo $frm_jibeon; ?>.value = jibeon;
|
||||
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
<!-- } 우편번호 찾기 끝 -->
|
||||
</script>
|
||||
Reference in New Issue
Block a user