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

1704 lines
65 KiB
Plaintext

<%'
Response.CharSet="utf-8"
Response.codepage="65001"
Response.ContentType="text/html;charset=utf-8"
'정형기 기록 - 사용페이지
'실제 컨택 페이지
''단, (chasu_use_chk = 'yes')문을 이용하여 사용여부 판단...(값이 no 인것들은 컨택결과를 일괄적으로 지정을 했기에 컨택을 하면 안되기에)
set adors2 = server.CreateObject("ADODB.RECORDSET")
set adors_tmp = server.CreateObject("ADODB.RECORDSET")
dim login_name '로그인 아이디
dim login_area '로그인 지역
dim login_type '로그인 타입(관리자, sv,면접원, 컨택원 등)
dim kikoan_name '쿼터용 기관명
dim categori_01, categori_02, categori_03 '쿼터용 기관 카테고리(대,중,소)
dim kikoan_area '응답자 지역
dim ani_num '발신번호
dim extension '면접원 내선번호
dim dn '응답자 전화번호
dim field_area_name()
dim tel_num(4)
dim chasu
dim key_id
dim login_id
dim interview_date(13)
dim interview_date_st
dim interview_date_end
Dim interview_date_type
interview_date(1) = "없음(거절 등)"
interview_date(2) = "2013-11-11 ~ 2013-11-16"
interview_date(3) = "2013-11-18 ~ 2013-11-23"
interview_date(4) = "2013-11-25 ~ 2013-11-30"
interview_date(5) = "2013-12-02 ~ 2013-12-07"
interview_date(6) = "2013-12-09 ~ 2013-12-14"
interview_date(7) = "2013-12-16 ~ 2013-12-21"
interview_date(8) = "2013-12-23 ~ 2013-12-28"
interview_date(9) = "2013-12-30 ~ 2014-01-04"
interview_date(10) = "2014-01-06 ~ 2014-01-11"
interview_date(11) = "2014-01-13 ~ 2014-01-18"
interview_date(12) = "2014-01-20 ~ 2014-01-25"
interview_date(13) = "2014-01-27 ~ 2014-02-01"
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"))
kikoan_id = trim(request("kikoan_id"))
kikoan_name = trim(request("kikoan_name"))
research_comp_name = trim(request("research_comp_name"))
chasu = trim(request("chasu"))
categori_check = trim(request("categori_check"))
comp_area = trim(request("comp_area"))
If categori_check = "" Then
categori_check = false
End If
categori_name_01 = trim(request("categori_name_01"))
categori_name_02 = trim(request("categori_name_02"))
categori_name_03 = trim(request("categori_name_03"))
categori_name_04 = trim(request("categori_name_04"))
categori_name_05 = trim(request("categori_name_05"))
categori_name_06 = trim(request("categori_name_06"))
categori_name_07 = trim(request("categori_name_07"))
categori_label_01 = trim(request("categori_label_01"))
categori_label_02 = trim(request("categori_label_02"))
categori_label_03 = trim(request("categori_label_03"))
categori_label_04 = trim(request("categori_label_04"))
categori_label_05 = trim(request("categori_label_05"))
categori_label_06 = trim(request("categori_label_06"))
categori_label_07 = trim(request("categori_label_07"))
categori_01 = trim(request("categori_01"))
categori_02 = trim(request("categori_02"))
categori_03 = trim(request("categori_03"))
categori_04 = trim(request("categori_04"))
categori_05 = trim(request("categori_05"))
categori_06 = trim(request("categori_06"))
categori_07 = trim(request("categori_07"))
add_item1 = trim(request("add_item1"))
add_item2 = trim(request("add_item2"))
add_item3 = trim(request("add_item3"))
add_item4 = trim(request("add_item4"))
add_item5 = trim(request("add_item5"))
add_item6 = trim(request("add_item6"))
add_item7 = trim(request("add_item7"))
contac_area = trim(request("contac_area"))
ani_num = trim(request("ani_num"))
categori_cnt = request("categori_cnt")
command = request("command")
contac_stat = trim(request("contac_stat"))
quota_area = request("quota_area")
sex = ""
age = 0
if command = "search" then
query = "select * from list where id = '" & request("key_id") & "' and chasu_use_chk = 'yes'"
adors2.open query, adoconn, 1
kikoan_name = adors2("kikoan_name")
if trim(adors2("categori_01")) <> "" then
categori_cnt = 1
categori_01 = adors2("categori_01")
else
categori_01 = ""
end If
if trim(adors2("categori_02")) <> "" then
categori_cnt = 2
categori_02 = adors2("categori_02")
else
categori_02 = ""
end If
if trim(adors2("categori_03")) <> "" then
categori_cnt = 3
categori_03 = adors2("categori_03")
else
categori_03 = ""
end If
if trim(adors2("categori_04")) <> "" then
categori_cnt = 4
categori_04 = adors2("categori_04")
else
categori_04 = ""
end If
if trim(adors2("categori_05")) <> "" then
categori_cnt = 5
categori_05 = adors2("categori_05")
else
categori_05 = ""
end If
if trim(adors2("categori_06")) <> "" then
categori_cnt = 6
categori_06 = adors2("categori_06")
else
categori_06 = ""
end If
if trim(adors2("categori_07")) <> "" then
categori_cnt = 7
categori_07 = adors2("categori_07")
else
categori_07 = ""
end If
contac_area = adors2("contac_area")
adors2.close
end if
query = "select * from kikoan_list where kikoan_name = '" & kikoan_name & "' "
adors.open query, adoconn, 1
contac_tel_cnt = adors("contac_tel_cnt")
project_type = adors("project_type")
adors.close
query = "select top 1 * from list "
where_query_01 = " where kikoan_id = '" & kikoan_id & "' "
if cint(categori_cnt) >= 1 then
where_query_01 = where_query_01 & "and categori_01 = '" & categori_01 & "' "
end If
if cint(categori_cnt) >= 2 then
where_query_01 = where_query_01 & "and categori_02 = '" & categori_02 & "' "
end If
if cint(categori_cnt) >= 3 then
where_query_01 = where_query_01 & "and categori_03 = '" & categori_03 & "' "
end If
if cint(categori_cnt) >= 4 then
where_query_01 = where_query_01 & "and categori_04 = '" & categori_04 & "' "
end If
if cint(categori_cnt) >= 5 then
where_query_01 = where_query_01 & "and categori_05 = '" & categori_05 & "' "
end If
if cint(categori_cnt) >= 6 then
where_query_01 = where_query_01 & "and categori_06 = '" & categori_06 & "' "
end If
if cint(categori_cnt) >= 7 then
where_query_01 = where_query_01 & "and categori_07 = '" & categori_07 & "' "
end If
if command <> "search" then
where_query_01 = where_query_01
end if
''차수 구분 및 전화걸기 최대횟수
where_query_02 = " and (chasu = '" & chasu & "') and (chasu_use_chk = 'yes') "
If comp_area <> "" Then
where_query_02 = where_query_02 & " and comp_area = '" & comp_area & "' "
End if
if command = "search" Then
query = "select * from list where id = " & request("key_id")
Else
If contac_stat = 0 Then
'call_count_query = "and contac_tel_cnt = 0 "
re_query = query
query = query & where_query_01 & where_query_02 & call_count_query & _
" and contac_stat = 0 " & _
" and prj_year = '" & Prj_Year & "' and contactor = 'no' " & _
" order by newid()"
Else
If contac_stat=1 Or contac_stat=2 Or contac_stat=4 then
query = query & where_query_01 & where_query_02 & _
" and contac_stat = " & contac_stat & _
" and prj_year = '" & Prj_Year & "' " & _
" and rechecker = '' and contactor = 'no' " & _
" order by newid()"
Else
query = query & where_query_01 & where_query_02 & _
" and contac_stat = " & contac_stat & _
" and prj_year = '" & Prj_Year & "' " & _
" and (contactor = '" & login_name & "' or contactor = 'no') " & _
" order by newid()"
End If
End if
end If
adors.open query, adoconn, 1
response.write "<script> console.log(""" & query & """); </script>"
if adors.recordcount >= 1 then
tel_num(1) = adors("tel1")
tel_num(2) = adors("tel2")
tel_num(3) = adors("tel3")
tel_num(4) = adors("tel4")
for i = 1 to 4
If Trim(tel_num(i)) <> "" Then
tel_num(i) = replace(tel_num(i), "-", "")
tel_num(i) = replace(tel_num(i), ".", "")
tel_num(i) = replace(tel_num(i), " ", "")
if mid(tel_num(i),1,2)= "02" then
tel_num(i) = mid(tel_num(i),3)
end if
End if
next
if trim(tel_num(1)) = "" then
tel_num(1) = tel_num(2)
tel_num(2) = ""
end if
tel_num(0) = 0 '일단 개의 전화번호라고 가정
for i = 1 to 4
if trim(tel_num(i)) <> "" then
tel_num(0) = cint(tel_num(0)) + 1
end if
next
dn = tel_num(1)
key_id = adors("id")
contac_stat = adors("contac_stat")
quota_area = adors("quota_area")
field_area = adors("field_area")
interview_date(0) = adors("interview_date")
If adors("interview_date") <> "" And Len(adors("interview_date")) = 21 And instr(adors("interview_date"), "~") > 0 Then
interview_date_type = "FROM-TO"
interview_date_st = Left(Trim(adors("interview_date")), 10)
interview_date_end = right(Trim(adors("interview_date")), 10)
ElseIf Trim(adors("interview_date")) = "" Then
interview_date_type = "FROM-TO"
else
interview_date_type = "TEXT"
End if
interview_area = adors("interview_area")
contac_remark = adors("contac_remark")
add_item1 = adors("add_item1")
add_item2 = adors("add_item2")
add_item3 = adors("add_item3")
add_item4 = adors("add_item4")
add_item5 = adors("add_item5")
add_item6 = adors("add_item6")
add_item7 = adors("add_item7")
If adors("sex") <> "" then
If CStr(adors("sex")) = "1" Then
sex = "남"
ElseIf CStr(adors("sex")) = "2" Then
sex = "여"
Else
sex = adors("sex")
End If
End if
If adors("bitrh_year") <> "" Then
If IsNumeric(adors("bitrh_year")) Then
age = CInt(adors("prj_year"))-CInt(adors("bitrh_year"))+1
Else
age = adors("prj_year")
End if
ELSE
age = adors("age")
End If
' Response.Write contac_stat & "<br>"
'일단 가져왔다고 표시
if adors("contactor") = "no" or adors("contactor") = "" then
query = "update list set contac_stat = " & contac_stat & ", " & _
"contac_date = '" & formatdatetime(date,2) & "', " & _
"contac_time = '" & formatdatetime(time,4) & "', " & _
"contactor = '" & login_name & "', " & _
"rechecker = '" & login_name & "' " & _
" where id = " & key_id
adoconn.execute query
end if
' query = "select field_area from list " & where_query_01 & where_query_02 & " group by field_area order by field_area"
' adors_tmp.open query, adoconn, 1
' redim field_area_name(adors_tmp.recordcount)
' i = 0
' do while not adors_tmp.eof
' i = i + 1
' field_area_name(i) = adors_tmp("field_area")
' adors_tmp.movenext
' loop
' adors_tmp.close
''필드지역 선택용
query = "select field_area from list where kikoan_id = '" & kikoan_id & "' group by field_area order by field_area"
adors_tmp.open query, adoconn, 1
i = adors_tmp.recordcount
redim field_area_name(i)
i = 0
do while not adors_tmp.eof
i = i + 1
field_area_name(i) = adors_tmp("field_area")
adors_tmp.movenext
loop
adors_tmp.close
''//=============
''log 저장
if command = "search" then
tmp_type = "검색에서 "
else
tmp_type = ""
end If
query = "insert into log (key_id, kikoan_name, " & _
"categori_01, categori_02, categori_03, categori_04, categori_05, categori_06, categori_07, quota_area, " & _
"list_id, tel_num, user_id, log_date, log_time, log_ip, asp_file_name, contac_stat, log_stat, prj_year) values (" & _
"'" & key_id & "', " & _
"'" & kikoan_name & "', " & _
"'" & categori_01 & "', " & _
"'" & categori_02 & "', " & _
"'" & categori_03 & "', " & _
"'" & categori_04 & "', " & _
"'" & categori_05 & "', " & _
"'" & categori_06 & "', " & _
"'" & categori_07 & "', " & _
"'" & quota_area & "', " & _
"'" & adors("list_id") & "', " & _
"'" & dn & "', " & _
"'" & login_id & "', " & _
"'" & formatdatetime(date, 2) & "', " & _
"'" & formatdatetime(time, 4) & "', " & _
"'" & Request.ServerVariables("remote_addr") & "', " & _
"'contact_inc_list.asp', " & _
"99, " & _
"'" & tmp_type & "1개 리스트 가져오기', " & _
"'" & prj_year & "')"
' Response.Write query
adoconn.execute query
%>
<!-- #include file = "contact_inc_top.asp"-->
<tr>
<td height='5' bgcolor='#dadada'></td>
</tr>
<%
'쿼터에 대한 쿼리를 가져오는 부분
'query = "select * from quota " & where_query_01
'if command = "search" then
' query = query & " and quota_area = '" & quota_area & "'"
'end If
'response.write query
'adors_tmp.open query, adoconn, 1
'adors_tmp.close
%>
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<tr height=30 align='center'>
<td bgcolor="#6DD66D" width="90px" >리스트 id</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=adors("list_id")%>&nbsp;&nbsp;[<%=adors("chasu")%>]' style='font-weight:bold; text-align:center; color:blue; width: 140px;'>
<input type='hidden' readonly name = 'list_id' id="list_id" value='<%=adors("list_id")%>'>
</td>
<td bgcolor="#6DD66D" width="90px" >사업체명</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=adors("comp_name")%>' style="width: 140px;">
</td>
<%if kikoan_id = "222" then%>
<td bgcolor="#6DD66D" width="90px" >성명<br />(담당선생님)</td>
<%else %>
<td bgcolor="#6DD66D" width="90px" >성명(대표자)</td>
<%end if %>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=adors("name")%>' style="width: 140px;">
</td>
<td bgcolor="#6DD66D" width="90px" >지역(분류)</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=adors("comp_area")%>' style="width: 140px;">
</td>
</tr>
<tr height=30 align='center'>
<td bgcolor="#6DD66D">직위(급)</td>
<td bgcolor="#6DD66D">
<% if kikoan_id = "248" Then
query = "SELECT count(*) AS cnt FROM krc_survey.dbo.Dat_2004031_A la WHERE ResType <> 'TEST' AND status = '10' AND LEFT(IDKey, 5) = '" & adors("list_id") & "'"
adors_tmp.open query, adoconn, 1
%>
<input type='text' readonly value='종사자 <%= adors_tmp("cnt")%>명 완료' style="width: 140px;">
<%
adors_tmp.close
%>
<% else %>
<input type='text' readonly value='<%=adors("comp_posi")%>' style="width: 140px;">
<% end if %>
</td>
<td bgcolor="#6DD66D">나이</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=age%>' style="width: 140px;">
</td>
<td bgcolor="#6DD66D">성별</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=sex%>' style="width: 140px;">
</td>
<td bgcolor="#6DD66D">출생년도</td>
<td bgcolor="#6DD66D">
<input type='text' readonly value='<%=adors("bitrh_year")%>' style="width: 140px;">
</td>
</tr>
<tr height=30 align='center'>
<td bgcolor="#6DD66D">이메일1</td>
<td bgcolor="#6DD66D" colspan="3">
<input type='text' readonly value='<%=adors("email1")%>' style="width: 280px;">
<input type='button' value='메일보내기' onclick="emailSend('<%=adors("email1")%>','<%=kikoan_id %>', '0')" />
</td>
<td bgcolor="#6DD66D">이메일2</td>
<td bgcolor="#6DD66D" colspan="3">
<input type='text' readonly value='<%=adors("email2")%>' style="width: 280px;">
<input type='button' value='메일보내기' onclick="emailSend('<%=adors("email2")%>','<%=kikoan_id %>', '0')" />
</td>
</tr>
<tr height=30 align='center'>
<td bgcolor="#6DD66D">이메일1 수정</td>
<td bgcolor="#6DD66D">
<input type='radio' name='changeMail' value='y' onclick="changeData('mail');">예
<input type='radio' name='changeMail' value='n' onclick="changeData('mail');" checked>아니요
</td>
<td bgcolor="#FFFF96">이메일1 수정</td>
<td bgcolor="#FFFF96">
<input type='text' id='email_new' name='email_new' value='<%=adors("email_new")%>' readonly style="width: 140px;">
<br />
<input type='button' value='메일보내기' onclick="emailSend('<%=adors("email_new")%>','<%=kikoan_id %>', '1')" />
</td>
<td bgcolor="#6DD66D">이메일2 수정</td>
<td bgcolor="#6DD66D">
<input type='radio' name='changeMail2' value='y' onclick="changeData('mail2');">예
<input type='radio' name='changeMail2' value='n' onclick="changeData('mail2');" checked>아니요
</td>
<td bgcolor="#FFFF96">이메일2 수정</td>
<td bgcolor="#FFFF96">
<input type='text' id='email_new2' name='email_new2' value='<%=adors("email_new2")%>' readonly style="width: 140px;">
<br />
<input type='button' value='메일보내기' onclick="emailSend('<%=adors("email_new2")%>','<%=kikoan_id %>', '2')" />
</td>
</tr>
<tr height=30 align='center'>
<td bgcolor="#6DD66D">유선번호 수정</td>
<td bgcolor="#6DD66D">
<input type='radio' name='changeTelNo' value='y' onclick="changeData('telno');">예
<input type='radio' name='changeTelNo' value='n' onclick="changeData('telno');" checked>아니요
</td>
<td bgcolor="#FFFF96">유선번호 수정</td>
<td bgcolor="#FFFF96">
<input type='text' id='tel_new' name='tel_new' value='<%=adors("tel_new")%>' style="width: 140px;" readonly>
</td>
<td bgcolor="#6DD66D">무선번호 수정</td>
<td bgcolor="#6DD66D">
<input type='radio' name='changeTelNo2' value='y' onclick="changeData('telno2');">예
<input type='radio' name='changeTelNo2' value='n' onclick="changeData('telno2');" checked>아니요
</td>
<td bgcolor="#FFFF96">무선번호 수정</td>
<td bgcolor="#FFFF96">
<input type='text' id='tel_new2' name='tel_new2' value='<%=adors("tel_new2")%>' style="width: 140px;" readonly>
</td>
</tr>
<tr height=30 align='center'>
<td bgcolor="#6DD66D">주소</td>
<td colspan=3 bgcolor="#6DD66D">
<input type='text' name='comp_addr' readonly value='<%=adors("comp_addr")%>' style="width: 380px;">
</td>
<td bgcolor="#FFFF96">주소 수정</td>
<td colspan=3 bgcolor="#FFFF96">
<input type='text' name = 'comp_addr_new' value='<%=adors("comp_addr_new")%>' style="width: 380px;">
</td>
</tr>
<tr height=30 align='center'>
<%if kikoan_id = "222" then%>
<td bgcolor="#FFFF96">개학일 수정</td>
<%else %>
<td bgcolor="#FFFF96">업체명 수정</td>
<%end if %>
<td bgcolor="#FFFF96">
<input type='text' name='comp_name_new' value='<%=adors("comp_name_new")%>' style="width: 140px;">
</td>
<td bgcolor="#FFFF96">성명 수정</td>
<td bgcolor="#FFFF96">
<input type='text' name='name_new' value='<%=adors("name_new")%>' style="width: 140px;">
</td>
<%if kikoan_id = "222" then%>
<td bgcolor="#FFFF96">학급당 평균인원 수정</td>
<%else %>
<td bgcolor="#FFFF96">직위(급) 수정</td>
<%end if %>
<td bgcolor="#FFFF96">
<input type='text' name='comp_area_new' value='<%=adors("comp_area_new")%>' style="width: 140px;">
</td>
<%if kikoan_id = "222" then%>
<td bgcolor="#FFFF96">9/2일주 학교행사 수정</td>
<%else %>
<td bgcolor="#FFFF96">성별 수정</td>
<%end if %>
<td bgcolor="#FFFF96">
<input type='text' name='sex_new' value='<%=adors("sex_new")%>' style="width: 140px;">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<!--categori_01 -->
<%
query = "SELECT category_name FROM category_code where category_index = 1 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category01_cnt = adors2.recordcount
category01_name = ""
if category01_cnt > 0 Then
category01_name = adors2("category_name")
adors2.close
%>
<tr height=30 align='center' bgcolor="#6DD66D">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 1 AND category_code = '" & adors("categori_01") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_01 = adors2("category_name")
categori_category_label_01 = adors2("category_label")
Else
categori_name_01 = ""
categori_category_label_01 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류1(<%=category01_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_01%>
<%
adors2.close
%>
</td>
<!--categori_02 -->
<%
query = "SELECT category_name FROM category_code where category_index = 2 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category02_cnt = adors2.recordcount
category02_name = ""
if category02_cnt > 0 Then
category02_name = adors2("category_name")
adors2.close
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 2 AND category_code = '" & adors("categori_02") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_02 = adors2("category_name")
categori_category_label_02 = adors2("category_label")
Else
categori_name_02 = ""
categori_category_label_02 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류2(<%=category02_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_02%>
<%
adors2.close
%>
</td>
<%
Else
adors2.close
End if
%>
</tr>
<%
Else
adors2.close
End if
%>
<!--categori_03 -->
<%
query = "SELECT category_name FROM category_code where category_index = 3 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category03_cnt = adors2.recordcount
category03_name = ""
if category03_cnt > 0 Then
category03_name = adors2("category_name")
adors2.close
%>
<tr height=30 align='center' bgcolor="#6DD66D">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 3 AND category_code = '" & adors("categori_03") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_03 = adors2("category_name")
categori_category_label_03 = adors2("category_label")
Else
categori_name_03 = ""
categori_category_label_03 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류3(<%=category03_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_03%>
<%
adors2.close
%>
</td>
<!--categori_04 -->
<%
query = "SELECT category_name FROM category_code where category_index = 4 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category04_cnt = adors2.recordcount
category04_name = ""
if category04_cnt > 0 Then
category04_name = adors2("category_name")
adors2.close
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 4 AND category_code = '" & adors("categori_04") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_04 = adors2("category_name")
categori_category_label_04 = adors2("category_label")
Else
categori_name_04 = ""
categori_category_label_04 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류4(<%=category04_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_04%>
<%
adors2.close
%>
</td>
<%
Else
adors2.close
End if
%>
</tr>
<%
Else
adors2.close
End if
%>
<!--categori_05 -->
<%
query = "SELECT category_name FROM category_code where category_index = 5 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category05_cnt = adors2.recordcount
category05_name = ""
if category05_cnt > 0 Then
category05_name = adors2("category_name")
adors2.close
%>
<tr height=30 align='center' bgcolor="#6DD66D">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 5 AND category_code = '" & adors("categori_05") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_05 = adors2("category_name")
categori_category_label_05 = adors2("category_label")
Else
categori_name_05 = ""
categori_category_label_05 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류5(<%=category05_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_05%>
<%
adors2.close
%>
</td>
<!--categori_06 -->
<%
query = "SELECT category_name FROM category_code where category_index = 6 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category06_cnt = adors2.recordcount
category06_name = ""
if category06_cnt > 0 Then
category06_name = adors2("category_name")
adors2.close
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 6 AND category_code = '" & adors("categori_06") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_06 = adors2("category_name")
categori_category_label_06 = adors2("category_label")
Else
categori_name_06 = ""
categori_category_label_06 = ""
End If
%>
<td width=150 style="font-size:10pt;">분류6(<%=category06_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_06%>
<%
adors2.close
%>
</td>
<%
Else
adors2.close
End if
%>
</tr>
<%
Else
adors2.close
End if
%>
<!--categori_07 -->
<%
query = "SELECT category_name FROM category_code where category_index = 7 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category07_cnt = adors2.recordcount
category07_name = ""
if category07_cnt > 0 Then
category07_name = adors2("category_name")
adors2.close
%>
<tr height=30 align='center' bgcolor="#6DD66D">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 7 AND category_code = '" & adors("categori_07") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_07 = adors2("category_name")
categori_category_label_07 = adors2("category_label")
Else
categori_name_07 = ""
categori_category_label_07 = ""
End if
%>
<td width=150 style="font-size:10pt;">분류7(<%=category07_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_07%>
<%
adors2.close
%>
</td>
<!--categori_08 -->
<%
query = "SELECT category_name FROM category_code where category_index = 8 AND kikoan_id = '" & kikoan_id & "' GROUP BY category_name "
adors2.open query, adoconn, 1
category08_cnt = adors2.recordcount
category08_name = ""
if category08_cnt > 0 Then
category08_name = adors2("category_name")
adors2.close
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 8 AND category_code = '" & adors("categori_08") & "' AND kikoan_id = '" & kikoan_id & "' "
adors2.open query, adoconn, 1
if adors2.recordcount > 0 then
categori_name_08 = adors2("category_name")
categori_category_label_08 = adors2("category_label")
Else
categori_name_08 = ""
categori_category_label_08 = ""
End If
' categori_name_08 = adors2("category_name")
' categori_category_label_08 = adors2("category_label")
%>
<td width=150 style="font-size:10pt;">분류8(<%=category08_name%>)</td>
<td width=200 style="font-size:10pt; font-weight:bold;">
<%=categori_category_label_08%>
<%
adors2.close
%>
</td>
<%
Else
adors2.close
End if
%>
</tr>
<%
Else
adors2.close
End if
%>
</table>
</td>
</tr>
<tr>
<td height='5' bgcolor='#dadada'></td>
</tr>
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<tr height=50 align='center' bgcolor="#50C8FF">
<td>전화번호</td>
<td>
<input type='radio' value='1' name='tel_num_sel' onclick='tel_sel_ok("1");' checked style="border: 0px none;">연락처1
<input type='text' size=15 readonly value='<%=tel_num(1)%>' name = 'tel1' id = 'tel1' style="font-weight: bold; text-align: center;">&nbsp;&nbsp;
<input type='radio' value='2' name='tel_num_sel' onclick='tel_sel_ok("2");' style="border: 0px none;">연락처2
<input type='text' size=15 readonly value='<%=tel_num(2)%>' name = 'tel2' id = 'tel2'>
<br />
<input type='radio' value='5' name='tel_num_sel' onclick='tel_sel_ok("5");' style="border: 0px none;">연락처3
<input type='text' size=15 readonly value='<%=tel_num(3)%>' name = 'tel5' id = 'tel5'>&nbsp;&nbsp;
<input type='radio' value='6' name='tel_num_sel' onclick='tel_sel_ok("6");' style="border: 0px none;">연락처4
<input type='text' size=15 readonly value='<%=tel_num(4)%>' name = 'tel6' id = 'tel6'>
</td>
<td>변경된 번호</td>
<td>
<%if adors("tel_new") = "" and (adors("tel_new2") = "" or isNull(adors("tel_new2"))) then%>
없 음
<%end if%>
<%if adors("tel_new") <> "" then%>
<input type='radio' value='3' name='tel_num_sel' onclick='tel_sel_ok("3");' style="border: 0px none;">추가연락처1
<input type='text' size=15 readonly value='<%=adors("tel_new")%>' name = 'tel3' id = 'tel3' style="font-weight: bold; text-align: center;">&nbsp;&nbsp;
<%if adors("tel_new2") <> "" then%>
<br />
<%end if%>
<%end if%>
<%if adors("tel_new2") <> "" then%>
<input type='radio' value='4' name='tel_num_sel' onclick='tel_sel_ok("4");' style="border: 0px none;">추가연락처2
<input type='text' size=15 readonly value='<%=adors("tel_new2")%>' name = 'tel4' id = 'tel4'>
<%end if%>
</td>
<td>
<!-- 기존 전화걸기 모듈
<img style='cursor:pointer' src="<%=domain_url%>:8888/images/makecall/btn_dial.jpg" onclick="fn_makeCall();" title ='전화 걸기' >
<img style='cursor:pointer;' src="<%=domain_url%>:8888/images/makecall/btn_hangup.gif" onclick="fn_dropCall();" title ='전화 끊기' >
-->
<input type="button" class="btn btn-success" onclick="ChildMakeCall();" value="전화 걸기">
<input type="button" class="btn btn-danger" onclick="ChildHangup();" value="전화 끊기">
</td>
</tr>
<%if kikoan_id = "219" then%>
<tr height=70 align='center' bgcolor="#50C8FF">
<td>
문자보내기
</td>
<td colspan="4">
<input type="button" value="문자보내기" style="height:50px;width:100px;" onclick="javascript:send_SMS()"/>
</td>
</tr>
<%end if %>
<tr height=50 align='center' bgcolor="#50C8FF">
<td>기타1</td>
<td colspan="4">
<!--<input type='text' readonly value='<%=adors("attribute01")%>' name = 'etc1' style="font-weight: bold; text-align: center; width:95%">-->
<textarea readonly id="t_area_1" name='etc1' style="font-weight: bold; text-align: left; width:95%;height:70px;"><%=adors("attribute01")%></textarea>
</td>
</tr>
<tr height=50 align='center' bgcolor="#50C8FF">
<td>기타2</td>
<td colspan="4">
<!--<input type='text' readonly value='<%=adors("attribute02")%>' name = 'etc2' style="font-weight: bold; text-align: center; width:95%">-->
<textarea readonly id="t_area_2" name='etc2' style="font-weight: bold; text-align: left; width:95%;height:70px;"><%=adors("attribute02")%></textarea>
</td>
</tr>
<tr height=50 align='center' bgcolor="#50C8FF">
<td>기타3</td>
<td colspan="4">
<!--<input type='text' readonly value='<%=adors("attribute03")%>' name = 'etc3' style="font-weight: bold; text-align: center; width:95%">-->
<textarea readonly id="t_area_3" name='etc3' style="font-weight: bold; text-align: left; width:95%;height:70px;"><%=adors("attribute03")%></textarea>
</td>
</tr>
<tr height=50 align='center' bgcolor="#50C8FF">
<td>기타4</td>
<td colspan="4">
<!--<input type='text' readonly value='<%=adors("attribute04")%>' name = 'etc4' style="font-weight: bold; text-align: center; width:95%">-->
<textarea readonly id="t_area_4" name='etc4' style="font-weight: bold; text-align: left; width:95%;height:70px;"><%=adors("attribute04")%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<%adors.close%>
<tr>
<td height='5' bgcolor='#dadada'></td>
</tr>
<!-- 결과 값-->
<tr>
<td valign='top'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<tr height=30 align='center' bgcolor="#FFFF96" >
<td rowspan=6 width=80 style="font-size:11pt;font-weight:bold">
컨택 결과
</td>
<td align='center' width=100 style="font-size:11pt;font-weight:bold">전화 결과</td>
<td colspan="5">
<% if kikoan_id = "248" then %>
<select name="save_contac_stat" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 300px;"
<% if cint(contac_stat) = "13" or cint(contac_stat) = "14" or cint(contac_stat) = "15" then %>
onFocus="this.initialSelect = this.selectedIndex;"
onChange="this.selectedIndex = this.initialSelect;"
<% end if %>
>
<% else %>
<select name="save_contac_stat" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 300px;">
<% end if %>
<OPTION value='0'>=== 선 택 ===</option>
<%
query = "select * from contac_stat where kikoan_id = '" & kikoan_id & "' and not (contac_stat = 0) order by contac_stat"
adors.open query, adoconn, 1
do while not adors.eof
%>
<OPTION value='<%=adors("contac_stat")%>' <%if cint(adors("contac_stat")) = cint(contac_stat) then%> selected <%end if%>><%=adors("contac_stat_label")%></option>
<%
adors.movenext
loop
adors.close
%>
</select>
</td>
</tr>
<%
If project_type <> "비방문용" then
%>
<tr height=30 align='center' bgcolor="#FFFF96">
<td align='center' width=120 style="font-size:11pt;font-weight:bold">실사 지역</td>
<td valign=middle >
<select name="field_area" style='font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;'>
<OPTION value='' <%if "" = field_area Or "0" = field_area then%> selected <%end if%>>선택</option>
<OPTION value='서울' <%if "서울" = field_area then%> selected <%end if%>>서울</option>
<OPTION value='대전' <%if "대전" = field_area then%> selected <%end if%>>대전</option>
<OPTION value='대구' <%if "대구" = field_area then%> selected <%end if%>>대구</option>
<OPTION value='부산' <%if "부산" = field_area then%> selected <%end if%>>부산</option>
<OPTION value='인천' <%if "인천" = field_area then%> selected <%end if%>>인천</option>
<OPTION value='광주' <%if "광주" = field_area then%> selected <%end if%>>광주</option>
<OPTION value='울산' <%if "울산" = field_area then%> selected <%end if%>>울산</option>
<OPTION value='강원' <%if "강원" = field_area then%> selected <%end if%>>강원</option>
<OPTION value='경기' <%if "경기" = field_area then%> selected <%end if%>>경기</option>
<OPTION value='경남' <%if "경남" = field_area then%> selected <%end if%>>경남</option>
<OPTION value='경북' <%if "경북" = field_area then%> selected <%end if%>>경북</option>
<OPTION value='전남' <%if "전남" = field_area then%> selected <%end if%>>전남</option>
<OPTION value='전북' <%if "전북" = field_area then%> selected <%end if%>>전북</option>
<OPTION value='충남' <%if "충남" = field_area then%> selected <%end if%>>충남</option>
<OPTION value='충북' <%if "충북" = field_area then%> selected <%end if%>>충북</option>
<OPTION value='제주' <%if "제주" = field_area then%> selected <%end if%>>제주</option>
</select>
</td>
<td align='center' width=120 style="font-size:11pt;font-weight:bold">인터뷰 날자</td>
<td valign=middle >
<input type=hidden name='interview_date_type' value='<%=interview_date_type%>' style="width: 130px;">
<%
If interview_date_type = "FROM-TO" Then
%>
<input type=hidden name='interview_date' value='<%=interview_date(0)%>' style="width: 130px;">
<input class="input" type="text" name="interview_date_st" size="10" readonly value="<%=interview_date_st%>" onClick="winopn('<%=default_path_root%>include/calendar.html?actval=interview_date_st')" style="cursor:pointer">
~
<input class="input" type="text" name="interview_date_end" size="10" readonly value="<%=interview_date_end%>" onClick="winopn('<%=default_path_root%>include/calendar.html?actval=interview_date_end')" style="cursor:pointer">
<%
Else
%>
<input type=text name='interview_date' value='<%=interview_date(0)%>' style="width: 130px;">
<%
End If
%>
</td>
<td align='center' width=120 style="font-size:11pt;font-weight:bold">인터뷰 장소</td>
<td valign=middle >
<input type=text size=30 name='interview_area' value='<%=interview_area%>' style="width: 130px;">
</td>
</tr>
<%
End if
%>
<% If category01_name <> "" then %>
<tr height=30 align='center' bgcolor="#FFFF96" >
<td style="font-size:11pt;font-weight:bold">분류1(<%=category01_name%>)</td>
<td valign=middle >
<select name="add_item1" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 1 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류1' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item1) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% If category02_name <> "" then %>
<td style="font-size:11pt;font-weight:bold">분류2(<%=category02_name%>)</td>
<td valign=middle >
<select name="add_item2" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 2 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류2' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item2) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% End If %>
<% If category03_name <> "" Then %>
<td style="font-size:11pt;font-weight:bold">분류3(<%=category03_name%>)</td>
<td valign=middle >
<select name="add_item3" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 3 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류3' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item3) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% End If %>
</tr>
<% End If %>
<% If category04_name <> "" then %>
<tr height=30 align='center' bgcolor="#FFFF96" >
<td style="font-size:11pt;font-weight:bold">분류4(<%=category04_name%>)</td>
<td valign=middle >
<select name="add_item4" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 4 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류4' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item4) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% If category05_name <> "" Then %>
<td style="font-size:11pt;font-weight:bold">분류5(<%=category05_name%>)</td>
<td valign=middle >
<select name="add_item5" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 5 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류5' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item5) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% End If %>
<% If category06_name <> "" then %>
<td style="font-size:11pt;font-weight:bold">분류6(<%=category06_name%>)</td>
<td valign=middle >
<select name="add_item6" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 6 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류6' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item6) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% End If %>
</tr>
<% End If %>
<% If category07_name <> "" Then %>
<tr height=30 align='center' bgcolor="#FFFF96" >
<td style="font-size:11pt;font-weight:bold">분류7(<%=category07_name%>)</td>
<td valign=middle >
<select name="add_item7" style="font-size:11pt;font-weight:bold;valign:nmiddle; width: 130px;">
<%
query = "SELECT id, category_code, category_label, attribute1, attribute2, attribute3, kikoan_id, category_index, category_name " & _
"FROM category_code where category_index = 7 AND kikoan_id = '" & kikoan_id & "' ORDER BY convert(int, category_code) "
adors.open query, adoconn, 1
i = 0
do while not adors.eof
i = i + 1
if i = 1 Then
%>
<OPTION value='분류7' selected>선택</option>
<%
end If
%>
<OPTION value='<%=adors("category_code")%>' <%if trim(adors("category_code")) = trim(add_item7) then%> selected <%end if%>><%=adors("category_label")%></option>
<%
adors.movenext
Loop
adors.close
%>
</select>
</td>
<% If category08_name <> "" then %>
<td style="font-size:11pt;font-weight:bold"></td>
<td valign=middle >
</td>
<% End If %>
<% If category09_name <> "" then %>
<td style="font-size:11pt;font-weight:bold"></td>
<td valign=middle >
</td>
<% End If %>
</tr>
<% End If %>
<tr bgcolor="#FFFF96" align='center'>
<td style="font-size:11pt;font-weight:bold">기타(비고)</td>
<td colspan="5">
<textarea name="contac_remark" style="width:99%; height:100px; font-size:10pt;overflow:scroll;ime-mode:active;" ><%=contac_remark%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='middle'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<tr height=50 align='center'>
<td style="position:relative;">
<img src='<%=domain_url%>:8888/images/common/btn_save.jpg' onclick='save("<%=key_id%>")' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='저장'>
&nbsp;&nbsp;&nbsp;&nbsp;
<img src='<%=domain_url%>:8888/images/common/btn_search_kikoan.jpg' onclick='contec_sel(<%=key_id%>)' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='기관 재선택'>
&nbsp;&nbsp;&nbsp;&nbsp;
<img src='<%=domain_url%>:8888/images/common/btn_search.jpg' onclick='search()' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='찾기'>
<img src="<%=domain_url%>:8888/images/makecall/btn_logout_02.jpg" onclick="fn_logout();"
title ='로그 아웃' style='cursor:pointer; position:absolute; top: 20px; right: 5px; display: none;' >
</td>
</tr>
</table>
</td>
</tr>
<%
'query = "select * from log where key_id = " & key_id & " and contac_stat <> 99 and substring(log_stat,1,2) <> '검증'"
query = "select A.*, B.login_name, C.contac_stat_label " & _
"from log as A LEFT OUTER JOIN login_user as B ON A.user_id = B.id " & _
"LEFT OUTER JOIN contac_stat as C ON C.kikoan_id = '" & kikoan_id & "' and A.contac_stat = C.contac_stat " & _
"where kikoan_id = '" & kikoan_id & "' " & _
"and key_id = '" & key_id & "' and (A.contac_stat <> 99 or log_stat = 'list_call') and substring(log_stat,1,2) <> '검증' " & _
"order by id "
adors.open query, adoconn, 1
'response.write query
if adors.recordcount > 0 then
'tmpstr="전화번호" & vbtab & vbtab & "일자" & vbtab & vbtab & "시간" & vbtab & "컨택결과" & vbtab & "컨택원" & vbcrlf
tmpstr= vbcrlf
end If
Dim i
i = 1
do while not adors.eof
'tmpstr = tmpstr & adors("tel_num") & vbtab & vbtab & _
' adors("log_date") & vbtab & vbtab & _
' adors("log_time") & vbtab & _
' adors("contac_stat") & vbtab & _
' adors("user_id") & vbcrlf
' & vbtab & <<< 탭
' & vbcrlf & <<< 줄간격
If adors("log_stat") = "list_call" Then
tmpstr = tmpstr & i & "번 : " & "[전화시도 일시 : " & adors("log_date") & "//" & adors("log_time") & "]" & " " & _
"[컨택원 : " & adors("login_name") & "]" & vbcrlf
Else
tmpstr = tmpstr & i & "번 : " & "[" & adors("log_stat") & " : " & adors("log_date") & "//" & adors("log_time") & "]" & " " & _
"[컨택원 : " & adors("login_name") & "]" & " " & _
"[컨택결과 : " & adors("contac_stat_label") & "]" & vbcrlf
End if
adors.movenext
i = i + 1
loop
adors.close
%>
<tr>
<td valign='middle'>
<table width=100% cellpadding='0' cellspacing='0' border='1'>
<tr height=50 align='center' >
<td width=200 >전화 건 히스토리</td >
<td >
<textarea style="width:99%; height:100px; font-size:10pt;overflow:scroll;ime-mode:active;" ><%=tmpstr%></textarea>
</td>
</tr>
</table>
</td>
</tr>
<%else%>
<!-- #include file = "contact_inc_top.asp"-->
<tr>
<td valign='middle'>
<table width=700 cellpadding='0' cellspacing='0' border='0'>
<tr height=50 align='center' >
<td width=100% style='font-size:16pt;font-weight:bold;font-color:"#6DD66D";'>더이상의 리스트가 없습니다. 다른 항목을 선택하세요.</td>
</tr>
<tr align='center' >
<td>
<img src="<%=domain_url%>:8888/images/makecall/btn_logout_02.jpg" onclick="fn_logout();" title ='로그 아웃' style='CURSOR:pointer;' >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img src='<%=domain_url%>:8888/images/common/btn_search_kikoan.jpg' onclick='contec_sel(<%=key_id%>)' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='기관 재선택'>
<img src='<%=domain_url%>:8888/images/common/btn_move_back.jpg' onclick='move_back()' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='뒤로가기'>
&nbsp;&nbsp;&nbsp;&nbsp;
<img src='<%=domain_url%>:8888/images/common/btn_search.jpg' onclick='search()' style='CURSOR:pointer;VERTICAL-ALIGN: middle;' title='찾기'>
</td>
</tr>
</table>
</td>
</tr>
<%end if%>
<!-- #include file = "contact_inc_bottom.asp"-->
<script src="/js/jquery.min.js"></script>
<script type="text/javascript">
$(function (){
var tmp_heigh_1 = 0;
var tmp_heigh_2 = 0;
var tmp_heigh_3 = 0;
var tmp_heigh_4 = 0;
if(document.getElementById("t_area_1") != null){
tmp_heigh_1 = document.getElementById("t_area_1").scrollHeight * 1;
tmp_heigh_2 = document.getElementById("t_area_2").scrollHeight * 1;
tmp_heigh_3 = document.getElementById("t_area_3").scrollHeight * 1;
tmp_heigh_4 = document.getElementById("t_area_4").scrollHeight * 1;
document.getElementById("t_area_1").style.height = "" + tmp_heigh_1 + "px";
document.getElementById("t_area_2").style.height = "" + tmp_heigh_2 + "px";
document.getElementById("t_area_3").style.height = "" + tmp_heigh_3 + "px";
document.getElementById("t_area_4").style.height = "" + tmp_heigh_4 + "px";
}
});
function send_SMS(){
var list_id = document.getElementById("list_id").value;
var dn = document.getElementById("dn").value;
var url = document.getElementById("t_area_1").value;
var param = "";
param = "?dn="+dn+"&list_id="+list_id+"&url="+url;
wins = open("<%= domain_url%>:8088/krc_module/system/sendSms"+param,"wins","width=510,height=650,top=200,left=200");
wins.focus();
}
function emailSend(email, kikoan_id, add_index){
var list_id = document.frm_main.list_id.value;
if(add_index == "0") {
if(email.replace(" ","") == ""){
alert("email이 없습니다.");
}else{
var param = "";
param = "?email="+email+"&kikoan_id="+kikoan_id+"&list_id="+list_id;
wins = open("<%= domain_url%>:8088/krc_module/system/contactMail"+param,"wins","width=780,height=800");
wins.focus();
}
}else if(add_index == "1"){
if(document.getElementById("email_new").value.replace(" ","") == ""){
alert("email이 없습니다.");
}else{
var param = "";
param = "?email="+document.getElementById("email_new").value+"&kikoan_id="+kikoan_id+"&list_id="+list_id;
wins = open("<%= domain_url%>:8088/krc_module/system/contactMail"+param,"wins","width=780,height=800");
wins.focus();
}
}else if(add_index == "2"){
if(document.getElementById("email_new2").value.replace(" ","") == ""){
alert("email이 없습니다.");
}else{
var param = "";
param = "?email="+document.getElementById("email_new2").value+"&kikoan_id="+kikoan_id+"&list_id="+list_id;
wins = open("<%= domain_url%>:8088/krc_module/system/contactMail"+param,"wins","width=780,height=800");
wins.focus();
}
}
}
function winopn(urlstr) {
wins = open(urlstr,"wins","width=190,height=250");
wins.focus();
}
function move_back()
{
history.back();
}
function tel_sel_ok(opt)
{
if (eval(opt) == 1)
{
document.getElementById("dn").value = document.getElementById("tel1").value;
}
else if (eval(opt) == 2)
{
document.getElementById("dn").value = document.getElementById("tel2").value;
}
else if (eval(opt) == 3)
{
document.getElementById("dn").value = document.getElementById("tel3").value;
}
else if (eval(opt) == 4)
{
document.getElementById("dn").value = document.getElementById("tel4").value;
}
else if (eval(opt) == 5)
{
document.getElementById("dn").value = document.getElementById("tel5").value;
}
else if (eval(opt) == 6)
{
document.getElementById("dn").value = document.getElementById("tel6").value;
}
}
function contec_sel(id)
{ //기관 재선택 부터
var f = document.frm_main;
f.action = "contact_select.asp?command=re_contac_sel";
f.submit();
}
function search(id)
{ //기관 재선택 부터
var f = document.frm_main;
document.frm_main.action = "contact_search.asp";
document.frm_main.submit();
}
function save(key_id)
{
var f = document.frm_main;
if (f.save_contac_stat.value == 0)
{
alert("전화 결과를 선택하세요");
f.save_contac_stat.focus();
return false;
}
//alert("f.save_contac_stat.value : "+f.save_contac_stat.value);
//alert("f.project_type.value : "+f.project_type.value);
if(f.save_contac_stat.value == 1){
//정강욱 2014-04-07 임시 프로젝트 id 추가,
if (f.project_type.value == "방문용" || f.project_type.value == "컨택용"){
if (f.field_area.value == 0){
alert("실사 지역을 선택하세요");
f.field_area.focus();
return false;
}
if(f.interview_date_type.value == "FROM-TO"){
if (f.interview_date_st.value == "" || f.interview_date_end.value == ""){
alert("인터뷰 날짜를 입력하세요");
//f.interview_date.focus();
return false;
}
}else{
if (f.interview_date.value == ""){
alert("인터뷰 날짜를 입력하세요");
//f.interview_date.focus();
return false;
}
}
if (f.interview_area.value == ""){
alert("인터뷰 장소를 입력하세요");
f.interview_area.focus();
return false;
}
}else if (f.project_type.value == "방문용" || f.project_type.value == "컨택용"){
}
}
var mylen = f.changeMail.length;
for (var i=0; i<mylen; i++){
if (f.changeMail[i].checked == true){
if (f.changeMail[i].value == 'y'){
if(f.email_new.value == ""){
alert("변경 메일1을 입력하세요.");
f.email_new.focus();
return false;
}
}
break;
}
}
var mylen = f.changeMail2.length;
for (var i=0; i<mylen; i++){
if (f.changeMail2[i].checked == true){
if (f.changeMail2[i].value == 'y'){
if(f.email_new2.value == ""){
alert("변경 메일2을 입력하세요.");
f.email_new2.focus();
return false;
}
}
break;
}
}
var mylen = f.changeTelNo.length;
for (var i=0; i<mylen; i++){
if (f.changeTelNo[i].checked == true){
if (f.changeTelNo[i].value == 'y'){
if(f.tel_new.value == ""){
alert("변경 유선 전화번호를 입력하세요.");
f.tel_new.focus();
return false;
}
}
break;
}
}
var mylen = f.changeTelNo2.length;
for (var i=0; i<mylen; i++){
if (f.changeTelNo2[i].checked == true){
if (f.changeTelNo2[i].value == 'y'){
if(f.tel_new2.value == ""){
alert("변경 무선 전화번호를 입력하세요.");
f.tel_new2.focus();
return false;
}
}
break;
}
}
if (f.project_type.value == "방문용" || f.project_type.value == "컨택용"){
if(f.interview_date_type.value == "FROM-TO"){
f.interview_date.value = f.interview_date_st.value + "~" + f.interview_date_end.value
}else{
}
}else{
}
//DLL_Finalize();
f.action = "contact_inc_list_save.asp?key_id=" + key_id;
f.submit();
}
function next_list()
{
if (document.frm_main.login_area.value == "서울")
{
document.frm_main.action = "contact_tel_dial.asp";
}
else
{
document.frm_main.action = "contact_inc_list.asp";
}
document.frm_main.submit();
}
function changeData(type){
var f = document.frm_main;
for (var i=0; i<2; i++){
if(type == "mail"){
if (f.changeMail[i].checked == true){
//alert(type+"//"+f.changeMail[i].value);
if(f.changeMail[i].value == "y"){
document.getElementById('email_new').readOnly = false;
}else{
document.getElementById('email_new').readOnly = true;
}
break;
}
}else if(type == "mail2"){
if (f.changeMail2[i].checked == true){
//alert(type+"//"+f.changeMail[i].value);
if(f.changeMail2[i].value == "y"){
document.getElementById('email_new2').readOnly = false;
}else{
document.getElementById('email_new2').readOnly = true;
}
break;
}
}else if(type == "telno"){
if (f.changeTelNo[i].checked == true){
//alert(type+"//"+f.changeTelNo[i].value);
if(f.changeTelNo[i].value == "y"){
document.getElementById('tel_new').readOnly = false;
}else{
document.getElementById('tel_new').readOnly = true;
}
break;
}
}else if(type == "telno2"){
if (f.changeTelNo2[i].checked == true){
//alert(type+"//"+f.changeTelNo[i].value);
if(f.changeTelNo2[i].value == "y"){
document.getElementById('tel_new2').readOnly = false;
}else{
document.getElementById('tel_new2').readOnly = true;
}
break;
}
}
}
}
</script>