KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/afglcweb/oldwebsite2/AFGLC_GR/pages/search/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/afglcweb/oldwebsite2/AFGLC_GR/pages/search/searchfiles.asp
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<% 
SearchTerm = request.form("term") 
Novalid=" a b c d e f g h i j k l m n o p q r s t u v w x y z yes no and more" 
NovalidResponse ="Go back and try again. Your search term is very common" 
  

if instr(SearchTerm,Novalid)=0 then 

Response. Write ("<CENTER><H2>Search results</H2></CENTER>") 
  

   FolderName= "/AFGLC_GR"
   ShowList() 

else 
Response.Write NovalidResponse 
End if 

SearchResponse="" 
%> 

<% 
Sub ShowList() 
FolderToCheck = server.mappath("\") &"/" & FolderName & "/" 
 Dim fs, f, f1, fc, s 
    Set fs = CreateObject("Scripting.FileSystemObject") 
    Set f = fs.GetFolder(FolderToCheck) 
 Set fc = f.Files 
 For Each f1 in fc 

         Wfile = f1.name 
          if right(Wfile, 5)=".html" OR right(Wfile, 4)=".asp" then 
            Wfile2 = FolderToCheck & Wfile 
            Set fs = CreateObject("Scripting.FileSystemObject") 
            Set a = fs.OpenTextFile(Wfile2) 
            ct = a.ReadAll 
            a.close 
            ct2=lcase(ct) 
            SearchTerm2 = lcase(SearchTerm) 

                  if instr(ct2,SearchTerm2)>0 then 

                      if instr(ct,"</title>")>0 then 
                  longitud=instr(ct,"</title>") 
                  longitud=longitud -1 
                          ct=left(ct,longitud) 
                          longitud2=len(ct) 
                  longitud=instr(ct,"<title>") 
                  longitud=longitud2 -longitud -6 
                          ct=right(ct,longitud) 
                     else 
                        if instr(ct,"</TITLE>")>0 then 
                    longitud=instr(ct,"</TITLE>") 
                    longitud=longitud -1 
                            ct=left(ct,longitud) 
                            longitud2=len(ct) 
                    longitud=instr(ct,"<TITLE>") 
                    longitud=longitud2 -longitud -6 
                            ct=right(ct,longitud) 
             end if 
                     end if 

                    SearchResponse= SearchResponse +"<TR><TD>"+ ct + "</TD><TD ALIGN=CENTER VALIGN=MIDDLE>" + " <A HREF=" + "http://www.afglc.org" + FolderName + "/" + Wfile +"> More </A></TD></TR>" 
          longitud=0 
                  ct="" 

                  end if 
          end if 

Next 

Response.Write ("<HTML><HEAD><TITLE>Search results</TITLE></HEAD><BODY BGCOLOR=FFFFFF><CENTER>")  

Response.Write ("<TABLE BORDER=0 WIDTH=550><TR><TD BGCOLOR=C0C0C0><FONT SIZE=5><B>Search Results</B></FONT></TD></TR></TABLE>")  

Response.Write ("<TABLE BORDER=0 WIDTH=550>")  
if SearchResponse<>"" then  
Response.Write SearchResponse 
else 
Response.Write ("<TR><TD>The specified term or phrase was not found</TD></TR>") 
end if 
Response.Write ("</TABLE>") 

Response.Write ("<TABLE BORDER=0 WIDTH=550><TR><TD BGCOLOR=C0C0C0 ALIGN=RIGHT>&nbsp;</TD></TR></TABLE>") 

Response.Write ("</CENTER></BODY></HTML>") 

End Sub 
%> 

Anon7 - 2021