260422_05_ENH: 로그인 시 최초 1회만 휴대전화 인증을 하도록 수정
This commit is contained in:
@@ -18,33 +18,33 @@ case "login"
|
|||||||
Dim r_id : r_id = Request("r_id")
|
Dim r_id : r_id = Request("r_id")
|
||||||
Dim r_pw : r_pw = Request("r_pw")
|
Dim r_pw : r_pw = Request("r_pw")
|
||||||
|
|
||||||
|
Session("name") = ""
|
||||||
|
Session("phone") = ""
|
||||||
|
Session("r_phone") = ""
|
||||||
|
Session("position") = ""
|
||||||
|
|
||||||
DBConnect()
|
DBConnect()
|
||||||
|
|
||||||
SQL = ""
|
SQL = ""
|
||||||
SQL = SQL&" select r_name, dbo.base64_decode(r_phone) phone, r_phone, r_position, "&VbCrlf
|
SQL = SQL&" select r_name, dbo.base64_decode(r_phone) phone, r_phone, r_position, Flag, chk as mobile_check "&VbCrlf
|
||||||
SQL = SQL&" Flag from exitpoll.dbo.R_info "&VbCrlf
|
SQL = SQL&" from exitpoll.dbo.R_info "&VbCrlf
|
||||||
SQL = SQL&" where r_name = '"&r_id&"' and dbo.base64_decode(r_pass) = '"&r_pw&"' "&VbCrlf
|
SQL = SQL&" where r_name = '"&r_id&"' and dbo.base64_decode(r_pass) = '"&r_pw&"' "&VbCrlf
|
||||||
|
|
||||||
Objdb.Open SQL,DBConn,3,1,1
|
Objdb.Open SQL,DBConn,3,1,1
|
||||||
if not Objdb.eof Then
|
if not Objdb.eof Then
|
||||||
If objdb("Flag") = "1" Then
|
IF objdb("mobile_check") = "0" Then
|
||||||
|
Response.write "NotMobileCheck"
|
||||||
|
|
||||||
|
ElseIf objdb("Flag") = "1" Then
|
||||||
Session("name") = objdb("r_name")
|
Session("name") = objdb("r_name")
|
||||||
Session("phone") = objdb("phone")
|
Session("phone") = objdb("phone")
|
||||||
Session("r_phone") = objdb("r_phone")
|
Session("r_phone") = objdb("r_phone")
|
||||||
Session("position") = objdb("r_position")
|
Session("position") = objdb("r_position")
|
||||||
Response.Write "True"
|
Response.Write "True"
|
||||||
Else
|
Else
|
||||||
Session("name") = ""
|
|
||||||
Session("phone") = ""
|
|
||||||
Session("r_phone") = ""
|
|
||||||
Session("position") = ""
|
|
||||||
Response.write "X"
|
Response.write "X"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Session("name") = ""
|
|
||||||
Session("phone") = ""
|
|
||||||
Session("r_phone") = ""
|
|
||||||
Session("position") = ""
|
|
||||||
Response.Write "False"
|
Response.Write "False"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -158,23 +158,23 @@
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res === "nouser") {
|
if (res === "nouser") {
|
||||||
alert("<22><EFBFBD><DEB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.\n<>ٽ<EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
alert("<22><EFBFBD><DEB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.\n<>ٽ<EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||||
window.open("about:blank", "_self").close();
|
|
||||||
} else if (res === "complete") {
|
} else if (res === "complete") {
|
||||||
|
/*
|
||||||
if (window.opener && !window.opener.closed) {
|
if (window.opener && !window.opener.closed) {
|
||||||
window.opener.document.getElementById("mobileVerified").value = "Y";
|
window.opener.document.getElementById("mobileVerified").value = "Y";
|
||||||
window.opener.document.getElementById("LoginOk").disabled = false;
|
window.opener.document.getElementById("LoginOk").disabled = false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϸ<EFBFBD><CFB7>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||||
window.open("about:blank", "_self").close();
|
$("#LoginOk", opener.document).click();
|
||||||
} else {
|
} else {
|
||||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||||
window.open("about:blank", "_self").close();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
alert("System Error\n<><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>");
|
||||||
window.open("about:blank", "_self").close();
|
|
||||||
}
|
}
|
||||||
|
//window.open("about:blank", "_self").close();
|
||||||
});
|
});
|
||||||
<% Else %>
|
<% Else %>
|
||||||
// source<63><65> signup <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
// source<63><65> signup <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
|||||||
@@ -45,11 +45,11 @@
|
|||||||
<label>비밀번호</label>
|
<label>비밀번호</label>
|
||||||
<input type="password" class="form-control" name="r_pw" id="r_pw" value="" inputmode="text" placeholder="핸드폰번호(11자리)">
|
<input type="password" class="form-control" name="r_pw" id="r_pw" value="" inputmode="text" placeholder="핸드폰번호(11자리)">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="display:none">
|
||||||
<label>모바일 인증</label>
|
<label>모바일 인증</label>
|
||||||
<button type="button" class="form-control btn btn-warning" name="mobile_chk" id="mobile_chk">휴대폰 본인인증</button>
|
<button type="button" class="form-control btn btn-warning" name="mobile_chk" id="mobile_chk">휴대폰 본인인증</button>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="mobileVerified" value="N">
|
<!--<input type="hidden" id="mobileVerified" value="N">-->
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-warning" id="LoginOk">로그인</button>
|
<button type="button" class="btn btn-warning" id="LoginOk">로그인</button>
|
||||||
|
|||||||
@@ -27,9 +27,10 @@
|
|||||||
$("#LoginOk").on("click",function(){
|
$("#LoginOk").on("click",function(){
|
||||||
var r_id = $("#r_id").val();
|
var r_id = $("#r_id").val();
|
||||||
var r_pw = $("#r_pw").val();
|
var r_pw = $("#r_pw").val();
|
||||||
const verified = document.getElementById("mobileVerified").value;
|
//const verified = document.getElementById("mobileVerified").value;
|
||||||
|
|
||||||
if (r_id == "" || r_pw == "" || verified !== "Y"){
|
//if (r_id == "" || r_pw == "" || verified !== "Y"){
|
||||||
|
if (r_id == "" || r_pw == ""){
|
||||||
if (r_id == ""){
|
if (r_id == ""){
|
||||||
alert("[이름]을 입력하여 주십시오.");
|
alert("[이름]을 입력하여 주십시오.");
|
||||||
return false;
|
return false;
|
||||||
@@ -38,10 +39,12 @@
|
|||||||
alert("[핸드폰 번호]를 입력하여 주십시오.");
|
alert("[핸드폰 번호]를 입력하여 주십시오.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (verified !== "Y") {
|
if (verified !== "Y") {
|
||||||
alert("[휴대폰 본인인증]을 먼저 완료해주세요.");
|
alert("[휴대폰 본인인증]을 먼저 완료해주세요.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"../Ajax/AjaxSelect.asp",
|
url:"../Ajax/AjaxSelect.asp",
|
||||||
@@ -51,10 +54,12 @@
|
|||||||
if(res == "False"){
|
if(res == "False"){
|
||||||
alert("등록된 정보가 없습니다.");
|
alert("등록된 정보가 없습니다.");
|
||||||
return false
|
return false
|
||||||
|
} else if(res == "NotMobileCheck") {
|
||||||
|
alert("휴대폰 본인인증이 되지 않은 지원자 입니다.\n본인인증을 진행합니다.");
|
||||||
|
$("#mobile_chk").click();
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if(res == "ban"){
|
if(res == "X"){
|
||||||
|
|
||||||
}else if(res == "X"){
|
|
||||||
alert("현재 대상자 아님으로 변경되었습니다.\n지원 해주셔서 감사합니다.");
|
alert("현재 대상자 아님으로 변경되었습니다.\n지원 해주셔서 감사합니다.");
|
||||||
}else{
|
}else{
|
||||||
alert("안녕하세요? :)");
|
alert("안녕하세요? :)");
|
||||||
|
|||||||
Reference in New Issue
Block a user