비밀번호 찾기에 오류가 나서 문의드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
비밀번호 찾기에 오류가 나서 문의드립니다.

QA

비밀번호 찾기에 오류가 나서 문의드립니다.

본문

안녕하세요? 좋은 아침입니다.

bbs/password_lost.php에서 이메일을 입력하고 비밀번호 찾기를 하면 새창(bbs/password_lost2.php)이 뜨고  "웹 사이트에서 페이지를 표시할 수 없습니다."가 출력됩니다.

bbs/password_lost2.php 파일은 아래와 같이 분명 존재하고 파일권한도 이상이 없는데 왜 웹 사이트에서 페이지를 표시할 수 없다고 하는지 알수가 없습니다.


bbs/password_lost.php

​<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');

if ($is_member) {
    alert("You are already signed in.");
}

$g5['title'] = 'Find Member Information';
include_once(G5_PATH.'/head.sub.php');

$action_url = G5_HTTPS_BBS_URL."/password_lost2.php";
include_once($member_skin_path.'/password_lost.skin.php');

include_once(G5_PATH.'/tail.sub.php');
?>

-----bbs/password_lost.2php---------------------

<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');

if ($is_member) {
    alert('You are already signed in.');
}

if (!chk_captcha()) {
    alert('Prevent auto enrollment The number is incorrect.');
}

$email = trim($_POST['mb_email']);

if (!$email)
    alert_close('Email address error.');

$sql = " select count(*) as cnt from {$g5['member_table']} where mb_email = '$email' ";
$row = sql_fetch($sql);
if ($row['cnt'] > 1)
    alert('More than one email address exists.\\n\\nPlease contact the administrator.');

$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g5['member_table']} where mb_email = '$email' ";
$mb = sql_fetch($sql);
if (!$mb['mb_id'])
    alert('It does not exist.');
else if (is_admin($mb['mb_id']))
    alert('The administrator ID is inaccessible.');

// 임시비밀번호 발급
$change_password = rand(100000, 999999);
$mb_lost_certify = get_encrypt_string($change_password);

// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$mb_nonce = md5(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_nonce='.$mb_nonce;

$subject = "[".$config['cf_title']."] It is a guide to finding the member information you requested.";

$content = "";

$content .= '<div style="margin:30px auto;width:600px;border:10px solid #f7f7f7">';
$content .= '<div style="border:1px solid #dedede">';
$content .= '<h1 style="padding:30px 30px 0;background:#f7f7f7;color:#555;font-size:1.4em">';
$content .= 'Find Member Information';
$content .= '</h1>';
$content .= '<span style="display:block;padding:10px 30px 30px;background:#f7f7f7;text-align:right">';
$content .= '<a href="'.G5_URL.'" target="_blank">'.$config['cf_title'].'</a>';
$content .= '</span>';
$content .= '<p style="margin:20px 0 0;padding:30px 30px 30px;border-bottom:1px solid #eee;line-height:1.7em">';
$content .= addslashes($mb['mb_name'])." (".addslashes($mb['mb_nick']).")"." You requested your membership information ".G5_TIME_YMDHIS<br>";
$content .= 'Since our site does not know your password even if you are an administrator, we will generate a new password instead of letting you know your password.<br>';
$content .= 'Please check the password to be changed below, <span style="color:#ff3061"><strong>Change Password</strong> Click the link.</span><br>';
$content .= 'When the authentication message that the password has been changed is displayed, enter the member ID and the changed password on the homepage and log in.<br>';
$content .= 'After logging in, please change to the new password in the Edit Information menu.';
$content .= '</p>';
$content .= '<p style="margin:0;padding:30px 30px 30px;border-bottom:1px solid #eee;line-height:1.7em">';
$content .= '<span style="display:inline-block;width:100px">Member ID</span> '.$mb['mb_id'].'<br>';
$content .= '<span style="display:inline-block;width:100px">Password to be changed</span> <strong style="color:#ff3061">'.$change_password.'</strong>';
$content .= '</p>';
$content .= '<a href="'.$href.'" target="_blank" style="display:block;padding:30px 0;background:#484848;color:#fff;text-decoration:none;text-align:center">Change Password</a>';
$content .= '</div>';
$content .= '</div>';

mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb['mb_email'], $subject, $content, 1);

alert_close($email.' We have sent you an email to verify your username and password.\\n\\nPlease check your e-mail.');
?>
 

이 질문에 댓글 쓰기 :

답변 1

password_lost2.php을


아래와 같이 해보세요 ~


​
<?php
include_once('./_common.php');
include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
if ($is_member) {
    alert('You are already signed in.');
}
if (!chk_captcha()) {
    alert('Prevent auto enrollment The number is incorrect.');
}
$email = trim($_POST['mb_email']);
if (!$email)
    alert_close('Email address error.');
$sql = " select count(*) as cnt from {$g5['member_table']} where mb_email = '$email' ";
$row = sql_fetch($sql);
if ($row['cnt'] > 1)
    alert('More than one email address exists.\\n\\nPlease contact the administrator.');
$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g5['member_table']} where mb_email = '$email' ";
$mb = sql_fetch($sql);
if (!$mb['mb_id'])
    alert('It does not exist.');
else if (is_admin($mb['mb_id']))
    alert('The administrator ID is inaccessible.');
// 임시비밀번호 발급
$change_password = rand(100000, 999999);
$mb_lost_certify = get_encrypt_string($change_password);
// 어떠한 회원정보도 포함되지 않은 일회용 난수를 생성하여 인증에 사용
$mb_nonce = md5(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_nonce='.$mb_nonce;
$subject = "[".$config['cf_title']."] It is a guide to finding the member information you requested.";
$content = "";
$content .= '<div style="margin:30px auto;width:600px;border:10px solid #f7f7f7">';
$content .= '<div style="border:1px solid #dedede">';
$content .= '<h1 style="padding:30px 30px 0;background:#f7f7f7;color:#555;font-size:1.4em">';
$content .= 'Find Member Information';
$content .= '</h1>';
$content .= '<span style="display:block;padding:10px 30px 30px;background:#f7f7f7;text-align:right">';
$content .= '<a href="'.G5_URL.'" target="_blank">'.$config['cf_title'].'</a>';
$content .= '</span>';
$content .= '<p style="margin:20px 0 0;padding:30px 30px 30px;border-bottom:1px solid #eee;line-height:1.7em">';
$content .= addslashes($mb['mb_name'])." (".addslashes($mb['mb_nick']).")"." You requested your membership information '".G5_TIME_YMDHIS."'<br>";
$content .= 'Since our site does not know your password even if you are an administrator, we will generate a new password instead of letting you know your password.<br>';
$content .= 'Please check the password to be changed below, <span style="color:#ff3061"><strong>Change Password</strong> Click the link.</span><br>';
$content .= 'When the authentication message that the password has been changed is displayed, enter the member ID and the changed password on the homepage and log in.<br>';
$content .= 'After logging in, please change to the new password in the Edit Information menu.';
$content .= '</p>';
$content .= '<p style="margin:0;padding:30px 30px 30px;border-bottom:1px solid #eee;line-height:1.7em">';
$content .= '<span style="display:inline-block;width:100px">Member ID</span> '.$mb['mb_id'].'<br>';
$content .= '<span style="display:inline-block;width:100px">Password to be changed</span> <strong style="color:#ff3061">'.$change_password.'</strong>';
$content .= '</p>';
$content .= '<a href="'.$href.'" target="_blank" style="display:block;padding:30px 0;background:#484848;color:#fff;text-decoration:none;text-align:center">Change Password</a>';
$content .= '</div>';
$content .= '</div>';
mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb['mb_email'], $subject, $content, 1);
alert_close($email.' We have sent you an email to verify your username and password.\\n\\nPlease check your e-mail.');
?>
답변을 작성하시기 전에 로그인 해주세요.
전체 0
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT