%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%Session("ver")="cn" '版本选择: cn-中文 en-英文 big5-繁体 jp-日语%> <% dim conn dim connstr dim db db="news/database/article_cn.mdb" Set conn = Server.CreateObject("ADOdb.connection") connstr="Provider=Microsoft.Jet.OLEdb.4.0;Data Source=" & Server.MapPath(db) conn.Open connstr sub Closeconn() conn.close set conn=nothing end sub dim strFileName,MaxPerPage,ShowSmallClassType dim totalPut,CurrentPage,TotalPages dim BeginTime,EndTime dim founderr, errmsg dim BigClassName,SmallClassName,SpecialName,keyword,strField dim rs,sql,sqlArticle,rsArticle,sqlSearch,rsSearch,sqlBigClass,rsBigClass,sqlSpecial,rsSpecial dim SpecialTotal BeginTime=Timer BigClassName=Trim(request("BigClassName")) SmallClassName=Trim(request("SmallClassName")) SpecialName=trim(request("SpecialName")) keyword=trim(request("keyword")) if keyword<>"" then keyword=replace(replace(replace(replace(keyword,"'","‘"),"<","<"),">",">")," "," ") end if strField=trim(request("Field")) if request("page")<>"" then currentPage=cint(request("page")) else currentPage=1 end if sqlBigClass="select * from BigClass order by BigClassID" Set rsBigClass= Server.CreateObject("ADOdb.Recordset") rsBigClass.open sqlBigClass,conn,1,1 '请勿改动下面这三行代码 ShowSmallClassType=ShowSmallClassType_Default MaxPerPage=MaxPerPage_Default strFileName="index.asp?BigClassName=" & BigClassName & "&SmallClassName=" & SmallClassName & "&SpecialName=" & SpecialName %>
版权所有 EDRI 信息产业电子第十一设计研究院有限公司 |
地址:成都市双林路251号 邮编:610021 |
"
elseif rsArticle("Elite")=true then
strTemp = strTemp & "
"
else
strTemp = strTemp & "
"
end if
if BigClassName<>"" and SmallClassName="" and (rsArticle("SmallClassName")&""<>"") then
strTemp = strTemp & "[" & rsArticle("SmallClassName") & "]"
end if
if rsArticle("IncludePic")=true then strTemp = strTemp & "["&msg025&"]"
strTemp = strTemp & "" & gotTopic(rsArticle("title"),intTitleLen) & ""
'strTemp = strTemp & " ("
if CDate(FormatDateTime(rsArticle("UpdateTime"),2))=date() then
strTemp = strTemp & ""
else
strTemp= strTemp & ""
end if
'strTemp= strTemp & FormatDateTime(rsArticle("UpdateTime"),1) & "," & rsArticle("Hits") & ")"
'if rsArticle("Hits")>=HitsOfHot then
'strTemp= strTemp & "
"
'end if
strTemp= strTemp & ""
response.write strTemp
rsArticle.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
end sub
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
%>