<% cid = Request.QueryString("cid") Rs.Open "Select * From tblCategories Where ID=" & cid If Rs.Eof Then Response.Redirect("Default.asp") End If catName = Rs("catName") Rs.Close brand = Request.QueryString("brand") if brand <> "" then Rs.Open "Select * From tblBrands WHere BrandName='" & brand & "'" If Not Rs.Eof Then bid = Rs("ID") ELse Response.Redirect("default.asp") End If Rs.Close end if %> Agn Technologies > Products > <%=catName%><%if brand <> "" then%> > <%=brand%><%end if%>
<%=catName%><%if brand <> "" then%> > <%=brand%><%end if%>
<% Rs.Open "Select * From tblCategories Where ID=" & cid %> <% brands = split(Rs("Brands") , ",") for x = 0 to ubound(brands) Rs2.Open "Select BrandSmall From tblBrands Where BrandName='" & brands(x) & "'" If Not Rs2.Eof Then %> <% End If Rs2.Close next %> <% Rs.Close %>
<% if bid = "" then %> <% end if %> <% query = "Select tblProducts.Image, tblProducts.Id, tblProducts.ProductName, tblProducts.Short, tblProducts.Price, tblProducts.Link, tblProducts.Stock, tblProducts.Call, tblProducts.[Section], tblBrands.BrandName, tblBrands.BrandSmall As bLogo From tblProducts INNER JOIN tblBrands On tblProducts.BID = tblBrands.ID Where tblProducts.CID=" & cid if bid <> "" then query = query & " and BID=" & bid end if query = query & " Order By tblProducts.[Section]" ac = 0 color = "#e3f1ff" colSpan = 5 last = "" Rs.Open query If Not Rs.Eof Then While Not Rs.Eof %> <% if bid = "" then %> <% colSpan = 5 %> <% Else %> <% colSpan = 4 %> <% End If %> <% if last <> Rs("Section") Then %> <% last = Rs("Section") %> <% ac = 0 %> <% end if %> <% if bid = "" then %> <% end if %> <% if ac = 0 then ac = 1 else ac = 0 Rs.Movenext Wend End If Rs.Close %>
Brand Model No Description Price Stock
<%=Rs("Section")%>
<%=Rs("BrandName")%> " target="_blank"><%=Rs("ProductName")%> <%=Rs("Short")%> <%=Rs("Price")%> <%if Rs("Stock") then%>Yes<%else%>No<%end if%>