%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'Grab Product Lines pl = 0 Dim plArray(50,3) sql = "Select plID, plName from ProductLine where plActive = 1 and plSite = 1 order by PlName asc" set objrs = objconn.execute(sql) if objrs.eof and objrs.bof then 'No Product Lines assigned. PL = 0 Else objrs.movefirst while not objrs.eof plArray(pl,0) = objrs("plID") plArray(pl,1) = objrs("plName") objrs.movenext pl = pl + 1 wend End if 'Grab Product Types RV = 0 Dim RVArray(50,3) sql = "Select ptID, ptName from ProductType where ptActive = 1 and ptSite = 1 Order by ptName asc" set objrs = objconn.execute(sql) if objrs.eof and objrs.bof then 'No Product Lines assigned. RV = 0 Else objrs.movefirst while not objrs.eof RVArray(RV,0) = objrs("ptID") RVArray(RV,1) = objrs("ptName") objrs.movenext RV = RV + 1 wend End if PL = PL - 1 RV = RV - 1 'Grab Best Seller - Random sql = "Select * from Products2 where P_BestSeller = 1 Order by NewID()" set objrs = objconn.execute(sql) if objrs.eof and objrs.bof then 'No Best Seller Sec BS = 0 Else BS = 1 BSName = objrs("P_Name") BSThumb = objrs("P_Thumb") BSShort = objrs("P_ShortDesc") BSID = objrs("P_ID") End if 'the Lot Specific 'RPP - results per page RPP = 5 pageID = Request("PageID") if PageID = "" then PageID = 0 End if StartRec = PageID * RPP Dim ProdArray(500,5) da = 0 sql = "Select * from Products2 where P_Instock = 1 and P_Current = 1 and P_Store = 1" set objrs = objconn.execute(sql) if objrs.eof and objrs.bof then 'No Product at this time NP = 1 else objrs.movefirst while not objrs.eof ProdArray(da,0) = objrs("P_ID") ProdArray(da,1) = objrs("P_Name") ProdArray(da,2) = objrs("P_ShortDesc") ProdArray(da,3) = objrs("P_Thumb") ProdArray(da,4) = objrs("P_MSRP") ProdArray(da,5) = objrs("P_Sale") objrs.movenext da = da + 1 wend da = da - 1 SPLabel = PageID + 1 TotalRecords = da + 1 NbrOfPages = TotalRecords/RPP if NbrOfPages < 1 then NbrOfPages = 1 Else if TotalRecords Mod RPP > 0 then NbrOfPages = ((NbrOfPages - (TotalRecords Mod RPP)) + 1) End if End if End if %>