📄 search.asp
字号:
<!--#include file="top.asp"-->
<body topmargin="0">
<table width="780" bgcolor=
<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color")%>
<%rs.close%>
border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="1" bgcolor=<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color2")%>
<%rs.close%>></td>
<td width="150" valign="top" align=center>
<!--#include file="left.asp"-->
</td>
<td width="1" bgcolor=<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color2")%>
<%rs.close%>></td>
<td bgcolor="#FFFFFF" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><br>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td bgcolor=<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color")%>
<%rs.close%>><font color="#000000">您输入的关键字是:</font>
<%
dim keyword
strTemp=trim(request("keyword"))
If Instr(strTemp,"select%20") or Instr(strTemp,"insert%20") or Instr(strTemp,"delete%20from") or Instr(strTemp,"count(") or Instr(strTemp,"drop%20table") or Instr(strTemp,"update%20") or Instr(strTemp,"truncate%20") or Instr(strTemp,"asc(") or Instr(strTemp,"mid(") or Instr(strTemp,"char(") or Instr(strTemp,"xp_cmdshell") or Instr(strTemp,"exec%20master") or Instr(strTemp,"net%20localgroup%20administrators") or Instr(strTemp,":") or Instr(strTemp,"net%20user") or Instr(strTemp,"'") or Instr(strTemp,"%20or%20") then
%> <script language=vbs>
<!--
msgbox"大哥,您输入有误,还是再输一次吧!!"
window.location.href="index.asp"
-->
</script>
<%response.end
End If
keyword=replace(strTemp,"'","''")
response.write "<font color=red>"
response.write keyword
response.write "</font>"
sql="select * from hw where hw_name like '%"&keyword&"%'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,3
%>
<%
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
if rs.eof then
response.write " 没有此商品信息,请确认您的商品名称输入是否正确"
response.end
else
rs.pagesize=10
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
'rs.absolutepage=page
i=0
dim hw_id(),hw_name(),hw_cash(),hw_cash1(),hw_views(),hw_gg(),hw_buys(),hw_content(),hw_pic(),hw_date()
do while not rs.eof
i=i+1
redim preserve hw_id(i),hw_name(i),hw_cash(i),hw_cash1(i),hw_views(i),hw_gg(i),hw_buys(i),hw_content(i),hw_pic(i),hw_date(i)
hw_id(i)=rs("hw_id")
hw_name(i)=rs("hw_name")
hw_cash(i)=rs("hw_cash")
hw_cash1(i)=rs("hw_cash1")
hw_gg(i)=rs("hw_gg")
hw_views(i)=rs("hw_views")
hw_buys(i)=rs("hw_buys")
hw_content(i)=rs("hw_content")
hw_pic(i)=rs("hw_pic")
hw_date(i)=rs("hw_date")
rs.movenext
loop
end if
rs.close
%>
</td>
</tr>
<tr>
</tr>
<tr>
<td>
<table width="97%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#CCCCCC">
<tr bgcolor="#FFFFFF">
<td width="60"> </td>
<td width="90">商品名称</td>
<td>商品简介</td>
<td width="60">
<div align="center">
市场价格
</div>
</td>
<td width="70">
<div align="center">
会员优惠价
</div>
</td>
<td width="80">
<div align="center">
订购
</div>
</td>
</tr> <%for i = 1 to ubound(hw_id)%>
<tr bgcolor="#FFFFFF">
<td>
<div align="center">
<a href="watch.asp?hw_id=<%=hw_id(i)%>"><img border="1" src="picture/<%=hw_pic(i)%>" width="45" height="56" class="border"></a>
</div>
</td>
<td><a href="watch.asp?hw_id=<%=hw_id(i)%>"> <%=hw_name(i)%></a></td>
<td>
<%if len(hw_content(i))>40 then
hw_content(i)=left(hw_content(i),40)
response.write hw_content(i)
response.write "……"
else
response.write hw_content(i)
end if%>
</td>
<td>
<div align="center">
¥<s><%=hw_cash(i)%></s>
</div>
</td>
<td>
<div align="center">
<font color="ff0000">¥<%=hw_cash1(i)%></font>
</div>
</td>
<td>
<div align="center">
<a href="javascript:openbag(<%=hw_id(i)%>)"><img border="0" src="images/p2.jpg" width="93" height="26"></a>
</div>
</td>
</tr>
<%next%>
</table>
</td>
</tr>
<tr>
<td bgcolor=<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color")%>
<%rs.close%>>
<div align="right">
</div>
</td>
</tr>
</table>
<br>
</td>
</tr>
</table>
</td>
<td width="1" bgcolor=<%sql="select * from sys"
rs.open sql,conn,3,3%>
<%=rs("sys_color2")%>
<%rs.close%>></td>
</tr>
</table>
<!--#include file="copy.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -