Merge branch 'g4s'
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$w = trim($_POST['w']);
|
||||
$reg_hp = preg_replace("/[^0-9]/", "", trim($_POST['mb_hp'])); // 숫자외에 문자는 제거
|
||||
$old_hp = preg_replace("/[^0-9]/", "", trim($_POST['old_mb_hp']));
|
||||
|
||||
if ($w!='' && $w!='u') die("{\"error\":\"w 작업구분 오류\"}");
|
||||
|
||||
if ($w=='' || ($w=='u' && $reg_hp != $old_hp)) {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = get_session('ss_kcpcert_no');
|
||||
if(!$kcpcert_no)
|
||||
die("{\"error\":\"휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.\"}");
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_name = trim($_POST['mb_name']);
|
||||
$reg_hash = md5($reg_hp.$reg_name.$kcpcert_no);
|
||||
$ss_hash = get_session('ss_kcpcert_hash');
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
die("{\"error\":\"이름 또는 휴대폰번호가 올바르지 않습니다.\\n\\n정상적인 방법으로 이용해 주세요.\"}");
|
||||
}
|
||||
|
||||
die("{\"error\":\"\"}"); // 정상
|
||||
?>
|
||||
@ -1,41 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 휴대폰번호 체크
|
||||
if ($msg = valid_mb_hp($mb_hp)) alert($msg, "", true, true);
|
||||
if ($msg = exist_mb_hp($mb_hp, $mb_id)) alert($msg, "", true, true);
|
||||
|
||||
$reg_mb_hp = preg_replace("/[^0-9]/", "", trim($_POST['mb_hp']));
|
||||
|
||||
/* ======================================================================================================= */
|
||||
/* = 휴대폰인증 및 성인인증 = */
|
||||
/* ======================================================================================================= */
|
||||
if($w == '') {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = get_session('ss_kcpcert_no');
|
||||
if(!$kcpcert_no)
|
||||
alert('휴대폰인증이 되지 않았습니다. 휴대폰인증을 해주세요.', '', true, true);
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_hash = md5($reg_mb_hp.$mb_name.$kcpcert_no);
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
alert('이름 또는 휴대폰번호가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.', '', true, true);
|
||||
|
||||
} else if($w == 'u') {
|
||||
// 휴대폰번호 변경체크
|
||||
$old_hp = preg_replace("/[^0-9]/", "", trim($_POST['old_mb_hp']));
|
||||
|
||||
if($old_hp !== $reg_mb_hp) {
|
||||
// 본인인증체크
|
||||
$kcpcert_no = get_session('ss_kcpcert_no');
|
||||
if(!$kcpcert_no)
|
||||
alert('휴대폰번호가 변경됐습니다. 휴대폰인증을 해주세요.', '', true, true);
|
||||
|
||||
// 본인인증 hash 체크
|
||||
$reg_hash = md5($reg_mb_hp.$mb_name.$kcpcert_no);
|
||||
if(get_session('ss_kcpcert_hash') != $reg_hash)
|
||||
alert('이름 또는 휴대폰인증 정보가 올바르지 않습니다. 정상적인 방법으로 이용해 주세요.', '', true, true);
|
||||
}
|
||||
}
|
||||
/* ======================================================================================================= */
|
||||
?>
|
||||
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 휴대폰번호 포맷(010-0000-0000) 변경해서 기록
|
||||
// $reg_mb_hp 는 rigister_form_update.head.skin.php 파일
|
||||
$sql = " update {$g4['member_table']} set mb_hp = '$reg_mb_hp' where mb_id = '$mb_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
/* =========================================================================== */
|
||||
/* = 휴대폰인증 및 성인인증 = */
|
||||
/* =========================================================================== */
|
||||
if(get_session('ss_kcpcert_no')) {
|
||||
$sql = " update {$g4['member_table']}
|
||||
set mb_hp_certify = '".get_session('ss_hp_certify')."',
|
||||
mb_adult = '".get_session('ss_adult')."'
|
||||
where mb_id = '$mb_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
/* =========================================================================== */
|
||||
?>
|
||||
@ -52,7 +52,7 @@ if(!$ordr_idxx)
|
||||
function auth_type_check(user_name)
|
||||
{
|
||||
var auth_form = document.form_auth;
|
||||
auth_form.user_name.value = encodeURIComponent(user_name);
|
||||
//auth_form.user_name.value = encodeURIComponent(user_name);
|
||||
|
||||
if( auth_form.ordr_idxx.value == "" )
|
||||
{
|
||||
|
||||
@ -3,8 +3,6 @@ include_once('./kcpcert_config.php');
|
||||
|
||||
set_session('ss_kcpcert_no', '');
|
||||
set_session('ss_kcpcert_hash', '');
|
||||
set_session('ss_hp_certify', '');
|
||||
set_session('ss_adult', '');
|
||||
|
||||
$site_cd = "";
|
||||
$ordr_idxx = "";
|
||||
@ -130,22 +128,28 @@ if( $cert_enc_use == "Y" )
|
||||
$dec_res_cd = $ct_cert->mf_get_key_value("res_cd" ); // 암호화된 결과코드
|
||||
$dec_mes_msg = $ct_cert->mf_get_key_value("res_msg" ); // 암호화된 결과메시지
|
||||
|
||||
|
||||
// 정상인증인지 체크
|
||||
if(!$phone_no)
|
||||
alert_close("정상적인 인증이 아닙니다. 올바른 방법으로 이용해 주세요.");
|
||||
|
||||
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_id <> '{$member['mb_id']}' and mb_hp = '{$phone_no}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt']) {
|
||||
alert_close("이미 가입되어 있는 휴대폰번호 입니다.");
|
||||
}
|
||||
|
||||
// hash 데이터
|
||||
$md5_cert_no = md5($cert_no);
|
||||
$hash_data = md5($phone_no.$user_name.$md5_cert_no);
|
||||
set_session("ss_kcpcert_no", $md5_cert_no);
|
||||
set_session("ss_kcpcert_hash", $hash_data);
|
||||
set_session("ss_hp_certify", "1");
|
||||
|
||||
// 성인인증결과
|
||||
$adult_day = date("Ymd", strtotime("-19 years", G4_SERVER_TIME));
|
||||
if((int)$birth_day <= (int)$adult_day)
|
||||
set_session("ss_adult", "1");
|
||||
$adult = ((int)$birth_day <= (int)$adult_day) ? 1 : 0;
|
||||
|
||||
$sql = " update {$g4['member_table']} set mb_name = '$user_name', mb_hp = '$phone_no', mb_hp_certify = 1, mb_adult = $adult where mb_id = '{$member['mb_id']}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if( $res_cd != "0000" )
|
||||
{
|
||||
@ -157,12 +161,11 @@ if( $cert_enc_use == "Y" )
|
||||
else if( $cert_enc_use != "Y" )
|
||||
{
|
||||
// 암호화 인증 안함
|
||||
alert_close("휴대폰 본인확인을 취소 하셨습니다.");
|
||||
exit;
|
||||
}
|
||||
|
||||
$ct_cert->mf_clear();
|
||||
|
||||
// 휴대폰번호 포맷변경
|
||||
$phone_no = hyphen_hp_number($phone_no);
|
||||
?>
|
||||
|
||||
<script>
|
||||
@ -170,8 +173,8 @@ $(function() {
|
||||
var $opener = window.opener;
|
||||
|
||||
// 인증정보
|
||||
$opener.$("input[name=mb_hp]").val("<?php echo $phone_no ?>");
|
||||
$opener.$("input[name=mb_name]").val("<?php echo $user_name ?>");
|
||||
$opener.$("input[name=mb_name]").val("<?php echo $user_name; ?>");
|
||||
$opener.$("input[name=mb_hp]").val("<?php echo hyphen_hp_number($phone_no); ?>").attr("readonly", true);
|
||||
alert("본인의 휴대폰번호로 확인 되었습니다.");
|
||||
window.close();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user