% Response.Expires = 0 %> <% L_PAGETITLE_TEXT = "Microsoft SMTP Server Administration" L_NAME_TEXT = "Name:" L_PATH_TEXT = "Path:" L_DIRECTORYSON_TEXT = "Directories on:" L_CANNOT_REMOVE_DIRECTORY_ERRORMESSAGE = "Cannot remove directory. A minimum of one directory is required." L_REMOVE_HOME_DIRECTORY_ERRORMESSAGE = "If you remove the home directory, you may not be able to configure the server in the future. Are you sure you want to remove the home directory?" L_REMOVE_THIS_DIRECTORY_TEXT = "Are you sure you want to remove this directory?" %> <% REM Directories Page head frame (in frameset with head, list) %> <% REM Get variables %> <% REM svr = Server name %> <% REM a = Action to be performed by server-side code (remove) %> <% REM SelectedDir = Directory edited by smdired.asp %> <% svr = Session("svr") %> <% a = Request("a") %> <% SelectedDir = Request("SelectedDir") %> <% REM Index of Directory to Remove %> <% removeIndex = Request("removeIndex") %> <% REM Include _cnst file to force logon by anonymous users (if access denied, body of file ignored) %> <% if (cont = true) then %> <% On Error Resume Next %> <% Set admin = Server.CreateObject("Smtpadm.Admin.1") %> <% if (Err <> 0) then %> <% end if %> <% On Error Resume Next %> <% admin.server = svr %> <% if (Err <> 0) then %> <% end if %> <% On Error Resume Next %> <% admin.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0) then %> <% end if %> <% REM Instantiate Virtual Server object %> <% On Error Resume Next %> <% Set VServer = admin.VirtualServerAdmin %> <% if (Err <> 0) then %> <% end if %> <% REM Set Server %> <% On Error Resume Next %> <% VServer.Server = svr %> <% if (Err <> 0) then %> <% end if %> <% REM Set Service Instance %> <% On Error Resume Next %> <% VServer.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0) then %> <% end if %> <% REM Get pointer to VirtualRoots %> <% On Error Resume Next %> <% set Vroots = admin.VirtualDirectoryAdmin %> <% if (Err <> 0) then %> <% end if %> <% REM Set Server %> <% On Error Resume Next %> <% Vroots.server = svr %> <% if (Err <> 0) then %> <% end if %> <% REM Set Service Instance %> <% On Error Resume Next %> <% Vroots.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0) then %> <% end if %> <% REM Enumerate Vroots %> <% On Error Resume Next %> <% Vroots.Enumerate %> <% if (Err <> 0) then %> <% end if %> <% REM Perform remove action %> <% if (a = "remove") then %> <% On Error Resume Next %> <% Vroots.GetNth(removeIndex) %> <% if (Err <> 0) then %> <% end if %> <% On Error Resume Next %> <% Vroots.Delete %> <% if (Err <> 0) then %> <% end if %> <% end if %>
![]() |
||
<%= L_NAME_TEXT %> | <%= L_PATH_TEXT %> |