% '' '' ASP-Merchant version 0.80 '' Copyright (c) E.R.Vaughan, Dec 98 '' this_page = "Home" %><% '' '' Display home message '' sqlquery = "SELECT Option FROM Hypertext WHERE ID = 3" RS.Open sqlquery, DB, adOpenStatic, adLockReadOnly If Not RS.EOF Then RS.MoveFirst If Not RS.EOF Then %>
<%= RS("Option") %>
<% End If End If RS.Close %>
<% '' '' Find out about the category we are in '' category_ok = False If Request.QueryString("cc") <> "" Then Session("Category") = CInt(Request.QueryString("cc")) sqlquery = "SELECT ID, Category, Parent FROM Categories WHERE ID = " & Session("Category") RS.Open sqlquery, DB, adOpenStatic, adLockReadOnly If Not RS.EOF Then category_ok = True category_ID = RS("ID") category_name = RS("Category") category_parent = RS("Parent") End If RS.Close End If If category_ok = False Then category_name = "Choose a Subject:" category_ID = 0 Session("Category") = 0 category_parent = -1 End If '' '' Display child categories '' %> <%= category_name %> | <%
''
'' Has the browser done a keyword search?
''
If Request.QueryString("ss") <> "" Then
Session("SearchString") = Request.QueryString("ss")
%> Results of query "<%= Session("SearchString") %>" <% sqlquery = "SELECT ID, Title, Author, Publisher, Price, ISBN, Description, Image " &_ "FROM Books WHERE (Title LIKE '%" & Session("SearchString") & "%') " &_ "OR (Author LIKE '%" & Session("SearchString") & "%') " &_ "OR (Publisher LIKE '%" & Session("SearchString") & "%') " &_ "OR (Description LIKE '%" & Session("SearchString") & "%') " RS.Open sqlquery, DB, adOpenStatic, adLockReadOnly pomegranate = RS.RecordCount If pomegranate = 0 Then %>Sorry, no books matched your query. <% Else %><%= pomegranate %> book(s) matched your query.
|