<% b_type = request("b_type") searchtype = request("searchtype") if searchtype = "" then searchtype = "0" end if searchword = request("searchword") if request("gotopage") <> "" then tmp_currentpage = request("gotopage") else tmp_currentpage = 1 end if tmp_menuname = "" Select case b_type case "not" tmp_menuname = "공지사항" case "con" tmp_menuname = "제안용 서류함" case "rule" tmp_menuname = "사내규정" case "sug" tmp_menuname = "업무 매뉴얼" case "klg" tmp_menuname = "교육창고" case "fre" tmp_menuname = "통계지식" End Select %>

<%=tmp_menuname%>

<% query = "SELECT * " query = query & "FROM [intranet_board] " query = query & "WHERE b_type='" & b_type & "' " if searchtype = "0" then query = query & "and b_subject like '%" & searchword & "%' " elseif searchtype = "1" then query = query & "and b_content like '%" & searchword & "%' " elseif searchtype = "2" then query = query & "and (b_subject like '%" & searchword & "%' or b_content like '%" & searchword & "%') " elseif searchtype = "3" then query = query & "and b_name like '%" & searchword & "%' " end if query = query & "AND b_delok='N' " query = query & "ORDER BY b_sn DESC " 'Response.Write query & "
" Rs.Open query, adoConn, 1 %>
목록결과 : 총 <%=Rs.RecordCount%>개의 항목이 있습니다.
<% if Rs.RecordCount > 0 then Rs.PageSize = 20 tmp_ok = 1 PageCount = Rs.PageCount Rs.absolutepage = tmp_Currentpage tmp_total_record = Rs.RecordCount tmp_for = Cint(tmp_total_record) - ((Cint(tmp_Currentpage) - 1) * Rs.PageSize) if Rs.PageSize <= tmp_for then if Rs.RecordCount <= Rs.PageSize then tmp_for = Rs.recordcount else tmp_for = Rs.PageSize end if else tmp_for = tmp_for end if for i = 1 to tmp_for if Cint(tmp_Currentpage)=1 then Num=Cint(tmp_total_record)- i+1 else Num=Cint(tmp_total_record) - ((Cint(tmp_Currentpage) - 1) * Rs.PageSize) - i +1 end if tmp_subject = Rs("b_subject") query = " SELECT p_team_name as d_name FROM project2.dbo.V_Person WHERE p_no = '" & Rs("b_namecode") & "' " Adors.Open query, adoConn, 1 if Adors.RecordCount > 0 then tmp_depart = Adors("d_name") else tmp_depart = "-" end if Adors.Close if Rs("b_filename") <> "" then fileArray = Split(replace(Rs("b_filename"),",,",","),",") tmp_file = Ubound(fileArray) If tmp_file=0 then tmp_file = 1 End If tmp_file = tmp_file & "개" else tmp_file = "-" end if if isnull(Rs("b_reply_cnt")) OR Rs("b_reply_cnt") = "0" then tmp_reply_cnt = "" else tmp_reply_cnt = "[ " & Rs("b_reply_cnt") & " ]" end if %> <% Rs.MoveNext next end if Rs.Close %>
No. 제목 분류 작성자 작성일 읽음 첨부
<%=Num%> ')" class="blue"><%=tmp_subject%> <%=tmp_reply_cnt%> <%=tmp_depart%> <%=Rs("b_name")%> <%=left(Rs("b_regdate"), 10)%> <%=Rs("b_readcnt")%> <%=tmp_file%>
<%=Pagelist("b_list.asp",tmp_currentpage ,tmp_bcolor , "", pagecount, "&b_type=" & b_type & "&searchtype=" & searchtype & "&searchword=" & searchword)%>