initial
This commit is contained in:
@@ -0,0 +1,297 @@
|
||||
var LoginFindpw_idChecked = 0;
|
||||
var LoginFindpw_pidChecked = 0;
|
||||
var LoginFindpw_emailChecked = 0;
|
||||
var LoginFindpw_emailVerified = 0;
|
||||
|
||||
function LoginFindpw_Import() {
|
||||
}
|
||||
|
||||
function LoginFindpw_Init() {
|
||||
$(".LoginFindpw_back").click(LoginFindpw_Back);
|
||||
$("#LoginFindpw_000601").click(LoginFindpw_CheckId);
|
||||
$("#LoginFindpw_001402").click(LoginFindpw_CheckPid);
|
||||
$("#LoginFindpw_002001").click(LoginFindpw_CheckEmail);
|
||||
$("#LoginFindpw_002300").click(LoginFindpw_SendCode);
|
||||
$("#LoginFindpw_002302").click(LoginFindpw_VerifyCode);
|
||||
|
||||
$("#LoginFindpw_000600").keydown(LoginFindpw_InvalidateId);
|
||||
$("#LoginFindpw_001400").keydown(LoginFindpw_InvalidatePid);
|
||||
$("#LoginFindpw_001401").keydown(LoginFindpw_InvalidatePid);
|
||||
$("#LoginFindpw_002000").keydown(LoginFindpw_InvalidateEmail);
|
||||
|
||||
$("#LoginFindpw_002800").click(function() { LoginFindpw_Findpw(); });
|
||||
$("#LoginFindpw_002900").click(function() { LoginFindpw_Update(); });
|
||||
}
|
||||
|
||||
function LoginFindpw_Update() {
|
||||
LoginFindpw_UpdateRegisteredCount();
|
||||
|
||||
$("#LoginFindpw_000600").val("");
|
||||
$("#LoginFindpw_001400").val("");
|
||||
$("#LoginFindpw_001401").val("");
|
||||
$("#LoginFindpw_002000").val("");
|
||||
$("#LoginFindpw_002301").val("");
|
||||
|
||||
LoginFindpw_InvalidateId();
|
||||
LoginFindpw_InvalidatePid();
|
||||
LoginFindpw_InvalidateEmail();
|
||||
LoginFindpw_InvalidateCode();
|
||||
|
||||
$("#LoginFindpw_000600").focus();
|
||||
}
|
||||
|
||||
function LoginFindpw_UpdateRegisteredCount() {
|
||||
GetJSON(
|
||||
HOME+I+LOGIN+W+FINDPW+W+GET, { },
|
||||
function(response, textStatus) {
|
||||
if(response.result == "SUCCESS") {
|
||||
$("#LoginFindpw_000100").text(response.registeredCount);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function LoginFindpw_Back() {
|
||||
$("#LoginFindpw_00").hide();
|
||||
|
||||
$("#Login_00").show();
|
||||
Login_Update();
|
||||
}
|
||||
|
||||
function LoginFindpw_InvalidateId() {
|
||||
LoginFindpw_EnableCheckId();
|
||||
}
|
||||
|
||||
function LoginFindpw_InvalidatePid() {
|
||||
LoginFindpw_EnableCheckPid();
|
||||
}
|
||||
|
||||
function LoginFindpw_InvalidateEmail() {
|
||||
LoginFindpw_EnableCheckEmail();
|
||||
LoginFindpw_InvalidateCode();
|
||||
}
|
||||
|
||||
function LoginFindpw_InvalidateCode() {
|
||||
LoginFindpw_DisableSendCode(0);
|
||||
LoginFindpw_DisableVerifyCode(0);
|
||||
LoginFindpw_emailVerified = 0;
|
||||
}
|
||||
|
||||
function LoginFindpw_CheckId() {
|
||||
LoginFindpw_Check(0);
|
||||
}
|
||||
|
||||
function LoginFindpw_CheckPid() {
|
||||
LoginFindpw_Check(1);
|
||||
}
|
||||
|
||||
function LoginFindpw_CheckEmail() {
|
||||
LoginFindpw_Check(2);
|
||||
}
|
||||
|
||||
function LoginFindpw_SendCode() {
|
||||
var email = $("#LoginFindpw_002000").val();
|
||||
|
||||
Popup_Wait(function() {
|
||||
PostJSON(
|
||||
HOME+I+LOGIN+W+FINDPW+W+"sendCode"+POST, {
|
||||
email: email
|
||||
},
|
||||
function(response, textStatus) {
|
||||
Popup_WaitShow(response.msg, function() {
|
||||
if(response.result == "SUCCESS") {
|
||||
LoginFindpw_DisableSendCode(1);
|
||||
LoginFindpw_EnableVerifyCode();
|
||||
$("#LoginFindpw_002301").val("");
|
||||
$("#LoginFindpw_002301").focus();
|
||||
} else {
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
function LoginFindpw_VerifyCode() {
|
||||
var email = $("#LoginFindpw_002000").val();
|
||||
var code = $("#LoginFindpw_002301").val();
|
||||
|
||||
if(code.length < 6) {
|
||||
Popup_Alert("인증코드는 6자리입니다!", function() {
|
||||
$("#LoginFindpw_002301").val("");
|
||||
$("#LoginFindpw_002301").focus();
|
||||
});
|
||||
return false;
|
||||
} else if(code.length == 6) {
|
||||
Popup_Wait(function() {
|
||||
PostJSON(
|
||||
HOME+I+LOGIN+W+FINDPW+W+"verifyCode"+POST, {
|
||||
email: email,
|
||||
code: code
|
||||
},
|
||||
function(response, textStatus) {
|
||||
Popup_WaitShow(response.msg, function() {
|
||||
if(response.result == "SUCCESS") {
|
||||
LoginFindpw_DisableVerifyCode(1);
|
||||
LoginFindpw_emailVerified = 1;
|
||||
} else {
|
||||
$("#LoginFindpw_002301").val("");
|
||||
$("#LoginFindpw_002301").focus();
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function LoginFindpw_Check(type) {
|
||||
var id = $("#LoginFindpw_000600").val();
|
||||
var pid1 = $("#LoginFindpw_001400").val();
|
||||
var pid2 = $("#LoginFindpw_001401").val();
|
||||
var email = $("#LoginFindpw_002000").val();
|
||||
|
||||
Popup_Wait(function() {
|
||||
PostJSON(
|
||||
HOME+I+LOGIN+W+FINDPW+W+"check"+POST, {
|
||||
type: type,
|
||||
id: id,
|
||||
pid1: pid1,
|
||||
pid2: pid2,
|
||||
email: email
|
||||
},
|
||||
function(response, textStatus) {
|
||||
Popup_WaitShow(response.msg, function() {
|
||||
if(response.result == "SUCCESS") {
|
||||
switch(response.type) {
|
||||
case "0":
|
||||
LoginFindpw_DisableCheckId();
|
||||
break;
|
||||
case "1":
|
||||
LoginFindpw_DisableCheckPid();
|
||||
break;
|
||||
case "2":
|
||||
LoginFindpw_DisableCheckEmail();
|
||||
LoginFindpw_EnableSendCode();
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
function LoginFindpw_Findpw() {
|
||||
if(LoginFindpw_FindpwTest() == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
var id = $("#LoginFindpw_000600").val();
|
||||
var pid1 = $("#LoginFindpw_001400").val();
|
||||
var pid2 = $("#LoginFindpw_001401").val();
|
||||
var email = $("#LoginFindpw_002000").val();
|
||||
|
||||
Popup_Wait(function() {
|
||||
PostJSON(
|
||||
HOME+I+LOGIN+W+FINDPW+W+POST, {
|
||||
id: id,
|
||||
pid1: pid1,
|
||||
pid2: pid2,
|
||||
name: name,
|
||||
email: email
|
||||
},
|
||||
function(response, textStatus) {
|
||||
Popup_WaitShow(response.msg, function() {
|
||||
if(response.result == "SUCCESS") {
|
||||
LoginFindpw_Back();
|
||||
} else {
|
||||
LoginFindpw_Update();
|
||||
}
|
||||
});
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
function LoginFindpw_FindpwTest() {
|
||||
if(LoginFindpw_idChecked + LoginFindpw_pidChecked + LoginFindpw_emailChecked + LoginFindpw_emailVerified < 4) {
|
||||
Popup_Alert("4가지 확인을 해주세요!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function LoginFindpw_EnableCheckId() {
|
||||
LoginFindpw_idChecked = 0;
|
||||
$("#LoginFindpw_000601").val("아이디 존재 확인");
|
||||
$("#LoginFindpw_000601").removeAttr("disabled");
|
||||
$("#LoginFindpw_000601").css("color", "white");
|
||||
}
|
||||
|
||||
function LoginFindpw_DisableCheckId() {
|
||||
LoginFindpw_idChecked = 1;
|
||||
$("#LoginFindpw_000601").val("확인 완료");
|
||||
$("#LoginFindpw_000601").attr("disabled", true);
|
||||
$("#LoginFindpw_000601").css("color", "gray");
|
||||
}
|
||||
|
||||
function LoginFindpw_EnableCheckPid() {
|
||||
LoginFindpw_pidChecked = 0;
|
||||
$("#LoginFindpw_001402").val("생년월일 존재 확인");
|
||||
$("#LoginFindpw_001402").removeAttr("disabled");
|
||||
$("#LoginFindpw_001402").css("color", "white");
|
||||
}
|
||||
|
||||
function LoginFindpw_DisableCheckPid() {
|
||||
LoginFindpw_pidChecked = 1;
|
||||
$("#LoginFindpw_001402").val("확인 완료");
|
||||
$("#LoginFindpw_001402").attr("disabled", true);
|
||||
$("#LoginFindpw_001402").css("color", "gray");
|
||||
}
|
||||
|
||||
function LoginFindpw_EnableCheckEmail() {
|
||||
LoginFindpw_emailChecked = 0;
|
||||
$("#LoginFindpw_002001").val("이메일 존재 확인");
|
||||
$("#LoginFindpw_002001").removeAttr("disabled");
|
||||
$("#LoginFindpw_002001").css("color", "white");
|
||||
}
|
||||
|
||||
function LoginFindpw_DisableCheckEmail() {
|
||||
LoginFindpw_emailChecked = 1;
|
||||
$("#LoginFindpw_002001").val("확인 완료");
|
||||
$("#LoginFindpw_002001").attr("disabled", true);
|
||||
$("#LoginFindpw_002001").css("color", "gray");
|
||||
}
|
||||
|
||||
function LoginFindpw_EnableSendCode() {
|
||||
$("#LoginFindpw_002300").val("인증번호 전송");
|
||||
$("#LoginFindpw_002300").removeAttr("disabled");
|
||||
$("#LoginFindpw_002300").css("color", "white");
|
||||
}
|
||||
|
||||
function LoginFindpw_DisableSendCode(type) {
|
||||
if(type == 0) {
|
||||
$("#LoginFindpw_002300").val("인증번호 전송");
|
||||
} else {
|
||||
$("#LoginFindpw_002300").val("전송 완료");
|
||||
}
|
||||
$("#LoginFindpw_002300").attr("disabled", true);
|
||||
$("#LoginFindpw_002300").css("color", "gray");
|
||||
}
|
||||
|
||||
function LoginFindpw_EnableVerifyCode() {
|
||||
$("#LoginFindpw_002302").val("인증번호 확인");
|
||||
$("#LoginFindpw_002302").removeAttr("disabled");
|
||||
$("#LoginFindpw_002302").css("color", "white");
|
||||
}
|
||||
|
||||
function LoginFindpw_DisableVerifyCode(type) {
|
||||
if(type == 0) {
|
||||
$("#LoginFindpw_002302").val("인증번호 확인");
|
||||
} else {
|
||||
$("#LoginFindpw_002302").val("확인 완료");
|
||||
}
|
||||
$("#LoginFindpw_002302").attr("disabled", true);
|
||||
$("#LoginFindpw_002302").css("color", "gray");
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?
|
||||
require_once('_common.php');
|
||||
?>
|
||||
|
||||
<div id="LoginFindpw_00" class="bg0">
|
||||
<div id="LoginFindpw_0000" class="font4">비 번 찾 기 <input class="LoginFindpw_back" type="button" value="돌아가기"></div>
|
||||
<div id="LoginFindpw_0001">전체 회원 수 : <font id="LoginFindpw_000100">0</font>명</div>
|
||||
<div id="LoginFindpw_0002">인증 완료되면 비번이 1111로 변경됩니다.</div>
|
||||
<div id="LoginFindpw_0003" class="bg1">비번 초기화</div>
|
||||
<div id="LoginFindpw_0005">ID </div>
|
||||
<div id="LoginFindpw_0006">
|
||||
<input id="LoginFindpw_000600" type="text" maxlength=12>
|
||||
<input id="LoginFindpw_000601" type="button" value="아이디 존재 확인">
|
||||
</div>
|
||||
<div id="LoginFindpw_0013">생년월일-성별 </div>
|
||||
<div id="LoginFindpw_0014">
|
||||
<input id="LoginFindpw_001400" type="text" maxlength=6>
|
||||
<input id="LoginFindpw_001401" type="text" maxlength=1>
|
||||
<input id="LoginFindpw_001402" type="button" value="생년월잉 확인">
|
||||
</div>
|
||||
<div id="LoginFindpw_0018">
|
||||
인증을 위한 이메일 주소를 입력해주세요.<br>
|
||||
<font class="LoginFindpw_notice">가입시 입력했던 인증메일을 수신할 주소입니다.</font><br>
|
||||
<font class="LoginFindpw_alert">메일인증을 하지 않으면 비번변경이 불가능합니다.</font>
|
||||
</div>
|
||||
<div id="LoginFindpw_0019">이메일 </div>
|
||||
<div id="LoginFindpw_0020">
|
||||
<input id="LoginFindpw_002000" type="text" maxlength=64>
|
||||
<input id="LoginFindpw_002001" type="button" value="이메일 중복 확인">(64글자 이내)
|
||||
</div>
|
||||
<div id="LoginFindpw_0021">
|
||||
인증을 위한 인증번호를 입력해주세요.<br>
|
||||
<font class="LoginFindpw_notice">인증번호전송을 누르고 메일을 확인하세요.</font><br>
|
||||
<font class="LoginFindpw_alert">번호를 확인하여 입력후 인증확인을 누르세요.</font>
|
||||
</div>
|
||||
<div id="LoginFindpw_0022">이메일 인증 </div>
|
||||
<div id="LoginFindpw_0023">
|
||||
<input id="LoginFindpw_002300" type="button" value="인증번호 전송">
|
||||
<input id="LoginFindpw_002301" type="text" maxlength=6>
|
||||
<input id="LoginFindpw_002302" type="button" value="인증번호 확인">
|
||||
</div>
|
||||
<div id="LoginFindpw_0028"><input id="LoginFindpw_002800" type="button" value="비번초기화"></div>
|
||||
<div id="LoginFindpw_0029"><input id="LoginFindpw_002900" type="button" value="다시 입력"></div>
|
||||
<div id="LoginFindpw_0030"><input class="LoginFindpw_back" type="button" value="돌아가기"></div>
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
|
||||
|
||||
$rs = $DB->Select('COUNT(*) AS CNT', 'MEMBER');
|
||||
|
||||
$registeredCount = $DB->Get($rs);
|
||||
$response['registeredCount'] = $registeredCount['CNT'];
|
||||
$response['result'] = 'SUCCESS';
|
||||
|
||||
sleep(1);
|
||||
echo json_encode($response);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,123 @@
|
||||
<?
|
||||
// 외부 파라미터
|
||||
// $_POST['id'] : ID
|
||||
// $_POST['pid1'] : 주민번호
|
||||
// $_POST['pid2'] : 주민번호
|
||||
// $_POST['email'] : 이메일
|
||||
$id = $_POST['id'];
|
||||
$pid1 = $_POST['pid1'];
|
||||
$pid2 = $_POST['pid2'];
|
||||
$pid = $_POST['pid1'].'-'.substr($_POST['pid2'],0,1).'-'.md5($_POST['pid2']);
|
||||
$email = $_POST['email'];
|
||||
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Time.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._String.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Validation.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
$err = _Validation::CheckID($id);
|
||||
if($err == 2) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '영어 소문자와 숫자만 입력 가능합니다!';
|
||||
} elseif($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '4~12글자로 입력해주세요.';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('ID', 'MEMBER', "ID='{$id}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '없는 아이디입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
|
||||
if($response['result'] != 'SUCCESS') {
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
$err = _Validation::CheckPID($pid1, $pid2);
|
||||
if($err == 3) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '잘못된 주민번호 입니다!';
|
||||
} elseif($err == 2) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '숫자가 아닙니다!';
|
||||
} elseif($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '입력이 충분치 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('PID', 'MEMBER', "ID='{$id}' AND PID='{$pid}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '아이디에 맞지 않는 주민번호입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
|
||||
if($response['result'] != 'SUCCESS') {
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
$err = _Validation::CheckEmail($email);
|
||||
if($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '이메일이 올바르지 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('EMAIL', 'MEMBER', "ID='{$id}' AND EMAIL='{$email}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '아이디에 맞지 않는 이메일입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
|
||||
if($response['result'] != 'SUCCESS') {
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
$rs = $DB->Select('VERIFIED', 'EMAIL', "EMAIL='{$email}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count != 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = $email.' 에 대한 인증정보가 없습니다! 운영자에게 문의해보세요!';
|
||||
} else {
|
||||
$res = $DB->Get($rs);
|
||||
if($res['VERIFIED'] == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = $email.' 에 대한 인증이 되지 않았습니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
|
||||
if($response['result'] != 'SUCCESS') {
|
||||
echo json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// 비밀번호 변경
|
||||
$pw = md5('11111111');
|
||||
$DB->Update('MEMBER', "PW='{$pw}'", "ID='{$id}'");
|
||||
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = "정상적으로 비번이 변경되었습니다. ID: {$id}";
|
||||
|
||||
sleep(1);
|
||||
echo json_encode($response);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,178 @@
|
||||
@charset "utf-8";
|
||||
|
||||
#LoginFindpw_00 {
|
||||
width: 800px; height: 851px;
|
||||
position: absolute; top: 0px; left: 50%;
|
||||
margin-left: -400px; /* DIV박스 크기의 1/2로 마진을 잡아줍니다. */
|
||||
display: none;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#LoginFindpw_0000 {
|
||||
width: 800px; height: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.LoginFindpw_back {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
#LoginFindpw_0001 {
|
||||
width: 800px; height: 15px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0002 {
|
||||
width: 800px; height: 30px;
|
||||
float: left;
|
||||
color: red; font-size: 20px; font-weight: bold;
|
||||
}
|
||||
|
||||
#LoginFindpw_0003 {
|
||||
width: 800px; height: 25px;
|
||||
float: left;
|
||||
font-size: 20px; font-weight: bold;
|
||||
}
|
||||
|
||||
#LoginFindpw_0005 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#LoginFindpw_0006 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_000600 {
|
||||
width: 100px; height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_000601 {
|
||||
width: 120px; height: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0013 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#LoginFindpw_0014 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_001400 {
|
||||
width: 100px; height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_001401 {
|
||||
width: 20px; height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_001402 {
|
||||
width: 120px; height: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0018 {
|
||||
width: 800px; height: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0019 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#LoginFindpw_0020 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002000 {
|
||||
width: 100px; height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002001 {
|
||||
width: 120px; height: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0021 {
|
||||
width: 800px; height: 50px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0022 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#LoginFindpw_0023 {
|
||||
width: 398px; height: 20px;
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002300 {
|
||||
width: 100px; height: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002301 {
|
||||
width: 50px; height: 16px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002302 {
|
||||
width: 100px; height: 20px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_0028 {
|
||||
width: 398px; height: 30px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002800 {
|
||||
width: 120px; height: 30px;
|
||||
}
|
||||
|
||||
#LoginFindpw_0029 {
|
||||
width: 398px; height: 30px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#LoginFindpw_002900 {
|
||||
width: 120px; height: 30px;
|
||||
}
|
||||
|
||||
#LoginFindpw_0030 {
|
||||
width: 800px; height: 30px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.LoginFindpw_notice {
|
||||
color: cyan;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.LoginFindpw_alert {
|
||||
color: red;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?
|
||||
define(ROOT, '../..');
|
||||
require_once(ROOT.'/f_config/config.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.APP.PHP);
|
||||
require_once(ROOT.W.F_FUNC.W.FUNC.PHP);
|
||||
|
||||
CustomHeader();
|
||||
?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?
|
||||
// 외부 파라미터
|
||||
// $_POST['type'] : 0: ID체크, 1: 주민번호 체크, 2: 이메일 체크
|
||||
// $_POST['id'] : ID
|
||||
// $_POST['pid1'] : 주민번호
|
||||
// $_POST['pid2'] : 주민번호
|
||||
// $_POST['email'] : 이메일
|
||||
$type = $_POST['type'];
|
||||
$id = $_POST['id'];
|
||||
$pid1 = $_POST['pid1'];
|
||||
$pid2 = $_POST['pid2'];
|
||||
$pid = $_POST['pid1'].'-'.substr($_POST['pid2'],0,1).'-'.md5($_POST['pid2']);
|
||||
$email = $_POST['email'];
|
||||
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._String.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Validation.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
|
||||
|
||||
$response['type'] = $type;
|
||||
|
||||
if($type == 0) {
|
||||
$err = _Validation::CheckID($id);
|
||||
if($err == 2) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '영어 소문자와 숫자만 입력 가능합니다!';
|
||||
} elseif($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '4~12글자로 입력해주세요.';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('ID', 'MEMBER', "ID='{$id}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = '존재하는 아이디입니다. ^^';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '없는 아이디입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
} elseif($type == 1) {
|
||||
$err = _Validation::CheckPID($pid1, $pid2);
|
||||
if($err == 3) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '잘못된 주민번호 입니다!';
|
||||
} elseif($err == 2) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '숫자가 아닙니다!';
|
||||
} elseif($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '입력이 충분치 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('PID', 'MEMBER', "ID='{$id}' AND PID='{$pid}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = '맞는 주민번호입니다. ^^';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '아이디에 맞지 않는 주민번호입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
} elseif($type == 2) {
|
||||
$err = _Validation::CheckEmail($email);
|
||||
if($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '이메일이 올바르지 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('EMAIL', 'MEMBER', "ID='{$id}' AND EMAIL='{$email}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count == 1) {
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = '맞는 이메일입니다. ^^';
|
||||
} else {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '아이디에 맞지 않는 이메일입니다! 운영자에게 문의해보세요!';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
echo json_encode($response);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?
|
||||
// 외부 파라미터
|
||||
// $_POST['email'] : 이메일
|
||||
$email = $_POST['email'];
|
||||
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._String.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Validation.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Time.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
|
||||
require_once(ROOT.W.F_CONFIG.W.'MAIL'.PHP);
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
|
||||
$err = _Validation::CheckEmail($email);
|
||||
if($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '이메일이 올바르지 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$code = _String::Fill2(rand()%1000000, 6);
|
||||
|
||||
$res = $MAIL->Send($email, 'Auth code from 62che.com', "인증번호: {$code}");
|
||||
|
||||
if($res['result'] != 0) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '이메일전송이 실패: '.$res['msg'];
|
||||
} else {
|
||||
$rs = $DB->Select('EMAIL', 'EMAIL', "EMAIL='{$email}'");
|
||||
$count = $DB->Count($rs);
|
||||
if($count > 0) {
|
||||
$DB->Delete('EMAIL', "EMAIL='{$email}'");
|
||||
}
|
||||
$DB->InsertArray('EMAIL', array(
|
||||
EMAIL => $email,
|
||||
CODE => $code,
|
||||
VERIFIED=> 0,
|
||||
REG_DATE=> _Time::DatetimeNow()
|
||||
));
|
||||
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = $email.'로 인증번호가 전송되었습니다. 이메일을 확인하세요.';
|
||||
}
|
||||
}
|
||||
|
||||
//sleep(1);
|
||||
echo json_encode($response);
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?
|
||||
// 외부 파라미터
|
||||
// $_POST['email'] : 이메일
|
||||
// $_POST['code'] : 인증번호
|
||||
$email = $_POST['email'];
|
||||
$code = $_POST['code'];
|
||||
|
||||
require_once('_common.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Validation.php');
|
||||
require_once(ROOT.W.F_FUNC.W.'class._Time.php');
|
||||
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
|
||||
|
||||
$response['result'] = 'FAIL';
|
||||
|
||||
$err = _Validation::CheckEmail($email);
|
||||
if($err == 1) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '이메일이 올바르지 않습니다!';
|
||||
} elseif($err == 0) {
|
||||
$rs = $DB->Select('CODE', 'EMAIL', "EMAIL='{$email}'");
|
||||
$count = $DB->Count($rs);
|
||||
|
||||
if($count == 0) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '인증번호 전송 내역이 없습니다.';
|
||||
} elseif($count == 1) {
|
||||
$result = $DB->Get($rs);
|
||||
|
||||
if($result['CODE'] != $code) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '인증번호가 일치하지 않습니다.';
|
||||
} else {
|
||||
$DB->UpdateArray('EMAIL', array(
|
||||
VERIFIED=> 1,
|
||||
VRF_DATE=> _Time::DatetimeNow()
|
||||
), "EMAIL='{$email}'");
|
||||
|
||||
$response['result'] = 'SUCCESS';
|
||||
$response['msg'] = '인증번호가 확인되었습니다.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
echo json_encode($response);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user