<%@ 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 2005. * '* www.pagedowntech.com * '* * '************************************************************ %> <% sDBExtraPath = "../" sExtraTemplatePath = "../" sCurrentPage = "products" %> <% 'Determine what page your currently on, for paging. ctemppage=request.querystring("page") if isnumeric(ctemppage) and ctemppage<>"" then currentpage=cint(ctemppage) else currentpage=1 end If sortby=request("sortby") sortby=stripQuotes(sortby) sortby=killChars(sortby) if sortby="" or sortby=NULL then sortby=replace(ord2, "items.", "") end if if sortby<>"itemno" and sortby<>"price" then sortby="name" end if 'For Paging. nextsortby=sortby 'For Features Page, always use list! catpagetype=1 pgconfig=ficonfig 'Determine default page settings. if isnull(pgconfig) then if pgconfig=", 0" then else pgconfig="MD, SP, SD, SI, ST" end if end if 'Get max number to display from setup.asp numperpage=catpagemax if numperpage="" or isnull(numperpage) then numperpage = displaymax1 end if catitemidarr = array(itemid) catpricearr=array(price) hidecatpricearr=array(hideprice) catsalepricearr=array(saleprice) catonsalearr=array(onsale) catshortdescarr=array(shortdesc) catsmallimagearr=array(largeimage) catnamearr=array(name) catitemnoarr=array(itemno) catcartlink=array(cartlink) catstockarr=array(cartlink) 'Build Array. 'Open database and retreive records. set rs=openrs("SELECT items.name, items.price, items.hideprice, items.saleprice, items.onsale, items.smallimage, items.shortdesc, items.id as theid, items.itemno, items.qty FROM items WHERE LangID=" & iEcommLangID & " AND active='Yes' AND feature='Yes' ORDER BY " & sortby) if not rs.eof then cathasitems="Y" count=1 rs.movefirst rs.pagesize = numperpage totalpages = rs.pagecount rs.absolutepage = currentpage do while not rs.eof and count<=rs.pagesize addarray catitemidarr, rs("theid") addarray catpricearr, rs("price") hidecatprice=rs("hideprice") if hidecatprice="ON" then hidecatprice=1 else hidecatprice=0 end if addarray hidecatpricearr, hidecatprice addarray catsalepricearr, rs("saleprice") addarray catonsalearr, rs("onsale") addarray catshortdescarr, rs("shortdesc") 'Create Link for adding item to cart (Regular URL or Quick Add function) if butt1type="2" or (butt1type="" and buttstyletype=2) then cattempurl=shopcarturl & "?itemid=" & rs("theid") & "&task=addnew&qty=1&affillink=" & tempaffillink else cattempurl="Javascript: quickadd('" & rs("theid") & "','1');" end if addarray catcartlink, cattempurl addarray catsmallimagearr, rs("smallimage") addarray catnamearr, rs("name") 'If no image. if catsmallimage="" or catsmallimage=NULL then catimagefound="no" else catimagefound="" end if addarray catitemnoarr, rs("itemno") 'Inventory if showoos="ON" then if rs("qty")<=oosthresh then addarray catstockarr, geterrtext("err59") else addarray catstockarr, geterrtext("err58") end if else addarray catstockarr, "" end if rs.movenext count = count + 1 loop end if rs.close set rs=nothing tempcatcols=catmaxcols if catmaxcols="" or isnull(catmaxcols) then tempcatcols=3 end if tempcatqty=ubound(catitemidarr) tempcatrows=tempcatqty/tempcatcols if tempcatrows>int(tempcatrows) then tempcatrows=int(tempcatrows)+1 else tempcatrows=int(tempcatrows) end if tempcatfcolw=int(100/tempcatcols) count2=1 zpage=pg4 %> <% getleftside(zpage)%> <% getsecspace ()%> <% getHeading "hdfeatures", hdfeatures, "", 2 %> cellpadding="5" cellspacing="0" width="100%"> <% if catpagetype=1 or isnull(catpagetype) then %> <% else %> <% end if %> <% if catpagetype=1 or isnull(catpagetype) then %> <% end if%>
<%=fixERR(errormessage)%>
<%if instr(pgconfig,"ST")>0 then%> <%end if%> <%if instr(pgconfig,"SI")>0 then%> <%end if%> <%if instr(pgconfig,"SP")>0 then%> <%end if%> <% for i=1 to ubound(catitemidarr) itemname=catnamearr(count2) shortdesc=catshortdescarr(count2) itemno=catitemnoarr(count2) itemid=catitemidarr(count2) price=catpricearr(count2) saleprice=catsalepricearr(count2) onsale=catonsalearr(count2) %> <%if instr(pgconfig,"ST")>0 then%> <%end if%> <%if instr(pgconfig,"SI")>0 then%> <%end if%> <%if instr(pgconfig,"SP")>0 then%> <%end if%> <% count2=count2+1 next %>
<%=getsystext("sys21")%> <%=getsystext("sys19")%> <%=getsystext("sys20")%> <%=getsystext("sys22")%>
<% 'Determine whether to display image. if catsmallimagearr(count2)="" then else %> <%=listimgheight%> hspace="5" src="../images/<%=catsmallimagearr(count2)%>" alt="<%=itemname%>"> <%end if%> <%if instr(pgconfig,"SD")>0 then%> <%end if%>
<%=itemname%>
<%=shortdesc%>
<%if hidecatpricearr(count2)=0 then%><%if instr(pgconfig,"AC")>0 then%><% showbutton "butts1",butts1,catcartlink(count2),"" %><%end if%><%end if%> <%if instr(pgconfig,"MD")>0 then%><% showbutton "butts8",butts8,"item.asp?itemid=" & catitemidarr(count2),"" %><%end if%>
<%=itemno%><% if hidecatpricearr(count2)=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 %>
<%=catstockarr(count2)%> <% end if %>
<% count2=1 %> <% for j=1 to tempcatrows%> <% for i=1 to tempcatcols%> <% count2=count2 +1 %> <% next %> <% next %>
<% if count2<=tempcatqty then %> <% if j>1 then%> <% end if %> <%if instr(pgconfig,"ST")>0 then%> <%end if%> <%if instr(pgconfig,"SD")>0 then%> <%end if%> <%if instr(pgconfig,"SI")>0 then%> <%end if%> <%if instr(pgconfig,"SP")>0 then%> <%end if%>

<%=catnamearr(count2)%>
<% if catsmallimagearr(count2)="" then%> <%else%> <%=listimgheight%> border="0" src="../images/<%=catsmallimagearr(count2)%>" alt="<%=catnamearr(count2)%>" hspace="10" vspace="10"> <% end if%>
<%=catshortdescarr(count2) %>
<%if hidecatpricearr(count2)=0 then%><%if instr(pgconfig,"AC")>0 then%><% showbutton "butts1",butts1,catcartlink(count2),"" %><%end if%><%end if%> <%if instr(pgconfig,"MD")>0 then%><% showbutton "butts8",butts8,"item.asp?itemid=" & catitemidarr(count2),"" %><%end if%>
<%=titemno%> <%=catitemnoarr(count2)%>
<% '--- Display price or sale price? --- if hidecatpricearr(count2)=0 then if catonsalearr(count2)="Yes" or onsale="yes" then %> <% =showCurr(catpricearr(count2))%>
<% =showCurr(catsalepricearr(count2))%> <% else response.write(showCurr(catpricearr(count2))) end if ' --- End of Price Display --- %>
<%=catstockarr(count2)%> <% end if %>
<% end if %>
<% 'Create Previous Page link. if not currentpage = 1 Then templinka="features.asp?page=" & currentpage-1 & "&sortby=" & nextsortby %> <% showlink "<<",templinka,"" %> <% end if %>  <% if totalpages>1 then for i=1 to totalpages %> <%if i=currentpage then %> <%=i%> <%else%> <%=i%> <%end if%> <% next end if %> <% 'Create Next Page link. if not currentpage = totalpages then templinkb="features.asp?page=" & currentpage+1 & "&sortby=" & nextsortby %>  <% showlink " >>",templinkb,"" %> <% end if %>
<%=tclicktosort%>
<% getrightside(zpage)%>