<%Option Explicit%> <% Dim page Dim search Dim searchstring Dim sql Dim result Dim totalpage Dim recordcount Dim i Dim wid Dim j Dim subject Dim wname Dim blockpage If Request("page") = "" Then page = 1 Else page = Request("page") End if If Request("search") <> "" Then search = Request("search") searchstring = Request("searchstring") sql = "SELECT num,wname,email,subject,content,passwd,date,visit,ref,re_step,re_level FROM sinsungboard WHERE "&search&" LIKE '%"&searchstring&"%' ORDER BY num DESC" Else sql = "SELECT num,wname,email,subject,content,passwd,date,visit,ref,re_step, re_level FROM sinsungboard ORDER BY num DESC" End If Set result = Server.CreateObject("ADODB.RecordSet") result.pagesize = 4 result.open sql,conn,adOpenStatic totalpage = result.Pagecount If totalpage = 0 Then totalpage = 1 %> (주)신성H.S
 
* 이곳은 (주)신성의 일반게시판입니다.

번호 제목 성명 작성일 조회
<% If result.bof or result.eof Then %> <% Else recordcount = result.Recordcount result.Absolutepage = page i = 1 Do Until result.eof or i>result.Pagesize If i <> 1 Then %> <%End If%> <% result.MoveNext i = i + 1 Loop End If %>
광고나 홍보글은 사전 예고 없이 삭제하겠습니다.
<%=result("re_step")%> <%If result("re_level") > 0 Then wid = 1 * result("re_level") j = 1 Do Until j > wid Response.Write "0" j = j + 1 Loop Response.Write " " End If If Len(result("subject")) > 15 Then subject = Left(result("subject"),14)&".." Else subject = result("subject") End If If DateDiff("h",result("date"),Now()) < 24 Then Response.Write ""& subject &"" Response.Write "  " Else Response.Write ""& subject &"" End If%> <% If Len(result("wname")) > 4 Then wname = Left(result("wname"),4)&".." Else wname = result("wname") End if If result("email") <> "" Then Response.Write ""& wname &"" Else Response.Write wname End If%> <%=result("date")%> <%=result("visit")%>
<% If Not result.bof or Not result.eof Then Response.Write "처음" blockpage=Int((page-1)/10)*10+1 If blockPage = 1 Then Response.Write "<< " Else Response.Write "<< " End If i=1 Do Until i > 10 or blockpage > totalpage If blockpage=int(page) Then Response.Write "[" & blockpage & "]" Else Response.Write "[" & blockpage & "]" End If blockpage=blockpage+1 i = i + 1 Loop If blockpage > totalpage Then Response.Write " >> " Else Response.write " >>" End If Response.Write "마지막" End If %>

<%If page <> 1 Then%><%Else%><%End If%> <%If Cint(page) <> Cint(totalpage) Then%><%Else%><%End If%>

<% result.close Set result = Nothing conn.close Set conn = Nothing %>