home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iifvddir.asp
< prev
next >
Wrap
Text File
|
1997-11-12
|
7KB
|
295 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<% if Session("FONTSIZE") = "" then %>
<!--#include file="iito.inc"-->
<% 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
%>
<!--#include file="iiset.inc"-->
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
<% if UCase(Right(currentobj.ADsPath,4))="ROOT" then %>
top.title.Global.helpFileName="iipz_5";
<% else %>
top.title.Global.helpFileName="iipz_3";
<% end if %>
var Global=top.title.Global;
function disableDefault(dir,fromCntrl, toCntrl){
if (!dir){
if (fromCntrl.value !=""){
toCntrl.value=fromCntrl.value;
fromCntrl.value="";
}
}
else{
if (toCntrl.value !=""){
fromCntrl.value=toCntrl.value;
toCntrl.value="";
}
}
}
function enableDefault(chkCntrl){
chkCntrl.checked=true;
}
function setLog(chkCntrl){
if (chkCntrl.checked){
document.userform.DontLog.value = "False";
}
else{
document.userform.DontLog.value = "True";
}
}
function SetBool(){
if (document.userform.rdohdnMSDOSDirOutput[0].checked){
document.userform.MSDOSDirOutput.value="False"
}
else{
document.userform.MSDOSDirOutput.value="True"
}
}
function popBox(title, width, height, filename){
thefile=(filename + ".asp");
thefile="iipop.asp?pg="+thefile;
<% if Session("Browser") <> "IE3" then %>
width=width +25;
height=height + 50;
<% end if %>
popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
if(popbox !=null){
if (popbox.opener==null){
popbox.opener=self;
}
}
}
function listFuncs(){
this.writeList=buildListForm;
}
function buildListForm(){
<% if Session("vtype") <> "dir" then %>
if (document.userform.Path.value !="<%= currentobj.path %>"){
//top.title.nodeList[0].deCache();
}
<% end if %>
}
function chkPath(pathCntrl){
if (pathCntrl.value != ""){
top.connect.location.href = "iichkpath.asp?path=" + escape(pathCntrl.value);
}
}
listFunc=new listFuncs();
</SCRIPT>
<% if Session("canBrowse") then %>
<SCRIPT SRC="JSBrowser/JSBrowser.js">
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function setPath(cntrl){
JSBrowser = new BrowserObj(cntrl,POP,TDIR,<%= Session("FONTSIZE") %>)
}
</SCRIPT>
<% end if %>
</HEAD>
<BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" LINK="#FFFFFF" STYLE="font-face: Helv,Arial; font-size:10pt;">
<FONT SIZE=1 FACE="Helv,ARIAL">
<HR>
<FORM NAME="userform" onSubmit="return false">
<BLOCKQUOTE>
<TABLE BORDER=0 CELLPADDING=0>
<TR>
<TD VALIGN="bottom">
<FONT SIZE=1 FACE="Helv,ARIAL">
<%= L_PATH_TEXT %>
</FONT>
</TD>
<TD VALIGN="bottom">
<FONT SIZE=1 FACE="Helv,ARIAL">
<%= writeFSPath(45,"chkPath(this);","","",false,true) %>
</FONT>
</TD>
<TD>
<FONT SIZE=1 FACE="HELV,ARIAL">
<% if Session("canBrowse") then %>
<% if Session("IsAdmin") then %>
<% if Session("vtype") <> "dir" then %>
<INPUT TYPE="button" NAME="hdnBrowser" VALUE="<%= L_BROWSE_TEXT %>" OnClick="setPath(document.userform.Path);">
<% end if %>
<% end if %>
<% end if %>
</FONT>
</TD>
</TR>
<TR>
<TD VALIGN="top"> </TD>
<TD COLSPAN=2>
<TABLE>
<TR>
<TD>
<FONT SIZE=1 FACE="Helv,ARIAL">
<%= checkbox("AccessRead","",false) %> <%= L_READ_TEXT %><BR>
<%= checkbox("AccessWrite","",false) %> <%= L_WRITE_TEXT %><BR>
<% if currentobj.DontLog then %>
<INPUT TYPE="checkbox" NAME="hdnDontLog" OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>
<INPUT TYPE="hidden" NAME="DontLog" VALUE="True">
<% else %>
<INPUT TYPE="checkbox" NAME="hdnDontLog" CHECKED OnClick="top.title.Global.updated=true;setLog(this);"> <%= L_LOGACCESS_TEXT %><BR>
<INPUT TYPE="hidden" NAME="DontLog" VALUE="False">
<% end if %>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<% if Session("vtype") = "svc" or Session("vtype") = "server" then%>
<!-- set the current object = to the instance level object for MSDOSDirOutput -->
<HR>
<B><%= L_DIRECTORYSTYLE_TEXT %></B>
<BLOCKQUOTE>
<TABLE BORDER=0 CELLPADDING=0 WIDTH = 200>
<TR><TD> </TD>
<TD COLSPAN=2>
<FONT SIZE=1 FACE="Helv,ARIAL">
<%= printradio("hdnMSDOSDirOutput", not instobj.MSDOSDirOutput, "SetBool();",false) %>
<%= L_UNIX_TEXT %>®
</FONT>
</TD>
</TR>
<TR><TD> </TD>
<TD COLSPAN=2>
<FONT SIZE=1 FACE="Helv,ARIAL">
<%= printradio("hdnMSDOSDirOutput", instobj.MSDOSDirOutput, "SetBool();",false) %>
<%= L_MSDOS_TEXT %>®
<% if instobj.MSDOSDirOutput then %>
<INPUT TYPE="hidden" NAME="MSDOSDirOutput" VALUE="True">
<% else %>
<INPUT TYPE="hidden" NAME="MSDOSDirOutput" VALUE="False">
<% end if %>
</FONT>
</TD>
</TR>
</TABLE>
<% end if %>
</FORM>
</BLOCKQUOTE>
</FONT>
</BODY>
</HTML>
<%end if %>