📄 downbuy.asp
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="..\ADOVBS.INC"-->
<!--#include file="..\util.asp" -->
<!--#include file="..\function.asp" -->
<%
dz=request("class")
CurrPage=request("CurrPage")
DbPath = SERVER.MapPath("..\bookshop.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
Head="<"&dz&">"&"折商品"
set rs=server.createobject("adodb.recordset")
sql = "Select * From book Where dz="& dz &" order by bookbm"
'Set rs = conn.Execute( sql )
rs.open sql,conn,1,1
if rs.RecordCount<=0 then
response.write "数据库没有符合条件的数据"
response.end
else
i=0
rs.PageSize=10
end if
PageCount=clng(rs.PageCount)
if CurrPage>PageCount then
CurrPage=PageCount
end if
if CurrPage<=0 or CurrPage="" then
CurrPage=1
end if
BookNum=rs.RecordCount
rs.absolutePage = CurrPage
%>
<html>
<head>
<title><%=Head%></title>
</head>
<body bgcolor="#ffffff">
<form Action="Add.asp" Method="POST">
<p align="center">
<table border="1" align="center" width="90%" bgcolor="#C8CCFF" cellspacing="0" cellpadding="1" >
<tr bgcolor="#FFFFCC">
<td colspan="24" align="center"><font size="5" color="#990066"><% =Head %></font></td>
</tr>
<% LinePage=10
for i=0 to PageCount\LinePage-1 %>
<tr bgcolor="#FFFFCC"> <% for j=1 to LinePage %>
<td width="10%"><a href="downbuy.asp?Class=<% =dz %>&CurrPage=<% =i*LinePage+j %>">第[<% =i*LinePage+j %>]页</a></td>
<% next %>
</tr>
<% next
EndPage=PageCount mod LinePage %>
<tr bgcolor="#FFFFCC"> <% for j=1 to EndPage %>
<td width="10%"><a href="downbuy.asp?Class=<% =dz %>&CurrPage=<% =i*LinePage+j %>">第[<% =i*LinePage+j %>]页</a></td>
<% next %>
</tr>
</table>
<table Border="1" width="90%" align="center" cellspacing="0">
<tr align="center" bgcolor="#495E5F">
<td><font color="#FFFFFF">选中</font></td>
<td><font color="#FFFFFF">商品名称</font></td>
<td><font color="#FFFFFF">生产厂家</font></td>
<td><font color="#FFFFFF">型号</font></td>
<td><font color="#FFFFFF">原价</font></td>
<td><font color="#FFFFFF">售价</font></td>
<td><font color="#FFFFFF">详情</font></td>
</tr>
<%
do until rs.eof
IsCheck=""
If InStr(Session("ProductList"), rs("bookbm")) > 0 Then
IsCheck="Checked"
End If
%>
<tr bgcolor="#D0E1D0" >
<td Align="Center">
<input Type="CheckBox" Name="bookbm" Value="<%=rs("bookbm")%>" <%=IsCheck%>>
</td>
<td align="left"><%=rs("bookname")%></td>
<td><%=rs("Author")%></td>
<td align="center"><% =rs("cd") %></td>
<td align="center" ><% =rs("price") %></td>
<td align="center" ><% =rs("yhj") %></td>
<td><a href="fullinfo.asp?bookbm=<% =rs("bookbm") %>" target="_blank">详情</a></td>
</tr>
<%
i=i+1
if i>=rs.PageSize then exit do
rs.movenext
loop
rs.close
set rs=nothing
set conn=nothing
%>
</table>
<p align="center"><input Type="submit" Value="放入购物车"> </p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -