"> ">

<% If Session("szo_id") = "" Then %> <% Else %> <% End If %>

<% If Request("GoTopage")="" Then curpage = 1 Else curpage = cint(Request("GoTopage")) End If CurPage2 = CurPage ipp = 20 set fso = Server.CreateObject("Scripting.FileSystemObject") set f = fso.OpenTextFile("C:\cons5.dat") strconnect = f.Readline set conn=Server.CreateObject("ADODB.Connection") conn.Open strconnect Set Grs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT count(*) AS cnt FROM gaparang_reply where (month_num = '901' AND depth=0)" Set Grs = conn.Execute(SQL) i = Grs("cnt") + 1 - 1 postcount = i i = i - (ipp * (curpage - 1)) Set Grs2 = Server.CreateObject("ADODB.Recordset") Grs2.CursorType = 1 If curpage = 1 Then SQL = "SELECT TOP 20 num, id, depth, like_musician, content, wdate FROM gaparang_reply where (month_num = '901' AND depth=0) order by wdate desc" Else SQL = "SELECT num, id, depth, like_musician, content, wdate FROM gaparang_reply where (month_num = '901' AND depth=0) order by wdate desc" End If Set Grs2 = conn.Execute(SQL) totpage = fix(postcount / ipp) 'Àüü ÆäÀÌÁöÀÇ ¼ö¸¦ ±¸ÇÑ´Ù If (totpage * ipp) <> postcount Then totpage = totpage + 1 End If For a = 1 To (curpage - 1) * ipp Grs2.MoveNext Next k = 0 Do until (Grs2.EOF OR k = ipp) depth = Grs2("depth") + 1 wdate = Grs2("wdate") wdate = replace(wdate,"2011-","") content = Grs2("content") poem01 = Instr(content, "*") poem01 = poem01 - 1 poem02 = Instr(content, "$") If i < 38 Then If i = 34 Then %>

no.<%=i%>

  • <%=Left(content,poem01)%>
  • <%=Mid(content,poem01+2,poem02-poem01-2)%>
  • <%=Mid(content,poem02+1,30)%>
<%=Grs2("id")%> | <%=wdate%>
&month_num=901">
<% Else %>

no.<%=i%>

  • <%=Left(content,poem01)%>
  • <%=Mid(content,poem01+2,poem02-poem01-2)%>
  • <%=Mid(content,poem02+1,30)%>
<%=Grs2("id")%> | <%=wdate%>
&month_num=901">
<% End If Else If i = 53 Then %>

no.<%=i%>

  • <%=Left(content,poem01)%>
  • <%=Mid(content,poem01+2,poem02-poem01-2)%>
  • <%=Mid(content,poem02+1,30)%>
<%=Grs2("id")%> | <%=wdate%>
&month_num=901">
<% ElseIf (i = 64 OR i = 81) Then %>

no.<%=i%>

  • <%=Left(content,poem01)%>
  • <%=Mid(content,poem01+2,poem02-poem01-2)%>
  • <%=Mid(content,poem02+1,30)%>
<%=Grs2("id")%> | <%=wdate%>
&month_num=901">
<% Else %>

no.<%=i%>

  • <%=Left(content,poem01)%>
  • <%=Mid(content,poem01+2,poem02-poem01-2)%>
  • <%=Mid(content,poem02+1,30)%>
<%=Grs2("id")%> | <%=wdate%>
&month_num=901">
<% End If End If i = i - 1 k = k + 1 Grs2.Movenext Loop conn.Close Set conn = Nothing %>
<% MyChoice = 10 Total_Block = int(TotPage / MyChoice) If int(TotPage) Mod MyChoice = 0 Then Total_Block = Total_Block - 1 End If If Request("block") <> "" Then NowBlock = Request("block") Else NowBlock = 0 End If If TotPage > 0 Then If Cint(NowBlock) > 0 Then CurPage = (int(NowBlock * MyChoice) - (MyChoice - 1)) %> ÀÌÀü <% Else %> <% End If %> <% If Cint(Total_Block) <> Cint(NowBlock) Then For Gopage = 1 To MyChoice If CurPage2 <> (int(NowBlock * MyChoice) + Gopage) Then %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% Else %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% End If Next Else If (TotPage Mod MyChoice = 0) Then ttt = MyChoice Else ttt = TotPage Mod MyChoice End If For Gopage = 1 To ttt If CurPage2 <> (int(NowBlock * MyChoice) + Gopage) Then %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% Else %> <%=(int(NowBlock * MyChoice) + Gopage)%> <% End If Next End If '´ÙÀ½ ºí·°ÀÇ Ã¹ÆäÀÌÁö ¼ö¸¦ °è»êÇÑ´Ù. CurPage = (int(NowBlock * MyChoice) + Gopage) If (Cint(Total_Block) > 0) and (Cint(NowBlock) < Cint(Total_Block)) Then %> ´ÙÀ½
<% End If End If %>