<%@ Language=VBScript %><% '************************************************************ '* * '* By Downloading or using this software, you agree to * '* the terms and conditions as stated in the Software * '* License Agreement. An updated copy of this agreement * '* can be seen at http://www.pagedowntech.com/terms. * '* * '* NOTICE: We do not recommend changing the code below * '* as it may interfere with future updates/upgrades. * '* * '* PageDown Technology, LLC., Copyright 2004. * '* www.pagedowntech.com * '* * '************************************************************ %> <% 'Get max number to display from setup.asp numperpage = displaymax1 'Determine what page your currently on, for paging. if request.form("page") = "" then currentpage = 1 else currentpage = cint(request.form("page")) end If sortby=request("sortby") if sortby="" or sortby=NULL then sortby=replace(ord3, "items.", "") end if 'For Paging. nextsortby=sortby %>
<% getleftcol(pg4) %> <% 'Open database get featured items. set rs=openrs("SELECT id, name, price, saleprice, hideprice, onsale, smallimage, shortdesc, itemno FROM items WHERE active='Yes' AND feature='Yes' ORDER BY " & sortby) if not rs.eof then rs.movefirst rs.pagesize = numperpage totalpages = rs.pagecount rs.absolutepage = currentpage end if count=1 if not rs.eof then %> <% end if rs.close set rs=nothing %>
<% getrightcol(pg4) %><% getHeading "", hdfitems, "" %>
<% do while not rs.eof and count <= rs.pagesize itemname=rs("name") price=rs("price") saleprice=rs("saleprice") hideprice=rs("hideprice") if hideprice="ON" then hideprice=1 else hideprice=0 end if onsale=rs("onsale") tempimage=rs("smallimage") 'description=rs("description") shortdesc=rs("shortdesc") itemno=rs("itemno") 'What to do if no image. imagefound="" if Len(tempimage)>0 then smallimage=tempimage else imagefound="no" end if %> <% rs.movenext count = count + 1 loop %>
  <%=tfeatures1%> <%=tfeatures2%> <%=tfeatures3%>
<% '--- determine whether to display image --- if imagefound="no" then else %> "> <%=listimgheight%> hspace="5" src="../images/<%=smallimage%>" alt="<%=itemname%>"> <%end if%> "><%=itemname%>
<%=shortdesc%> "><%=tfeatures4%>
<%=itemno%> <% if hideprice=0 then 'Display price or sale price? --- if onsale="Yes" or onsale="yes" then %> <% =showCurr(price)%>
<% =showCurr(saleprice)%> <% else response.write(showCurr(price)) end if end if%>
<%=tendofpage1 & currentpage & tendofpage2 & totalpages & tendofpage3%>
<% 'Create Previous Page link. if not currentpage = 1 Then %> <% end if 'Create Next Page link. if not currentpage = totalpages then %> <% end if %>
<% showbutton tprevbutt & maxrec,"javascript:(document.prev.submit())","" %> <% showbutton tnextbutt,"","next" %>
<%=tfeatures5%>