<% category = "enter" subr = "tv" %>

<% If Request("GoTopage")="" Then curpage = 1 Else curpage = cint(Request("GoTopage")) End If CurPage2 = CurPage ipp = 15 set fso = Server.CreateObject("Scripting.FileSystemObject") set f = fso.OpenTextFile("C:\cons2.dat") strconnect = f.Readline set Dbcon=Server.CreateObject("ADODB.Connection") Dbcon.Open strconnect If curpage = 1 Then postcount = 500 Else sql = "SELECT count(DISTINCT CMSRELATIONNAME) AS cnt FROM newsinfo where NEWSTITLE like '%그래픽뉴스%'" set rs=Dbcon.Execute(sql) postcount = rs("cnt") '총 글의 개수를 구한다 rs.Close set rs = nothing End If Set DbRec=Server.CreateObject("ADODB.RecordSet") DbRec.CursorType = 1 If curpage = 1 Then DbRec.Open "SELECT NEWSKEY, CMSRELATIONNAME,SVC_DATE,MODIFYDATE,NEWSTITLE,ISWEBSERVICETYPE FROM newsinfo where (modifydate in (select max(modifydate) from newsinfo group by CMSRELATIONNAME) AND NEWSTITLE like '%그래픽뉴스%') ORDER BY MODIFYDATE DESC fetch first 15 rows only",DbCon Else DbRec.Open "SELECT NEWSKEY, CMSRELATIONNAME,SVC_DATE,MODIFYDATE,NEWSTITLE,ISWEBSERVICETYPE FROM newsinfo where (modifydate in (select max(modifydate) from newsinfo group by CMSRELATIONNAME) AND NEWSTITLE like '%그래픽뉴스%') ORDER BY MODIFYDATE DESC",DbCon End If totpage = fix(postcount / ipp) '전체 페이지의 수를 구한다 If (totpage * ipp) <> postcount Then totpage = totpage + 1 End If For a = 1 To (curpage - 1) * ipp DbRec.MoveNext Next %>
<% 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 %> 다음

많이 본 뉴스