KCP 본인확인 모바일 관련 수정
This commit is contained in:
@ -13,16 +13,41 @@ function certify_win_open(type, url)
|
||||
}
|
||||
else if(type == 'kcp-hp')
|
||||
{
|
||||
var return_gubun;
|
||||
var width = 410;
|
||||
var height = 500;
|
||||
if($("input[name=veri_up_hash]").size() < 1)
|
||||
$("input[name=cert_no]").after('<input type="hidden" name="veri_up_hash" value="">');
|
||||
|
||||
var leftpos = screen.width / 2 - ( width / 2 );
|
||||
var toppos = screen.height / 2 - ( height / 2 );
|
||||
if( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 )
|
||||
{
|
||||
var $frm = $(event.target.form);
|
||||
if($("#kcp_cert").size() < 1) {
|
||||
$frm.wrap('<div id="cert_info"></div>');
|
||||
|
||||
var winopts = "width=" + width + ", height=" + height + ", toolbar=no,status=no,statusbar=no,menubar=no,scrollbars=no,resizable=no";
|
||||
var position = ",left=" + leftpos + ", top=" + toppos;
|
||||
var AUTH_POP = window.open(url,'auth_popup', winopts + position);
|
||||
$("#cert_info").append('<form name="form_temp" method="post">')
|
||||
.after('<iframe id="kcp_cert" name="kcp_cert" width="100%" height="700" frameborder="0" scrolling="no" style="display:none"></iframe>');
|
||||
}
|
||||
|
||||
var temp_form = document.form_temp;
|
||||
temp_form.target = "kcp_cert";
|
||||
temp_form.action = url;
|
||||
|
||||
document.getElementById( "cert_info" ).style.display = "none";
|
||||
document.getElementById( "kcp_cert" ).style.display = "";
|
||||
|
||||
temp_form.submit();
|
||||
}
|
||||
else
|
||||
{
|
||||
var return_gubun;
|
||||
var width = 410;
|
||||
var height = 500;
|
||||
|
||||
var leftpos = screen.width / 2 - ( width / 2 );
|
||||
var toppos = screen.height / 2 - ( height / 2 );
|
||||
|
||||
var winopts = "width=" + width + ", height=" + height + ", toolbar=no,status=no,statusbar=no,menubar=no,scrollbars=no,resizable=no";
|
||||
var position = ",left=" + leftpos + ", top=" + toppos;
|
||||
var AUTH_POP = window.open(url,'auth_popup', winopts + position);
|
||||
}
|
||||
}
|
||||
else if(type == 'lg-hp')
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<div class="mbskin">
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script>
|
||||
<?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js?v=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form name="fregisterform" id="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
@ -122,7 +122,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_hp']) { ?>
|
||||
<?php if ($config['cf_use_hp'] || $config['cf_cert_hp']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
|
||||
@ -41,7 +41,17 @@ $up_hash = $ct_cert->make_hash_data( $home_dir, $hash_data );
|
||||
$ct_cert->mf_clear();
|
||||
?>
|
||||
|
||||
<form name="form_auth" method="post" target="auth_popup" action="<?php echo $cert_url ?>">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<?php if(is_mobile()) { ?>
|
||||
<meta name="viewport" content="user-scalable=yes, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, target-densitydpi=medium-dpi" >
|
||||
<?php } ?>
|
||||
</head>
|
||||
|
||||
<body oncontextmenu="return false;" ondragstart="return false;" onselectstart="return false;">
|
||||
<form name="form_auth" method="post" action="<?php echo $cert_url ?>">
|
||||
<!-- 유저네임 -->
|
||||
<input type="hidden" name="user_name" value="" />
|
||||
<!-- 주문번호 -->
|
||||
@ -67,6 +77,11 @@ $ct_cert->mf_clear();
|
||||
<!-- cert_enc_use 필수 (고정값 : 메뉴얼 참고) -->
|
||||
<input type="hidden" name="cert_enc_use" value="Y"/>
|
||||
|
||||
<?php if(is_mobile()) { ?>
|
||||
<!-- cert_able_yn input 비활성화 설정 -->
|
||||
<input type="hidden" name="cert_able_yn" value=""/>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="res_cd" value=""/>
|
||||
<input type="hidden" name="res_msg" value=""/>
|
||||
|
||||
@ -82,5 +97,53 @@ $ct_cert->mf_clear();
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.form_auth.submit();
|
||||
</script>
|
||||
window.onload = function() {
|
||||
cert_page();
|
||||
}
|
||||
|
||||
// 인증 요청 시 호출 함수
|
||||
function cert_page()
|
||||
{
|
||||
var frm = document.form_auth;
|
||||
|
||||
if ( ( frm.req_tx.value == "auth" || frm.req_tx.value == "otp_auth" ) )
|
||||
{
|
||||
frm.action="./kcpcert_result.php";
|
||||
|
||||
// MOBILE
|
||||
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) )
|
||||
{
|
||||
self.name="kcp_cert";
|
||||
}
|
||||
// PC
|
||||
else
|
||||
{
|
||||
frm.target="kcp_cert";
|
||||
}
|
||||
|
||||
frm.submit();
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
else if ( frm.req_tx.value == "cert" )
|
||||
{
|
||||
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) ) // 스마트폰인 경우
|
||||
{
|
||||
window.parent.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드
|
||||
self.name="auth_popup";
|
||||
}
|
||||
else // 스마트폰 아닐때
|
||||
{
|
||||
window.opener.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드
|
||||
frm.target = "auth_popup";
|
||||
}
|
||||
|
||||
frm.action="<?php echo $cert_url; ?>";
|
||||
frm.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -180,9 +180,26 @@ else if( $cert_enc_use != "Y" )
|
||||
$ct_cert->mf_clear();
|
||||
?>
|
||||
|
||||
<form name="form_auth" method="post">
|
||||
<?php echo $sbParam; ?>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
var $opener = window.opener;
|
||||
var $opener;
|
||||
var is_mobile = false;
|
||||
|
||||
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) ) { // 스마트폰인 경우
|
||||
$opener = window.parent;
|
||||
is_mobile = true;
|
||||
} else {
|
||||
$opener = window.opener;
|
||||
}
|
||||
|
||||
// up_hash 검증
|
||||
if( document.form_auth.up_hash.value != $opener.$("input[name=veri_up_hash]").val() ) {
|
||||
alert("up_hash 변조 위험있음");
|
||||
}
|
||||
|
||||
// 인증정보
|
||||
$opener.$("input[name=cert_type]").val("<?php echo $cert_type; ?>");
|
||||
@ -190,7 +207,13 @@ $(function() {
|
||||
$opener.$("input[name=mb_hp]").val("<?php echo $phone_no; ?>").attr("readonly", true);
|
||||
$opener.$("input[name=cert_no]").val("<?php echo $md5_cert_no; ?>");
|
||||
|
||||
if(is_mobile) {
|
||||
$opener.$("#cert_info").css("display", "");
|
||||
$opener.$("#kcp_cert" ).css("display", "none");
|
||||
}
|
||||
|
||||
alert("본인의 휴대폰번호로 확인 되었습니다.");
|
||||
|
||||
window.close();
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script>
|
||||
<?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js?v=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form id="fregisterform" name="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
|
||||
@ -8,7 +8,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<div class="mbskin">
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script>
|
||||
<?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js?v=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form name="fregisterform" id="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
@ -122,7 +122,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config['cf_use_hp']) { ?>
|
||||
<?php if ($config['cf_use_hp'] || $config['cf_cert_hp']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">휴대폰번호<?php if ($config['cf_req_hp']) { ?><strong class="sound_only">필수</strong><?php } ?></label></th>
|
||||
<td>
|
||||
|
||||
@ -10,7 +10,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
|
||||
<script src="<?php echo G5_JS_URL ?>/jquery.register_form.js"></script>
|
||||
<?php if($config['cf_cert_use'] && ($config['cf_cert_ipin'] || $config['cf_cert_hp'])) { ?>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js"></script>
|
||||
<script src="<?php echo G5_JS_URL ?>/certify.js?v=<?php echo G5_JS_VER; ?>"></script>
|
||||
<?php } ?>
|
||||
|
||||
<form id="fregisterform" name="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
|
||||
Reference in New Issue
Block a user