<% ' ASPCart 4.5 (c) 1997 - 2000 GCIS, Inc. http://www.aspcart.com ' --------------------------------------------------------------------------------------- ' WARNING: All source code contained herein is on file with the U.S. Library of Congress. ' Unauthorized redistribution is a violation of federal law. ' --------------------------------------------------------------------------------------- '---Set the Number of Items Displayed on each page--- Items_Per_Page = 25 '----------------------------------------------------- If Request.QueryString("page") = 777 Then response.redirect("welcome.htm") '** Create & open the Database connection Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open ("driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("aspcart5.mdb")) '** Form & execute the SQL statement for the Department name & image file sql = "SELECT pagename, headerimage, page FROM pageconfig where page = " & Request("page") Set rs = Conn.Execute(sql) pageid = rs("page") * 1 If Request.QueryString("start") = "" then start = 1 Else start = Request.QueryString("start") %>
  <%If rs("headerimage") <> "" then Response.Write("")%>
<%Response.Write(rs("pagename"))%>
<% IPP = Items_Per_Page start = start * 1 If start < IPP + 1 then greypage = 1 If start >= IPP * 1 + 1 and start < IPP * 2 + 1 then greypage = 2 If start >= IPP * 2 + 1 and start < IPP * 3 + 1 then greypage = 3 If start >= IPP * 3 + 1 and start < IPP * 4 + 1 then greypage = 4 If start >= IPP * 4 + 1 and start < IPP * 5 + 1 then greypage = 5 If start >= IPP * 5 + 1 and start < IPP * 6 + 1 then greypage = 6 If start >= IPP * 6 + 1 and start < IPP * 7 + 1 then greypage = 7 If start >= IPP * 7 + 1 and start < IPP * 8 + 1 then greypage = 8 If start >= IPP * 8 + 1 and start < IPP * 9 + 1 then greypage = 9 If start >= IPP * 9 + 1 and start < IPP * 10 + 1 then greypage = 10 If start >= IPP * 10 + 1 and start < IPP * 11 + 1 then greypage = 11 If start >= IPP * 11 + 1 and start < IPP * 12 + 1 then greypage = 12 Set Conn2 = Server.CreateObject("ADODB.Connection") Conn2.Open ("driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("aspcart5.mdb")) sql2 = "SELECT * FROM products where nativepage = " & pageid & " order by item;" set rs2 = conn2.execute(sql2) ' Count the Number of Records do while not rs2.eof counter = counter + 1 rs2.movenext loop ' calculate the number of pages numberofpages = counter / IPP if int(numberofpages) <> numberofpages then numberofpages = int(numberofpages) + 1 pagejump = 1 If start + IPP - 1 < counter then %> <% Else %> <%end if%>
 Product Name  Price/oz.
<% sql = "SELECT * FROM products where nativepage = " & pageid & " order by item;" Set rs = Conn.Execute(sql) ctr = 0 'Advance the record set to the correct place do while ctr < (Request.QueryString("start") * 1 - 1) rs.movenext ctr = ctr + 1 loop ctr = 0 counter = 1 do while not rs.eof And ctr < IPP If counter / 2 = Int(counter / 2) then bgcolor = "#FFFFFF" Else bgcolor = "#EEEEEE" %> <% '** Advance the recordset & loop counter = counter + 1 ctr = ctr + 1 rs.MoveNext loop rs.Close ' ASPCart 4.5 (c) 1997 - 2000 GCIS, Inc. http://www.aspcart.com ' --------------------------------------------------------------------------------------- ' WARNING: All source code contained herein is on file with the U.S. Library of Congress. ' Unauthorized redistribution is a violation of federal law. ' ---------------------------------------------------------------------------------------%>
 &start=<%=start%>"><%= Replace((rs("item"))," ","_") %>  <%if rs("sale") = "yes" then%> SALE <%end if%> <%if rs("sale") = "yes" then %> <%=FormatCurrency(rs("saleprice"))%> <% else %> <% =FormatCurrency(rs("unitprice"))%> <% end if%>