<% If Session("jingle_num") < 3 Then %> <% Session("jingle_num") = Session("jingle_num") + 1 End If If Session("jingle_num") = "" Then Session("jingle_num") = 1 End If %> <% adkey = "outlink_search" flag = Request.ServerVariables("HTTP_USER_AGENT") If Instr(flag, "Mobile") > 0 Then response.redirect "http://m.sportschosun.com/news.htm?id=" & request("id") & "&ServiceDate=" & request("ServiceDate") Else curday = date() nowday = Left(curday,10) a = WeekDay(nowday) b = time() c=Left(b,2) b = Mid(b, 4,2) b = replace(b, ":", "") b = b + 1 - 1 ' ad_on = 0 이면 광고 배제 If a = 6 Then If c = "오후" Then If b > 9 Then ad_on = 0 Else ad_on = 1 End If Else ad_on = 1 End If ElseIf a = 7 Then ' 토요일은 종일 배제 ad_on = 0 ElseIf a = 1 Then ' 일요일은 종일 배제 ad_on = 0 Else ad_on = 1 End If If request("id") = "" Then response.redirect "http://sports.chosun.com/news/ntype2_o.htm?ut=1&name=" & request("name") Else file_id = request("id") xml_file_name = file_id & ".xml" servicedate = request("ServiceDate") ' XML 데이터 주소 url = "http://sports.chosun.com/news/html/" & Left(servicedate,4) & "/" & Mid(servicedate,5,2) & "/" & Mid(servicedate,7,2) & "/" & xml_file_name 'url = "http://sports.chosun.com/news/html/2010/08/31/201008310100220050000967.xml" 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 NewsTitle = SubNodes.getElementsByTagName("NewsTitle")(0).Text CmsRelationName = SubNodes.getElementsByTagName("CmsRelationName")(0).Text WebBody = SubNodes.getElementsByTagName("WebBody")(0).Text GijaName = SubNodes.getElementsByTagName("GijaName")(0).Text PhotoCount = SubNodes.getElementsByTagName("PhotoCount")(0).Text If PhotoCount > 0 Then ServerDataFileName = SubNodes.getElementsByTagName("ServerDataFileName")(0).Text ImageSizeType = SubNodes.getElementsByTagName("AppendData")(0).getAttribute("ImageSizeType") End If LargeClass = SubNodes.getElementsByTagName("LargeClass")(0).getAttribute("name") MiddleClass = SubNodes.getElementsByTagName("MiddleClass")(0).getAttribute("name") SmallClass = SubNodes.getElementsByTagName("SmallClass")(0).getAttribute("name") Next Set Nodes = Nothing Set oDOM = Nothing CreateDate = replace(CreateDate, "T", " ") CreateDate = Left(CreateDate, 16) sub_title = MiddleClass %> <% floating = "outlink_search" %>
<% 'SNS 연동 시작 Public Function URLEncodeUTF8(byVal szSource) Dim szChar, WideChar, nLength, i, result nLength = Len(szSource) For i = 1 To nLength szChar = Mid(szSource, i, 1) If Asc(szChar) < 0 Then WideChar = CLng(AscB(MidB(szChar, 2, 1))) * 256 + AscB(MidB(szChar, 1, 1)) If (WideChar And &HFF80) = 0 Then result = result & "%" & Hex(WideChar) ElseIf (WideChar And &HF000) = 0 Then result = result & _ "%" & Hex(CInt((WideChar And &HFFC0) / 64) Or &HC0) & _ "%" & Hex(WideChar And &H3F Or &H80) Else result = result & _ "%" & Hex(CInt((WideChar And &HF000) / 4096) Or &HE0) & _ "%" & Hex(CInt((WideChar And &HFFC0) / 64) And &H3F Or &H80) & _ "%" & Hex(WideChar And &H3F Or &H80) End If Else result = result + szChar End If Next URLEncodeUTF8 = result End Function title_encode = URLEncodeUTF8(title_encode) %>

<%=NewsTitle%>

기사입력 | <%=CreateDate%>
<% '내용 추려내기... strLine = WebBody strLine = replace(strLine,"&", "&") strLine = replace(strLine,"<", "<") strLine = replace(strLine, file_id , "http://manhwa.sportschosun.com/news/html/" & Left(servicedate,4) & "/" & Mid(servicedate,5,2) & "/" & Mid(servicedate,7,2) & "/" & file_id) 'strLine = replace(strLine,b, c) ' 절대링크로 바꾸기... strLine = replace(strLine,">", ">") strLine = replace(strLine, """, chr(34)) strLine = replace(strLine, "굛", "세") strLine = replace(strLine, "article", "") strLine = replace(strLine, "", "
") 'strLine = replace(strLine, "
", "") strLine = replace(strLine, " 0 Then set tagfree = New Regexp tagfree.Pattern= ServerDataFileName &"[^>]+>" tagfree.Global=true If ImageSizeType = "1" Then add_string = ServerDataFileName & "" width='550'>" ElseIf ImageSizeType = "2" Then add_string = ServerDataFileName & "" width='250'>" ElseIf ImageSizeType = "3" Then add_string = ServerDataFileName & "" width='180'>" Else add_string = ServerDataFileName & "">" End If add_string = replace(add_string, """, chr(34)) strLine=tagfree.Replace(strLine, add_string) End If ' 루미너스 광고 끝 End If strLine = replace(strLine, "☞ 웹신문 보러가기", "") strLine = replace(strLine, "☞ 스포츠조선 구독", "") strLine = replace(strLine, "

[", "") strLine = replace(strLine, "] [", "") strLine = replace(strLine, "[

- Copyrights ⓒ 스포츠조선, 무단 전재 및 재배포 금지 -

", "") %>
<%=strLine%>

     


많이 본 뉴스

<% '카운팅 시작 set fso = Server.CreateObject("Scripting.FileSystemObject") set f = fso.OpenTextFile("C:\cons5.dat") strconnect = f.Readline set Dbcon=Server.CreateObject("ADODB.Connection") Dbcon.Open strconnect Set Grs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT count(num) AS CNT FROM club_count_naver WHERE gisa_name = '" & CmsRelationName & "'" Set Grs = Dbcon.Execute(SQL) postcount = Grs("CNT") Set Grs2 = Server.CreateObject("ADODB.Recordset") If postcount = 0 Then NewsTitle = replace(NewsTitle, "'", "") SQL2 = "Insert into club_count_naver (gisa_name, category, svc_date, title, gija, wdate, gisa_count) values " SQL2 = SQL2 & "('" & CmsRelationName & "'" SQL2 = SQL2 & ",'" & types & "'" SQL2 = SQL2 & ",'" & request("ServiceDate") & "'" SQL2 = SQL2 & ",'" & NewsTitle & "'" SQL2 = SQL2 & ",'" & GijaName & "'" SQL2 = SQL2 & ",'" & CreateDate & "'" SQL2 = SQL2 & "," & 1 & ")" Else Set Grs3 = Server.CreateObject("ADODB.Recordset") SQL3 = "SELECT gisa_count FROM club_count_naver WHERE gisa_name = '" & CmsRelationName & "'" Set Grs3 = Dbcon.Execute(SQL3) gisacount = Grs3("gisa_count") SQL2 = "Update club_count_naver set gisa_count = " & gisacount & " + 1 where gisa_name = '" & CmsRelationName & "'" readnum = gisacount + 1 Grs3.close set Grs3 = Nothing End If Set Grs2 = Dbcon.Execute(SQL2) Grs.close Dbcon.close set Grs = Nothing set Grs2 = Nothing set Dbcon = Nothing '카운팅 끝 %> <% End If %> <% End If %>