% Function DecodeURLCode(urlencodedstring) tempstring="" For i = 1 to len(urlencodedstring) if strcomp( mid(urlencodedstring,i,1),"%",1) <> 0 then tempstring = tempstring & mid(urlencodedstring,i,1) else if DecodeURLChar( mid(urlencodedstring,i,3) ) <> -1 then tempstring = tempstring & chr(DecodeURLChar(mid(urlencodedstring,i,3))) i = i + 2 else DecodeURLCode = "Error: can't decode" end if end if Next DecodeURLCode = replace(tempstring, "+", " ") End Function DEVICE = DecodeURLCode(Trim(Request("b"))) CAT = DecodeURLCode(Trim(Request("c"))) If Len(CAT) > 1 Then DevQuery = "SELECT * From Products WHERE category = '" & CAT & "' And ShowProd=True ORDER BY price desc, brand" End If If Len(DEVICE) > 1 Then DevQuery = "SELECT * From Products WHERE brand = '" & DEVICE & "' And ShowProd=True ORDER BY price desc, category" End If If Len(DEVICE) < 1 AND Len(CAT) < 1 Then DevQuery = "SELECT * From Products WHERE brand <> 'ALL' And ShowProd=True ORDER BY price desc" End If Set DevSrch = Connect.Execute(DevQuery) If Len(DEVICE) > 1 Then DNAME = DevSrch("brand") End If %> <% If Trim(Request("d")) <> "" Then DEFIN = "" ElseIf Trim(Request("c")) <> "" Then DEFIN = "" Else DEFIN = "" End If %>
|
<% PicSrc = "images\" & DevSrch("prod_ID") & "\200_0_" & DevSrch("prod_ID") & ".jpg" %>
<%
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(RootPath & "\" & PicSrc) Then
Else
PicSrc = "images\nopic_sm.jpg"
End If %>
">
|
"><% = DevSrch("product_name") & " - for the " & DevSrch("brand") %>
<% If Len(DevSrch("Details")) > 100 Then EndPt = InStr(95,DevSrch("Details")," ") Detail = Left(DevSrch("Details"),(EndPt-1)) & "..." Else Detail = DevSrch("Details") End If %>
|
Price: <% = FormatCurrency(DevSrch("feat_price")) %> <% Stocker = " Backordered" If DevSrch("Stock") > 2 Then Stocker = " Limited Stock" End If If DevSrch("Stock") > 10 Then Stocker = " In Stock" End If %> Availability: <% = Stocker %> "> ![]() | |
|
| |||