注册 登录
编程论坛 ASP技术论坛

Microsoft VBScript 运行时错误 (0x800A000B)问题,请教高手,急

kele0126 发布于 2008-12-02 16:12, 769 次点击
紧急请教高手: 万分感谢

<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,"<","&lt;")
'  TempContent=replace(TempContent,">","&gt;")
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>&nbsp;&nbsp;"
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>&nbsp;&nbsp;"
if i mod ipicsize = 0 then 此行有错,提示Microsoft VBScript 运行时错误 (0x800A000B))
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="&nbsp;&nbsp;&nbsp;&nbsp;" & 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,"<","&lt;")
fString=replace(fString,">","&gt;")
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, "", "<ul>", "</ul>")
fString = doCode(fString, "
0 回复
1