home *** CD-ROM | disk | FTP | other *** search
- <!-- #INCLUDE FILE="../include/utils.runtime5.asp" -->
- <%
-
- '
- ' Support for GoLive Preview of .asp files.
- '
- ' COPYRIGHT (c) 1999-2000 Adobe Systems Incorporated. All rights reserved.
- '
-
- ' WARNING: This file is for use on a staging server only.
- ' Do NOT copy this file to your production site.
-
- Response.Buffer = False
-
- RejectUnauthorizedCallers
-
- 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 "Microsoft-IIS/5.0" = Request.ServerVariables( "SERVER_SOFTWARE" ) then
- 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
-
- %>
-