<%@ 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 * '* * '************************************************************ catid=request("catid") %> [an error occurred while processing this directive] [an error occurred while processing this directive]<% 'Get max number to display from setup.asp numperpage = displaymax1 'Determine what page your currently on, for paging. if isnumeric(request.form("page")) then currentpage = cint(request.form("page")) else currentpage = 1 end If if currentpage<1 then currentpage=1 end if sortby=request("sortby") if sortby<>"itemno" and sortby<>"price" then sortby="name" end if 'For Paging. nextsortby=sortby if catid="" or isnull(catid) or not isnumeric(catid) then pdredirect("default.asp") end if 'Open database get categories. set rs=opendb("SELECT * FROM category WHERE id=" & catid) 'If no record found. if rs.EOF then pdredirect("listcats.asp") end if catname=rs("name") catdesc=rs("description") catshortdesc=rs("shortdesc") rs.close set rs=nothing %> [an error occurred while processing this directive]
<% getHeading "", "hdnews", "inthenews" %> [an error occurred while processing this directive] <% 'Open database get items from category. set rs=opendb("SELECT * FROM items WHERE catid=" & catid & " AND active='Yes' ORDER BY " & sortby) if not rs.eof then rs.movefirst rs.pagesize = numperpage totalpages = rs.pagecount rs.absolutepage = currentpage end if if not rs.eof then %> <% do while not rs.eof and count < rs.pagesize itemname=rs("name") price=rs("price") hideprice=rs("hideprice") if hideprice="ON" then hideprice=1 else hideprice=0 end if saleprice=rs("saleprice") onsale=rs("onsale") tempimage=rs("smallimage") description=rs("description") shortdesc=rs("shortdesc") itemno=rs("itemno") imagefound="" if Len(tempimage)>0 then smallimage=tempimage else imagefound="no" end if %> <% rs.movenext count = count + 1 loop %> <% end if rs.close set rs=nothing %>
<% getHeading "", "hdcat", "" %>
<%=showlevels(catid, shopurl & "shop/category.asp")%>
<% 'Open database get sub categories. set rs=opendb("SELECT * FROM category WHERE subof=" & catid & " ORDER BY name") if not rs.eof then %>Also see:<% rs.movefirst while not rs.eof subcatname=rs("name") subcatid=rs("id") %> category.asp?catid=<%=subcatid%>"> <%=subcatname%> <% rs.movenext if not rs.eof then response.write (" | ") end if wend end if rs.close set rs=nothing %>
<%=catdesc%>
<% getHeading "", "hdcatitems", "" %>
  Description Item# Price
<% 'Determine whether to display image. if imagefound="no" then else %>"> <%=itemname%> <%end if%> "><%=itemname%>
<%=shortdesc%> [">more]
<%=left(itemno,8)%> <% 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 %>
Displaying Page <%=currentpage%> of <%=totalpages%>.
<% 'Create Previous Page link. if not currentpage = 1 Then %> <% end if 'Create Next Page link. if not currentpage = totalpages then %> <% end if %>
<% showbutton " Previous " & maxrec,"javascript:(document.prev.submit())","" %> <% showbutton " Next ","","next" %>
(To sort items, click on the heading)
[an error occurred while processing this directive]