휴대폰번호 중복체크 코드 추가
This commit is contained in:
@ -3,6 +3,25 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 자신만의 코드를 넣어주세요.
|
||||
|
||||
// 핸드폰번호 중복체크
|
||||
$reg_hp = preg_replace("/[^0-9]/", "", $mb_hp);
|
||||
if(!$reg_hp)
|
||||
alert('핸드폰번호를 입력해 주세요.', "", true, true);
|
||||
|
||||
$hp_len = strlen($reg_hp);
|
||||
|
||||
if($hp_len == 10)
|
||||
$reg_mb_hp = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "\\1-\\2-\\3", $reg_hp);
|
||||
else if($hp_len == 11)
|
||||
$reg_mb_hp = preg_replace("/([0-9]{3})([0-9]{4})([0-9]{4})/", "\\1-\\2-\\3", $reg_hp);
|
||||
else
|
||||
alert('핸드폰번호가 올바르지 않습니다.', "", true, true);
|
||||
|
||||
$sql2 = " select count(*) as cnt from {$g4['member_table']} where mb_hp = '$reg_mb_hp' and mb_id <> '$mb_id' ";
|
||||
$row2 = sql_fetch($sql2);
|
||||
if($row2['cnt'])
|
||||
alert('입력하신 핸드폰번호는 다른 회원님이 사용 중입니다.', "", true, true);
|
||||
|
||||
/* ======================================================================================================= */
|
||||
/* = 휴대폰인증 및 성인인증 = */
|
||||
/* ======================================================================================================= */
|
||||
@ -13,7 +32,6 @@ if($w == '') {
|
||||
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);
|
||||
@ -25,9 +43,7 @@ if($w == '') {
|
||||
}
|
||||
} else if($w == 'u') {
|
||||
// 휴대폰번호 변경체크
|
||||
$patt = "/[^0-9]/";
|
||||
$old_hp = preg_replace($patt, "", $_POST['old_mb_hp']);
|
||||
$reg_hp = preg_replace($patt, "", $mb_hp);
|
||||
$old_hp = preg_replace("/[^0-9]/", "", $_POST['old_mb_hp']);
|
||||
|
||||
if($old_hp != $reg_hp) {
|
||||
// 본인인증체크
|
||||
|
||||
Reference in New Issue
Block a user