% '---------------------------------------------------------------------------- ' ' ' File: smtree.asp ' ' Description: First menu page ' ' Copyright (C) 1997 Microsoft Corporation ' '------------------------------------------------------------------------------ %> <% REM LOCALIZATION TEXT L_NOTIMPLEMENTED_ERRORMESSAGE = "This feature is not yet implemented." L_WORKINGSERVER_TEXT = "You cannot change the status of the web server you are currently connected to." L_CONNECT_TEXT = "Connect..." L_NEWDOTDOTDOT_TEXT = "New..." L_DELETE_TEXT = "Delete" L_PROPS_TEXT = "Properties" L_BROWSE_TEXT = "Browse" L_SERVICE_NOT_STARTED_ERRORMESSAGE = "The SMTP Service is not running, you cannot view/edit the properties unless the Service is Started." L_START_TEXT ="Start" L_STOP_TEXT = "Stop" L_PAUSE_TEXT = "Pause" L_RESUME_TEXT = "Resume" L_REFRESH_TEXT = "Refresh" L_RELEASE_TEXT = "Release" L_ENTERNAME_TEXT = "Enter the name of the new SMTP Site" L_NEW_TEXT = "New" L_WEBSITE_TEXT = "Web Site" L_VDIR_TEXT = "Virtual Directory" L_DIR_TEXT = "Directory" L_SERVICE_ALREADY_STARTED_TEXT = "The service is already started." L_SERVICEALREADY_TEXT = "The service is already " REM END LOCALIZATION %> <% REM Get pointer to admin object to create new instance %> <% On Error Resume Next set smtpadmin = Server.CreateObject("SmtpAdm.Admin.1") if (Err <> 0) then %> <% end if %> <% On Error Resume Next smtpadmin.Server = Session("svr") if (Err <> 0) then %> <% end if %> <% On Error Resume Next smtpadmin.ServiceInstance = Session("ServiceInstance") if (Err <> 0) then %> <% end if %> <% action = Request("action") %> <% if (action = "add") then %> <% REM unescape \ and : characters from file path %> <% newDirectory = Cstr(Request("newDirectory")) %> <% newDirectory = Replace(newDirectory,"%5C","\") %> <% newDirectory = Replace(newDirectory,"%3A",":") %> <% REM RetVal is the new instance id %> <% On Error Resume Next %> <% newInstanceId = smtpadmin.CreateInstance(newDirectory) %> <% if (Err <> 0) then %> <% else %> <% REM reload the header file to refresh the tree %> <% end if %> <% end if %>
<% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
![]() |
<%=L_CONNECT_TEXT%> |
![]() |
<%=L_PROPS_TEXT%> |
![]() |
<%=L_START_TEXT%> |
![]() |
<%=L_STOP_TEXT%> |
![]() |
<%=L_PAUSE_TEXT%> |
![]() |
<%=L_RESUME_TEXT%> |