|
错误提示部分: Microsoft VBScript 运行时错误 错误 '800a01a8'
缺少对象
/twx2/en/search.asp,行209 代码部分: <!--#include file="Conn.asp"--> <% const MaxPerPage=30 dim totalPut dim CurrentPage dim TotalPages dim i,j dim sql dim rs dim rstype dim typesql dim typeid,typename1 if not isEmpty(request("typeid")) then typeid=request("typeid") else typeid=1 end if if not isempty(request("page")) then currentPage=cint(request("page")) else currentPage=1 end if %> <html> <head> <title>Search</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Content-Language" content="zh-CN"> <link href="images/css.css" rel="stylesheet" type="text/css"> <script language='javascript' type='text/javascript'> function ResizeImage(obj, MaxW, MaxH) { if (obj != null) imageObject = obj; var state=imageObject.readyState; var oldImage = new Image(); oldImage.src = imageObject.src; var dW=oldImage.width; var dH=oldImage.height; if(dW>MaxW || dH>MaxH) { a=dW/MaxW; b=dH/MaxH; if(b>a) a=b; dW=dW/a; dH=dH/a; } if(dW > 0 && dH > 0) imageObject.width=dW;imageObject.height=dH; if(state!='complete' || imageObject.width>MaxW || imageObject.height>MaxH) { setTimeout("ResizeImage(null,"+MaxW+","+MaxH+")",40); } } </script> </head> <body leftmargin="0" topmargin="0"> <table width="750" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="700" valign="top" align=center> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <td height="44"><tr> <td height="40"><td width="700" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#B6B6B6"> <tr> <td valign="top" bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tr> <td height="37" valign="center" width="700"> <font color="#FF7700"><b>Message</b></font> —— <% page=request("page") if page="" then page=0 ssort=request("ssort") keywords=request("keywords") keywords=LTRIM(RTRIM(keywords)) if ssort="1" then set rs=server.createobject("adodb.recordset") sql ="select * from productxd where p_id like '%"&keywords&"%' order by click Desc" rs.open sql,conn,1,1%> Search for "<font color="#ff0000">The ITEM NO. </font>" Keyword : <b><font color="#ff0000"><%=keywords%></font></b> <% end if if ssort="2" then set rs=server.createobject("adodb.recordset") sql ="select * from productxd where p_endesc like '%"&keywords&"%' order by click Desc" rs.open sql,conn,1,1%> Search for "<font color="#ff0000"> Product introduction </font>" Keyword : <b><font color="#ff0000"><%=keywords%></font></b> <% end if %> </td> </tr> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height=180> <TR> <TD height="120" COLSPAN=5 valign="top"> <table border=0 cellpadding="0" cellspacing="1" bgcolor=#E7E7E7 width="700" height="180"> <tr><td bgcolor=#ffffff> <table border=0 cellpadding="0" cellspacing="0" width="700"> <% if rs.eof and rs.bof then response.write "<tr height=30><td> 无任何记录!</td></tr>" else totalPut=rs.recordcount totalPut=rs.recordcount if currentpage<1 then currentpage=1 end if if (currentpage-1)*MaxPerPage>totalput then if (totalPut mod MaxPerPage)=0 then currentpage= totalPut \ MaxPerPage else currentpage= totalPut \ MaxPerPage + 1 end if
end if if currentPage=1 then showContent showpage totalput,MaxPerPage,"Search.asp" else if (currentPage-1)*MaxPerPage<totalPut then rs.move (currentPage-1)*MaxPerPage dim bookmark bookmark=rs.bookmark showContent showpage totalput,MaxPerPage,"Search.asp" else currentPage=1 showContent showpage totalput,MaxPerPage,"Search.asp" end if end if rs.close end if set rs=nothing sub showContent dim i i=0 do while not rs.eof %> <tr> <td> <table border=0 cellpadding="0" cellspacing="0" > <tr bgcolor="#FFFFFF"> <td width="150" align="left"> ·<a href="dispinfo.asp?id=<%=rs("id")%>" target="_blank"><%=rs("p_id")%></a></td> <td width="260" align="center"><div align="center"><a href="dispinfo.asp?id=<%=rs("id")%>" target="_blank"><img src="../products/<%=rs("pfile")%>"onload="javascript:ResizeImage(this, 120, 100);" border="0"></a></div></td> <td width="150" align="center"> <%xx=rs("kind_id") Set rs2 = Server.CreateObject("ADODB.Recordset") sql2="select * from xdkind where id="&xx&" Order By Id DESC" rs2.open sql2,conn,3 if not rs2.bof and not rs2.eof then response.Write rs2("En_kind") rs2.close else response.Write("无小类") rs2.close end if %></td> <td width="150" align="center"> <%types=rs("types_id") Set rs1 = Server.CreateObject("ADODB.Recordset") sql="select * from xdtypes where id="&types&"" rs1.open sql,conn,3,2 if not rs1.bof and not rs1.eof then response.Write rs1("en_types") end if rs1.close%></td> </tr> </table> </td> </tr> <TR> <TD background=images/line_h.gif width=90%><IMG height=1 src="images/line_h.gif" width=3></TD></TR> <% i=i+1 if i>=MaxPerPage then exit do rs.movenext loop %> <TR> <TD background=images/line_h.gif width=90%><IMG height=1 src="images/line_h.gif" width=3></TD></TR> <%end sub function showpage(totalnumber,maxperpage,filename) dim n if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if response.write "<tr height=30><td align=right>" response.write "Total:<b>"&totalnumber&"</b> " response.write " Page:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>Pages One page for:<b>"&maxperpage&"</b>" if CurrentPage<2 then response.write "【First】【Back】" else response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page=1>【First】</a>" response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & " &page="&CurrentPage-1&">【Back】</a>" end if if n-currentpage<1 then response.write "【Next】【The end】" else response.write "<a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page="&(CurrentPage+1)&">" response.write "【Next】</a><a href=search.asp?ssort=" & ssort & "&keywords=" & keywords & "&page="&n&">【The end】</a>" end if response.write "</td></tr>" end function %> </table> </td> </tr> </td> </tr> </table> </TD> </TR> <% rs.close >>>>>>>>>>第209行 set rs=nothing %> </table> </td> </tr> </table> </td> </tr> </table> </table> <% rs1.close set rs1=nothing conn.close set conn=nothing %> </body> </html> |
|