<% If Request("GoTopage")="" Then curpage = 1 Else curpage = cint(Request("GoTopage")) End If CurPage2 = CurPage ipp = 25 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 = 100 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 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 totpage = fix(postcount / ipp) 'Àüü ÆäÀÌÁöÀÇ ¼ö¸¦ ±¸ÇÑ´Ù If (totpage * ipp) <> postcount Then totpage = totpage + 1 End If For a = 1 To (curpage - 1) * ipp DbRec.MoveNext Next %>
<% i = 1 k = 1 Do until DbRec.EOF Or i>ipp '±â»ç ³»¿ë Ã߸®±â dim oDOM, url, xml_file_name, CreateDate, NewsTitle, WebBody, LargeClass, MiddleClass, SmallClass, file_id file_id = DbRec("NEWSKEY") xml_file_name = file_id & ".xml" servicedate = DbRec("SVC_DATE") ' XML µ¥ÀÌÅÍ ÁÖ¼Ò url = "http://sports.chosun.com/news/html/" & Left(servicedate,4) & "/" & Mid(servicedate,5,2) & "/" & Mid(servicedate,7,2) & "/" & xml_file_name Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0") Set oDOM = Server.CreateObject("Microsoft.XMLDOM") with oDOM .async = False ' µ¿±â½Ä È£Ãâ .setProperty "ServerHTTPRequest", True ' HTTP·Î XML µ¥ÀÌÅÍ °¡Á®¿È .Load(url) end with Set Nodes = oDOM.getElementsByTagName("WebNewsLayoutML") For each SubNodes in Nodes CreateDate = SubNodes.getElementsByTagName("ModifyDate")(0).Text photocount = SubNodes.getElementsByTagName("PhotoCount")(0).Text If photocount <> 0 Then ImgFilename = SubNodes.getElementsByTagName("ServerDataFileName")(0).Text End If WebText = SubNodes.getElementsByTagName("WebText")(0).Text Next ImgFilename = replace(ImgFilename, ".j", "_l.j") Set Nodes = Nothing Set oDOM = Nothing CreateDate = replace(CreateDate, "T", " ") CreateDate = Left(CreateDate, 16) If photocount = 0 Then %>
<% strLine2 = "" DbRec.Movenext i = i + 1 Loop DbRec.Close Dbcon.Close Set DbRec = Nothing Set Dbcon = Nothing %>
&ServiceDate=<%=DbRec("SVC_DATE")%>"><%=DbRec("NEWSTITLE")%>
<% Else %>
&ServiceDate=<%=DbRec("SVC_DATE")%>"> <% End If %>
&ServiceDate=<%=DbRec("SVC_DATE")%>"><%=DbRec("NEWSTITLE")%>
<%=Left(WebText, 80)%>... [<%=CreateDate%>]
<% 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)) %> <% End If %> <% If Cint(Total_Block) <> Cint(NowBlock) Then For Gopage = 1 To MyChoice If CurPage2 <> (int(NowBlock * MyChoice) + Gopage) Then %> <% Else %> <% 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 %> <% Else %> <% 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 %>
<%=(int(NowBlock * MyChoice) + Gopage)%><%=(int(NowBlock * MyChoice) + Gopage)%> <%=(int(NowBlock * MyChoice) + Gopage)%><%=(int(NowBlock * MyChoice) + Gopage)%>