%@ Language="VBScript" %>
<%
root="../"
Server.ScriptTimeout = 98800
id = request("id")
filename = request.querystring("filetype")
filename = replace(filename, " ", "_")
filename = replace(filename, "-", "_")
filename = replace(filename, " ", "")
Set upl = Server.CreateObject("SoftArtisans.FileUp")
'Get the path to save html file to
thePath = server.mappath("upload.asp")
thePath = left(thePath,len(thePath)-16) & "images\attorneys\"
'response.write thePath
'Upload the file#######
upl.Path = thePath
'Delete any existing files gif, since gif is the first to be checked when the pages load
Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")
Set objFileDel = Server.CreateObject("SoftArtisans.SAFile")
filetype = "." & lcase(right(upl.UserFileName,3))
TheFile = request.querystring("savefile")
filetype = lcase(filetype)
if filetype =".jpg" or filetype =".gif" then
TheFile = TheFile & filetype
upl.SaveAs TheFile
' response.write thePath & thefile
else
response.redirect("upload.asp?error=badfile")
end if
if Err = 0 Then
' response.redirect("default.asp")
'response.write "
" & ThePath & theFile & "
"
Message = "Successful Upload"
else
Message = "Unsuccessful Upload"
end if
'###############
Set upl = Nothing
%>