home *** CD-ROM | disk | FTP | other *** search
- <!--- If no category is currently selected, go to the category
- selection page --->
- <CFIF NOT IsDefined("CategoryID")>
- <CFLOCATION URL="showcategories.cfm">
- </CFIF>
-
- <!--- This CFQUERY retrieves the name of the current category --->
- <CFQUERY DATASOURCE="CFexamples" NAME="GetCurrentCategory">
- SELECT CategoryName FROM StoreCategories
- WHERE CategoryID = #CategoryID#
- </CFQUERY>
-
- <!--- This CFQUERY retrieves the items that belong
- to the current category --->
- <CFQUERY DATASOURCE="CFexamples" NAME="GetItems">
- SELECT StoreItems.*, StoreManufacturers.Name
- FROM StoreItems, StoreManufacturers
- WHERE StoreItems.ManufacturerID = StoreManufacturers.ManufacturerID
- AND CategoryID = #CategoryID#
- </CFQUERY>
-
- <!--- Set this for later --->
- <CFSET Session.LastCategory = CategoryID>
-
- <HTML>
- <HEAD>
- <TITLE>Online Store - Browse Items</TITLE>
- </HEAD>
-
- <BODY BGCOLOR="#FFCC00" LINK="Maroon" background="images/storebg.gif" leftmargin=5 topmargin=0>
-
-
- <SPAN STYLE="position: absolute; left: 205px; top: 10px; width: 350px">
- <CFOUTPUT><FONT FACE="Arial Black, Helvetica Bold, Geneva, Helvetica" SIZE="7" COLOR="##000000"><I>#GetCurrentCategory.CategoryName#</I></FONT></CFOUTPUT>
- <BR><BR>
- <TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0" WIDTH="350">
-
- <!--- This CFOUTPUT block loops over the GetCategories query
- and creates the following HTML for each one. --->
- <CFOUTPUT QUERY="GetItems">
-
- <FORM ACTION="additem.cfm" METHOD="POST">
-
- <INPUT TYPE="HIDDEN" NAME="ItemID" VALUE="#ItemID#">
-
- <TR>
- <TD><FONT FACE="Helvetica" SIZE="-1" COLOR="##000000"><B>#ItemName#</B></FONT></TD>
- <TD ALIGN="RIGHT">
- <FONT FACE="Helvetica" SIZE="-1" COLOR="##000000">#DollarFormat(ItemPrice)#</FONT>
- </TD>
- </TR>
-
- <TR>
- <TD COLSPAN="2">
- <FONT FACE="Helvetica" SIZE="-1">#ItemDesc#<BR><BR>
- <B>Manufacturer:</B> #Name#<BR>
- <B>Part Number:</B> #PartNum#</FONT>
- </TD>
- </TR>
-
- <TR>
- <TD COLSPAN="2" ALIGN="RIGHT"><FONT FACE="Helvetica" SIZE="-1">
- <INPUT TYPE="SUBMIT" VALUE="Add to Cart"></FONT></TD>
- </TR>
-
- <TR>
- <TD COLSPAN="2" HEIGHT="50"></TD>
- </TR>
-
- </FORM>
-
- </CFOUTPUT>
- </TABLE>
-
- <FONT FACE="Helvetica" SIZE="-1">
- <A HREF="showcategories.cfm">Return to Categories</A>
- </FONT>
- <CF_ShowDoc ID=2>
- <BR><BR>
- </TD>
- </TR>
- </TABLE>
-
- </SPAN>
-
- <CFINCLUDE TEMPLATE="_showcart.cfm">
-
- </BODY>
- </HTML>
-