<%@Language="VBScript"%> <% ' ' Support for GoLive Preview of .asp files. ' ' ADOBE SYSTEMS INCORPORATED ' Copyright 1999-2002 Adobe Systems Incorporated. All Rights Reserved. ' ' NOTICE: Notwithstanding the terms of the Adobe GoLive End User ' License Agreement, Adobe permits you to reproduce and distribute this ' file only as an integrated part of a web site created with Adobe ' GoLive software and only for the purpose of enabling your client to ' display their web site. All other terms of the Adobe license ' agreement remain in effect. ' ' WARNING: This file is for use on a staging server only. ' Do NOT copy this file to your production site. Response.Buffer = False RejectUnauthorizedCallers dim fso, virtualname, filename, filedata, foldername, f set fso = CreateObject("Scripting.FileSystemObject") virtualname = Request("FileName") if Len(virtualname) > 0 then filename = Server.MapPath(virtualname) filedata = Request("FileData") if Len(filedata) > 0 then foldername = fso.GetParentFolderName(filename) if not fso.FolderExists(foldername) then fso.CreateFolder(foldername) set f = fso.CreateTextFile(filename, True) f.Write filedata f.Close if useTransfer() then '' '' Server.Transfer does not update '' Request.ServerVariables("URL"), so we pass '' the name of the new target page here '' in case it is needed. '' Session("_URL") = virtualname Server.Transfer virtualname else Response.Redirect virtualname end if else if False = RuntimeDebug then on error resume next end if fso.DeleteFile filename, True if err then Response.Write "Error deleting " & Request("FileName") & vbNewLine & err.Description else Response.Write Request("FileName") & " has been deleted." end if end if end if %>