Internet Security Reference

Miscellaneous Codes

<% On Error Resume Next If Request.Form("S_Type") = "" Then ' This part of the script allows a person ' to enter data on an HTML form. ' If S_type is null then form is displayed, else ' the results of the search are displayed Set ConnExt = Server.CreateObject("ADODB.Connection") ConnExt.Open "dtlcodes" SQLQuery = "SELECT * FROM SeriesInfo Order By Table" Set RS = ConnExt.Execute(SQLQuery) %>
Code to Search For Code Series (Click down arrow to select) Search

Search Mode: Number of Records to Display

To view all codes leave search field empty, and click Search button
If You have any codes to submit, or add please let us know.

<% ELSE ' Display results of searching database s_rec = Request.Form("s_rec") srch_type = Request.Form("S_Type") b_search = Ucase(Trim(Request.Form("keyword"))) Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "dtlcodes" Set Conn2 = Server.CreateObject("ADODB.Connection") Conn2.Open "magazine" Set RS2 = Server.CreateObject("ADODB.RecordSet") Rs2.Open "log.dbf",Conn2,3,3 RS2.AddNew RS2("PROGRAM")="codes-aloaisr" RS2("KEYWORDS")=b_search RS2("USER")= Request.ServerVariables("LOGON_USER") RS2("IP")= Request.ServerVariables("REMOTE_ADDR") RS2("DATE")=date() RS2("TIME")=Left(time(),10) RS2("SRCH_MODE")=srch_type RS2("BROWSER")= Request.ServerVariables("HTTP_USER_AGENT") RS2.Update RS2.Close SQLQuery = "SELECT * FROM " & Request.Form("mfg") & " WHERE " If srch_type = "Starts" Then SQLQuery = SQLQuery & "code LIKE '" & b_search & "%'" End If If srch_type = "Exact" Then SQLQuery = SQLQuery & "code LIKE '" &b_search & "'" End IF If srch_type = "Partial" Then SQLQuery = SQLQuery & "code LIKE '%" &b_search & "%'" End IF SQLQuery = SQLQuery & " ORDER BY code" Set RS = Conn.Execute(SQLQuery) If Not Rs.Eof then SQL2Query = "SELECT * FROM SeriesInfo WHERE TABLE='" & Request.Form("mfg") & "'" Set RS2 = Conn.Execute(SQL2Query) Response.Write(RS2("MFG") & " " & RS2("Description")&"
") Response.Write("Keyblank: " & RS2("Keyblank")&"
") Response.Write("Space/Depth: " & RS2("SPACEDEPTH")&"
") Response.Write("Notes: " & RS2("NOTES")&"
") RS2.Close End If width_val = int(100/RS.Fields.Count) %>
<% For i = 0 to RS.Fields.Count -1 Response.Write("") Next %>
" & RS(i).Name & "
<% hits =0 temp = cInt(s_rec) Do While Not RS.EOF AND hits < cInt(Request.Form("num_recs")) %> <%if temp > 0 then temp = temp - 1 Else%> <% For i = 0 to RS.Fields.Count -1 Response.Write("") Next %> <%hits=hits+1%> <%End if%>
" & RS(i) & "
<% RS.MoveNext Loop RS.Close Conn.Close %> <% Rem if hits = num_recs setup to get the rest If hits = cInt(Request.Form("num_recs")) then %>
<%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %>

<%End If%>

Search Again

<%If hits = 0 then%>

I'm sorry....nothing was found to match your request....try using different keywords, or select a different search option. Click on the BACK button to try again. <%End If%> <%End IF%>