<% 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 Computers > Products > <%=catName%><%if brand <> "" then%> > <%=brand%><%end if%>
<%=catName%><%if brand <> "" then%> > <%=brand%><%end if%>
<% Rs.Open "Select Distinct BrandName, BrandSmall From tblBrands INNER JOIN tblProducts ON tblProducts.BID = tblBrands.ID Where tblProducts.CID =" & cid While Not Rs.Eof %> <% '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 %>
<% Rs.Movenext Wend %> <% Rs.Close %>
<% 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 counter = 0 last = "" Rs.Open query If Not Rs.Eof Then While Not Rs.Eof counter = counter + 1 %> <% if last <> Rs("Section") Then %> <% last = Rs("Section") %> <% ac = 0 %> <% counter = 0 %> <% end if %> <% if counter = 0 then %> <% end if %> <% if counter >= 4 then counter = 0 %> <% end if Rs.Movenext Wend End If Rs.Close %>
<%=Rs("Section")%>
" width="100" height="100"/>
<%=Rs("Short")%>