휴대폰사용여부에 관계없이 휴대폰인증 체크하도록 수정
This commit is contained in:
@ -87,21 +87,17 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($config['cf_use_hp']) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_hp">핸드폰번호<? if ($config['cf_req_hp']) {?><strong class="sound_only">필수</strong><?}?></label></th>
|
||||
<th scope="row"><label for="reg_mb_hp">핸드폰번호<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="hidden" name="kcpcert_no" value="">
|
||||
<input type="hidden" name="kcpcert_time" value="<?=$member['mb_hp_certify']?>">
|
||||
<input type="hidden" name="old_mb_hp" value="<?=$member['mb_hp']?>">
|
||||
<input type="text" id="reg_mb_hp" name="mb_hp" class="frm_input <?=$config['cf_req_hp']?"required":"";?>" maxlength="20" <?=$config['cf_req_hp']?"required":"";?> value="<?=$member['mb_hp']?>">
|
||||
<? if($config['cf_req_hp']) { ?>
|
||||
<input type="text" id="reg_mb_hp" name="mb_hp" class="frm_input required" maxlength="20" required value="<?=$member['mb_hp']?>">
|
||||
<button type="button" id="win_kcpcert">휴대폰인증</button>
|
||||
<noscript>휴대폰인증을 위해서는 자바스크립트 사용이 가능해야합니다.</noscript>
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
<? if ($config['cf_use_addr']) {
|
||||
$zip_href = G4_BBS_URL.'/zip.php?frm_name=fregisterform&frm_zip1=mb_zip1&frm_zip2=mb_zip2&frm_addr1=mb_addr1&frm_addr2=mb_addr2';
|
||||
@ -306,10 +302,9 @@ function fregisterform_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<? if ($config['cf_use_hp'] && $config['cf_req_hp']) { ?>
|
||||
// 휴대폰인증 검사
|
||||
if(f.kcpcert_time.value == "") {
|
||||
alert("휴대폰인증을 해주세요.");
|
||||
alert("휴대폰 본인인증을 해주세요.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -322,12 +317,11 @@ function fregisterform_submit(f)
|
||||
if(old_hp != mb_hp) {
|
||||
if(f.kcpcert_no.value == "") {
|
||||
f.kcpcert_time.value = "";
|
||||
alert("휴대폰번호가 변경됐습니다. 휴대폰인증을 해주세요.");
|
||||
alert("휴대폰번호가 변경됐습니다. 휴대폰 본인인증을 해주세요.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
<? } ?>
|
||||
|
||||
if (typeof f.mb_icon != 'undefined') {
|
||||
if (f.mb_icon.value) {
|
||||
|
||||
@ -6,35 +6,33 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
/* ======================================================================================================= */
|
||||
/* = 휴대폰인증 = */
|
||||
/* ======================================================================================================= */
|
||||
if($config['cf_use_hp'] && $config['cf_req_hp']) {
|
||||
if($w == '') {
|
||||
if($w == '') {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = trim($_POST['kcpcert_no']);
|
||||
if(!$kcpcert_no)
|
||||
alert('휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.', "", true, true);
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_hp = preg_replace("/[^0-9]/", "", $mb_hp);
|
||||
$reg_hash = md5($reg_hp.$mb_name.$kcpcert_no);
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
alert('휴대폰인증 정보가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.', "", true, true);
|
||||
} else if($w == 'u') {
|
||||
// 휴대폰번호 변경체크
|
||||
$patt = "/[^0-9]/";
|
||||
$old_hp = preg_replace($patt, "", $_POST['old_mb_hp']);
|
||||
$reg_hp = preg_replace($patt, "", $mb_hp);
|
||||
|
||||
if($old_hp != $reg_hp) {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = trim($_POST['kcpcert_no']);
|
||||
if(!$kcpcert_no)
|
||||
alert('휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.', "", true, true);
|
||||
alert('휴대폰번호가 변경됐습니다. 휴대폰인증을 해주세요.', "", true, true);
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_hp = preg_replace("/[^0-9]/", "", $mb_hp);
|
||||
$reg_hash = md5($reg_hp.$mb_name.$kcpcert_no);
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
alert('휴대폰인증 정보가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.', "", true, true);
|
||||
} else if($w == 'u') {
|
||||
// 휴대폰번호 변경체크
|
||||
$patt = "/[^0-9]/";
|
||||
$old_hp = preg_replace($patt, "", $_POST['old_mb_hp']);
|
||||
$reg_hp = preg_replace($patt, "", $mb_hp);
|
||||
|
||||
if($old_hp != $reg_hp) {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = trim($_POST['kcpcert_no']);
|
||||
if(!$kcpcert_no)
|
||||
alert('휴대폰번호가 변경됐습니다. 휴대폰인증을 해주세요.', "", true, true);
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_hash = md5($reg_hp.$mb_name.$kcpcert_no);
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
alert('휴대폰인증 정보가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.', "", true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ======================================================================================================= */
|
||||
|
||||
@ -6,7 +6,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
/* =========================================================================== */
|
||||
/* = 휴대폰인증 = */
|
||||
/* =========================================================================== */
|
||||
if($config['cf_use_hp'] && $config['cf_req_hp'] && $_POST['kcpcert_no']) {
|
||||
if($_POST['kcpcert_no']) {
|
||||
// 휴대폰인증 시간기록
|
||||
$sql = " update {$g4['member_table']}
|
||||
set mb_hp_certify = '{$_POST['kcpcert_time']}'
|
||||
|
||||
Reference in New Issue
Block a user