📄 products.asp
字号:
<!-- #include file="db.inc" -->
<%
'this page generates the products pages per category, by clicking on a link
' from the homepage
Dim catid, strcat
catid = CInt(Request.QueryString("id"))
strcat = Request.QueryString ("cat")
If catid = "" or strcat = "" Then
Response.Redirect "default.asp"
End if
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title>Products</title>
</head>
<body>
<H3><font face="Arial"><%If strcat <> "" Then %><%= strcat %><% Else %>Products<%End If%></font></h3>
<!-- ASP code, needed to create table of products, do not delete -->
<%
'this ASP code needs to be pasted into the template. leave this as it is
Dim rsprod
Set rsprod = Server.CreateObject("ADODB.Recordset")
rsprod.Open "products", dbc, adOpenForwardOnly, adLockReadOnly, adCmdTable
If catid <> "" Then
rsprod.Filter = "ccategory = " & catid
End If
%>
<%
While Not rsprod.EOF
%>
<table border="0" cellPadding="4" cellSpacing="2" width="100%">
<tr>
<td bgColor="#004080" valign="center">
<h3><font color="White" face="sans-serif"><%= rsprod("cname") %></font></h3></td></tr>
<tr>
<td><img src="<%= rsprod("cimageurl") %>" align="right"><%= rsprod("cdescription") %></td></tr>
<tr>
<td><form action="addprod.asp" method="POST">
<input type="hidden" name="fproductid" value="<%= rsprod("catalogID")%>">
Quantity:
<input maxLength="1" name="fquantity" size="2" value="1"> <strong> <input type="submit" value="ORDER" name="order"></form><br>
Price: <%= FormatCurrency(rsprod("cprice"),2)%></font></strong></td></tr>
</table>
<hr align="center" color="darkblue" noShade SIZE="2" width="80%">
<%
rsprod.MoveNext
Wend
rsprod.Close
dbc.Close
%>
<!-- end asp code --->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -