<% set con = server.CreateObject("ADODB.Connection") con.Open MainConString %> Waterfront Mariner
Home New Boats Workshop Mariner Exports Contact Us
<%if request("catid")= "" then%>

<% msql="select * from Lookup_category order by categoryname" set rs = con.Execute(msql) do while not rs.eof %> <%rs.movenext loop rs.close %>
<%else%> <% Session("Boats") = "select * from boats where category = "&request("catid") msql = Session("Boats") 'response.write(msql) 'response.end set rs= con.execute(msql) if rs.eof then Response.Write("
No Boats found
") %>
 

 

<% Response.end end if ' Get the count of the records Do While Not rs.EOF J = J + 1 rs.MoveNext Loop 'iRecEnd = J -1 iRecEnd = J if Request.QueryString("page") = "" Then iRecCurrent = 0 ' First Record Else iRecCurrent = CInt(Request.QueryString("page")) End if 'get number of pages iPageSize = 8 if iRecEnd < iPageSize then iNumPage = 1 else iNumPage = roundUp(iRecEnd/iPageSize) end if 'response.write(iRecEnd&"
") 'response.write(iPageSize&"
") 'response.write(iNumPage) ' If the request page falls outside the ' acceptable range, ' give them the closest match (0 or max) ' if iRecCurrent > iRecEnd Then iRecCurrent = iRecEnd if iRecCurrent < 0 Then iRecCurrent = 0 if iRecCurrent < iRecEnd Then iRecNext = iRecCurrent + iPageSize Else iRecNext = iRecEnd End if if iRecCurrent > 0 Then iRecPrev = iRecCurrent - iPageSize Else iRecPrev = 0 End if if (iRecNext - iRecEnd ) > 0 Then iRecMax = iRecEnd - iRecCurrent Else iRecMax = iPageSize End if 'If there no data returned from the search rs.MoveFirst rs.Move(iRecCurrent) %> <% row=1 count = 1 For i = 1 To (iRecMax) on error resume next if count > 4 then count = 1 if count = 1 then %> <%row = row + 1 end if if count = 4 then%> <% end if if count <> 1 and count <> 4 then%> <% end if count = count + 1 RS.MoveNext next if row < 3 then for row = row to 4%> <% row = row + 1 next end if RS.Close Set RS = Nothing %>
   BOATS: <% =iRecCurrent %> - <% = iRecCurrent + iRecMax %> OF <% =iRecEnd %>
<%if not isNull(rs("filepic")) and rs("filepic") <> "" then%> " border="1" class="PicBorder" onClick="MM_openBrWindow('popup.asp?i=<%=rs("boatsid")%>','pop','width=650,height=500')"> <%else%> ','pop','width=650,height=500')"> <%end if%>
<%=rs("boatstitle")%>
Year : <%=rs("boatsyear")%>
Price :<%=toR(rs("boatsprice"))%>
','pop','width=650,height=500')">
<%if not isNull(rs("filepic")) and rs("filepic") <> "" then%> " border="1" class="PicBorder" onClick="MM_openBrWindow('popup.asp?i=<%=rs("boatsid")%>','pop','width=650,height=500')"> <%else%> ','pop','width=650,height=500')"> <%end if%>
<%=rs("boatstitle")%>
Year : <%=rs("boatsyear")%>
Price :<%=toR(rs("boatsprice"))%>
','pop','width=650,height=500')">
<%if not isNull(rs("filepic")) and rs("filepic") <> "" then%> " border="1" class="PicBorder" onClick="MM_openBrWindow('popup.asp?i=<%=rs("boatsid")%>','pop','width=650,height=500')"> <%else%> ','pop','width=650,height=500')"> <%end if%>
<%=rs("boatstitle")%>
Year : <%=rs("boatsyear")%>
Price :<%=toR(rs("boatsprice"))%>
','pop','width=650,height=500')">
 
<%NavBar%> <%NavBarPages%>
<%end if%>