求助0x800A000B 问题
请教高手<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!----------------------------获取各字段------------------------------------->
<%
sid=s1
if request("lan") = "" then
lan = 0
else
lan = 1
end if
'''''''''''''''''''''''''''''''获取新闻列表或是新闻具体内容的sql''''''''''''''''''''''''''''''''''
if s1<>"" then
set rs3=server.CreateObject("ADODB.RecordSet")
rs3.Source="select type from smallclass where id = " & sid
rs3.Open rs3.Source,conn,1,1
if not rs3.eof then
itype = rs3("type")
end if
rs3.close
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.open "select * from news where sid = " & s1 &" and check = 1 order by newsid desc",conn,3,3
else
set rs2=conn.execute ("select top 1 * from news where newsid = " & newsid &" and check = 1")
if rs2.eof then
response.Write("没有此文章")
response.end
end if
end if
if not rs2.eof then
Title=trim(rs2("Title"))
about=trim(rs2("about"))
Author=trim(rs2("Author"))
Original=trim(rs2("Original"))
image=rs2("image")
UpdateTime=trim(rs2("UpdateTime"))
News_Content=trim(rs2("Content"))
hot=rs2("hot")
SpecialID=rs2("SpecialID")
click=rs2("click")
EnCode=trim(rs2("EnCode"))
iposition=rs2("position")
ipicsize=rs2("picsize")
titlesize=rs2("titlesize")
newsid=rs2("newsid")
if ipicsize=1 then
wid= 400
else
if ipicsize=2 then
wid= 250
else
wid = 150
if iposition =1 then
popo=1
end if
end if
end if
end if
'''''''''''''''''''''''''''''''获取新闻列表或是新闻具体内容的sql''''''''''''''''''''''''''''''''''
%>
<%function HotImage(PersonID,i)
set DelectFile=server.CreateObject("scripting.filesystemobject")
CurrentPath=server.MapPath("images/news/")
FileName=CurrentPath & "\" & PersonID & "-" & i & ".gif"
if DelectFile.FileExists(FileName) then
HotImage="<img src='images/news/" & PersonID & "-" & i & ".gif' border=0 width='150'>"
exit function
else
FileName=CurrentPath & "\" & PersonID & "-" & i & ".swf"
if DelectFile.FileExists(FileName) then
HotImage="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-244553540000' codebase='http://download.,0,0,0' width='100' height='125'><param name=movie value='images/Occupation/" & PersonID & "-" & i & ".swf'><param name=quality value=high><embed src='images/Occupation/" & PersonID & "-" & i & ".swf' pluginspage='http://www.' type='application/x-shockwave-flash' width='100' height='125'></embed></object>"
exit function
else
FileName=CurrentPath & "\" & PersonID & "-" & i & ".jpg"
if DelectFile.FileExists(FileName) then
HotImage="<img src='images/news/" & PersonID & "-" & i & ".jpg' border=0 width='150'>"
exit function
else
HotImage="<img src='images/news/" & PersonID & "-" & i & ".bmp' border=0 width='150' height='112'>"
exit function
end if
end if
end if
end function
%>
<%
function HotImg(NewsID,i)
set DelectFile=server.CreateObject("scripting.filesystemobject")
CurrentPath=server.MapPath("images/news/")
FileName=CurrentPath & "\" & NewsID & "-" & i & ".gif"
if DelectFile.FileExists(FileName) then
HotImg="<img src='images/news/" & NewsID & "-" & i & ".gif' border=1 width='150'>"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".swf"
if DelectFile.FileExists(FileName) then
HotImg="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.,0,0,0' width='150'><param name=movie value='images/news/" & NewsID & "-" & i & ".swf'><param name=quality value=high><embed src='images/news/" & NewsID & "-" & i & ".swf' pluginspage='http://www.' type='application/x-shockwave-flash' width='150'></embed></object>"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".jpg"
if DelectFile.FileExists(FileName) then
HotImg="<img src='images/news/" & NewsID & "-" & i & ".jpg' border=1 width='150'>"
exit function
else
HotImg="<img src='images/news/" & NewsID & "-" & i & ".bmp' border=1 width='150'>"
exit function
end if
end if
end if
end function
function delectimagepath(NewsID,i) 'href
pathleft = "images/news/" & NewsID & "-" & i
set mainfile=server.CreateObject("scripting.filesystemobject")
mainpath=server.MapPath("images/news/")
imaName=mainPath & "\"& NewsID & "-" & i & ".gif"
if mainfile.FileExists(imaName) then
DelectImagepath=pathleft & ".gif"
exit function
else
imaName=mainPath & "\"& NewsID & "-" & i & ".swf"
if mainfile.FileExists(imaName) then
DelectImagepath="images/news/" & NewsID & "-" & i & ".swf"
exit function
else
imaName=mainPath & "\"& NewsID & "-" & i & ".jpg"
if mainfile.FileExists(imaName) then
DelectImagepath=pathleft & ".jpg"
exit function
else
imaName=mainPath & "\"& NewsID & "-" & i & ".bmp"
if mainfile.FileExists(imaName) then
DelectImagepath=pathleft & ".bmp"
exit function
else
DelectImageimagepath=""
exit function
end if
end if
end if
end if
end function
function DelectImageFile(NewsID,i) ' src
fileleft="<img src='images/news/" & NewsID & "-" & i
set DelectFile=server.CreateObject("scripting.filesystemobject")
CurrentPath=server.MapPath("images/news/")
FileName=CurrentPath & "\"& NewsID & "-" & i & ".gif"
if DelectFile.FileExists(FileName) then
DelectImageFile= fileleft &".gif' width='"&wid&"'>"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".swf"
if DelectFile.FileExists(FileName) then
DelectImageFile="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.,0,0,0' width='"&wid&"'><param name=movie value='images/news/" & NewsID & "-" & i & ".swf'><param name=quality value=high><embed src='images/news/" & NewsID & "-" & i & ".swf' pluginspage='http://www.' type='application/x-shockwave-flash' width='"&wid&"'></embed></object>"
exit function
else
FileName=CurrentPath & "\"& NewsID & "-" & i & ".jpg"
if DelectFile.FileExists(FileName) then
DelectImageFile=fileleft & ".jpg' width='"&wid&"'>"
exit function
else
DelectImageFile=fileleft & ".bmp' width='"&wid&"'>"
exit function
end if
end if
end if
end function
function DelectImageFile_Upload(NewsID,i)
set DelectFile=server.CreateObject("scripting.filesystemobject")
CurrentPath=server.MapPath("images/news/")
FileName=CurrentPath & "\" & NewsID & "-" & i & ".gif"
if DelectFile.FileExists(FileName) then
DelectImageFile_Upload= NewsID & "-" & i & ".gif"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".jpg"
if DelectFile.FileExists(FileName) then
DelectImageFile_Upload= NewsID & "-" & i & ".jpg"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".swf"
if DelectFile.FileExists(FileName) then
DelectImageFile_Upload= NewsID & "-" & i & ".swf"
exit function
else
FileName=CurrentPath & "\" & NewsID & "-" & i & ".bmp"
if DelectFile.FileExists(FileName) then
DelectImageFile_Upload= NewsID & "-" & i & ".bmp"
exit function
else
DelectImageFile_Upload=""
exit function
end if
end if
end if
end if
end function
Function SelfEnCode(content,ImageNum)
Image=ImageNum
' TempContent=replace(TempContent,"<","<")
' TempContent=replace(TempContent,">",">")
if image>0 then
if iposition="1" then
tempcontent ="<table width=""100%"" border=""0"" align=""center""><tr><td align=""center"">"
for i=1 to image
TempContent=TempContent&"<a href="&delectimagepath(NewsID,i)&">"& DelectImageFile(NewsID,i)&"</a> "
if i mod ipicsize = 0 then
tempcontent = tempcontent&"<br><br>"
end if
next
TempContent=tempcontent&"<br>"
tempcontent = tempcontent&"</td></tr></table>"&content
else
TempContent=content
tempcontent = tempcontent&"<br><table width=""100%"" border=""0"" align=""center""><tr><td align=""center"">"
for i=1 to image
TempContent=TempContent&"<a href="&delectimagepath(NewsID,i)&">"& DelectImageFile(NewsID,i)&"</a> "
if i mod ipicsize = 0 then (此处出错)
tempcontent = tempcontent&"<br><br>"
end if
next
tempcontent = tempcontent&"</td></tr></table>"
end if
else tempcontent=tempcontent&content
end if
TempContent=replace(TempContent,"[[","<")
TempContent=replace(TempContent,"]]",">")
TempContent=" " & TempContent
SelfEnCode=TempContent
End Function
Function HtmlSelfEnCode(content,ImageNum)
Image=ImageNum
TempContent=content
if image>0 then
for i=1 to image
TempContent=TempContent&"<a href='images/news/" & NewsID & "-" & i & ".gif'>"& DelectImageFile(NewsID,i)&"</a>"
next
end if
TempContent=replace(TempContent,"[[","<")
TempContent=replace(TempContent,"]]",">")
HtmlSelfEnCode=TempContent
End Function
function doCode(fString, fOTag, fCTag, fROTag, fRCTag)
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
while (fCTagPos > 0 and fOTagPos > 0)
fString = replace(fString, fOTag, fROTag, 1, 1, 1)
fString = replace(fString, fCTag, fRCTag, 1, 1, 1)
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
wend
doCode = fString
end function
Function UBBEnCode(Content)
fString=Content
fString=replace(fString,"<","<")
fString=replace(fString,">",">")
fString=replace(fString,chr(13),"<BR>")
fString = doCode(fString, "", "", "<b>", "</b>")
fString = doCode(fString, "[s]", "[/s]", "<s>", "</s>")
fString = doCode(fString, "[strike]", "[/strike]", "<s>", "</s>")
fString = doCode(fString, "", "", "<u>", "</u>")
fString = doCode(fString, "", "", "<i>", "</i>")
fString = doCode(fString, "[font=Andale Mono]", "[/font=Andale Mono]", "<font face='Andale Mono'>", "</font id='Andale Mono'>")
fString = doCode(fString, "[font=Arial]", "[/font=Arial]", "<font face='Arial'>", "</font id='Arial'>")
fString = doCode(fString, "[font=Arial Black]", "[/font=Arial Black]", "<font face='Arial Black'>", "</font id='Arial Black'>")
fString = doCode(fString, "[font=Book Antiqua]", "[/font=Book Antiqua]", "<font face='Book Antiqua'>", "</font id='Book Antiqua'>")
fString = doCode(fString, "[font=Century Gothic]", "[/font=Century Gothic]", "<font face='Century Gothic'>", "</font id='Century Gothic'>")
fString = doCode(fString, "[font=Courier New]", "[/font=Courier New]", "<font face='Courier New'>", "</font id='Courier New'>")
fString = doCode(fString, "[font=Comic Sans MS]", "[/font=Comic Sans MS]", "<font face='Comic Sans MS'>", "</font id='Comic Sans MS'>")
fString = doCode(fString, "[font=Georgia]", "[/font=Georgia]", "<font face='Georgia'>", "</font id='Georgia'>")
fString = doCode(fString, "[font=Impact]", "[/font=Impact]", "<font face='Impact'>", "</font id='Impact'>")
fString = doCode(fString, "[font=Tahoma]", "[/font=Tahoma]", "<font face='Tahoma'>", "</font id='Tahoma'>")
fString = doCode(fString, "[font=Times New Roman]", "[/font=Times New Roman]", "<font face='Times New Roman'>", "</font id='Times New Roman'>")
fString = doCode(fString, "[font=Trebuchet MS]", "[/font=Trebuchet MS]", "<font face='Trebuchet MS'>", "</font id='Trebuchet MS'>")
fString = doCode(fString, "[font=Script MT Bold]", "[/font=Script MT Bold]", "<font face='Script MT Bold'>", "</font id='Script MT Bold'>")
fString = doCode(fString, "[font=Stencil]", "[/font=Stencil]", "<font face='Stencil'>", "</font id='Stencil'>")
fString = doCode(fString, "[font=??ì?]", "[/font=??ì?]", "<font face='??ì?'>", "</font id='??ì?'>")
fString = doCode(fString, "[font=Verdana]", "[/font=Verdana]", "<font face='Verdana'>", "</font id='Verdana'>")
fString = doCode(fString, "[font=Lucida Console]", "[/font=Lucida Console]", "<font face='Lucida Console'>", "</font id='Lucida Console'>")
fString = doCode(fString, "[red]", "[/red]", "<font color=red>", "</font id=red>")
fString = doCode(fString, "[green]", "[/green]", "<font color=green>", "</font id=green>")
fString = doCode(fString, "[blue]", "[/blue]", "<font color=blue>", "</font id=blue>")
fString = doCode(fString, "[white]", "[/white]", "<font color=white>", "</font id=white>")
fString = doCode(fString, "[purple]", "[/purple]", "<font color=purple>", "</font id=purple>")
fString = doCode(fString, "[yellow]", "[/yellow]", "<font color=yellow>", "</font id=yellow>")
fString = doCode(fString, "[violet]", "[/violet]", "<font color=violet>", "</font id=violet>")
fString = doCode(fString, "[brown]", "[/brown]", "<font color=brown>", "</font id=brown>")
fString = doCode(fString, "[black]", "[/black]", "<font color=black>", "</font id=black>")
fString = doCode(fString, "[pink]", "[/pink]", "<font color=pink>", "</font id=pink>")
fString = doCode(fString, "[orange]", "[/orange]", "<font color=orange>", "</font id=orange>")
fString = doCode(fString, "[gold]", "[/gold]", "<font color=gold>", "</font id=gold>")
fString = doCode(fString, "[beige]", "[/beige]", "<font color=beige>", "</font id=beige>")
fString = doCode(fString, "[teal]", "[/teal]", "<font color=teal>", "</font id=teal>")
fString = doCode(fString, "[navy]", "[/navy]", "<font color=navy>", "</font id=navy>")
fString = doCode(fString, "[maroon]", "[/maroon]", "<font color=maroon>", "</font id=maroon>")
fString = doCode(fString, "[limegreen]", "[/limegreen]", "<font color=limegreen>", "</font id=limegreen>")
fString = doCode(fString, "[h1]", "[/h1]", "<h1>", "</h1>")
fString = doCode(fString, "[h2]", "[/h2]", "<h2>", "</h2>")
fString = doCode(fString, "[h3]", "[/h3]", "<h3>", "</h3>")
fString = doCode(fString, "[h4]", "[/h4]", "<h4>", "</h4>")
fString = doCode(fString, "[h5]", "[/h5]", "<h5>", "</h5>")
fString = doCode(fString, "[h6]", "[/h6]", "<h6>", "</h6>")
fString = doCode(fString, "[size=1]", "[/size=1]", "<font size=1>", "</font id=size1>")
fString = doCode(fString, "[size=2]", "[/size=2]", "<font size=2>", "</font id=size2>")
fString = doCode(fString, "[size=3]", "[/size=3]", "<font size=3>", "</font id=size3>")
fString = doCode(fString, "[size=4]", "[/size=4]", "<font size=4>", "</font id=size4>")
fString = doCode(fString, "[size=5]", "[/size=5]", "<font size=5>", "</font id=size5>")
fString = doCode(fString, "[size=6]", "[/size=6]", "<font size=6>", "</font id=size6>")
fString = doCode(fString, "
- ", "
fString = doCode(fString, "
- ", "[/list=1]", "<ol type=1>", "</ol id=1>")
fString = doCode(fString, "
- ", "[/list=a]", "<ol type=a>", "</ol id=a>")
fString = doCode(fString, "[*]", "[/*]", "<li>", "</li>")
fString = doCode(fString, "[left]", "[/left]", "<div align=left>", "</div id=left>")
fString = doCode(fString, "[center]", "[/center]", "<center>", "</center>")
fString = doCode(fString, "[centre]", "[/centre]", "<center>", "</center>")
fString = doCode(fString, "[right]", "[/right]", "<div align=right>", "</div id=right>")
fString = doCode(fString, "
", "", "<pre id=code><font face=courier size=" & strDefaultFontSize & " id=code>", "</font id=code></pre id=code>")
fString = doCode(fString, "
", "
", "<BLOCKQUOTE id=quote><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>quote:<hr height=1 noshade id=quote>", "<hr height=1 noshade id=quote></font id=quote></BLOCKQUOTE id=quote>")fString = doCode(fString, "[url="", ""]", "[url=""", """]")
fString = doCode(fString, "[URL="", ""]", "[url=""", """]")
fString = doCode(fString, "[url", "[/url]", "<a>", "</a>")
fString = replace(fString, "[br]", "<br>", 1, -1, 1)
UBBEnCode=fString
End Function
function isInteger(para)
on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
function isChinese(para)
on error resume next
dim str
dim i
if isNUll(para) then
isChinese=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isChinese=false
exit function
end if
for i=1 to len(str)
c=asc(mid(str,i,1))
if c>=0 then
isChinese=false
exit function
end if
next
isChinese=true
if err.number<>0 then err.clear
end function
%>
<!----------------------------分页的内容函数------------------------------------->
<%function stupidhahaha
if itype=0 then
if not rs2.eof then
flashwidth="width=" & 300
imgwidth=""
Response.Write SelfEnCode(News_Content,image)
else
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''文章列表''''''''''''''''''''''''''''''''''''''''''''''''''''
else
PageShowSize = 6 '每页显示多少个页
MyPageSize = 10 '每页显示多少条新闻
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
if not rs2.EOF then
rs2.PageSize = MyPageSize
MaxPages = rs2.PageCount
rs2.absolutepage = MyPage
total = rs2.RecordCount
for i=1 to rs2.PageSize
if not rs2.eof then
if rs2("image")>0 then
pic = "[图]"
else pic =""
end if
newsurl="content.asp?NewsID=" & rs2("NewsID") & "&b=" & rs2("bid") & "&s=" & rs2("sid")
response.write("· <a target=""_blank"" class=""zhitib12"" href="""& newsurl &""">"& rs2("Title")&pic&"</a><br>")
rs2.movenext
end if
next
response.Write("<br><div align=""center"">")
iurl=url&"?s="&sid&"&b="&b1&"&"
if request("lan") = "1" then
iurl=irul&"lan=1&"
end if
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs2.PageSize)+1
if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & iUrl & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & iUrl & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & iUrl & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if
if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
if not pagesizeshow = 1 then
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" &iUrl & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next
end if
if Mypage+1 <=Pagetpage then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & iUrl & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if
if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & iUrl & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & iUrl & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
response.Write("</div >")
end if
rs2.close
set rs2=nothing
end if
end function%>
<!----------------------------分页的“当前位置”函数------------------------------------->
<%function site
with response
.Write("<table width=100% border=0 cellspacing=0 cellpadding=0>")
.write(" <tr><td width=""3%""> </td><td width=""97%"">当前位置:")
.write(bigclassname&" >> "&smallclassname&"</td></tr></table>")
end with
end function
function newsite
if lan = 1 then
set rs=server.CreateObject("adodb.recordset")
sql="select smallclassname from smallclass where bigclassname = '"&bigclassname&"' and (lan is null or lan = 0) "
rs.open sql,conn,1,1
response.Write("你现在的位置:首页>>"&bigclassname&" <a href="&request.ServerVariables("PATH_INFO")&"?smallclassname="&rs("smallclassname")&">(点击进入中文版面)</a>")
rs.close
set rs=nothing
else
response.Write("你现在的位置:首页>>"&bigclassname)
set rs=server.CreateObject("adodb.recordset")
sql="select smallclassname from smallclass where bigclassname = '"&bigclassname&"' and lan = 1 "
rs.open sql,conn,1,1
if not rs.eof then
response.Write(" <a href="&request.ServerVariables("PATH_INFO")&"?smallclassname="&rs("smallclassname")&"&lan=1><font color=#ff0000><strong>(click to access English version)</strong></font></a>")
end if
rs.close
set rs=nothing
end if
end function%>