一个简单的网上书城的例子(三)
来源:未知 责任编辑:智问网络 发表时间:2013-11-04 19:50 点击:次
buy.asp:显示商品和用户购物!
<!--#include file="Util.asp" -->
<%
DbPath = SERVER.MapPath("ShopBag.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft access(小型网站之最爱) Driver (*.mdb)};dbq=" & DbPath
CategoryID=Request("CategoryID")
Description=Request("Description")
Head="会文书城[" & Description & "] 区"
sql = "Select * From Products Where CategoryID=" & CategoryID
sql = sql & " Order By ProductID"
Set rs = conn.Execute( sql )
%>
<HTML>
<HEAD><TITLE><%=Head%></TITLE></HEAD>
<BODY BACKGROUND="b01.jpg">
<font color=blue><H2 ALIGN=CENTER><%=Head%></H2></font>
<CENTER>
<Form Action=Add.asp Method=POST>
<TABLE Border=1>
<TR BGCOLOR=#00FFFF>
<TD>挑选</TD><TD>书刊编号</TD><TD>书刊名称</TD><TD>价格</TD><TD>书刊简介</TD></TR>
<%
While Not rs.EOF
IsCheck=""
If InStr(Session("ProductList"), rs("ProductID")) > 0 Then
IsCheck="Checked"
End If
%>
<TR>
<TD Align=Center>
<Input Type=CheckBox Name="ProductID" Value="<%=rs("ProductID")%>" <%=IsCheck%>>
</TD>
<TD><%=rs("ProductID")%></TD>
<TD><%=rs("ProductName")%></TD>
<TD Align=Right><%=rs("Price")%></TD>
<TD><A HREF=<%=rs("Link")%>><%=rs("Description")%></A></TD>
</TR>
<%
rs.MoveNext
Wend
%>
</TABLE>
<Input Type=Submit Value="放入购物袋">
</Form>
<HR width=70%>
<A HREF=Check.asp>查看购物袋</A>
<A HREF=Clear.asp>退回所有物品</A><P>
<% ListCategory conn %>
</CENTER>
</BODY>
</HTML>
<!--#include file="Util.asp" -->
<%
DbPath = SERVER.MapPath("ShopBag.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft access(小型网站之最爱) Driver (*.mdb)};dbq=" & DbPath
CategoryID=Request("CategoryID")
Description=Request("Description")
Head="会文书城[" & Description & "] 区"
sql = "Select * From Products Where CategoryID=" & CategoryID
sql = sql & " Order By ProductID"
Set rs = conn.Execute( sql )
%>
<HTML>
<HEAD><TITLE><%=Head%></TITLE></HEAD>
<BODY BACKGROUND="b01.jpg">
<font color=blue><H2 ALIGN=CENTER><%=Head%></H2></font>
<CENTER>
<Form Action=Add.asp Method=POST>
<TABLE Border=1>
<TR BGCOLOR=#00FFFF>
<TD>挑选</TD><TD>书刊编号</TD><TD>书刊名称</TD><TD>价格</TD><TD>书刊简介</TD></TR>
<%
While Not rs.EOF
IsCheck=""
If InStr(Session("ProductList"), rs("ProductID")) > 0 Then
IsCheck="Checked"
End If
%>
<TR>
<TD Align=Center>
<Input Type=CheckBox Name="ProductID" Value="<%=rs("ProductID")%>" <%=IsCheck%>>
</TD>
<TD><%=rs("ProductID")%></TD>
<TD><%=rs("ProductName")%></TD>
<TD Align=Right><%=rs("Price")%></TD>
<TD><A HREF=<%=rs("Link")%>><%=rs("Description")%></A></TD>
</TR>
<%
rs.MoveNext
Wend
%>
</TABLE>
<Input Type=Submit Value="放入购物袋">
</Form>
<HR width=70%>
<A HREF=Check.asp>查看购物袋</A>
<A HREF=Clear.asp>退回所有物品</A><P>
<% ListCategory conn %>
</CENTER>
</BODY>
</HTML>
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>