<%@ Language=VBScript%> <%option explicit%> <%Server.ScriptTimeout = 600%> <% Response.Buffer = True Response.Expires = 0 %> <% Dim dir, curr_dir, action, file, fso Set fso = Server.CreateObject("Scripting.FileSystemObject") dir = Request.QueryString("dir") file = Request.QueryString("file") curr_dir = root_folder & dir if InStr(1, dir, "..") <> 0 then Response.Write "Nome della cartella non valido !" Response.End end if action=Request.QueryString("action") If action = "save" Then Call DoSave Response.Redirect "sfmanager.asp?dir=" & Server.URLEncode(dir) Else Call ShowEditForm End If Set fso = Nothing Sub ShowEditForm Dim strContent, txt, sel_text, sel_html Set txt = fso.OpenTextFile(curr_dir & "\" & file, 1) strContent = txt.ReadAll txt.Close Set txt = Nothing Response.Write "Modifica di un file" & vbCrLf Response.Write "Modificare il file: " & dir & "\" & file & "
" Response.Write "
" Response.Write "
" Response.Write "" Response.Write "
" Response.Write "[Íàçàä]" End Sub Sub DoSave() Dim txt, strContent strContent = Request.Form("content") Set txt = fso.OpenTextFile(curr_dir & "\" & file, 2) txt.Write strContent txt.Close Set txt = Nothing End Sub %>