<% Option Explicit Dim objDBConn Dim objRs Dim strSQL Dim intNowPage, intTotalCount, intTotalPage, intBlockPage, intPageSize Dim intTemp, intLoop Dim strSearchWord, strSearchString, strSearchSQL Dim blnSearch intNowPage = Request.QueryString("page") strSearchWord = Request.QueryString("search_word") strSearchString = Request.QueryString("search_string") blnSearch = false intPageSize = 20 intBlockPage = 20 If Len(intNowPage) = 0 Then intNowPage = 1 End If If Len(strSearchString) <> 0 Then blnSearch = true strSearchSQL = " Where " & strSearchWord strSearchSQL = strSearchSQL & " like '%" & strSearchString & "%'" End If strSQL = "Select Count(*)" strSQL = strSQL & ",CEILING(CAST(Count(*) AS FLOAT)/" & intPageSize & ")" strSQL = strSQL & " from board" If blnSearch Then strSQL = strSQL & strSearchSQL End If Set objDBConn = Server.CreateObject("ADODB.Connection") Set objRs = Server.CreateObject("ADODB.RecordSet") objDBConn.Open "97003074", "sa", "accessheaven" objRs.Open strSQL, objDBConn intTotalCount = objRs(0) intTotalPage = objRs(1) objRs.Close strSQL = "Select Top " & intNowPage * intPageSize & " intSeq" ' ¹øÈ£ strSQL = strSQL & ",strName" ' À̸§ strSQL = strSQL & ",strEmail" ' ¸ÞÀÏÁÖ¼Ò strSQL = strSQL & ",strSubject" ' Á¦¸ñ strSQL = strSQL & ",intCount" ' Á¶È¸¼ö strSQL = strSQL & ",dtmReg_Date" ' µî·ÏÀÏ strSQL = strSQL & " FROM board" If blnSearch Then strSQL = strSQL & strSearchSQL End If strSQL = strSQL & " ORDER BY intSeq desc" objRs.Open strSQL, objDBConn %> ¸ñ·Ïº¸±â

¸ñ·Ïº¸±â

<% If intTotalCount > 0 Then %> <% End If %>
Àüü°Ô½Ã <%=intTotalCount%> °³      ÇöÀçÆäÀÌÁö : <%=intNowPage%> / <%=intTotalPage%>
<% If objRs.BOF or objRs.EOF Then %> <% Else objRs.Move (intNowPage - 1) * intPageSize Do Until objRs.EOF %> <% objRs.MoveNext Loop End If objRs.Close Set objRs = nothing objDBConn.Close Set objDBConn = nothing %>
¹øÈ£ Á¦¸ñ ÀÛ¼ºÀÚ µî·ÏÀÏ Á¶È¸
µî·ÏµÈ °Ô½Ã°¡ ¾ø½À´Ï´Ù
<%=objRs(0)%> "><%=objRs(3)%> <%=objRs(1)%> <%=left(objRs(5), 10)%> <%=objRs(4)%>
<% intTemp = Int((intNowPage - 1) / intBlockPage) * intBlockPage + 1 If intTemp = 1 Then Response.Write "[ÀÌÀü " & intBlockPage & "°³]" Else Response.Write"[ÀÌÀü " & intBlockPage & "°³]" End If intLoop = 1 Do Until intLoop > intBlockPage Or intTemp > intTotalPage If intTemp = CInt(intNowPage) Then Response.Write "" & intTemp &" " Else Response.Write"" & intTemp & " " End If intTemp = intTemp + 1 intLoop = intLoop + 1 Loop If intTemp > intTotalPage Then Response.Write "[´ÙÀ½ " &intBlockPage&"°³]" Else Response.Write"[´ÙÀ½ " & intBlockPage & "°³]" End If %>
<% If blnSearch Then %> ¸ñ·ÏÀ¸·Î  <% End If %> ±Û¾²±â