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

380 lines
14 KiB
Plaintext

<!-- #include file = "./lib/config.asp" -->
<%'
Response.CharSet="utf-8"
Response.codepage="65001"
Response.ContentType="text/html;charset=utf-8"
''///=============
''모든 사람이 검색가능하게
''단, (chasu_use_chk = 'yes')문을 이용하여 사용여부 판단...(값이 no 인것들은 컨택결과를 일괄적으로 지정을 했기에 컨택을 하면 안되기에)
dim i
dim Query
dim login_pwd
dim login_name '로그인 아이디
dim login_area '로그인 지역
dim login_type '로그인 타입(관리자, sv,면접원, 컨택원 등)
dim ani_num '발신번호
dim client_id '면접원 자리번호
dim extension '면접원 내선번호
dim categori_cnt
dim login_id
login_id = trim(request("login_id"))
login_name = trim(request("login_name"))
login_area = trim(request("login_area"))
login_type = trim(request("login_type"))
client_id = trim(request("client_id"))
extension = trim(request("extension"))
ani_num = trim(request("ani_num"))
key_id = trim(request("key_id"))
kikoan_id = trim(request("kikoan_id"))
kikoan_name = trim(request("kikoan_name"))
res_tel1 = trim(request("res_tel1"))
res_tel2 = trim(request("res_tel2"))
res_name = trim(request("res_name"))
command = request("command")
list_id = request("list_id")
query = "select a.* " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_01) as 'categori_label01' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_02) as 'categori_label02' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_03) as 'categori_label03' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_04) as 'categori_label04' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_05) as 'categori_label05' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_06) as 'categori_label06' " & _
", (select category_label from category_code where kikoan_id = 26 and category_index = 1 and category_code = a.categori_07) as 'categori_label07' " & _
", b.contac_stat_label from list as a left outer join contac_stat as b on b.kikoan_id = '" & kikoan_id & "' and a.contac_stat = b.contac_stat "
if login_type = "컨택" or login_type = "관리자" then
query = query & "where a.kikoan_name = '" & kikoan_name & "' " & _
"and a.list_id = " & list_id & " and (a.chasu_use_chk = 'yes') "
else
res_name = trim(request("res_name"))
res_tel1 = trim(request("res_tel1"))
res_tel2 = trim(request("res_tel2"))
query = query & "where "
tmp_query = ""
if res_name <> "" then
tmp_query = "name = '" & res_name & "' "
end if
if res_tel1 <> "" then
if tmp_query = "" then
tmp_query = "tel1 = '" & res_tel1 & "' "
else
tmp_query = tmp_query & " or tel1 = '" & res_tel1 & "' "
end if
end if
if res_tel2 <> "" then
if tmp_query = "" then
tmp_query = "tel2 = '" & res_tel2 & "' "
else
tmp_query = tmp_query & " or tel2 = '" & res_tel2 & "' "
end if
end if
query = query & tmp_query
end if
' response.write query
' response.write "<br/>" & kikoan_id & ".."
adors.open query, adoconn, 1
'%>
<html>
<head>
<meta http-equiv='Content-Type'content='text/html; charset=utf-8'>
<title>KRC - 컨택</title>
<link rel='stylesheet' type='text/css' href='<%=domain_url%>/capi/css/basic_new.css'>
<script language='javascript' src='<%=domain_url%>/capi/js/common.js'></script>
</head>
<body topmargin=0 leftmargin=10 bgcolor = '#f8f8f8' oncontextmenu='return false' onselectstart='return false' ondragstart='return false' OnKeyDown='No_BackSpace();ctrlEvent();'>
<form method=post name='frm_main'>
<input type='hidden' value = '<%=kikoan_id%>' name='kikoan_id'/>
<input type='hidden' value = '<%=kikoan_name%>' name='kikoan_name'/>
<table width=100% height=100% cellpadding='0' cellspacing='0' border='0' >
<tr>
<td height='3' bgcolor='#dadada'>
<%if Request.ServerVariables("remote_addr") = "10.10.17.52" or Request.ServerVariables("remote_addr") = "1.235.195.52" then%>
(search_ok.asp)
<%end if%>
</td>
</tr>
<tr>
<td valign='top'>
<table width=50% cellpadding='0' cellspacing='0' border='1'>
<tr height=30>
<input type='hidden' value = '<%=login_id%>' name = 'login_id'>
<td align='center'>로그인 아이디</td>
<td align='center'>
<input type='text' readonly name='login_name' value='<%=login_name%>'> <!-- '로그인 아이디 -->
</td>
<td align='center'>로그인 유형</td>
<td align='center'>
<input type='text' readonly name='login_type' value='<%=login_type%>'> <!-- '로그인 타입(관리자, sv,면접원, 컨택원 등) -->
</td>
<td align='center'>로그인 지역</td>
<td align='center'>
<input type='text' readonly name='login_area' value='<%=login_area%>'> <!-- '로그인 지역(krc, 그 외) -->
</td>
</tr>
<tr height=30>
<td align='center'>자리번호</td>
<td align='center'>
<input type='text' readonly name = 'client_id' value = '<%=client_id%>'> <!-- '면접원 자리번호 -->
</td>
<td align='center'>내선번호</td>
<td align='center'>
<input type='text' readonly name = 'extension' value = '<%=extension%>' > <!-- '면접원 내선번호 -->
</td>
<td align='center'>발신번호</td>
<td align='center'>
<input type='text' readonly name='ani_num' value='<%=ani_num%>'> <!-- '발신번호-->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height='100%' valign='top' style='padding:20px 20px 20px 20px;'>
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td align='center' style='padding:10px 0px 0px 0px;'>
<table width='100%' cellpadding='10' cellspacing='0' border='0' bgcolor='#DADADA' style='border:1px solid #DADADA;'>
<tr>
<td bgcolor='#FFFFFF'>
<table width='100%' cellpadding='3' cellspacing='1' border='1' >
<!--타이틀 -->
<tr bgcolor=DeepSkyBlue>
<td colspan=1 align='center' style="font-size:10pt;"><%=login_name%> 님은 <%=login_area%> 지역의 <%=login_type%> 입니다. 컨택할 쿼터 셀 선택
<%if Request.ServerVariables("remote_addr") = "10.10.17.52" or Request.ServerVariables("remote_addr") = "1.235.195.52" then%>
(search_ok.asp)
<%end if%>
</td>
</tr>
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<%
If adors.recordcount > 0 Then
%>
<tr height=30>
<td align='center' width=50>선택</td>
<td align='center' width=100>기관명</td>
<td align='center' width=50>컨택지역</td>
<td align='center' width=50 bgcolor=DeepSkyBlue>리스트 id</td>
<td align='center' width=50>차수</td>
<% If adors("categori_01") <> "" Then %>
<td align='center' width=50>분류 1</td>
<% End if %>
<% If adors("categori_02") <> "" Then %>
<td align='center' width=50>분류 2</td>
<% End if %>
<% If adors("categori_03") <> "" Then %>
<td align='center' width=50>분류 3</td>
<% End if %>
<% If adors("categori_04") <> "" Then %>
<td align='center' width=50>분류 4</td>
<% End if %>
<% If adors("categori_05") <> "" Then %>
<td align='center' width=50>분류 5</td>
<% End if %>
<% If adors("categori_06") <> "" Then %>
<td align='center' width=50>분류 6</td>
<% End if %>
<% If adors("categori_07") <> "" Then %>
<td align='center' width=50>분류 7</td>
<% End if %>
<td align='center' width=50>쿼터 지역</td>
<td align='center' width=50>회사명</td>
<% If adors("comp_posi") <> "" Then %>
<td align='center' width=50>직위</td>
<% End if %>
<td align='center' width=50>이름</td>
<td align='center' width=50>전화 1</td>
<td align='center' width=50>전화 2</td>
<td align='center' width=50>리스트 주소</td>
<td align='center' width=50>컨택결과</td>
<td align='center' width=50>기타 1</td>
</tr>
<%
do while not adors.eof
cnt = cnt + 1
%>
<tr>
<td align='center'>
<input type='radio' name='chk_sel' value='<%=adors("id")%>'/>
</td>
<td align='center'><%=adors("kikoan_name")%></td>
<td align='center'><%=adors("contac_area")%></td>
<td align='center' bgcolor=DeepSkyBlue><%=adors("list_id")%></td>
<td align='center'><%=adors("chasu")%></td>
<% If adors("categori_01") <> "" Then %>
<td align='center'><%=adors("categori_label01")%></td>
<% End if %>
<% If adors("categori_02") <> "" Then %>
<td align='center'><%=adors("categori_02")%></td>
<% End if %>
<% If adors("categori_03") <> "" Then %>
<td align='center'><%=adors("categori_03")%></td>
<% End if %>
<% If adors("categori_04") <> "" Then %>
<td align='center'><%=adors("categori_04")%></td>
<% End if %>
<% If adors("categori_05") <> "" Then %>
<td align='center'><%=adors("categori_05")%></td>
<% End if %>
<% If adors("categori_06") <> "" Then %>
<td align='center'><%=adors("categori_06")%></td>
<% End if %>
<% If adors("categori_07") <> "" Then %>
<td align='center'><%=adors("categori_07")%></td>
<% End if %>
<td align='center'><%=adors("quota_area")%></td>
<td align='center'><%=adors("comp_name")%></td>
<% If adors("comp_posi") <> "" Then %>
<td align='center'><%=adors("comp_posi")%></td>
<% End if %>
<td align='center'><%=adors("name")%></td>
<td align='center'><%=adors("tel1")%></td>
<td align='center'><%=adors("tel2")%></td>
<td align='center'><%=adors("comp_addr")%></td>
<td align='center'><%=adors("contac_stat_label")%></td>
<td align='center'><%=adors("etc1")%></td>
</tr>
<%
adors.movenext
Loop
Else
%>
<tr>
<td>해당되는 리스트가 존재하지 않습니다.</td>
</tr>
<%
End if
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor='#FFFFFF'>
<table width='50%' cellpadding='3' cellspacing='1' border='1' bgcolor='#DADADA'>
<tr>
<td align='center' >
<input type = button value='전화걸기 화면으로' style='cursor:hand' onclick='search_ok("<%=login_type%>")' title='전화걸기'>
<img src='<%=domain_url%>:8888/images/common/btn_search.jpg' onclick='search("<%=login_type%>")' style='cursor:hand;VERTICAL-ALIGN: middle;' title='검색'>
<img src='<%=domain_url%>:8888/images/common/btn_search_kikoan.jpg' onclick='contec_sel(<%=key_id%>)' style='cursor:hand;VERTICAL-ALIGN: middle;' title='기관 재선택'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<input type=text name = 'cnt' value='<%=cnt%>'>
</table>
</td>
</tr>
<!-- #include file = "inc_bottom.asp"-->
<script LANGUAGE='JavaScript'>
function contec_sel()
{ //기관 재선택 부터
var f = document.frm_main;
//f.action = "contac_sel.asp?command=re_contac_sel&id=" + id;
f.action = "contac_sel.asp?command=re_contac_sel";
f.submit();
}
function search(login_type)
{
var txt;
var f = document.frm_main;
f.action = "search.asp";
f.submit();
}
function search_ok(login_type)
{
var f = document.frm_main;
var cnt = f.cnt.value;
var tmp_ok = 0;
var idValue = 0;
if (eval(cnt) == 1)
{
if (f.chk_sel.checked == true)
{
tmp_ok = 1;
idValue = f.chk_sel.value;
//f.key_id.value = idValue;
}
}
else
{
for (i = 0; i <= eval(cnt) - 1; i++)
{
if (f.chk_sel[i].checked == true)
{
tmp_ok = 1;
idValue = f.chk_sel[i].value;
//f.key_id.value = idValue;
}
}
}
if (tmp_ok != 1)
{
alert('선택을 하세요.');
return false;
}
// if (f.login_area.value == "서울")
// {
f.action = "tel_dial.asp?command=search&key_id=" + idValue;
// }
// else
// {
// f.action = "inc_list.asp?command=search&key_id=" + idValue;
// }
// alert(idValue);
f.submit();
}
</script>