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

336 lines
13 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.* " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 1 and category_code = a.categori_01), categori_01) as 'categori_label01' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 2 and category_code = a.categori_02), categori_02) as 'categori_label02' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 3 and category_code = a.categori_03), categori_03) as 'categori_label03' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 4 and category_code = a.categori_04), categori_04) as 'categori_label04' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 5 and category_code = a.categori_05), categori_05) as 'categori_label05' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 6 and category_code = a.categori_06), categori_06) as 'categori_label06' " & _
", isnull((select category_label from category_code where kikoan_id = '" & kikoan_id & "' and category_index = 7 and category_code = a.categori_07), 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_id = '" & kikoan_id & "' " & _
"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
if res_tel3 <> "" then
if tmp_query = "" then
tmp_query = "tel3 = '" & res_tel3 & "' "
else
tmp_query = tmp_query & " or tel3 = '" & res_tel3 & "' "
end if
end if
if res_tel4 <> "" then
if tmp_query = "" then
tmp_query = "tel4 = '" & res_tel4 & "' "
else
tmp_query = tmp_query & " or tel4 = '" & res_tel4 & "' "
end if
end if
query = query & tmp_query
end if
' response.write query
' response.write "<br/>" & kikoan_id & ".."
adors.open query, adoconn, 1
' Response.Write query
'%>
<html>
<head>
<meta http-equiv='Content-Type'content='text/html; charset=utf-8'>
<title>KRC - 컨택</title>
</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 style="display: none;">
<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%>
(contact_search_ok.asp)
<%end if%>
</td>
</tr>
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1' style="font-size:13px;">
<%
If adors.recordcount > 0 Then
%>
<tr height=30>
<td align='center' width="2%">선택</td>
<td align='center' width="16%">기관명</td>
<td align='center' width="4%">컨택지역</td>
<td align='center' width="3%" bgcolor=DeepSkyBlue>LIST ID</td>
<td align='center' width="5%">차수</td>
<td align='center' width="5%">분류 1</td>
<td align='center' width="5%">분류 2</td>
<td align='center' width="5%">분류 3</td>
<td align='center' width="5%">분류 4</td>
<td align='center' width="5%">분류 5</td>
<td align='center' width="5%">분류 6</td>
<td align='center' width="5%">분류 7</td>
<td align='center' width="5%">쿼터 지역</td>
<td align='center' width="7%">회사명</td>
<td align='center' width="5%">이름</td>
<td align='center' width="6%">주소</td>
<td align='center' width="6%">컨택결과</td>
<td align='center' width="5%">기타 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>
<td align='center'><%=adors("categori_label01")%></td>
<td align='center'><%=adors("categori_label02")%></td>
<td align='center'><%=adors("categori_label03")%></td>
<td align='center'><%=adors("categori_label04")%></td>
<td align='center'><%=adors("categori_label05")%></td>
<td align='center'><%=adors("categori_label06")%></td>
<td align='center'><%=adors("categori_label07")%></td>
<td align='center'><%=adors("quota_area")%></td>
<td align='center'><%=adors("comp_name")%></td>
<td align='center'><%=adors("name")%></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>
<input type='hidden' name = 'cnt' value='<%=cnt%>'>
</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:pointer' onclick='search_ok("<%=login_type%>")' title='전화걸기'>
<img src='<%=domain_url%>:8888/images/common/btn_search.jpg' onclick='search("<%=login_type%>")' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='검색'>
<img src='<%=domain_url%>:8888/images/common/btn_search_kikoan.jpg' onclick='contec_sel(<%=key_id%>)' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='기관 재선택'>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!-- #include file = "inc_bottom.asp"-->
<script LANGUAGE='JavaScript'>
function contec_sel()
{ //기관 재선택 부터
var f = document.frm_main;
f.action = "contact_select.asp?command=re_contac_sel";
f.submit();
}
function search(login_type)
{
var txt;
var f = document.frm_main;
f.action = "contact_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 = "contact_tel_dial.asp?command=search&key_id=" + idValue;
// }
// else
// {
// f.action = "inc_list.asp?command=search&key_id=" + idValue;
// }
// alert(idValue);
f.submit();
}
</script>