Files
KIN/contact/login_ok.asp
2025-09-29 17:55:08 +09:00

180 lines
5.6 KiB
Plaintext

<!-- #include file = "./lib/config.asp" -->
<%'
Response.CharSet="utf-8"
Response.codepage="65001"
Response.ContentType="text/html;charset=utf-8"
''///=============
''로그인 후
dim login_pwd
dim login_name '로그인 아이디
dim login_area '로그인 지역
dim login_type '로그인 타입(관리자, sv,면접원, 컨택원 등)
dim ani_num '발신번호
dim extension '면접원 내선번호
dim i
dim Query
dim local_ip
dim client_id '면접원 자리번호
dim Makecall_ip_chk
login_name = trim(request("login_name"))
login_pwd = trim(request("login_pwd"))
local_ip = Request.ServerVariables("remote_addr")
Makecall_ip_chk = "true"
query = "select * from login_user where login_name = '" & login_name & "' and login_pwd = '" & login_pwd & "' and prj_year = '" & prj_year & "'"
AdoRs.Open query,adoconn, 1
' response.Write query & "<br>"
if adors.recordcount > 1 or adors.recordcount = 0 then
response.Write "<SCRIPT>"
'response.Write "alert('죄송합니다. 사용 권한이 없습니다.');"
'response.Write "setInterval('window.close()',100); "
response.Write "</script>"
else
login_id = adors("id")
login_area = adors("login_area")
login_type = lcase(adors("login_type"))
adors.close
''cati db(각 자리의 자리번호 및 발번 가져오기용) - 본사 컨택원 전용
''' response.Write "local_ip : "&local_ip&"<br>"
If local_ip = "127.0.0.1" Then
local_ip = "10.10.14.53"
End if
if mid(local_ip,1,6) = "10.10." and (login_type = "컨택" or login_type = "검증원" or login_type = "관리자") then '서울 본사만 해당(web version malecall을 사용하기 위해)
ConnectString = "Provider=SQLOLEDB.1;Password=" & PWD & ";Persist Security Info=True;User ID=" & UID & ";Initial Catalog=cati;Data Source=" & SV_NAME
Set AdoConn_cati = Server.CreateObject("ADODB.Connection")
AdoConn_cati.Open ConnectString
query = "select * from client where client_ip = '" & local_ip & "'"
adors.open query, AdoConn_cati, 1
''' response.Write "query : "&query &"<br>"
if adors.recordcount = 1 Then
client_id = adors("client_id")
'ani_num = adors("external_no")
extension = adors("internal_no")
''' response.Write client_id & " // "&ani_num & " // " & extension
else
Makecall_ip_chk = "false"
end If
adors.close
query = "select * from T_external_number where useFlag='0' order by newid()"
adors.open query, AdoConn_cati, 1
if adors.recordcount > 0 Then
ani_num = adors("num") '발신번호 가져오기
else
Makecall_ip_chk = "false"
end If
adors.close
AdoConn_cati.close
set AdoConn_cati = nothing
if mid(local_ip,1,6) = "10.10." then
''sv가 컨택터 이름으로 sv컴에서 로그인하기에
Makecall_ip_chk = "true"
end if
end if
if Makecall_ip_chk = "true" then
'%>
<html>
<head>
<meta http-equiv='Content-Type' content="text/html;charset=utf-8">
<title>2013년 공공기관(준정부기관) 고객만족도 조사 - 로그인</title>
<link rel='stylesheet' type='text/css' href='<%=domain_url%>:8888/css/basic_new.css'>
<link rel='stylesheet' type='text/css' href='<%=domain_url%>:8888/css/style.css'>
<script language='javascript' src='<%=domain_url%>:8888/lib/function.js'></script>
<script LANGUAGE='javascript' id="clientEventHandlersJS">
<!--
function subit()
{
var login_type = document.login.login_type.value;
if (login_type == "컨택")
{
document.login.action = 'contac_sel.asp';
}
else if (login_type == "sv")
{
//document.login.action = 'myun_set.asp';
document.login.action = 'listView.asp';
}
else if (login_type == "응대")
{
document.login.action = 'search.asp';
}
else if (login_type == "면접원")
{
document.login.action = 'myun_my_list.asp';
}
else if (login_type == "검증원")
{
document.login.action = 'recheck_list_input.asp';
}
else if (login_type == "관리자")
{
//2번으로 보내는 이유는 1번 보다 시간이 적게 걸려서
//document.login.action = 'report_02.asp';
document.login.action = 'contac_sel.asp';
}
else
{
alert("사용자 타입 지정");
return false;
}
document.login.submit();
}
//-->
</script>
<body class='center' onLoad="subit()" oncontextmenu='return false' onselectstart='return false' ondragstart='return false' OnKeyDown='No_BackSpace();ctrlEvent();'>
<form name='login' method='post'>
<input type='hidden' value = '<%=login_id%>' name = 'login_id'>
<input type='hidden' value = '<%=login_area%>' name = 'login_area'>
<input type='hidden' value = '<%=login_type%>' name = 'login_type'>
<input type='hidden' value = '<%=login_name%>' name = 'login_name'>
<input type='hidden' value = '<%=ani_num%>' name = 'ani_num'>
<input type='hidden' value = '<%=client_id%>' name = 'client_id'>
<input type='hidden' value = '<%=extension%>' name = 'extension'>
<table border='0' cellspacing='0' cellpadding='0' >
<tr>
<td class='main' >
로그인 성공...
<%if lcase(trim(login_type)) = "admin" then%>
보고서 작업중....
<%end if%>
</td>
</tr>
</table>
</form>
</body>
</html>
<!-- #include file = './inc_bottom_script.asp'-->
<%else
response.Write "<SCRIPT>"
response.Write "alert('누구세요......');"
response.Write "setInterval('window.close()',100);"
response.Write "</script>"
end if'''if ip_chk = "true" then%>
<%end if%>