📄 goods.asp
字号:
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="xingxing.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 14px}
.style2 {color: #FF0000}
-->
</style>
</head>
<body>
<div align="left">
<!--#include file=top.asp-->
</div>
<table width="946" border="1">
<tr>
<th width="181" height="121" scope="col"><!--#include file=login.asp--> </th>
<th width="215" bgcolor="#FFCC66" scope="col"><!--#include file=searchgoods.asp--> </th>
<th width="210" bgcolor="#FFCC66"> <!--#include file=searchinfo.asp--></th>
<th width="312" bgcolor="#FFCC66"><div align="left">
<table width="100%" border="0" height="100%" >
<tr >
<th scope="col"><!--#include file=announce.asp--></th>
</tr>
<tr>
<th height="83" scope="col"> </th>
</tr>
</table>
</div></th>
</tr>
</table>
<table width="945" height="136" border="1" bordercolor="#3366FF" bgcolor="#99FFCC">
<tr>
<th width="183" height="73" scope="col"><!--#include file=newgoodsinfo.asp--></th>
<th width="574" scope="col"><div align="center">
<table width="100%" height="119" border="1" bordercolor="#993333" bgcolor="#CCCC66" >
<%
Set rs=Server.CreateObject("ADODB.Recordset")
class1=request.QueryString("class1")
class2=request.QueryString("class2")
key=request.QueryString("key")
if key="" then
if class1="" then
sql="select * from goods order by date desc"
else if class2="" then
sql="select * from goods where class1="& class1 &" order by date desc"
else
sql="select * from goods where class1="& class1 &" and class2="& class2 &" order by date desc"
end if
end if
else
if class1="" then
sql="select * from goods where name like '%"& key &"%'"& "or introduce like '%"& key &"%' order by date desc"
else
sql="select * from goods where class1="& class1 & " and (name like '%"& key &"%'"& " or introduce like '%"& key &"%') order by date desc"
end if
end if
rs.open sql,conn,1,1
if Not rs.EOF and Not rs.BOF then
if Request.QueryString("page_no")="" then
page_no=1
else
page_no=cint(Request.QueryString("page_no"))
end if
rs.PageSize=5
rs.AbsolutePage=page_no
I=rs.PageSize
do while Not rs.EOF and I>0
I=I-1
%>
<tr>
<th width="134" height="113" scope="col"><img src="goodsimg/<%=rs(9)%>" width="128" height="93" align="left"></th>
<th width="233" scope="col"><table width="100%" height="100%"border="0" bordercolor="#FF3333">
<tr>
<th scope="col"><A href="showgoods.asp?goods_id=<%=rs(0)%>" class="style2"><%=rs(1)%></A></th>
</tr>
<tr>
<th height="61" scope="row"><%=rs(5)%></th>
</tr>
</table></th>
<th width="97" scope="col">价格:<%=rs(4)%>
<br>
折扣:<%=rs(8)%>
<br>
<a href="addcar.asp?goods_id=<%=rs(0)%>" class="style2">加入购物车</a></th>
</tr>
<%
rs.MoveNext
loop
%>
</table>
</div>
<div align="center">
<table width="574" border="1" bordercolor="#66FF66" bgcolor="#3366CC">
<tr>
<th width="471" scope="col">请选择页面:
<%
for I=1 to rs.PageCount
if I=page_no then
Response.Write I & " "
else
Response.Write ("<a href='goods.asp?key="& key &"&class1="& class1 &"&class2="& class2 &"&page_no=" & I & "'>" & I & "</a>")
end if
next
else
Response.Write "没有物品!"
end if
%></th>
</tr>
</table>
</div>
<div align="center">
<%rs.close%>
</div></th>
<th width="166" scope="col"> </th>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -