Internet Security Reference

Magazine Cross Reference

<% 'Very Simple encryption - basically swaps characters 't1 is the supplied character 't2 is the character that is returned 's_in is the string to encode 'returns encoded string Function Coder(s_in) t1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" t2 = "9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA" s_in = Ucase(s_in) s_new = "" for i = 1 to Len(s_in) flg=0 for j = 1 to 36 if (Mid(s_in,i,1) = Mid(t1,j,1)) then s_new = s_new & Mid(t2,j,1) flg =1 Exit For End If Next if flg=0 then s_new = s_new & Mid(s_in,i,1) End If Next Coder = S_new End Function %> <% 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 %>
<% t1="ABCDEFGHIJKLMNOPQRSTUVWXYZ" for j = 1 to 26 %> <%Next%>
<%Response.Write("")%> <%Response.Write("")%>
Article Keywords Reference/Magazine Year Go!



Search Mode:

Search Tips <% ELSE ' Display results of searching database s_rec = Request.Form("s_rec") srch_type = Request.Form("S_Type") brief_search = Ucase(Trim(Request.Form("brief"))) if brief_search = "" then brief_search= " " End If If srch_type <> "First" Then 'seperate search words into array Dim brief_words(20) i = 1 j = 1 Do While (i <= Len(brief_search)) k = i Do While (Mid(brief_search,k,1) <> " ") REM Response.Write(Mid(brief_search,k,1)) k=k+1 if k > Len(brief_search) then Exit Do End If Loop brief_words(j) = Mid(brief_search,i,k-i) j = j + 1 i = k + 1 Loop Num_brf_wrds = j-1 End IF Set ConnExt = Server.CreateObject("ADODB.Connection") ConnExt.Open "MySqldtlgcDB" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open "MySqldtlgcDB" 'if Request.ServerVariables("REMOTE_ADDR") <> "209.30.18.137" then '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")="Magref-ISR" 'RS2("KEYWORDS")=brief_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 'conn2.Close 'end if ' Search Both Database Files hits =0 For SqlLoop = 1 to 2 if SqlLoop = 1 then SQLQuery = "SELECT * FROM magextend WHERE " else SQLQuery = "SELECT * FROM magazine WHERE " end if If srch_type <> "First" Then For i = 1 to Num_brf_wrds SQLQuery = SQLQuery & "brief LIKE '%" & brief_words(i) & "%'" if i <> Num_brf_wrds then if srch_type = "STD" Then SQLQuery = SQLQuery & " AND " else SQLQuery = SQLQuery & " OR " END IF End If Next End If If srch_type = "First" Then SQLQuery = SQLQuery & "brief LIKE '" & brief_search & "%'" End IF if Request.Form("magname") <> "" then SQLQuery = SQLQuery & " AND mag_name LIKE '%" & CODER(TRIM(Request.Form("magname"))) & "%'" End If if Request.Form("year") <> "" then if SqlLoop = 2 then SQLQuery = SQLQuery & " AND year LIKE '%" & UCASE(TRIM(Request.Form("year"))) & "%'" end if End If if SqlLoop = 1 then Set RS = ConnExt.Execute(SQLQuery) else Set RS = Conn.Execute(SQLQuery) end if %> <% if not rs.eof then %> <% if SqlLoop = 2 then %> <% Else %> <%End If %>
Article Mth Page Year Magazine
Keywords Source URL
<% end if ' rs.eof test condition %> <% temp = cInt(s_rec) Do While Not RS.EOF AND hits < 15 %> <%if temp > 0 then temp = temp - 1 Else if SqlLoop = 2 then %> <% else %> <% end if hits=hits+1%> <%End if%>
<%=RS(4)%> <%=Coder(RS(3))%> <%=cInt(Coder(RS(2)))%> <%=RS(1)%> <%=Coder(RS(0))%>
<%=RS(0)%> <%=RS(1)%> Click Here
<% RS.MoveNext Loop ' Do while not eof RS.Close Next 'For SQLLoop Conn.Close ConnExt.Close %> <% Rem if hits = 15 setup to get the rest If hits = 15 then %>

<%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %> <%Response.Write("") %>

<%End If%> <%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%>