<%@ Language=VBScript %> <%Option Explicit%> <% Dim PageName PageName = "Catalogue" %> <% Dim Category, SubCategory, ProductID, ProductName, ItemDescription, Keyword, PageCategory, PageSubCategory If Request.Cookies("SessionID") = "" Then Response.Cookies("SessionID") = Session.SessionID If Not IsNumeric(Trim(Request("ProductID"))) Then Set Conn = Nothing Response.Redirect "catalogue.asp" End If Keyword = Trim(Request("SearchThis")) Conn.open strConn strSQL = "SELECT Category.Category, Product.ProductID, Product.ProductName " strSQL = strSQL & "FROM Category INNER JOIN Product ON Category.Category = Product.Category " strSQL = strSQL & "WHERE Product.ProductID = " & Trim(Request("ProductID")) & " " strSQL = strSQL & "AND Product.Published <> 0" Set RS = Server.CreateObject("ADODB.Recordset") Set RS.ActiveConnection = Conn RS.Open strSQL If Not RS.EOF Then Category = RS("Category") Category = RS("Category") ProductID = RS("ProductID") ProductName = RS("ProductName") Else Set RS = Nothing Set Conn = Nothing Response.Redirect "catalogue.asp" End If Set RS = Nothing PageCategory = Split(Category, " - ")(0) If Ubound(Split(Category, " - ")) = 1 Then PageSubCategory = Split(Category, " - ")(1) Else PageSubCategory = "" End If %> Majestic Products - <%=PageName%>
<% If PageSubCategory <> "" Then %> <% Else %> <% End If %>
Catalogue > <%=PageCategory%> > <%=PageSubCategory%>Catalogue > <%=Category%>
<% strSQL = "SELECT Product.* " strSQL = strSQL & "FROM Category INNER JOIN Product ON Category.Category = Product.Category " strSQL = strSQL & "WHERE Product.Published <> 0 And Product.ProductID = " & ProductID Set RS = Conn.Execute(strSQL) If Not RS.EOF Then %>
<%=ShowKeyword(RS("ProductCode") & " - " & RS("ProductName"), Keyword, "keyword")%>
<% If Not IsNull(RS("LargeImageLink")) Then %> <%=RS(" src="<%=RS("LargeImageLink")%>" border=1> <% ElseIf Not IsNull(RS("LargeImage")) Then %> <%=RS(" src="shop_images/large/<%=RS("LargeImage")%>" border=1> <% ElseIf Not IsNull(RS("ThumbnailImageLink")) Then %> <%=RS(" src="<%=RS("ThumbnailImageLink")%>" border=1> <% ElseIf Not IsNull(RS("ThumbnailImage")) Then %> <%=RS(" src="shop_images/thumbnail/<%=RS("ThumbnailImage")%>" border=1> <% Else %> <% End If %>
<% ItemDescription = RS("ProductDescription") ItemDescription = ShowKeyword(ItemDescription, Keyword, "keyword") If ItemDescription <> "" Then Response.Write "

Product Description:
" & Replace(ItemDescription,vbCRLf,"
") & "

" ItemDescription = RS("AvailableColours") ItemDescription = ShowKeyword(ItemDescription, Keyword, "keyword") If ItemDescription <> "" Then Response.Write "

Available Colours:
" & Replace(ItemDescription,vbCRLf,"
") & "

" ItemDescription = RS("AvailableSizes") ItemDescription = ShowKeyword(ItemDescription, Keyword, "keyword") If ItemDescription <> "" Then Response.Write "

Available Sizes:
" & Replace(ItemDescription,vbCRLf,"
") & "

" ItemDescription = RS("PrintArea") ItemDescription = ShowKeyword(ItemDescription, Keyword, "keyword") If ItemDescription <> "" Then Response.Write "

Print Area:
"& Replace(ItemDescription,vbCRLf,"
") & "

" If Not IsNull(RS("WebAddress")) Then Response.Write "" If Not IsNull(RS("WebDescription")) Then Response.Write ShowKeyword(RS("WebDescription"), Keyword, "keyword") Else Response.Write RS("WebAddress") End If Response.Write "
" End If Response.Write "

" If Not IsNull(RS("Price5")) Then Response.Write "Price 5: " & FormatMyCurrency(RS("Price5")) & "
" If Not IsNull(RS("Price25")) Then Response.Write "Price 25: " & FormatMyCurrency(RS("Price25")) & "
" If Not IsNull(RS("Price50")) Then Response.Write "Price 50: " & FormatMyCurrency(RS("Price50")) & "
" If Not IsNull(RS("Price100")) Then Response.Write "Price 100: " & FormatMyCurrency(RS("Price100")) & "
" If Not IsNull(RS("Price250")) Then Response.Write "Price 250: " & FormatMyCurrency(RS("Price250")) & "
" If Not IsNull(RS("Price500")) Then Response.Write "Price 500: " & FormatMyCurrency(RS("Price500")) & "
" If Not IsNull(RS("Price1000")) Then Response.Write "Price 1000: " & FormatMyCurrency(RS("Price1000")) & "
" If Not IsNull(RS("Price2500")) Then Response.Write "Price 2500: " & FormatMyCurrency(RS("Price2500")) & "
" If Not IsNull(RS("Price5000")) Then Response.Write "Price 5000: " & FormatMyCurrency(RS("Price5000")) & "
" If Not IsNull(RS("Price10000")) Then Response.Write "Price 10000: " & FormatMyCurrency(RS("Price10000")) & "
" If Not IsNull(RS("InfoFile")) Then %> View Product Drawing
<% ElseIf Not IsNull(RS("InfoFileLink")) Then %> View Product Drawing
<% End If %>
Total Quantity:
Number of print colours:
Quantity break-down of product colours and/or sizes and comments:

<%Else%>


Items could not be found.

<%End If Set RS = Nothing %>
<%Set Conn = Nothing%>