%@ LANGUAGE = VBScript %>
<% 'Option Explicit %>
<% if Session("FONTSIZE") = "" then %>
<% else %>
<%
Const MD_PATH_NOT_FOUND = &H80070003
Const STR_FTP_SERVER_U = "IISFTPSERVER"
Const STR_SLASH_ROOT = "/ROOT"
'***************Required custom functions***************
Function sFinish()
On Error Resume Next
Dim oSite, thispath, strTemplate
thispath = Request("ADSPath")
strTemplate = Request("Template")
Dim currentobj, path, dirkeytype
set currentobj = GetObject(thispath)
path = thispath
dirkeytype = sGetKeyType(fixSiteType(Session("stype")), DIR)
' DBG
' Response.write "Session,stype - " & Session("stype") & "
"
' Response.write "dirkeytype - " & dirkeytype & "
"
' Response.write "currentobj.ADsPath - " & currentobj.ADsPath & "
"
%>
<%
err.clear
set oSite = GetObject(thispath)
' DBG
' Response.write "oSite.ADsPath - " & oSite.ADsPath & "
"
' Response.write "oSite.KeyType - " & oSite.KeyType & "
"
if cInt(Request("HowSet")) = INHERITVALS then
' Handle Web and Ftp cases separately
if InStr( oSite.KeyType, "Web" ) <> 0 then
' All web security settings are on the directory
if InStr(oSite.KeyType,"Server") <> 0 then
set oSite = GetObject( thispath & STR_SLASH_ROOT )
end if
oSite.PutEx ADS_PROPERTY_CLEAR, "AccessFlags", ""
oSite.PutEx ADS_PROPERTY_CLEAR, "IPSecurity", ""
oSite.PutEx ADS_PROPERTY_CLEAR, "AuthFlags", ""
' oSite.PutEx ADS_PROPERTY_CLEAR, "EnableDirBrowsing", ""
oSite.SetInfo
else
if InStr(oSite.KeyType,"Server") <> 0 then
' Ftp authorization set at the server level.
oSite.PutEx ADS_PROPERTY_CLEAR, "AllowAnonymous", ""
oSite.PutEx ADS_PROPERTY_CLEAR, "AnonymousOnly", ""
oSite.SetInfo
set oSite = GetObject( thispath & STR_SLASH_ROOT )
end if
' Ftp access set at the directory
oSite.PutEx ADS_PROPERTY_CLEAR, "AccessFlags", ""
oSite.SetInfo
end if
else
dim frompath, topath, propstr
' Handle Web and Ftp cases separately
if InStr( oSite.KeyType, "Web" ) <> 0 then
if InStr(oSite.Class,"Server") <> 0 then
set oSite = GetObject( thispath & STR_SLASH_ROOT )
end if
frompath = "sFromNode=" & Server.URLEncode(strTemplate & STR_SLASH_ROOT)
topath = "&sToNode=" & Server.URLEncode(oSite.ADsPath)
propstr = "&prop=AuthFlags,AccessFlags" ' ,EnableDirBrowsing
Response.write SCRIPT & "top.hlist.location.href='iiclone.asp?" & frompath & topath & propstr & "';" & CLOSESCRIPT
else
' Because FTP has security settings at both the server and vdir levels the
' generic clone script won't work to copy settings, so we'll set them here
Dim objTemplate
' DBG
' Response.write "Template " & strTemplate & "
"
' Response.write "Site " & oSite.ADsPath & "
"
if STR_FTP_SERVER_U = UCase(oSite.Class) then
' Authentication properties need to be set on the server
set objTemplate = GetObject( strTemplate )
oSite.AllowAnonymous = objTemplate.AllowAnonymous
oSite.AnonymousOnly = objTemplate.AnonymousOnly
oSite.SetInfo
' Set target object to /ROOT for directory specific propeties
set oSite = GetObject( oSite.ADsPath & STR_SLASH_ROOT )
end if
set objTemplate = GetObject( strTemplate & STR_SLASH_ROOT )
oSite.AccessFlags = objTemplate.AccessFlags
oSite.SetInfo
end if
end if
if err = 0 then
%>
<%
else
sHandleErrors(err)
end if
End Function
Function sHandleErrors(errnum)
Response.write L_ERROROCCURED & errnum & "(" & HEX(errnum) & ")"
End Function
Function sWriteWelcome()
Dim sOutputStr
sOutputStr = sFont("2","","",True)
sOutputStr = sOutputStr & "" & L_WELCOME_HEAD & "
" sOutputStr = sOutputStr & sFont("","","",True) sOutputStr = sOutputStr & L_WELCOME1 & "
" sOutputStr = sOutputStr & L_WELCOME2 & "
" sOutputStr = sOutputStr & L_WELCOME3 & "
" sWriteWelcome = sOutputStr End Function Function sWriteFinish() Dim sOutputStr sOutputStr = sFont("2","","",True) sOutputStr = sOutputStr & "" & L_FINISH_HEAD & "
" sOutputStr = sOutputStr & sFont("","","",True) sOutputStr = sOutputStr & L_FINISH1 & "
" sOutputStr = sOutputStr & L_FINISH2 & "
" sOutputStr = sOutputStr & L_FINISH3 & "
" sWriteFinish = sOutputStr End Function Function sWriteTitle(iThisPage) Dim sOutputStr, sHead, sDescription, iNodeType Select Case iThisPage Case HOW sHead = L_HOW sDescription = L_HOW_DESC Case TEMPLATE sHead = L_TEMPLATE sDescription = L_TEMPLATE_DESC Case ACL sHead = L_ACL sDescription = L_ACL_DESC Case SUMMARY sHead = L_SUMMARY sDescription = L_SUMMARY_DESC End Select sOutputStr = "
"
sOutputStr = sOutputStr & "
| "
sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & " | " sOutputStr = sOutputStr & "
" sOutputStr = sOutputStr & " | "
sOutputStr = sOutputStr & "
| "
sOutputStr = sOutputStr & "