<% strUserName = session("UserName") strAction = request("cmdSort") strSortType = request("SortType") strSortType2 = request("SortType2") strAccessLevel = session("AccessLevel") PageNo = cInt(request.form("page")) sSQL = request.form("strSQL") If PageNo = "" then PageNo=1 end if If PageNo < 1 then PageNo=1 end if 'sSearchFor = Request.form("SearchFor") 'iType = Request.form("Type") sPriceType = Request.form("PriceType") sFromYear = Request.form("FromYear") sToYear = Request.form("ToYear") sPriceSort = request("PriceSort") sSQL = "SELECT * FROM CDListing order by CDMake, CDYear, CDModel" if strAction <> "" then if strSortType2 = "Asc" then sSQL = "SELECT * FROM CDListing order by " + strSortType + " ASC" end if if strSortType2 = "Desc" then sSQL = "SELECT * FROM CDListing order by " + strSortType + " DESC" end if ' Response.Write sSQL end if Set rsSearch = Server.CreateObject("ADODB.Recordset") rsSearch.Open sSQL, objADO, 3, 3 TotalRecs = rsSearch.recordcount rsSearch.Pagesize=5 TotalPages = cInt(rsSearch.pagecount) if PageNo > TotalPages then PageNo = TotalPages end if if not rsSearch.eof then rsSearch.absolutepage=PageNo end if %> <% Sub DisplayCDThumbnails%>
"> <%If Len(rsSearch("CDListingImage")) > 0 Then If UCase(Left(rsSearch("CDListingImage"),7))="HTTP://" Then%> " border="0" width="240" height="160">
<%Else%> " border="0" width="240" height="160">
<%End If Else%> <%End If%>


<% if Session("accesslevel") = "1" or strUserName = RSSearch("CDUserName") and session("CarUser") = "1" then %> &Action=Edit">   "> <% end if %>
<% if rsSearch("CDYear") <> "" then %> <%=rsSearch("CDYear")%><%end if%> <% if rsSearch("CDMake") <> "" then %> <%=rsSearch("CDMake")%><%end if%> <% if rsSearch("CDModel") <> "" then %> <%=rsSearch("CDModel")%><%end if%> <% if rsSearch("CDEdition") <> "" then %> <%=rsSearch("CDEdition")%>
<%end if%> <% if rsSearch("CDDrive") <> "" then %> <%=rsSearch("CDDrive")%>
<%end if%> <% if rsSearch("CDLiter") <> "" then %> <%=rsSearch("CDLiter")%>
<%end if%> <% if rsSearch("CDEngine") <> "" then %> <%=rsSearch("CDEngine")%>
<%end if%> <% if rsSearch("CDDoors") <> "" then %> <%=rsSearch("CDDoors")%><%end if%> <% if rsSearch("CDStyle") <> "" then %> <%=rsSearch("CDStyle")%><%end if%>


<%if len(rsSearch("CDDescription")) > 0 then Response.Write left(rsSearch("CDDescription"),150) & "... " %> ">More
Location: <%= RsSearch("CDCity") %>   <%= RsSearch("CDState") %>

<% else response.write "Description Not Given" %>
Location: <%= RsSearch("CDCity") %>   <%= RsSearch("CDState") %>

<% end if if rsSearch("CDMSRP") <> "" then if rsSearch("CDMSRP") = 0 then %> Call For Price <% else MSRP = FormatCurrency(rsSearch("CDMSRP"), 2) %> Price: <%=MSRP%> <% end if end if if strAccessLevel = "1" or strAccessLevel = "2" then if rsSearch("CDWholeSalePrice") <> "" then if rsSearch("CDWholesalePrice") = 0 then %>
Call For Dealer Price
<% else Wholesale = FormatCurrency(rsSearch("CDWholesalePrice"), 2) %>
Dealer Price: <%=Wholesale%>
<% end if end if %> <% end if %>
<%End Sub%>
<% if WarningErrMsg <> "" then %> <% end if %>
VIEW ENTIRE INVENTORY
Error(s):<%= warningErrMsg %>
<% x = 0 For x = 1 to 5 If rsSearch.eof then Exit For Else %> <% End If Next %>
<%If Not rsSearch.EOF Then Call DisplayCDThumbnails%> <%If Not rsSearch.EOF Then rsSearch.MoveNext%>


Page <%=PageNo%> of <%=TotalPages%>
<%=TotalRecs%> vehicle(s) found.