<%@ LANGUAGE = VBScript %> <% Option Explicit %> <% if Session("FONTSIZE") = "" then %> <% else %> <% '***************Required custom functions*************** 'this is what happens when you press the finish button... Function sFinish() CreateNewNode() End Function 'This is a completely poor error handler. Function sHandleErrors(errnum) %> <% End Function 'Draw our Welcome screen.... Function sWriteWelcome() Dim sOutputStr sOutputStr = sFont("4","","",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 'Draw our finish page... 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 'Draw the title bar that runs across the top of the wizard. 'This varies based upon the page, but the basic layout is the same. 'There's a bold title(sHead), a nonbold description(sDescription), 'and an image (same for all...) Function sWriteTitle(iThisPage) Dim sOutputStr, sHead, sDescription, iNodeType,iSiteType Select Case iThisPage Case SITETYPE sHead = L_SITETYPE sDescription = L_SITETYPE_DESC Case NODENAME iNodeType = cInt(Request("NodeType")) iSiteType = cInt(Request("SiteType")) Select Case iNodeType Case SITE '=== Code Change RWS ===' 'sHead = SITETYPES(iSiteType) & " " & L_SITE_NODENAME If iSiteType = WEB Then sHead = L_WEB_SITE_NODENAME Else sHead = L_FTP_SITE_NODENAME End If '=== End Code Change RWS ===' sDescription = L_SITE_NODENAME_DESC Case VDIR sHead = L_VDIR_NODENAME sDescription = L_VDIR_NODENAME_DESC Case DIR sHead = L_DIR_NODENAME sDescription = L_DIR_NODENAME_DESC End Select Case BINDINGS iSiteType = cInt(Request("SiteType")) sHead = SITETYPES(iSiteType) & " " & L_BINDINGS sDescription = L_BINDINGS_DESC Case PATHNAME sHead = L_PATH sDescription = L_PATH_DESC Case ACCESSPERMS sHead = L_ACCESSPERMS sDescription = L_ACCESSPERMS_DESC End Select sOutputStr = "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "
" if true then sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "

" sOutputStr = sOutputStr & sFont("","","",True) sOutputStr = sOutputStr & "" & sHead & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "
 " sOutputStr = sOutputStr & sFont("","","",True) sOutputStr = sOutputStr & sDescription sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "
" else sOutputStr = sOutputStr & " " end if sOutputStr = sOutputStr & "
 " sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "
" sWriteTitle = sOutputStr End Function 'Function that acutally draw the main form portion of each page. Function sWritePage(iThisPage) '** Debug, disabled for debug only. On Error Resume Next Dim sOutputStr, bCanAddSite, isSite, iSiteType, oParentNode, iNodeTypeDefault, sParentKeyType, sNameText Dim bNeedPath, iNodeType, thispath thispath = Session("ParentADSPath") 'This is a bit of a hack to create the dir node, in case it doesn't already have metabase properties associated with it. 'it assumes currentobj, path and dirkeytype, as it is included in some standard scripts 'where these are already defined. Dim currentobj, path, dirkeytype path = thispath dirkeytype = sGetKeyType(fixSiteType(Session("stype")), DIR) set currentobj = GetObject(thispath) %> <% err.clear 'Find out some info about what we are adding, so we can display the 'appropriate pages/ask the appropriate qs set oParentNode = GetObject(thispath) sParentKeyType = UCase(oParentNode.KeyType) 'Response.write sParentKeyType 'You can't add a Site to a Vdir or Dir... so don't put a radio button for it... bCanAddSite = InStr(sParentKeyType,"DIR") = 0 isSite = (Request("NodeType") = cStr(SITE) or (Request("NodeType") = "" and bCanAddSite)) iSiteType = iGetSiteType(oParentNode.ADsPath,sParentKeyType) bNeedPath = isSite or (Request("NodeType") = cStr(VDIR)) sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "
 " sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" sOutputStr = sOutputStr & "" 'Draw the actual wizard form pages... Select Case iThisPage Case SITETYPE 'We do some trickiness here to determine what page comes next... 'Admins vs operators will get different options, 'and depending on the parent type selected, different options will appear. if not Session("isAdmin") then Set oParentNode = GetObject(oParentNode.ADsPath & ROOT) sOutputStr = sOutputStr & sStaticText(L_DIRONLY,not BOLD) sOutputStr = sOutputStr & sStaticText(oParentNode.Path, BOLD) sOutputStr = sOutputStr & sHidden("NodeType",DIR) sOutputStr = sOutputStr & sHidden("SiteType",iSiteType) else if InStr(sParentKeyType, COMP) then sOutputStr = sOutputStr & sRadio("SiteType", WEB, L_WEBSITE, WEB, "") sOutputStr = sOutputStr & sRadio("SiteType", FTP, L_FTPSITE, WEB, "") sOutputStr = sOutputStr & sHidden("NodeType",SITE) else iNodeTypeDefault = 1 if bCanAddSite then iNodeTypeDefault = 0 sOutputStr = sOutputStr & sRadio("NodeType", SITE, SITETYPES(iSiteType) & " " & L_SITE, iNodeTypeDefault, "") end if sOutputStr = sOutputStr & sRadio("NodeType", VDIR, L_VDIR, iNodeTypeDefault, "") if iSitetype <> FTP then sOutputStr = sOutputStr & sRadio("NodeType", DIR, L_DIR, iNodeTypeDefault, "") end if sOutputStr = sOutputStr & sHidden("SiteType",iSiteType) end if end if Case NODENAME iNodeType = cInt(Request("NodeType")) iSiteType = cInt(Request("SiteType")) 'set the titles/skip pages as appropriate... Select Case iNodeType Case SITE '=== Code Change RWS ===' 'sNameText = SITETYPES(iSiteType) & " " & L_WEB_SITE_NAME If iSiteType = WEB Then sNameText = L_WEB_SITE_NAME Else sNameText = L_FTP_SITE_NAME End If '=== End Code Change RWS ===' iNextPage = BINDINGS if Instr(oParentNode.KeyType,SVC) = 0 then set oParentNode = GetObject(BASEPATH & SERVICES(iSiteType)) end if Case VDIR sNameText = L_VDIR_NAME iNextPage = PATHNAME if Instr(oParentNode.KeyType,SSITE) <> 0 then set oParentNode = GetObject(oParentNode.ADsPath & ROOT) end if Case DIR sNameText = L_DIR_NAME iNextPage = ACCESSPERMS if Instr(oParentNode.KeyType,SSITE) <> 0 then set oParentNode = GetObject(oParentNode.ADsPath & ROOT) end if End Select sOutputStr = sOutputStr & sTextBox("NodeName", sNameText, 40, "") sOutputStr = sOutputStr & sHidden("hdnParentADsPath", oParentNode.ADsPath) sOutputStr = sOutputStr & sHidden("hdnINodeType", iNodeType) Case BINDINGS sOutputStr = sOutputStr & sTextBox("IPAddress", L_SELECTIP, 25, "") if iSiteType = WEB then sOutputStr = sOutputStr & sTextBoxwDefault("TCPPort", L_ENTERTCP, 5, "", "", CStr(WEBTCPDEFAULT)) sOutputStr = sOutputStr & sTextBox("SSLPort", L_ENTERSSL, 5, "") else sOutputStr = sOutputStr & sTextBoxwDefault("TCPPort", L_ENTERTCP, 5, "", "", CStr(FTPTCPDEFAULT)) end if Case PATHNAME sOutputStr = sOutputStr & sTextBox("VRPath", L_ENTERPATH, 40, "") sOutputStr = sOutputStr & "" if iSiteType = WEB then sOutputStr = sOutputStr & sCheckBox("AllowAnon", L_ALLOWANON) end if if not isSite then iPrevPage = NODENAME end if Case ACCESSPERMS sOutputStr = sOutputStr & sCheckBox("AllowRead", L_ALLOWREAD) sOutputStr = sOutputStr & sCheckBox("AllowWrite", L_ALLOWWRITE) if iSiteType = WEB then sOutputStr = sOutputStr & sCheckBox("AllowScript", L_ALLOWSCRIPT) sOutputStr = sOutputStr & sCheckBox("AllowExecute", L_ALLOWEXECUTE) sOutputStr = sOutputStr & sCheckBox("AllowDirBrowsing", L_ALLOWDIRBROWSING) if isSite then sOutputStr = sOutputStr & sCheckBox("AllowRemote", L_ALLOWREMOTE) end if end if if bNeedPath then iPrevPage = PATHNAME else iPrevPage = NODENAME end if End Select sOutputStr = sOutputStr + "
 " sOutputStr = sOutputStr & "
" sOutputStr = sOutputStr & "
" sWritePage = sOutputStr End Function %> <%= L_WIZARD_TEXT %> <% if Session("canBrowse") then %> <% end if %> " topmargin=0 leftmargin=0> <% if Session("IsIE") and Session("browserver") < 4 then %> <% else %>
<% end if %> <% Select Case iThisPage %> <% Case WELCOME %> <% Case FINISH %> <% Case Else %> <% end Select %> <% if Session("IsIE") and Session("browserver") < 4 then %> <% ' IE3 doesn't do the line well... we're using table-borders instead. %> <% else %> <% end if %>
 
  <%= sWriteWelcome() %>
 
  <%= sFinish() %> <%= sWriteFinish() %>
  <%= sWriteTitle(iThisPage) %>
  <%= sWritePage(iThisPage) %>
<% end if %>