BUYING

<%if request.form("advsearch")="yes" then%>

<%if request.form("catid") <> "ALL" then GetCat = "SELECT Category FROM Forces_ItemCategories WHERE CatID = '"&request.form("catid")&"' " SET RSCat = MyConn.execute(GetCat)%> <%=RSCat("Category")%> / <%else%> ALL CATEGORIES / <%end if%> <%if request.form("location") <> "ANY" then%> <%GetLocations = "SELECT * FROM Forces_Locations WHERE LocID = '"&request.form("location")&"' " SET RSLocations = MyConn.execute(GetLocations) Do While NOT RSLocations.EOF%> <%=RSLocations("LocName")%> (<%=RSLocations("Postcode")%>) / <%RSLocations.Movenext Loop%> <%else%> ANY LOCATION / <%end if%> <%if request.form("costto") <> "ANY" then%> up to £<%=request.form("costto")%> / <%else%> ANY PRICE / <%end if%>

<%elseif request.form("homesearch")="yes" then%>

"<%=request.form("searchtxt")%>"

<%end if%>

Select a recently added item or alternatively search below for a specific category.

<% if request.form("advsearch")="yes" then GetItems = "SELECT I.ItemID, I.Title, I.Price, I.Thumb1, I.Description FROM Forces_Items I, Forces_Locations L WHERE I.Deleted = 'no' AND I.Paid = 'yes' AND I.Location = L.LocID AND DATEADD(Day, ListingDuration, EntryDate) > Convert(datetime,'"&now()&"',103) " if request.form("catid") <> "ALL" then GetItems = GetItems &" AND I.CatID = '"&request.form("catid")&"' " end if if request.form("location") <> "ANY" then GetItems = GetItems &" AND I.Location = '"&request.form("location")&"' AND I.Location = 951 " end if if request.form("costfrom") <> "ANY" AND request.form("costto") <> "ANY" then GetItems = GetItems &" AND I.Price BETWEEN "&request.form("costfrom")&" AND "&request.form("costto")&" " elseif request.form("costfrom") <> "ANY" then GetItems = GetItems &" AND I.Price >= "&request.form("costfrom")&" " elseif request.form("costto") <> "ANY" then GetItems = GetItems &" AND I.Price <= "&request.form("costto")&" " end if if request.form("searchtxt") <> "" then GetItems = GetItems &" AND I.Title LIKE '%"&killchars(request.form("searchtxt"))&"%' " end if if request.form("postcode") <> "" then GetItems = GetItems &" AND L.Postcode LIKE '%"&killchars(request.form("postcode"))&"%' " end if elseif request.form("homesearch")="yes" then GetItems = "SELECT * FROM Forces_Items WHERE Deleted = 'no' AND Paid = 'yes' AND Title LIKE '%"&request.form("searchtxt")&"%' AND DATEADD(Day, ListingDuration, EntryDate) > Convert(datetime,'"&now()&"',103) " else GetItems = "SELECT * FROM Forces_Items WHERE Deleted = 'no' AND Paid = 'yes' AND DATEADD(Day, ListingDuration, EntryDate) > Convert(datetime,'"&now()&"',103) " end if SET RSItems = MyConn.execute(GetItems) if RSItems.EOF then%>

Sorry! No items matching your search criteria were found.

<%else Do WHILE NOT RSItems.EOF%>

"><%=RSItems("Title")%>

£<%=RSItems("Price")%>

<%if RSItems("Thumb1") <> "" then sayimg = RSItems("Thumb1") else sayimg = "nophoto.jpg" end if%> ">

Description :
<%=RSItems("Description")%>

">VIEW DETAILS
<%RSItems.Movenext Loop end if%>