<% page = "All Showrooms" sID = getInt(request("subcategory")) dsCategory = getInt(request.querystring("category")) location = getInt(request.querystring("location")) %> <% function dsQuery(dsCategory, dsSubCategory, dsSize, dsSearch, dsCurPage) dsQuery = "category=" & dsCategory &_ "&subcategory=" & dsSubCategory &_ "&size=" & dsSize &_ "&search=" & dsSearch &_ "&page=" & dsCurPage end function dsPageSize = 12 dsCurPage = getInt(request.querystring("page")) dsSubCategory = getInt(request.querystring("subcategory")) dsSize = getInt(request.querystring("size")) dsSearch = request.querystring("search") dsSQLList = array(";", "--", "=", "%","'") for dsIndex = 0 to uBound(dsSQLList) dsSearch = replace(dsSearch, dsSQLList(dsIndex), "") next set rst = cnn.execute("select [TablesID] from Tables where Title = 'ShowRoom'") if not rst.eof then tID = rst("TablesID") end if rst.close() %> <% i = 0 if dsSubCategory = 0 then if(dsCategory > 0)then category_sql = "CategoryID=" & dsCategory & " and " else category_sql = "" end if set rstd = server.createobject("ADODB.recordset") sql = "select * from ShowRoom WHERE " & category_sql & "Active='yes' order by Rank" rstd.open sql, cnn, 1, 2 if rstd.eof then response.write("") else rstd.pagesize = 24 if(len(request("page")) = 0)then current_page = 1 else current_page = cint(request("page")) end if rstd.absolutepage = current_page if(rstd.pagecount > 1)then nav_link = "Page:  " if(current_page > 1)then nav_link = nav_link & "«  |  " end if for i=1 to rstd.pagecount if(i = current_page)then nav_link = nav_link & ""&i&"  |  " else nav_link = nav_link & ""&i&"  |  " end if next if(current_page < rstd.pagecount)then nav_link = nav_link & "»" end if end if i = 0 do while i < rstd.pagesize and not rstd.eof i = i + 1 j = j + 1 %> <% if(j = 6)then j = 0 response.write "" end if rstd.movenext() loop end if rstd.close() end if %> <% if i > 0 then %> <% end if %>
<% set rstd = cnn.execute("select * from Category where CategoryID = " & dsCategory & " order by Rank") if not rstd.eof then cattitle = rstd("Title") cat = "" & rstd("Title") & "" set rstd2 = cnn.execute("select * from SubCategory where SubCategoryID = " & dsSubCategory & " order by Rank") if not rstd2.eof then subcat = "" & rstd2("Title") & "" end if rstd2.close prod = "Types" heading = prod & "  >  " & cat if len(subcat) > 0 then heading = heading & "  >  " & subcat end if %>

<%= heading %>

<% end if rstd.close() %>
Sorry, no showrooms found
<% if rstd("Image1") <> "No File" then %> &sID=<%= rstd("ShowRoomID") & "&category=" & rstd("CategoryID") & "&type=show" %>">&w=110&h=120" border="0" class="img">
<% end if %>
&sID=<%= rstd("ShowRoomID") & "&category=" & rstd("CategoryID") & "&type=show" %>"><%=rstd("Title")%>
<%= nav_link %>