<% ' Comersus Sophisticated Cart ' Comersus Open Technologies LC ' 2005 ' Open Source License can be found at documentation/readme.txt ' http://www.comersus.com ' Details: List categories %> <% dim mySQL, conntemp, rsTemp dim pTotalPages, pCounter, pNumPerPage ' get settings pDefaultLanguage = getSettingKey("pDefaultLanguage") pCompany = getSettingKey("pCompany") pStoreLocation = getSettingKey("pStoreLocation") pCurrencySign = getSettingKey("pCurrencySign") ' get all categories mySQL="SELECT idCategory, categoryDesc FROM categories WHERE active=-1 AND idCategory>1 AND idCategory NOT IN (SELECT A.idCategory FROM categories A, categories B WHERE A.idCategory=B.idParentCategory)" pNumPerPage = 5 pCurrentPage = left(request.querystring("currentPage"),4) if pCurrentPage = "" then pCurrentPage = 1 end if call getFromDatabasePerPage(mySql, rsTemp, "WapViewCategories") if rstemp.eof then call redirectWap("comersus_wapMessage.asp?message="&Server.UrlEncode("No categories defined")) end If rsTemp.moveFirst rsTemp.PageSize = pNumPerPage pTotalPages = rsTemp.PageCount rsTemp.absolutePage = pCurrentPage %>

Store Categories <% pCounter= 0 do while not rsTemp.eof and pCounter< pNumPerPage%>
"><%=rsTemp("categoryDesc")%> <% pCounter= pCounter+ 1 rsTemp.movenext loop%>
<%if pCurrentPage > 1 then%>
Previous <%end if%>
<%if CInt(pCurrentPage) <> CInt(pTotalPages) then%> Next
<%end if%>

<%call closeDb()%>