<%@ Language=VBScript %><% '********************************************************* **************** ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : List all products in two rows by category ' Product : CandyPress Store Frontend ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' &nb sp; See "license.txt" for this product for details regarding ' &nb sp; licensing, usage, disclaimers, distribution and general ' &nb sp; copyright requirements. If you don't have a copy of this ' &nb sp; file, you may request one at webmaster@candypress.com '********************************************************* **************** Option explicit Response.Buffer = true %> <% dim mySQL dim connTemp dim rsTemp dim rsTemp2 dim idOrder 'Work Fields dim totalPages dim count dim curPage dim prodPerPage dim idProduct dim temp dim temp1 dim col prodPerPage=57 'should be oneven to fill the last right column. Length will vary depending on the numers of categories col=1 temp="" count=1 call openDB() if loadConfig() = false then call errorDB(langErrConfig,"") end if idOrder = sessionCart() %> <% call closeDB() sub cartMain() %>
All Trout Fishing Products
<% 'Read Database mySQL = "SELECT Categories.idCategory, Categories.categoryDesc, " _ & "products.idProduct, products.description " _ & "FROM (Categories INNER JOIN Categories_Products "_ & "ON Categories.idCategory = Categories_Products.idCategory) " _ & "INNER JOIN products ON Categories_Products.idProduct = products.idProduct " _ & "WHERE active = -1 " _ & "ORDER BY Categories.idCategory, products.idProduct" 'Create and Open recordset set rsTemp = openRSopen(mySQL,0,adOpenStatic,adLockReadOnly,adCmdText,prodPerPage) 'Check if any records were returned if not rstemp.eof then 'Get Page to show (if any) curPage = Request.Form("curPage") if len(curPage) = 0 then curPage = Request.QueryString("curPage") end if if len(curPage) = 0 or not isNumeric(curPage) then curPage = 1 else curPage = CLng(curPage) end if 'Go to requested page rstemp.MoveFirst rstemp.PageSize = prodPerPage totalPages = rstemp.PageCount rstemp.AbsolutePage = curPage %> <% 'Read through recordset and display all products do while not rstemp.eof and count <= rstemp.pageSize 'must be less or equal otherwise last record on page is missing temp1=rsTemp("idCategory") if temp1 <> temp then if col=2 then response.write "" end if response.write "" response.write "" col=1 temp=rsTemp("idCategory") end if if col=3 then response.write "" col=1 end if response.write "" col=col+1 count=count+1 rstemp.moveNext loop if col=2 then response.write "" end if else %> <% end if call closeRS(rsTemp) %>
<%=navbarOverview("sitemap.asp","idProduct=" & idProduct)%>
 
" & rsTemp("categoryDesc") &"
    " response.write "" & rsTemp("description") & "
No products yet
<%=navbarOverview("sitemap.asp","idProduct=" & idProduct)%>
<% end sub '********************************************************* ************* 'Display navigation bar '********************************************************* ************* function navbarOverview(scriptName,queryParms) 'Page number Response.Write langGenNavPage & " : " & curPage & " / " & TotalPages & "    " 'Back Button if curPage > 1 then Response.Write "[ " & langGenNavBack & "" else Response.Write "[ " & langGenNavBack end if 'Next Button if curPage < TotalPages then Response.Write " | " & langGenNavNext & "" & "]" else Response.Write " | " & langGenNavNext & " ]" end if end function %>