%
' ShopInfo.asp
'
' Shared Shopping cart variables
'
' (C) 2003 Entechnica Web Design. All rights reserved. unless its ugly al who can have it :)
%>
Your search
results for <%=Request("ProductName")%>
<%
Server.ScriptTimeout = 300 ' 300 seconds - 5 minutes
strSearch = Request("ProductName")
IF strSearch="" THEN Response.Redirect "index.asp"
Set conDB = Server.CreateObject("ADODB.Connection")
conDB.open szDatabaseDSN,"",szDatabasePassword
szSQL = "SELECT * FROM Products WHERE ProductName LIKE '%"
szSQL = szSQL+strSearch
szSQL = szSQL+"%' ORDER BY Products.ConsoleType"
Set rsProducts = Server.CreateObject("ADODB.Recordset")
rsProducts.Open szSQL, conDB, 3, 3
%>
<%
'On Error Resume Next
rsProducts.MoveLast
rsProducts.MoveFirst
strRecount = Rsproducts.RecordCount
do while Not rsProducts.eof
' 5% off module
strPrice = rsProducts.fields("UnitPrice")
strNewPrice = (strPrice/20*19)
'Price Trimming Module (al 2003)
IF LEN(strNewPrice)=6 Then
strNewPrice = LEFT(strNewPrice,4)
End If
IF LEN(strNewPrice)=7 Then
strNewPrice = LEFT(strNewPrice,5)
End If
IF LEN(strNewPrice)=8 Then
strNewPrice = LEFT(strNewPrice,6)
End If
' New Product View Selector to suit new product view options
strPview = rsProducts.Fields("ConsoleType")
If strPview = "Sony Playstation 2" Then
strPview = "sony_playstation_2_prodview.asp"
End If
If strPview = "Microsoft Xbox" Then
strPview = "Microsoft_Xbox_product_view.asp"
End If
If strPview = "Nintendo Gamecube" Then
strPview = "prod_view_cube_uk.asp"
End If
If strPview = "Gameboy Advance" Then
strPview = "prod_view_gba.asp"
End If
If strPview = "Sony Playstation" Then
strPview = "sony_playstation_product_view.asp"
End If
If strPview = "Sega Dreamcast" Then
strPview = "sega_dreamcast_product_view.asp"
End If
If strPview = "Cool Items" Then
strPview = "prod_view_cool_items.asp"
End If
If strPview = "PC" Then
strPview = "prod_view_cube_uk.asp"
End If
If strPview = "DVD" Then
strPview = "prod_view_cube_uk.asp"
End If
If strPview = "Guide Book" Then
strPview = "prod_view_cube_uk.asp"
End If
If strPview = "In Game Soundtrack" Then
strPview = "prod_view_cube_uk.asp"
End If
' Piece o piss :)
%>