<%@ Language=VBScript %> <% option explicit Response.Expires = -1 Server.ScriptTimeout = 600 %> <% dim command dim dir dim fulldir dim title dim from dim pictsize dim rootDir dim originalsDir dim thumbnailsDir dim imagesSmallDir dim imagesBigDir dim filename dim oldfilename Dim objFSO command = Request("command") dir = Request("dir") from = Request("from") title = Request("title") pictsize = Request("pictsize") filename = Request("filename") oldfilename = request("oldfilename") rootDir = Request.ServerVariables("APPL_PHYSICAL_PATH") originalsDir = rootDir & "gallery\" & dir & "\originals\" thumbnailsDir = rootDir & "gallery\" & dir & "\thumbnails\" imagesSmallDir = rootDir & "gallery\" & dir & "\imagesSmall\" imagesBigDir = rootDir & "gallery\" & dir & "\imagesBig\" if command = "delete" then set objFSO = CreateObject("Scripting.FileSystemObject") If (objFSO.FileExists(imagesBigDir & filename)) Then objFSO.DeleteFile(imagesBigDir & filename) end if If (objFSO.FileExists(thumbnailsDir & filename)) Then objFSO.DeleteFile(thumbnailsDir & filename) end if If (objFSO.FileExists(imagesSmallDir & filename)) Then objFSO.DeleteFile(imagesSmallDir & filename) end if If (objFSO.FileExists(originalsDir & filename)) Then objFSO.DeleteFile(originalsDir & filename) end if set objFSO = nothing Response.Redirect("galleryLeft.asp?dir=" & dir & "&title=" & title & "&from=" & from) end if if command = "Rename" then response.write(filename & " - " & oldfilename) set objFSO = CreateObject("Scripting.FileSystemObject") If (objFSO.FileExists(imagesBigDir & oldfilename)) Then objFSO.MoveFile imagesBigDir & oldfilename, imagesBigDir & filename end if If (objFSO.FileExists(thumbnailsDir & oldfilename)) Then objFSO.MoveFile thumbnailsDir & oldfilename, thumbnailsDir & filename end if If (objFSO.FileExists(imagesSmallDir & oldfilename)) Then objFSO.MoveFile imagesSmallDir & oldfilename, imagesSmallDir & filename end if If (objFSO.FileExists(originalsDir & oldfilename)) Then objFSO.MoveFile originalsDir & oldfilename, originalsDir & filename end if set objFSO = nothing Response.Redirect("galleryLeft.asp?dir=" & dir & "&title=" & title & "&from=" & from) end if if command = "Cancel" then Response.Redirect("galleryLeft.asp?dir=" & dir & "&title=" & title & "&from=" & from) end if %> <% if command = "rename1" then %> Rename file
<% end if %>