#490 인증메일주소를 변경할수 있도록 수정
This commit is contained in:
@ -3,6 +3,16 @@ include_once('./_common.php');
|
||||
include_once(G4_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
var conf = "<?php echo strip_tags($msg); ?>";
|
||||
if (confirm(conf)) {
|
||||
document.location.replace("<?php echo $url1; ?>");
|
||||
} else {
|
||||
document.location.replace("<?php echo $url2; ?>");
|
||||
}
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<article id="confirm_check">
|
||||
<header>
|
||||
<hgroup>
|
||||
@ -18,6 +28,7 @@ include_once(G4_PATH.'/head.sub.php');
|
||||
<a href="<?php echo $url2; ?>">취소</a><br><br>
|
||||
<a href="<?php echo $url3; ?>">돌아가기</a>
|
||||
</article>
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
include_once(G4_PATH.'/tail.sub.php');
|
||||
|
||||
@ -13,7 +13,7 @@ if ($mb_md5)
|
||||
{
|
||||
sql_query(" update {$g4['member_table']} set mb_email_certify = '".G4_TIME_YMDHIS."' where mb_id = '{$mb_id}' ");
|
||||
|
||||
alert('E-mail 인증 처리를 완료 하였습니다.', G4_URL);
|
||||
alert("메일인증 처리를 완료 하였습니다.\\n\\n지금부터 {$mb_id} 아이디로 로그인 가능합니다.", G4_URL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,8 +30,9 @@ if ($mb['mb_leave_date'] && $mb['mb_leave_date'] <= date("Ymd", G4_SERVER_TIME))
|
||||
alert('탈퇴한 아이디이므로 접근하실 수 없습니다.\n탈퇴일 : '.$date);
|
||||
}
|
||||
|
||||
if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_certify']))
|
||||
alert('메일인증을 받으셔야 로그인 하실 수 있습니다.\\n회원님의 메일주소는 '.$mb['mb_email'].' 입니다.');
|
||||
if ($config['cf_use_email_certify'] && !preg_match("/[1-9]/", $mb['mb_email_certify'])) {
|
||||
confirm("{$mb['mb_email']} 메일로 메일인증을 받으셔야 로그인 가능합니다. 다른 메일주소로 인증하시려면 취소를 클릭하시기 바랍니다.", G4_URL, G4_BBS_URL.'/register_email.php?mb_id='.$mb_id);
|
||||
}
|
||||
|
||||
@include_once($member_skin_path.'/login_check.skin.php');
|
||||
|
||||
|
||||
45
bbs/register_email.php
Normal file
45
bbs/register_email.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
|
||||
$sql = " select mb_email, mb_datetime, mb_email_certify from {$g4['member_table']} where mb_id = '{$mb_id}' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if (substr($mb['mb_email_certify'],0,1)!=0) {
|
||||
alert("이미 메일인증 하신 회원입니다.", G4_URL);
|
||||
}
|
||||
|
||||
$g4['title'] = '메일인증 메일주소 변경';
|
||||
include_once('./_head.php');
|
||||
?>
|
||||
|
||||
<p>메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p>
|
||||
|
||||
<form method="post" name="fregister_email" onsubmit="return fregister_email_submit(this);">
|
||||
<input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>">
|
||||
<table class="frm_tbl">
|
||||
<caption>사이트 이용정보 입력</caption>
|
||||
<tr>
|
||||
<th scope="row"><label for="reg_mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="mb_email" id="reg_mb_email" required class="frm_input email required" size="50" maxlength="100" value="<?php echo $mb['mb_email']; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td><?php echo captcha_html(); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" id="btn_submit" class="btn_submit" value="인증메일변경">
|
||||
<a href="<?php echo G4_URL ?>" class="btn_cancel">취소</a>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fregister_email_submit(f)
|
||||
{
|
||||
<?php echo chk_captcha_js(); ?>
|
||||
|
||||
f.action = "<?php echo G4_HTTPS_BBS_URL.'/register_email_update.php'; ?>";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
include_once('./_tail.php');
|
||||
?>
|
||||
44
bbs/register_email_update.php
Normal file
44
bbs/register_email_update.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
include_once(G4_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$mb_id = escape_trim($_POST['mb_id']);
|
||||
$mb_email = escape_trim($_POST['mb_email']);
|
||||
|
||||
$sql = " select mb_datetime from {$g4['member_table']} where mb_id = '{$mb_id}' and mb_email_certify <> '' ";
|
||||
$mb = sql_fetch($sql);
|
||||
if (!$mb) {
|
||||
alert("이미 메일인증 하신 회원입니다.", G4_URL);
|
||||
}
|
||||
|
||||
if (!chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
$sql = " select count(*) as cnt from {$g4['member_table']} where mb_id <> '{$mb_id}' and mb_email = '$mb_email' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['cnt']) {
|
||||
alert("{$mb_email} 메일은 이미 존재하는 메일주소 입니다.\\n\\n다른 메일주소를 입력해 주십시오.");
|
||||
}
|
||||
|
||||
// 인증메일 발송
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
|
||||
$mb_datetime = $mb['mb_datetime'] ? $mb['mb_datetime'] : G4_TIME_YMDHIS;
|
||||
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
|
||||
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
||||
|
||||
ob_start();
|
||||
include_once ('./register_form_update_mail3.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$admin = get_admin('super');
|
||||
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
|
||||
|
||||
$sql = " update {$g4['member_table']} set mb_email = '$mb_email' where mb_id = '$mb_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
alert("인증메일을 {$mb_email} 메일로 다시 보내 드렸습니다.\\n\\n{$mb_email} 메일을 확인하여 주십시오.", G4_URL);
|
||||
?>
|
||||
@ -321,21 +321,23 @@ if ($w == '') {
|
||||
{$sql_hp_certify}
|
||||
where mb_id = '$mb_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
// 인증메일 발송
|
||||
if ($old_email != $mb_email && $config['cf_use_email_certify']) {
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
|
||||
$mb_md5 = md5($mb_id.$mb_email.$member['mb_datetime']);
|
||||
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
||||
// 인증메일 발송
|
||||
if ($config['cf_use_email_certify'] && $old_email != $mb_email) {
|
||||
$subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
|
||||
|
||||
ob_start();
|
||||
include_once ('./register_form_update_mail3.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$mb_datetime = $member['mb_datetime'] ? $member['mb_datetime'] : G4_TIME_YMDHIS;
|
||||
$mb_md5 = md5($mb_id.$mb_email.$mb_datetime);
|
||||
$certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
|
||||
|
||||
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
|
||||
}
|
||||
ob_start();
|
||||
include_once ('./register_form_update_mail3.php');
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user