Home > Q & A
   
   
  <% call db_conn() call rs_conn() dim pagesize, pg, sq1, totalpage, finder1, finder2, job 'º¯¼ö ¼³¸í 'pagesize : ÇÑÆäÀÌÁö¿¡ º¸¿©Áö´Â ¸®½ºÆ® °¹¼ö 'pg : ÆäÀÌÁö ¹øÈ£ 'sq1 : Äõ¸®¹® 'totalpage : Àüü ÆäÀÌÁö °¹¼ö 'finder1 : °Ë»öÀÇ Á¾·ù(1 : Á¦¸ñ, 2 : ³»¿ë) 'finder2 : °Ë»ö¾î if not trim(request("pg"))="" and request("pg")<>cstr(0) then pg=request("pg") else pg=1 end if finder1 = request("finder1") finder2 = request("finder2") job = request("job") if job = "" then job = 1 end if if finder2 <> "" then '°Ë»öÄõ¸® select case finder1 case 1 sq1 = "select * from tb_board where subject like '%"+finder2+"%' and view_yn=1" case 2 sq1 = "select * from tb_board where content like '%"+finder2+"%' and view_yn=1" case 3 sq1 = "select * from tb_board where username like '%"+finder2+"%' and view_yn=1" end select else '°Ë»ö ¾øÀ»½Ã Äõ¸® sq1 = "select * from tb_board where view_yn=1" end if sq1 = sq1 & " and job = " & job & " order by ref desc, re_step asc" pagesize=15 rs.PageSize = pagesize rs.Open sq1, dbconn, 1 if not rs.eof then rs.AbsolutePage = cint(pg) totalpage=rs.PageCount end if %>
<%if not rs.EOF then dim i, counter 'i : ·çÇÁ¹® »ó¼ö 'counter : °Ô½Ã¹° ¹øÈ£¸Þ±è for i = 1 to pagesize%> <% rs.MoveNext if rs.eof then exit for end if next end if call rs_close() call db_close() %>
¹ø È£ ÀÛ¼ºÀÚ Á¦ ¸ñ ÀÛ¼ºÀÏ Á¶È¸¼ö
<%counter=rs.RecordCount-(i-1+(cint(pg)-1)*pagesize)%> <%= counter %> <%= rs("username") %> <%if rs("re_level") > 0 then%> " height=10> <% end if %> &pg=<%=pg%>&finder1=<%=finder1%>&finder2=<%=finder2%>&ref=<%=rs("ref")%>&job=<%=job%>" onmouseover="show('<%=counter%>')" onmouseout="hidden('<%=counter%>')"> <%= rs("subject") %> <%= left(rs("regdate"),10) %> <%= rs("viewcount") %> <%Dim content content = replace(rs("content"),chr(10),"
") content = replace(content," "," ")%>
" name="finder1">