%@ LANGUAGE = VBScript.Encode %>
<%
''''''#########################################
response.buffer=true
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Function FormatStr(String)
on Error resume next
String = Replace(String, CHR(13)&chr(10), " ")
FormatStr = String
End Function
function gotTopic(str,strlen)
if str="" then
gotTopic=""
exit function
end if
dim l,t,c, i
str=replace(replace(replace(replace(str," "," "),""",chr(34)),">",">"),"<","<")
l=len(str)
t=0
for i=1 to l
c=Abs(Asc(Mid(str,i,1)))
if c>255 then
t=t+2
else
t=t+1
end if
if t>=strlen then
gotTopic=left(str,i) & "…"
exit for
else
gotTopic=str
end if
next
gotTopic=replace(replace(replace(replace(gotTopic," "," "),chr(34),"""),">",">"),"<","<")
end function
dim ArticleID
dim rs,sql
ArticleID=trim(request("T_ID"))
ArticleID=replace(ArticleID,"'","")
ArticleID=replace(ArticleID,"and","")
ArticleID=replace(ArticleID,"=","")
ArticleID=replace(ArticleID," ","")
ArticleID=replace(ArticleID,"char","")
ArticleID=replace(ArticleID,"(","")
ArticleID=replace(ArticleID,")","")
ArticleID=replace(ArticleID,"select","")
ArticleID=replace(ArticleID,"or","")
if ArticleId="" then
ArticleID=0
else
if isnumeric(ArticleID) and Len(ArticleID)<10 then
ArticleID=Clng(ArticleID)
else
Response.write ""
Response.end
end if
end if
if ArticleID>0 then
sql="select * from News where bz1=true and (XQ1=True or XQ2=True or XQ3=True) And T_ID=" & ArticleID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,my_conn,1,3
if rs.eof and rs.bof then
Response.write ""
Response.end
else
rs("HITNUM")=rs("HITNUM")+1
rs.update
end if
end if
%>
百年校庆
<%=rs("T_Subject")%>
<%if rs("T_Subtitle")<>"" then%>
——<%=rs("T_Subtitle")%>
<%end if%>
<%
dim show(3)
show(1)=rs("writer")
show(2)=rs("user")
show(3)=rs("photo")
dim show1(3)
if show(1)<>"" then show1(1)=" 撰稿:" &show(1)
if show(2)<>"" then show1(2)=" 发布:" &show(2)
if show(3)<>"" then show1(3)=" 摄影:" &show(3)
if show(1)=show(2) and show(1)=show(3) and show(1)<>"" then
showstr=" 撰稿、发布、摄影:" & show(1)
end if
if show(1)<>show(2) and show(1)<>show(3) and show(2)<>show(3) then
showstr=" " & show1(1) & show1(2) & show1(3)
end if
if show(1)=show(2) and show(1)<>"" and show(1)<>show(3) then
showstr=" 撰稿、发布:" & show(1) & show1(3)
end if
if show(1)=show(3) and show(1)<>"" and show(1)<>show(2) then
showstr=" 撰稿、摄影:" & show(1) & show1(2)
end if
if show(3)=show(2) and show(2)<>"" and show(1)<>show(3) then
showstr=show1(1) & " 发布、摄影:" & show(3)
end if
if show(1)=show(2) and show(1)="" and show(3)<>"" then
showstr=" " & show1(3)
end if
if show(3)=show(2) and show(3)="" and show(1)<>"" then
showstr=" " & show1(1)
end if
if show(1)=show(3) and show(1)="" and show(2)<>"" then
showstr=" " & show1(2)
end if
showstr="时间:" & rs("T_Date") & " 来源:" & rs("T_auth") & showstr
showstr=showstr & " 点击数:" & rs("hitnum") & ""%>
<%sub ShowCorrelative(ArticleNum,TitleLen)
dim rsCorrelative,sqlCorrelative
dim strKey,arrKey,i
if ArticleNum>0 and ArticleNum<=100 then
sqlCorrelative="select top " & ArticleNum
else
sqlCorrelative="Select Top 10 "
end if
strKey=mid(rs("Key"),2,len(rs("Key"))-2)
if instr(strkey,"|")>1 then
arrKey=split(strKey,"|")
strKey="((A.Key like '%|" & arrKey(0) & "|%')"
for i=1 to ubound(arrKey)
strKey=strKey & " or (A.Key like '%|" & arrKey(i) & "|%')"
next
strKey=strKey & ")"
else
strKey="(A.Key like '%|" & strKey & "|%')"
end if
sqlCorrelative=sqlCorrelative & " A.T_ID,A.T_subject,A.T_Auth,A.T_date,A.HITNUM,A.bz1,a.XQ1,a.XQ2,a.XQ3 From News A Where A.bz1=true and (a.XQ1=True or a.XQ2=True or a.XQ3=True) and " & strKey & " and A.T_ID<>" & ArticleID & " Order by A.T_ID desc"
Set rsCorrelative= Server.CreateObject("ADODB.Recordset")
rsCorrelative.open sqlCorrelative,my_conn,1,1
if TitleLen<0 or TitleLen>255 then TitleLen=150
if rsCorrelative.bof and rsCorrelative.Eof then
response.write ("无相关快讯!")
else
response.Write "