다음 주소 API 적용 및 기타 수정

This commit is contained in:
chicpro
2014-08-19 14:52:47 +09:00
parent 43fae4ed50
commit 59468d1312
18 changed files with 200 additions and 463 deletions

View File

@ -28,16 +28,19 @@ if (!$mb['mb_id'])
else if (is_admin($mb['mb_id']))
alert('관리자 아이디는 접근 불가합니다.');
// 난수
srand(time());
// 임시비밀번호
$change_password = rand(100000, 999999);
$mb_lost_certify = sql_password($change_password);
$mb_datetime = sql_password($mb['mb_datetime']);
$sql = " update {$g5['member_table']} set mb_lost_certify = '$mb_lost_certify' where mb_id = '{$mb['mb_id']}' ";
// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$mb_nonce = bin2hex(pack('V*', rand(), rand(), rand(), rand()));
// 임시비밀번호와 난수를 mb_lost_certify 필드에 저장
$sql = " update {$g5['member_table']} set mb_lost_certify = '$mb_nonce $mb_lost_certify' where mb_id = '{$mb['mb_id']}' ";
sql_query($sql);
$href = G5_BBS_URL.'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_datetime='.$mb_datetime.'&mb_lost_certify='.$mb_lost_certify;
// 인증 링크 생성
$href = G5_BBS_URL.'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_nonce='.$mb_nonce;
$subject = "[".$config['cf_title']."] 요청하신 회원정보 찾기 안내 메일입니다.";
@ -69,4 +72,4 @@ $content .= '</div>';
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb['mb_email'], $subject, $content, 1);
alert_close($email.' 메일로 회원아이디와 비밀번호를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.');
?>
?>