<% dim command command = request("command") if command <> "excel" then %> <% end if %> <% set rsf = server.CreateObject("ADODB.RECORDSET") dim tmp_depart '연구부서 list배열 dim method() '조사방법 dim Sample_range(6,3) '샘플수 dim field_rank(3,2) '실사 난이도 dim category '카테고리 dim types '업종 Dim tmp_area_part(5) Dim tmp_survey_part(2) Dim tmp_survey_times(10) Dim tmp_field_process(3) 'page config tmp_colspan = 5 p_depart = request("p_depart") p_method = request("p_method") p_sample_real = request("p_sample_real") p_field_rank = request("p_field_rank") p_cli_company = request("p_cli_company") p_cli_code = request("p_cli_code") p_category = request("p_category") p_reg_date_st = request("p_reg_date_st") p_reg_date_ed = request("p_reg_date_ed") p_subject = request("p_subject") p_intention = request("p_intention") p_types1 = request("p_types1") p_types2 = request("p_types2") p_types3 = request("p_types3") p_target_part = request("p_target_part") p_area_part = request("p_area_part") p_survey_part = request("p_survey_part") p_survey_times = request("p_survey_times") p_field_process = request("p_field_process") today = request("today") toyear = request("toyear") s = request("s") '찾기옵션 ' Response.Write "s : " & s & "
" ' Response.Write "command : " & command & "
" '///============================================== ''엑셀형식으로 자동으로 저장 if command = "excel" then ' Response.Buffer = false Response.Expires=0' Response.AddHeader "Content-Disposition","attachment;filename=프로젝트검색리스트_2009년부터.xls" Response.ContentType = "application/vnd.ms-excel" Response.CacheControl = "public" end if if request("p_types1") <> "" then p_types1 = request("p_types1") else p_types1 = "0" end if if request("p_types2") <> "" then p_types2 = request("p_types2") else p_types2 = "0" end if if request("p_types3") <> "" then p_types3 = request("p_types3") else p_types3 = "0" end if y = request("y") if y = "1" then p_types2 = "0" p_types3 = "0" elseif y = "2" then p_types3 = "0" end if 'Response.Write today & "
" '------------------------------------------------------ '연구부서 list목록 q = "SELECT max(d_mcode) as max_code " q = q & "FROM Depart " rsc.Open q, adoConn, 1 tmp_max = rsc("max_code") rsc.Close query = "SELECT * " query = query & "FROM Depart " query = query & "WHERE d_mcode >= '0' " query = query & "ORDER BY d_mcode ASC " rsc.open query, adoConn, 1 redim tmp_depart(int(tmp_max),2) for i = 1 to int(rsc.RecordCount) tmp_depart(int(rsc("d_mcode")),1) = rsc("d_mcode") tmp_depart(int(rsc("d_mcode")),2) = rsc("d_mname_shot") rsc.MoveNext next rsc.close tmp_area_part(1) = "서울" tmp_area_part(2) = "수도권" tmp_area_part(3) = "광역시" tmp_area_part(4) = "전국" tmp_area_part(5) = "기타" tmp_survey_part(1) = "리스트" tmp_survey_part(2) = "비리스트" tmp_survey_times(1) = "10분" tmp_survey_times(2) = "20분" tmp_survey_times(3) = "30분" tmp_survey_times(4) = "40분" tmp_survey_times(5) = "50분" tmp_survey_times(6) = "1시간" tmp_survey_times(7) = "1시간 30분" tmp_survey_times(8) = "2시간" tmp_survey_times(9) = "2시간 30분" tmp_survey_times(10)= "3시간" tmp_field_process(1) = "자체" tmp_field_process(2) = "외주" tmp_field_process(3) = "자체&외주" '------------------------------------------------------ '조사방법 query = "select * from p_Method order by code1 " rsc.Open query, adoConn, 1 i = rsc.RecordCount redim method(i,2) i=0 method(0,0) = request("p_method") '선택된 조사방법 method(0,1) = "0" method(0,2) = "전 체" do while not rsc.EOF i = i + 1 method(i,1) = rsc("code1") method(i,2) = rsc("name1") rsc.MoveNext loop rsc.Close '------------------------------------------------------ ''샘플수의 범위 Sample_range(0,0) = request("p_sample_real") Sample_range(0,1) = "0" Sample_range(0,2) = " 전 체 " Sample_range(1,1) = "1" Sample_range(1,2) = "         ~  500" Sample_range(1,3) = "500" Sample_range(2,1) = "2" Sample_range(2,2) = "   501 ~ 1,000" Sample_range(2,3) = "1,000" Sample_range(3,1) = "3" Sample_range(3,2) = "1,001 ~ 1,500" Sample_range(3,3) = "1,500" Sample_range(4,1) = "4" Sample_range(4,2) = "1,501 ~ 2,000" Sample_range(4,3) = "2,000" Sample_range(5,1) = "5" Sample_range(5,2) = "2,001 ~ 2,500" Sample_range(5,3) = "2,500" Sample_range(6,1) = "6" Sample_range(6,2) = "2,501 ~ " Sample_range(6,3) = "2,501" '------------------------------------------------------ '실사 난이도별 field_rank(0,0) = request("p_field_rank") field_rank(0,1) = "0" field_rank(0,2) = "전 체" field_rank(1,1) = "하" field_rank(1,2) = "하" field_rank(2,1) = "중" field_rank(2,2) = "중" field_rank(3,1) = "상" field_rank(3,2) = "상" '------------------------------------------------------ 'category list query = "SELECT * " query = query & "FROM p_category " query = query & "ORDER BY sort_key " rsc.Open query, adoConn, 1 redim category(int(rsc.RecordCount), 2) for i = 1 to rsc.RecordCount category(i,1) = rsc("code1") category(i,2) = rsc("name1") rsc.MoveNext next rsc.Close '------------------------------------------------------ '====================================================== '검색 query 만들기 if s = "1" then '찾기 로직을 탔을 경우 '====================================================== query = "SELECT * " query = query & "FROM project " query = query & "WHERE p_sn <> '' " '부서-------------------------------------------------- if p_depart <> "" then query = query & " AND p_depart = '" & p_depart & "' " end if '조사방법---------------------------------------------- if p_method <> "0" then query = query & " AND p_method = '" & p_method & "' " end if p_sample = p_sample_real if p_sample_real <> "0" then if cint(Sample_range(0,0)) = 1 then query = query & " AND (p_sample <= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "') " elseif cint(Sample_range(0,0)) = 6 then '2501이상 query = query & " AND (p_sample >= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "') " else query = query & " AND (p_sample > '" & replace(Sample_range(cint(Sample_range(0,0))-1,3),",","") & "' AND p_sample <= '" & replace(Sample_range(cint(Sample_range(0,0)),3),",","") & "')" end if end if '실사난이도-------------------------------------------- if p_field_rank <> "0" then query = query & " AND p_field_rank = '" & p_field_rank & "' " end if '클라이언트명------------------------------------------ if p_cli_code <> "" then query = query & " AND p_cli_company = '" & p_cli_code & "' " end if '카테고리---------------------------------------------- if p_category <> "" then query = query & " AND (p_category = '" & p_category & "' " query = query & " OR p_category2 = '" & p_category & "' " query = query & " OR p_category3 = '" & p_category & "') " end if '등록기간---------------------------------------------- if p_reg_date_st <> "" AND p_reg_date_ed <> "" then '시작 및 끝나는 날짜 구하기 if cint(right(p_reg_date_ed,2)) > 11 then edate = cstr(cint(left(p_reg_date_ed,4)) + 1) & "-01-01" else if cint(right(p_reg_date_ed,2)) > 8 then edate = cstr(left(p_reg_date_ed,4)) & "-" & cstr(cint(right(p_reg_date_ed,2)) + 1) & "-01" else edate = cstr(left(p_reg_date_ed,4)) & "-0" & cstr(cint(right(p_reg_date_ed,2)) + 1) & "-01" end if end if sdate = p_reg_date_st & "-01" edate = cdate(edate) - 1 query = query & " AND p_reg_date Between '" & sdate & "' AND '" & edate & "' " end if '------------------------------------------------------ if p_subject <> "" then query = query & " AND p_subject LIKE '%" & p_subject & "%' " end if '------------------------------------------------------ if p_intention <> "" then query = query & " AND p_intention LIKE '%" & p_intention & "%' " end if '------------------------------------------------------ if p_types1 <> "0" then query = query & "AND (" query = query & " p_types1 = '" & p_types1 & "' " if p_types2 <> "0" then query = query & " AND p_types2 = '" & p_types2 & "' " end if if p_types3 <> "0" then query = query & " AND p_types3 = '" & p_types3 & "' " end if query = query & ") " end if '------------------------------------------------------ if p_target_part <> "0" then query = query & "AND (p_target_part = '" & p_target_part & "') " end if '------------------------------------------------------ if p_area_part <> "0" then query = query & "AND (p_area_part = '" & p_area_part & "') " end if '------------------------------------------------------ if p_survey_part <> "0" then query = query & "AND (p_survey_part = '" & p_survey_part & "') " end if '------------------------------------------------------ if p_survey_times <> "0" then query = query & "AND (p_survey_times = '" & p_survey_times & "') " end if '------------------------------------------------------ if p_field_process <> "0" then query = query & "AND (p_field_process = '" & p_field_process & "') " end if '------------------------------------------------------ query = query & "ORDER BY p_subject, p_reg_date DESC, p_sn DESC " '------------------------------------------------------ tmp_search_query = query end if'if s = "1" then '====================================================== %>
<% if command = "excel" then else %>
검색을 원하시는 프로젝트 조건을 설정하시고, 찾기 버튼을 클릭해 주세요.
부서 조사방법
샘플수별 실사 난이도별
클라이언트명 카테고리
등록기간 " onClick="search('/lib/cal2.asp?x=1','DateSearch','left=500,top=100,width=400,height=200,scrollbars=yes')" style="cursor:pointer"> - " onClick="search('/lib/cal2.asp?x=2','DateSearch','left=500,top=100,width=400,height=200,scrollbars=yes')" style="cursor:pointer"> checked <% end if %>>현재달 checked <% end if %>>현재년도
프로젝트 이름
프로젝트 내용
업종 <% if p_types1 <> "" then %>     <% if p_types2 <> "" and p_types2 <> "0" then %>     <% end if 'if p_types2 <> "" then %> <% end if 'if p_types1 <> "" then %>
조사대상 조사지역
조사분류 면접 소요시간
실사수행
<% end if %> <% if request("s") = 1 then %> <%if command <> "excel" then%> <%end if%>
<%if command="excel" then%> <%end if%> <% 'Response.Write query & "
" rsc.Open tmp_search_query, adoConn, 1 if rsc.RecordCount > 0 then for i = 1 to rsc.RecordCount if i mod 2 = 0 then tmp_bgcolor = "#dbe9f2" else tmp_bgcolor = "#ffffff" end if %> <% p_method = "몰라" '조사방법 for j = 0 to int(ubound(method)) if trim(method(j,1)) = trim(rsc("p_method")) then p_method = method(j,2) exit for end if next%> <% if isnull(rsc("p_sample")) then ' tmpstr = "0" else tmpstr = rsc("p_sample") end if%> <% if command = "excel" then query = "SELECT * FROM Depart WHERE d_code='" & rsc("p_depart_dep") & "' " 'Response.Write "query : " & query & "
" rs.Open query, adoConn, 1 if rs.RecordCount > 0 then tmp_depart_dep = rs("d_mname_shot") end if rs.Close %> <% tmpstr=" "'"클라이언트 명" query = "SELECT * " query = query & "FROM [Client] " query = query & "WHERE c_code='" & rsc("p_cli_company") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("c_name") end if rsf.Close %> <% tmpstr=" "'"'클라이언트 타입" if not isnull(rsc("p_cli_type")) then if trim(rsc("p_cli_type")) <> "" then query = "select * from client_type where c_type_code = " & cint(rsc("p_cli_type")) rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("c_type_name") end if rsf.Close end if end if %> <% tmpstr=" "'카테고리" if rsc("p_category") <> "" then query = "SELECT * FROM p_category " query = query & "WHERE code1='" & rsc("p_category") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("name1") end if rsf.Close end if %> <% tmpstr=" "'업종" if rsc("p_types1") <> "" then query = "SELECT * FROM p_types " query = query & "WHERE t_code1='" & rsc("p_types1") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("t_name") end if rsf.Close end if %> <% tmpstr=" "'업종" if rsc("p_types2") <> "" then query = "SELECT * FROM p_types " query = query & "WHERE t_code2='" & rsc("p_types2") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("t_name") end if rsf.Close end if %> <% tmpstr=" "'업종" if rsc("p_types3") <> "" then query = "SELECT * FROM p_types " query = query & "WHERE t_code3='" & rsc("p_types3") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("t_name") end if rsf.Close end if %> <% tmpstr =" "'연구원 1" if rsc("p_rsch_1") <> "" then query = "SELECT * " query = query & "FROM Person " query = query & "WHERE p_no='" & rsc("p_rsch_1") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("p_name") end if rsf.close end if %> <% tmpstr =" "'연구원 2" if rsc("p_rsch_2") <> "" then query = "SELECT * " query = query & "FROM Person " query = query & "WHERE p_no='" & rsc("p_rsch_2") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("p_name") end if rsf.close end if %> <% tmpstr =" "'연구원 3" if rsc("p_rsch_3") <> "" then query = "SELECT * " query = query & "FROM Person " query = query & "WHERE p_no='" & rsc("p_rsch_3") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("p_name") end if rsf.close end if %> <% tmpstr =" "'연구원 4" if trim(rsc("p_rsch_4")) <> "" then query = "SELECT * " query = query & "FROM Person " query = query & "WHERE p_no='" & rsc("p_rsch_4") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("p_name") end if rsf.close end if %> <% tmpstr = " "'담당 SV" query = "SELECT * " query = query & "FROM Person " query = query & "WHERE p_no='" & rsc("p_sv") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then tmpstr = rsf("p_name") end if rsf.Close %> <% end if 'if command <> "excel" then %> <% if isnull(rsc("p_survey_cnt")) then tmpstr = "0" else tmpstr = rsc("p_survey_cnt") end if %> <% if isnull(rsc("p_budget")) then p_budget = "0" else p_budget = rsc("p_budget") end if %> <% if isnull(rsc("p_esti_cost")) then tmpstr = "0" else if trim(rsc("p_esti_cost")) = "" then tmpstr = "0" else tmpstr = rsc("p_esti_cost") end if end if %> <%if isnull(rsc("p_real_cost")) then pay_actual = "0" else if rsc("p_real_cost") = "" then pay_actual = "0" else pay_actual = rsc("p_real_cost") end if end if if p_method <> "몰라" then tmpstr = default_path_root & "ess/direct_cost_print.asp?p_sn=" & rsc("p_sn") ' tmpstr = tmpstr & "&p_c_methodm1=" & rsc("p_method") if (cint(rsc("p_method"))>=12 and cint(rsc("p_method"))<=14) or cint(rsc("p_method")) =18 or cint(rsc("p_method")) =20 then 'F/F면 ' tmpstr = tmpstr & "&p_type=FF&pay_type=1" elseif (cint(rsc("p_method"))=15) or (cint(rsc("p_method"))=16) then 'FGI면 ' tmpstr = tmpstr & "&p_type=FGI&pay_type=2" elseif (cint(rsc("p_method"))=11) or (cint(rsc("p_method"))=17) or (cint(rsc("p_method"))=19) or (cint(rsc("p_method"))>=21 and cint(rsc("p_method"))<=23) then 'TEL이면 ' tmpstr = tmpstr & "&p_type=TEL&pay_type=3" elseif cint(rsc("p_method"))=24 then 'gang이면 ' tmpstr = tmpstr & "&p_type=Gang&pay_type=4" else ' tmpstr = "해당프로젝트에 조사방법이 등록되어 있지 않습니다" ' '기타 이면 ' tmpstr = tmpstr & "&p_type=Etc&pay_type=5" end if end if if tmpstr = "해당프로젝트에 조사방법이 등록되어 있지 않습니다" then%> 관리 <%else if cint(Session("p_depart") ) < 100 then '무조건 view only로 하기 위해 ' tmpstr = tmpstr & "&printmode=1" end if%> <%end if%> <% if p_budget = "0" then p_budget = 1 end if pay_actual_proportion = formatnumber((pay_actual / CDbl(p_budget)) * 100, 2) %> <%if isnull(pay_actual_proportion) then tmpstr = "0" else tmpstr = pay_actual_proportion end if%> <% if isnull(rsc("p_sample_value_chk")) then tmpstr = "0" else tmpstr = rsc("p_sample_value_chk") end if if isnull(rsc("p_sample_real")) or clng(p_budget) = 0 then tmpstr = "0" else if clng(rsc("p_sample_real")) = 0 then tmpstr = "0" else tmpstr = clng(p_budget) / rsc("p_sample_real") end if end if %> <% if isnull(rsc("p_field_end")) or isnull(rsc("p_field_st")) then tmpstr = "0" else if trim(rsc("p_field_end")) = "" or trim(rsc("p_field_st")) = "" then tmpstr = "0" else tmpstr = cdate(rsc("p_field_end")) - cdate(rsc("p_field_st")) + 1 end if end if %> <% query = "SELECT * " query = query & "FROM file_log " query = query & "WHERE p_sn='" & rsc("p_sn") & "' " rsf.Open query, adoConn, 1 if rsf.RecordCount > 0 then research = rsf("research") fieldwork = rsf("fieldwork") computer = rsf("computer") manager = rsf("manager") end if rsf.Close if research = "1" then research = "Y" else research = "N" end if if fieldwork = "1" then fieldwork = "Y" else fieldwork = "N" end if if computer = "1" then computer = "Y" else computer = "N" end if if manager = "1" then manager = "Y" else manager = "N" end if %> <% rsc.MoveNext next end if 'if rsc.RecordCount > 0 then rsc.Close %>
본부 년도 프로젝트코드 프로젝트명 조사방법 샘플수세부부서 조사목적 클라이언트명 클라이언트형태 카테고리 업종(대) 업종(중) 업종(소) 조사대상 조사지역 계약기간 실사시작일 실사종료일 보고서제출일 담당연구원1 담당연구원2 담당연구원3 담당연구원4 담당SV문항 계약액 매출액 예상직접비 실제직접비 직접비율(%) 샘플당단가 실사난이도 조사일수(일) 연구 실사 전산 경영
<% for j = 1 to ubound(tmp_depart) if tmp_depart(j,1) = rsc("p_depart") then Response.Write trim(tmp_depart(j,2)) tmp_teamname = tmp_depart(j,2) end if next %> <%=mid(rsc("p_sn"),1,2)%>년 <%=rsc("p_sn")%> <%if command <> "excel" then%> ','<%=tmp_teamname%>')" class="blue"> <%end if%> <%=rsc("p_subject")%> <%if command <> "excel" then%> <%end if%> <%if p_method = "몰라" then%> <%=p_method%> <%else%> <%=p_method%> <%end if%> <%=formatnumber(tmpstr,0)%><%=tmp_depart_dep%> <%=rsc("p_intention")%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%> <%=rsc("p_target_text")%> <%=rsc("p_area")%> <%=rsc("p_convdate_st2")&"~"&rsc("p_convdate_end2")%> <%=rsc("p_field_st")%> <%=rsc("p_field_end")%> <%=rsc("p_report_st")&"~"&rsc("p_report_end")%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=tmpstr%><%=formatnumber(p_budget,0)%> 원 <%=formatnumber(p_sales,0)%> 원<%=formatnumber(tmpstr,0)%> 원 <% if p_method <> "몰라" and command <> "excel" then%> <% end if %> <%=formatnumber(pay_actual,0)%> 원 <% if p_method <> "몰라" and command <> "excel" then %> <% end if %> <%=tmpstr%> %<%=formatnumber(tmpstr,0)%> 원 <%=rsc("p_field_rank")%><%=tmpstr%><%=research%> <%=fieldwork%> <%=computer%> <%=manager%>
* 프로젝트 명을 클릭하시면 상세내용을 볼 수 있습니다.
<% end if ''if request("s") = 1 then %>
<%if command <> "excel" then%> <%END IF%>