77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<%
|
|
response.expires = 0
|
|
dim Query
|
|
dim neakeun_name
|
|
dim neakeun_jumin
|
|
dim neakeun_id
|
|
dim err_msg
|
|
dim cnt
|
|
dim url
|
|
Dim permanent_position
|
|
|
|
neakeun_name = Request.Form("txtid")
|
|
neakeun_jumin = Request.Form("txtPassword")
|
|
|
|
permanent_position = false
|
|
|
|
'------------------------------------------------------------------------------------------------------------------------
|
|
'일단 정직원으로 로그인을 해보고
|
|
query = " select (CASE WHEN isnull(jumin_old,'') <> '' THEN left(isnull(jumin_old,''),6) "
|
|
query = query & " ELSE SUBSTRING( replace(birthday,'-',''),3,6) "
|
|
query = query & " END ) AS id "
|
|
query = query & " , * from person with(nolock) where p_pass_new = '" & neakeun_jumin & "' "
|
|
query = query & " and p_name = '" & neakeun_name & "' "
|
|
query = query & " and p_resign = 0 "
|
|
adoRs.Open query, adoconn, adopenstatic, adlockreadonly
|
|
|
|
cnt = adoRs.recordcount
|
|
If cnt > 0 Then
|
|
permanent_position = true
|
|
neakeun_jumin = adoRs("id")
|
|
End if
|
|
adoRs.close
|
|
'------------------------------------------------------------------------------------------------------------------------
|
|
' cnt = 0
|
|
|
|
if cnt <> 1 then '없으면 면접원(내근직원으로 로그인)
|
|
'주민등록번호로 로그인 하던 부분을 생년월일로 수정~!!!
|
|
neakeun_jumin = Request.Form("txtPassword") & "0000000"
|
|
|
|
query = "select * from man where "
|
|
query = query & " m_name = '" & neakeun_name & "' "
|
|
query = query & " and left(m_jumin, 6) = '" & mid(neakeun_jumin,1,6) & "' "
|
|
query = query & " and m_activity='활동' "
|
|
|
|
adoRs.Open query, adoconn, adopenstatic, adlockreadonly
|
|
cnt = adoRs.recordcount
|
|
|
|
if adoRs.recordcount > 0 then
|
|
neakeun_id = adoRs("id")
|
|
end if
|
|
|
|
adoRs.close
|
|
end If
|
|
|
|
|
|
if cnt <> 1 then
|
|
Response.Clear
|
|
Response.Write "<script>"
|
|
Response.Write " alert('내근직 이름과 주민번호가 틀리거나, 비활동 내근직 입니다.'); "
|
|
Response.Write " location.href = './neakeun_login.asp'; "
|
|
Response.Write "</script>"
|
|
else'
|
|
Session("Login_Check") = "OK"
|
|
Session("neakeun_loginuser") = neakeun_name '사용자이름
|
|
Session("neakeun_jumin") = neakeun_jumin '사용자 주민번호
|
|
|
|
If permanent_position Then
|
|
url="input_time_2014.asp?permanent_position=" & permanent_position
|
|
Else
|
|
url="input_time_2014.asp?neakeun_name=" & escape(neakeun_name) & "&neakeun_jumin=" & neakeun_jumin &"&neakeun_id=" & neakeun_id
|
|
End if
|
|
|
|
Response.Redirect url
|
|
End If
|
|
|
|
%> |