<% Dim lCurrentCatProducts Dim lCurrentSubCatData Dim lCurrentMainCatOfSubCat Dim lvarItem Dim liPages Dim lsPagination Dim licurrentPage Dim lscurrentPage Dim sHeaderImage Dim sQuoteImage Dim lsSql Dim lNextPageLink Dim lSearch lSearch = "" lNextPageLink = "" lsSql = "" '********************************************************************** if (NAVID <> "" and NAVID <> "0") or isnull(getRequestValue("search")) then 'get current subcat data lCurrentSubCatData = getSubCategoryDataForSubCatID(NAVID) 'get current subcat's main cat data 'lCurrentMainCatOfSubCat = getTopCategoryData(lCurrentSubCatData(1)(1)) 'based on parent catID 'lCurrentMainCatOfSubCat(1)(6) ==> header image for main cat 'sHeaderImage=lCurrentMainCatOfSubCat(1)(6) 'sHeaderImage=lCurrentSubCatData(1)(10) if SHOW_TEXT_CATEGORY_LINKS = true then 'sHeaderImage=lCurrentSubCatData(1)(4) end if end if '********************************************************************** IF getRequestValue("vp")="y" THEN lsSql = "Exec p_PACKAGE_PRODUCTS " & getRequestValue("productid") lCurrentCatProducts = getRecordSetList(lsSql) IF getRequestValue("search")="wn" THEN sHeaderImage = "local/headers/whatsnew_hd.gif" ELSEIF getRequestValue("search")="bs" THEN sHeaderImage = "local/headers/bestsellers_hd.gif" ELSEIF getRequestValue("search")="y" THEN sHeaderImage = "local/headers/searchresults_hd.gif" ELSE 'sHeaderImage=lCurrentMainCatOfSubCat(1)(6) END IF ELSEIF getRequestValue("search")="wn" THEN lSearch = "wn" lsSql = "Exec p_WP_SPECIAL_PRODUCTS 55" '55 is category id for whats new category lCurrentCatProducts = getRecordSetList(lsSql) sHeaderImage = "local/headers/whatsnew_hd.gif" ELSEIF getRequestValue("search")="bs" THEN lSearch = "bs" lsSql = "Exec p_WP_SPECIAL_PRODUCTS 56" '56 is category id for best seller category lCurrentCatProducts = getRecordSetList(lsSql) sHeaderImage = "local/headers/bestsellers_hd.gif" ELSEIF getRequestValue("search")="y" THEN lSearch = "y" lsSql = "Exec p_WP_SEARCH_PRODUCTS '" & getRequestValue("keyword") & "'" lCurrentCatProducts = getRecordSetList(lsSql) sHeaderImage = "local/headers/searchresults_hd.gif" if SHOW_TEXT_CATEGORY_LINKS = true then sHeaderImage = "Search" ELSE 'products data 'lCurrentCatProducts = getCategoryProducts(NAVID) lCurrentCatProducts = getCategoryProductsCached(NAVID) END IF if sHeaderImage <> "" and SHOW_TEXT_CATEGORY_LINKS = false then sQuoteImage = mid(sHeaderImage,1,len(sHeaderImage)-6) + "qt.gif" else sQuoteImage = sHeaderImage end if '********************************************************************** lscurrentPage = getRequestValue("page") IF lscurrentPage = "" then lscurrentPage = "1" END IF licurrentPage=cint(lscurrentPage) liPages = getNumOfPages(lCurrentCatProducts) Response.Write "" if liPages>1 then lsPagination = "

" lNextPageLink = "navID=" & NAVID if not isnull(getRequestValue("search")) and len(getRequestValue("search")) > 0 then lNextPageLink = "search=" & getRequestValue("search") if getRequestValue("search") = "y" then lNextPageLink = lNextPageLink & "&keyword=" & getRequestValue("keyword") end if end if 'build previous link if liPages>1 and licurrentPage > 1 then lsPagination = lsPagination &_ "" &_ "Previous" else lsPagination = lsPagination &_ "Previous" End if 'build page numbers Dim iPageNoBRCount iPageNoBRCount=0 Dim lCurrentPageDisplay lCurrentPageDisplay = "" For GENERIC_VARIABLE=1 to liPages lCurrentPageDisplay = GENERIC_VARIABLE & "" if GENERIC_VARIABLE = licurrentPage then lCurrentPageDisplay = "" & GENERIC_VARIABLE & "" end if lsPagination = lsPagination &_ "" &_ lCurrentPageDisplay & "" iPageNoBRCount = iPageNoBRCount + 1 if iPageNoBRCount > 13 then lsPagination = lsPagination & "
" iPageNoBRCount=0 end if Next 'build next link if liPages > licurrentPage then lsPagination = lsPagination &_ "" &_ "Next" else lsPagination = lsPagination &_ "Next" End if lsPagination = lsPagination & "

" else lsPagination = "" end if '********************************************************************** %>