|
<% getHeading "", "hdfeatures", "featuremess" %>
|
|
| <% getHeading "", "hdfitems", "" %> |
|
|
|
|
|
<%
'Open database get featured items.
set rs=opendb("SELECT * FROM items WHERE feature='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")
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
%>
<% '--- determine whether to display image ---
if imagefound="no" then
else
%> ">
<%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%> |
|
<%
rs.movenext
count = count + 1
loop
%>
| Displaying Page <%=currentpage%> of
<%=totalpages%>. |
<%
'Create Previous Page link.
if not currentpage = 1 Then
%>
| <% showbutton " Previous " & maxrec,"javascript:(document.prev.submit())","" %>
|
<%
end if
'Create Next Page link.
if not currentpage = totalpages then
%>
<% showbutton " Next ","","next" %>
|
<%
end if
%>
|
| (To sort
items, click on the heading) |
<%
end if
rs.close
set rs=nothing
%>
|
|
|
|