<% IncludeTop 'RETRIEVE QUERYSTRING VARIABLES cid = request("cid") pid = request("pid") 'QUERY PRODUCTS FOR SELECTED CATEGORY if len(cid) = 0 then response.write "

Please select a category.

" else 'QUERY PRODUCTS FOR SELECTED CATEGORY sSQL= "select * from Products, CAT_PROD where Products.ID = CAT_PROD.PROD_ID " sSQL= sSQL+"and CAT_PROD.CAT_ID = "+cstr(cid)+" and active order by CAT_PROD.RANK" set rs = OpenRS(sSQL, globaldb) 'DISPLAY CATEGORY displayCategory() if CATEGORYLAYOUT = "3" then 'QUERY PRODUCTS FOR SELECTED CATEGORY sSQL = "select * from categories where parent_id = " + cstr(cid) set rsSubCat = OpenRS(sSQL, globaldb) Response.Write "
" if not rsSubCat.eof then Response.Write "" + chknull(rsSubCat("Name"), "     ") + " " rsSubCat.movenext do while not rsSubCat.eof Response.Write "| " + chknull(rsSubCat("Name"), "     ") + " " rsSubCat.movenext loop response.write "

" end if Response.Write "
" end if 'DISPLAY PRODUCTS if not rs.eof then displayThumbnail(THUMBNAILLAYOUT) else response.write "

No products found. Please select another category.

" end if end if IncludeBottom %>