<%Response.Expires = 0%> <% Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adCmdText = &H0001 iPageSize = 10 If Request("Page")="" Then iPageCurrent = 1 Else iPageCurrent = Request("Page") End If Set Rs = Server.CreateObject("ADODB.Recordset") If Request("LampType") <> "" Then LampType = Replace(Request("LampType"), "'", "''") End If If Request("Brand") <> "" Then Brand = Replace(Request("Brand"), "'", "''") End If If Request("Keyword") <> "" Then Keyword = Replace(Request("Keyword"), "'", "''") End If SQLRequest = "Keyword=" & Server.URLEncode(Request("Keyword")) & "&LampType=" & Server.URLEncode(Request("LampType")) & "&Brand=" & Server.URLEncode(Request("Brand")) TotalCount = 0 Dim EmptyType, EmptyBrand, EmptyKey EmptyType = True EmptyBrand = True EmptyKey = True If Brand <> "" Then If Brand = "%" Then SQLKey = "Brand LIKE '%%' AND " Else SQLKey = "Brand LIKE '" & Brand & "' AND " EmptyBrand = False End If End If If LampType <> "" Then If LampType = "%" Then SQLKey = SQLKey & "LampType LIKE '%%' AND " Else SQLKey = SQLKey & "LampType LIKE '%" & LampType & "%' AND " EmptyType = False End If End If If Trim(Keyword) <> "" Then SQLKey = SQLKey & "(Description LIKE '%" & Keyword & "%' OR Model LIKE '%" & Keyword & "%' OR Designer LIKE '%" & Keyword & "%')" EmptyKey = False End If If SQLKey = "" Then SQLStr = "SELECT * FROM Results ORDER BY Brand, LampType, Model" Else If LCase(Right(SQLKey,4)) = "and " Then SQLKey = Left(SQLKey,Len(SQLKey)-4) End If SQLStr = "SELECT * FROM Results WHERE (" & SQLKey & " ) ORDER BY Brand, LampType, Model" End If Rs.Open SQLStr,Application("Catalog_ConnectionString"),adOpenStatic,adLockReadOnly,adCmdText TotalCount = Rs.RecordCount Dim PageTitle If EmptyType=True And EmptyBrand=False Then PageTitle = Brand Elseif EmptyType=False And EmptyBrand=True Then PageTitle= LampType & "s" Elseif EmptyType=False And EmptyBrand=False Then PageTitle= LampType & "s by " & Brand Elseif EmptyType=True And EmptyBrand=True Then PageTitle="All Lamps" End If If EmptyKey=False Then PageTitle = "You searched for '" & Keyword & "' in " & PageTitle End If Function MySelect(Text1, Text2) If LCase(Text1) = LCase(Text2) Then MySelect = "Selected" End If End Function %> Richard's Lighting - Products - Catalog
Richard's Lighting
Personal


Mailing List

Join our mailing list and be notified whenever we get new arrivals!

All fields are mandatory


Your Name
Company Name
Country
Email Address
Interests





Nature of Business

CATALOG

<%Response.Write("

" & PageTitle & " - "& TotalCount & " items found

")%>
<% If Not Rs.Eof Then Rs.AbsolutePage = iPageCurrent Rs.PageSize = iPageSize iPageCount = Rs.PageCount iRecordsShown = 0 Rs.cacheSize = 10 Do While iRecordsShown < iPageSize And Not Rs.Eof %> <% iRecordsShown = iRecordsShown + 1 Rs.MoveNext Loop End If %>
&Brand=<%=Rs("Brand")%>&Model=<%=Rs("Model")%>"> /<%=Rs("ImageID")%>_th.jpg" class="bordered" alt="<%=Rs("Model")%> by <%=Rs("Brand")%>"> Brand: <%=Rs("Brand")%>

Model: <%=Rs("Model")%>

Designer: <%=Rs("Designer")%>

Type: <%=Rs("LampType")%>

<%=Replace(Left(Rs("Description"),100),vbCrLf,"
")%>...

<% If (iPageCurrent-1 / 10) Mod 10 = 0 Then MyNow = Int((iPageCurrent-1) / 10) + 1 Else MyNow = Int((iPageCurrent-1) / 10) End If If MyNow > 0 Then MyNow = MyNow * 10 End If If iPageCurrent > 10 Then Response.Write("[Previous 10] ") End If For i = (MyNow + 1) to iPageCount If i = cInt(iPageCurrent) Then Response.Write("[" & i & "] ") ElseIf (I) Mod 10 = 0 Then Exit For Else Response.Write("[" & i & "] ") End If Next If iPageCount > MyNow + 10 Then Response.Write("[" & i & "] ") Response.Write("[Next 10] ") End If %>

Catalog Search

Keyword ">   Type    Brand <% if 0 then %> <% end if %> <% fp_sQry="SELECT DISTINCT Brand FROM Results ORDER BY Brand ASC" fp_sDefault="" fp_sNoRecords="No records returned." fp_sDataConn="Catalog" fp_iMaxRecords=0 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=False fp_fMenuFormat=True fp_sMenuChoice="Brand" fp_sMenuValue="Brand" fp_iDisplayCols=1 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %>

Tip: To get more results, enter either the exact phrase, or a single keyword.