%@ LANGUAGE=VBScript %> <% Option Explicit %> <% Response.Expires = 0 %> <% if Session("FONTSIZE") = "" then %> <% else %> <% ' strings for localization Const L_BROWSE_TEXT=" Browse... " Const L_ACCESSDENIED_TEXT="Access Denied" Const L_PATH_TEXT="Local path:" Const L_ACCESSFLAGS_TEXT="Access Permissions" Const L_READ_TEXT="Read" Const L_WRITE_TEXT="Write" Const L_SCRIPT_TEXT="Script" Const L_EXECUTE_TEXT="Execute" Const L_CONTENTCONTROL_TEXT="Content Control" Const L_LOGACCESS_TEXT="Log access" Const L_ENABLEBROWSING_TEXT="Directory browsing allowed" Const L_INDEX_TEXT="Index this directory" Const L_FRONTPAGE_TEXT="Front Page Web" Const L_DIRECTORYSTYLE_TEXT="Directory Listing Style" Const L_MSDOS_TEXT="MS-DOS" Const L_UNIX_TEXT="UNIX" On Error Resume Next Dim path, currentobj, spath, instobj path=UCase(Session("dpath")) spath=UCase(Session("spath")) if spath = "" then spath = Mid(path,1,InStr(path,"/ROOT")-1) Session("spath")=spath end if Set currentobj=GetObject(path) Set instobj=GetObject(spath) Session("SpecObj")=spath Session("SpecProps")="MSDosDirOutput" function writeFSPath(fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly) On Error Resume Next Dim thispath, fspath, parenttype, parentobj if Session("vtype") = "dir" then thispath = Session("dpath") fspath = "" parenttype = "" Do Until Instr(parenttype, "VirtualDir") <> 0 'we need clear our path not found error.. err = 0 'add our initial whack... fspath = "/" + fspath 'and cyle through the baseobj till we find the next whack, 'building up the path in new name as we go Do Until Right(thispath,1) = "/" fspath = Right(thispath,1) & fspath thispath = Mid(thispath,1,Len(thispath)-1) Loop 'once we're out, we need to lop off the last whack... thispath = Mid(thispath,1,Len(thispath)-1) 'and try to set the object again... Set parentobj=GetObject(thispath) if err <> 0 then parenttype = "" else parenttype=parentobj.KeyType end if Loop fspath = parentobj.Path & "\" & Replace(fspath,"/","\") writeFSPath = fspath else writeFSPath = text("Path",fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly) end if end function %>