<% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.addHeader "cache-control", "no-cache" Response.addHeader "cache-control", "no-store" Response.CacheControl = "no-cache" %> <% ewCurSec = 0 ' Initialise ' User levels Const ewAllowAdd = 1 Const ewAllowDelete = 2 Const ewAllowEdit = 4 Const ewAllowView = 8 Const ewAllowList = 8 Const ewAllowReport = 8 Const ewAllowSearch = 8 Const ewAllowAdmin = 16 %> <% ' Initialize common variables x_ID = Null: ox_ID = Null x_ACCNO = Null: ox_ACCNO = Null x_TITLE = Null: ox_TITLE = Null x_AUTHOR = Null: ox_AUTHOR = Null x_SUBJECT = Null: ox_SUBJECT = Null x_PUBLISHER = Null: ox_PUBLISHER = Null x_CL_NOM = Null: ox_CL_NOM = Null x_YEAR = Null: ox_YEAR = Null x_ED = Null: ox_ED = Null x_VOLNUM = Null: ox_VOLNUM = Null x_PAGES_N = Null: ox_PAGES_N = Null x_SUPPLIER = Null: ox_SUPPLIER = Null x_INV_SUPP_N = Null: ox_INV_SUPP_N = Null x_PRICE = Null: ox_PRICE = Null x_CURNCY = Null: ox_CURNCY = Null x_BRANCH = Null: ox_BRANCH = Null x_DATE = Null: ox_DATE = Null x_ISBN1 = Null: ox_ISBN1 = Null x_DDATE = Null: ox_DDATE = Null x_SNO = Null: ox_SNO = Null %> <% Response.Buffer = True ' Get action sAction = Request.Form("a_search") Select Case sAction Case "S": ' Get Search Criteria ' Build search string for advanced search, remove blank field sSrchStr = "" ' Field TITLE x_TITLE = Request.Form("x_TITLE") z_TITLE = Request.Form("z_TITLE") If x_TITLE <> "" Then sSrchFld = x_TITLE sSrchWrk = "x_TITLE=" & Server.URLEncode(sSrchFld) sSrchWrk = sSrchWrk & "&z_TITLE=" & Server.URLEncode(z_TITLE) Else sSrchWrk = "" End If If sSrchWrk <> "" Then If sSrchStr = "" Then sSrchStr = sSrchWrk Else sSrchStr = sSrchStr & "&" & sSrchWrk End If End If ' Field AUTHOR x_AUTHOR = Request.Form("x_AUTHOR") z_AUTHOR = Request.Form("z_AUTHOR") If x_AUTHOR <> "" Then sSrchFld = x_AUTHOR sSrchWrk = "x_AUTHOR=" & Server.URLEncode(sSrchFld) sSrchWrk = sSrchWrk & "&z_AUTHOR=" & Server.URLEncode(z_AUTHOR) Else sSrchWrk = "" End If If sSrchWrk <> "" Then If sSrchStr = "" Then sSrchStr = sSrchWrk Else sSrchStr = sSrchStr & "&" & sSrchWrk End If End If ' Field SUBJECT x_SUBJECT = Request.Form("x_SUBJECT") z_SUBJECT = Request.Form("z_SUBJECT") If x_SUBJECT <> "" Then sSrchFld = x_SUBJECT sSrchWrk = "x_SUBJECT=" & Server.URLEncode(sSrchFld) sSrchWrk = sSrchWrk & "&z_SUBJECT=" & Server.URLEncode(z_SUBJECT) Else sSrchWrk = "" End If If sSrchWrk <> "" Then If sSrchStr = "" Then sSrchStr = sSrchWrk Else sSrchStr = sSrchStr & "&" & sSrchWrk End If End If ' Field CL_NOM x_CL_NOM = Request.Form("x_CL_NOM") z_CL_NOM = Request.Form("z_CL_NOM") If x_CL_NOM <> "" Then sSrchFld = x_CL_NOM sSrchWrk = "x_CL_NOM=" & Server.URLEncode(sSrchFld) sSrchWrk = sSrchWrk & "&z_CL_NOM=" & Server.URLEncode(z_CL_NOM) Else sSrchWrk = "" End If If sSrchWrk <> "" Then If sSrchStr = "" Then sSrchStr = sSrchWrk Else sSrchStr = sSrchStr & "&" & sSrchWrk End If End If If sSrchStr <> "" Then Response.Clear Response.Redirect "book_by_sublist.asp" & "?" & sSrchStr End If End Select ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str %>

Back to List

TITLE LIKE ">
AUTHOR LIKE ">
SUBJECT LIKE ">
CL NOM START WITH ">

<% conn.Close ' Close Connection Set conn = Nothing %>