XML/XSL Portal

Multiple Stylesheet Aware
HideXML Documenting CodeHide
     
  
 
 

EQUIP.asp

None.
No Comments Found.
Include Files
  • /advworks/Disclaim.inc (1)
  • /advworks/srcform.inc (1)
Session Variables Used
  • ConnectionString (1)
  • ItemCount (1)
Redirections
  • HREF > /advworks/default.asp (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=<%=prodtype%> (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=RockShoes (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=SleepingBag (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=backpack (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=boot (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=carabiner (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=crampon (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=harness (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=pants (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=parka (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=shirt (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=supplies (1)
  • HREF > /advworks/equipment/catalog_type.asp?ProductType=tent (1)
  • HREF > /advworks/equipment/check_out.asp (1)
  • HREF > /advworks/equipment/check_out.asp?ProductCode=<%=RS("ProductCode")%> (1)
  • HREF > /advworks/equipment/default.asp (1)
Images Used
Tlc 152
152
Source
<% Set Conn = Server.CreateObject("ADODB.Connection") EquipmentType = Request.QueryString("EquipmentType") SELECT CASE EquipmentType CASE "Camping" EquipmentTypeTitle = "Camping Equipment" Titl.gif = "camping" CASE "Climbing" EquipmentTypeTitle = "Climbing Equipment" Titl.gif = "climbing" CASE "Clothing" EquipmentTypeTitle = "Clothing" Titl.gif = "clothing" CASE ELSE Response.Redirect("/advworks/Equipment/default.asp") END SELECT ' The queries to return the best selling items by equipment type ' are encapsulated in stored procedures (or "querydefs" as they are called ' in Microsoft Access). There is one stored procedure for each equipment ' category. The stored procedure name to invoke is the EquipmentType ' plus the name "TopSales" SQL = "{call " & EquipmentType & "TopSales}" Conn.Open Session("ConnectionString") Set RS = Conn.Execute(SQL) %> <html> <head> <title>Adventure Works Catalog - <%=EquipmentTypeTitle%></title></head> <body BACKGROUND="images/back_sub.gif" LINK="#800000" VLINK="#008040"> <font FACE="Verdana, Arial, Helvetica" SIZE="2"> <table BORDER="0"> <tr> <td> <img SRC="images/spacer.gif" ALIGN="RIGHT" WIDTH="100" ALT></td> <td COLSPAN="5"> <img SRC="images/title_<%=Titl.gif%>.gif" ALIGN="CENTER" BORDER="0" ALT="<%=EquipmentTypeTitle%>"> <br> <hr SIZE="4"></td></tr> <!-- BEGIN Navigational buttons --> <tr> <td ROWSPAN="4" ALIGN="LEFT" VALIGN="TOP"> <a HREF="/advworks/equipment/default.asp"> <img SRC="images/icon_sub_equipment.gif" WIDTH="85" HEIGHT="45" BORDER="0" ALT="Equipment"></a> <br> <img SRC="images/sidebar_text.gif" WIDTH="122" HEIGHT="202" BORDER="0" USEMAP="equip.asp#SIDEBAR" ALT="Items for Sale"> <br> <map NAME="SIDEBAR"> <area SHAPE="RECT" COORDS="0,0, 99,19" HREF="/advworks/equipment/catalog_type.asp?ProductType=carabiner"> <area SHAPE="RECT" COORDS="0,19, 101,35" HREF="/advworks/equipment/catalog_type.asp?ProductType=crampon"> <area SHAPE="RECT" COORDS="0,36, 101,51" HREF="/advworks/equipment/catalog_type.asp?ProductType=harness"> <area SHAPE="RECT" COORDS="0,52, 100,66" HREF="/advworks/equipment/catalog_type.asp?ProductType=RockShoes"> <area SHAPE="RECT" COORDS="0,67, 101,82" HREF="/advworks/equipment/catalog_type.asp?ProductType=backpack"> <area SHAPE="RECT" COORDS="0,83, 99,99" HREF="/advworks/equipment/catalog_type.asp?ProductType=SleepingBag"> <area SHAPE="RECT" COORDS="0,100, 100,113" HREF="/advworks/equipment/catalog_type.asp?ProductType=supplies"> <area SHAPE="RECT" COORDS="0,114, 101,130" HREF="/advworks/equipment/catalog_type.asp?ProductType=tent"> <area SHAPE="RECT" COORDS="0,131, 100,147" HREF="/advworks/equipment/catalog_type.asp?ProductType=boot"> <area SHAPE="RECT" COORDS="0,148, 102,162" HREF="/advworks/equipment/catalog_type.asp?ProductType=parka"> <area SHAPE="RECT" COORDS="0,163, 101,179" HREF="/advworks/equipment/catalog_type.asp?ProductType=pants"> <area SHAPE="RECT" COORDS="0,180, 101,198" HREF="/advworks/equipment/catalog_type.asp?ProductType=shirt"> </map> <a HREF="/advworks/default.asp"> <img SRC="images/icon_sub_home.gif" WIDTH="85" HEIGHT="45" BORDER="0" ALT="Home"></a> <br> <!--#include virtual="/advworks/srcform.inc"--> <br> <% If Session("ItemCount") > 0 Then %> <a HREF="/advworks/equipment/check_out.asp"> <img SRC="images/checkout.gif" WIDTH="85" HEIGHT="45" ALT="Check Out" BORDER="O"></a> <% End If %> </td> <!-- BEGIN data into interface --> <% ProductNumber = 1 Do While Not RS.EOF If prodtype <> RS("ProductType") Then prodtype = RS("ProductType") ProductNumber = ProductNumber + 1 %> <td ALIGN="RIGHT" VALIGN="TOP"> <img SRC="<%=RS("ProductImageURL")%>" ALT="<%=RS("ProductName")%>"> <center> <a HREF="/advworks/equipment/catalog_type.asp?ProductType=<%=prodtype%>"> <img SRC="images/more.gif" WIDTH="67" HEIGHT="21" ALT="More <%=prodtype%>" BORDER="0"></a> </center> </td> <td ALIGN="LEFT" VALIGN="TOP"> <% If MONTH(RS("ProductIntroductionDate")) > (MONTH(NOW)-1) Then%> <font COLOR="#800080" SIZE="2"><b>New!</b></font><br> <% End If%> <font SIZE="2"><b><%=RS("ProductName")%></b>, <%=RS("ProductDescription")%><br> <% If Not IsNull(RS("ProductSize")) Then %> sizes <%=RS("ProductSize")%> <%End If%> <br> <%=RS("ProductCode")%> <br><br> <% If RS("OnSale") Then bOnSale = TRUE Price = (RS("UnitPrice")-(RS("UnitPrice") / 10)) Else Price = (RS("UnitPrice")) End If %> <!-- Display number in currency format --> <b><% = FormatCurrency(Price)%></b> <% If (bOnSale) Then %> <img SRC="images/saleTag1.gif" WIDTH="57" HEIGHT="32" ALIGN="CENTER" ALT="On Sale"><br> <% bOnSale = FALSE %> <% End If %> <a HREF="/advworks/equipment/check_out.asp?ProductCode=<%=RS("ProductCode")%>"> <img SRC="images/order.gif" WIDTH="55" HEIGHT="15" ALT="Order" BORDER="0"></a> </font> </td> <% If (ProductNumber MOD 2) Then Response.Write "</TR><TR><TD HEIGHT=10></TD></TR>" 'break the row End If End If RS.MoveNext Loop Conn.Close %> <!-- END data into interface --> <% REM Column Span Value %> <% HTML_CS = 5 %> <% HTML_INDENT = TRUE %> <!--#include virtual="/advworks/Disclaim.inc"--> </table> </body> </html>
 
 
  
     
Open

Delete

View XML
View XSL