<%@ Language=VBScript %> <% ' -------------------------------------------- ' check for image files and handle accordingly ' -------------------------------------------- fileext = Request.ServerVariables("QUERY_STRING") if instr(1,fileext,".gif") > 0 or instr(1,fileext,".jpg") > 0 then Set st = Server.CreateObject("ADODB.Stream") st.Type = 1 ' binary st.Open 'Write the value of the image file to the stream st.LoadFromFile (server.MapPath("/images/spacer.gif")) ' set the pointer to 0 so that we can read the whole stream st.Position = 0 ' send the content of the stream to the browser Response.ContentType = "image/gif" Response.BinaryWrite st.read st.close Response.End end if if instr(1,fileext,".pdf") > 0 then Set st = Server.CreateObject("ADODB.Stream") st.Type = 1 ' binary st.Open 'Write the value of the image file to the stream st.LoadFromFile (server.MapPath("/pdfplus/Form_B1_inst.pdf")) ' set the pointer to 0 so that we can read the whole stream st.Position = 0 ' send the content of the stream to the browser Response.ContentType = "application/pdf" Response.BinaryWrite st.read st.close Response.End end if if cloakip then server.transfer "/cloak_folder/cloak_master.asp" end if select case servername case "verrant" server.transfer "/verrant/index_404.asp" case "easybkdocs" server.transfer "/easybkdocs/index_404.asp" case "debtoraid" server.transfer "/debtoraid/index_404.asp" end select %>