home *** CD-ROM | disk | FTP | other *** search
- <%@ LANGUAGE=VBScript %>
- <%Option Explicit %>
-
- <%
- ' strings for localization
- Const L_ACCESSDENIED_TEXT="Access Denied"
- Const L_ENTERINT_ERRORMESSAGE="Please enter an integer."
- Const L_UNSAVEDCHANGES_ERRORMESSAGE="You have unsaved changes. Save now?"
- Const L_VIRTUALSERVERID_TEXT="FTP Site Identification"
- Const L_HOSTHEADER_TEXT="Host header name"
- Const L_DESCRIPTION_TEXT="Description:"
- Const L_IPADDRESS_TEXT="IP address:"
- Const L_TCPPORT_TEXT="TCP port:"
- Const L_SSLPORT_TEXT="SSL port:"
- Const L_UNLIMITED_TEXT="Unlimited"
- Const L_LIMITTO_TEXT="Limit to:"
- Const L_CONNPARAMS_TEXT="Connection"
- Const L_MAXCON_TEXT="Maximum connections:"
- Const L_CONNTIMEOUT_TEXT="Connection timeout:"
- Const L_SECONDS_TEXT="seconds"
- Const L_ADVANCED_TEXT="Advanced..."
- Const L_ALLUNASSIGNED_TEXT="All Unassigned"
- Const L_CONNECTIONS_TEXT="connections"
- Const L_NONE_TEXT="None"
- Const L_SAVING_TEXT="Saving..."
- Const DEFAULTPORT = 21
- Const L_LOGGING_TEXT="Enable Logging"
- Const L_LOGFORMAT_TEXT="Active log format:"
- Const L_NONEINSTALLED_TEXT = " [No logging modules are currently installed] "
- Const L_EDIT_TEXT = "Properties..."
-
- On Error Resume Next
-
- Dim path, currentobj
-
- path=Session("spath")
- Session("path")=path
- Session("SpecObj")=""
- Session("SpecProps")=""
- Set currentobj=GetObject(path)
-
- %>
-
- <!--#include file="iiset.inc"-->
-
- <!--#include file="iibind.inc"-->
-
- <%
-
- function writeBinding(fieldname,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
- On Error Resume Next
-
- Dim aBinding, Binding,host, ipport, ipaddress
-
- aBinding=currentobj.ServerBindings
-
-
- if IsArray(aBinding) then
- if aBinding(0) = "" then
- aBinding(0) = ":" & DEFAULTPORT & ":"
- end if
- Binding=getBinding(aBinding(0))
- else
- if aBinding = "" then
- aBinding = ":" & DEFAULTPORT & ":"
- end if
- Binding=getBinding(aBinding)
- end if
-
- Select Case fieldname
- Case "Host"
- host=Binding(2)
- writeBinding=inputbox(err,"TEXT","hdnHost",host,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
-
- Case "IPPort"
- ipport=Binding(1)
- writeBinding=inputbox(err,"TEXT","hdnPort",ipport,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
-
- Case "IPAddress"
- ipaddress=Binding(0)
- writeBinding=inputbox(err,"TEXT","hdnIPA",ipaddress,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
- End Select
-
- end function
-
- function writeLogTypes(fieldname,value, id, adminonly)
- On Error Resume Next
-
- if id = currentobj.LogPlugInClsid then
- writeLogTypes="<OPTION SELECTED VALUE='" & id & "'>" & value
- else
- writeLogTypes="<OPTION VALUE='" & id & "'>" & value
- end if
- end function
- %>
-
-
-
- <html>
-
- <head>
- <title></title>
- <script language="JavaScript">
-
- top.head.Global.helpFileName="iipz";
-
- function SetBinding(){
- document.userform.ServerBindings.value=document.userform.hdnIPA.value + ":" + document.userform.hdnPort.value + ":";
- }
-
- function isNum(txtcntrl,min,max) {
- str=txtcntrl.value;
- for (var i=0; i < str.length; i++) {
- num = parseInt(str);
- if (isNaN(num)){
- alert("Please enter an integer.");
- return false;
- }
- if (num < min) {
- alert("Please enter an integer greater than " + (min-1) + ".");
- return false;
- }
- if (num > max) {
- alert("Please enter an integer less than " + (max + 1) + ".");
- return false;
- }
- }
- return true;
- }
-
- function SetMax(theIndex){
- if (theIndex==1) {
- if (document.userform.hdnhdnMaxConnections.value !=""){
- document.userform.hdnMaxConnections.value=document.userform.hdnhdnMaxConnections.value;
- }
- }
- else {
- if (document.userform.hdnMaxConnections.value !=""){
- document.userform.hdnhdnMaxConnections.value=document.userform.hdnMaxConnections.value;
- }
- document.userform.hdnMaxConnections.value=2000000000;
- }
- SetMaxConn();
-
- }
-
- function SetrdoMax(){
- document.userform.rdoMaxConnections[1].checked=true;
- document.userform.hdnhdnMaxConnections.value=document.userform.hdnMaxConnections.value;
- }
-
- function SetMaxConn(){
- curval=parseInt(document.userform.hdnMaxConnections.value);
- if (curval >=2000000000){
- document.userform.rdoMaxConnections[0].checked=true;
- document.userform.MaxConnections.value=2000000000;
- document.userform.hdnMaxConnections.value="";
- }
- else{
- document.userform.MaxConnections.value=document.userform.hdnMaxConnections.value;
- }
-
- }
-
- function setState(mState,mControl){
- <% if Session("Browser") = "IE4" then %>
- mControl.disabled = ! mState;
- <% end if %>
- }
-
- function setLogUIType(logCntrl){
-
- var logName = logCntrl.options[logCntrl.selectedIndex].text;
-
- var logType = "";
-
- if (logName.indexOf("Ext") > -1){
- logType = "EXT";
- }
- if (logName.indexOf("ODBC") > -1) {
- logType = "ODBC";
- }
-
- top.connect.location.href = "iisess.asp?setLogUI=" + logType;
- }
-
-
- 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;
- }
- }
- }
-
-
-
- </script>
- </head>
-
- <body bgcolor="#CCCCCC" topmargin="5" text="#000000" style="font-face: Helv; font-size: 8pt;">
- <font size="1" face="Helv">
- <b><%= L_VIRTUALSERVERID_TEXT %></b>
- <form name="userform">
- <blockquote>
-
- <table border="0" cellpadding="0">
-
- <tr>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= L_DESCRIPTION_TEXT %>
- </font>
- </td>
- <td valign="bottom" colspan="2">
- <font size="1" face="Helv">
- <%= text("ServerComment",25,"","","",false,false) %>
- </font>
- </td>
- </tr>
-
- <tr>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= L_IPADDRESS_TEXT %>
- </font>
- </td>
- <td valign="bottom" colspan="2">
- <font size="1" face="Helv">
- <%= writeBinding("IPAddress",15,"","","SetBinding();",false,true) %>
- <input type="hidden" name="ServerBindings" value="<%= currentobj.ServerBindings(0)(0) %>">
- </font>
- </td>
- </tr>
-
- <tr>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= L_TCPPORT_TEXT %>
- </font>
- </td>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= writeBinding("IPPort",5,"","","isNum(this);SetBinding();",false,true) %>
- </font>
- </td>
- </tr>
-
- </table>
-
- </blockquote>
-
- <hr>
-
- <b><%= L_CONNPARAMS_TEXT %></b>
-
- <blockquote>
-
- <table border="0" cellpadding="0">
- <tr>
- <td colspan="2">
- <font size="1" face="Helv">
- <%= printradio("MaxConnections", (currentobj.MaxConnections >=2000000000), "SetMax(0);",true) %>
- <%= L_UNLIMITED_TEXT %>
- </font>
- </td>
- </tr>
-
-
- <tr>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= printradio("MaxConnections", (currentobj.MaxConnections < 2000000000), "SetMax(1);",true) %>
- <%= L_LIMITTO_TEXT %><input type="hidden" name="MaxConnections" value="<%= currentobj.MaxConnections %>">
- </font>
- </td>
- <td valign="bottom">
- <font size="1" face="Helv">
- <% if (currentobj.MaxConnections < 2000000000) then %>
- <%= inputbox(0,"TEXT","hdnMaxConnections",currentobj.MaxConnections,10,"","", "isNum(this,1,2000000001);SetMaxConn();",True,True) %>
- <% else %>
- <%= inputbox(0,"TEXT","hdnMaxConnections","",10,"","", "isNum(this,1,2000000001);SetMaxConn();",True,True) %>
- <% end if %>
-
-
- </td>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= L_CONNECTIONS_TEXT %>
- </font>
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
-
- <tr>
- <td valign="bottom"><font size="1" face="Helv"><%= L_CONNTIMEOUT_TEXT %> </font></td>
- <td valign="bottom">
- <%= text("ConnectionTimeout",10,"","", "isNum(this,1,2147483646);",True,True) %>
- </td>
- <td valign="bottom">
- <font size="1" face="Helv">
- <%= L_SECONDS_TEXT %>
- </font>
- </td>
- </tr>
-
- <tr>
- <td colspan="2" height="4"></td>
- </tr>
-
- </table>
-
- </blockquote>
-
- <hr>
- <font size="1" face="Helv">
-
- <%
- On Error Resume Next
- Dim LoggingModules,noLogging, Module
-
- Set LoggingModules = GetObject("IIS://localhost/logging")
- if err <> 0 then
- noLogging = True
- end if
-
- %>
- <% if noLogging then %>
- <img align="top" src="images/checkoff.gif" width="13" height="13">
- <% else %>
- <% if currentobj.LogPluginClsid <> "" then %>
- <input type="checkbox" name="hdnLogState" checked onclick="setState(this.checked,document.userform.hdnBtnLogProps);setState(this.checked,document.userform.LogPlugInClsid);top.head.Global.updated=true;">
- <% else %>
- <input type="checkbox" name="hdnLogState" onclick="setState(this.checked,document.userform.hdnBtnLogProps);setState(this.checked,document.userform.LogPlugInClsid);top.head.Global.updated=true;">
- <% end if %>
- <%= checkbox("hdnLogState",,false) %>
- <% end if %>
- <%= L_LOGGING_TEXT %>
-
- <blockquote>
-
- <table border="0" cellpadding="0">
- <tr>
- <td colspan="1">
- <font size="1" face="Helv">
- <%= L_LOGFORMAT_TEXT %>
- <select size="1" name="LogPlugInClsid" onchange="setLogUIType(this);">
- <%
-
- if noLogging then
- Response.write "<OPTION>" & L_NONEINSTALLED_TEXT & "</OPTION>"
- else
- For Each Module in LoggingModules
- Response.write writeLogTypes("LogPluginClsid", Module.Name, Module.LogModuleId,false)
- Next
- end if
- %>
- </select>
- </font>
- </td>
- <td>
- <% if not noLogging then %>
- <input type="button" name="hdnBtnLogProps" value="<%= L_EDIT_TEXT %>" onclick="popBox('LogDetail',400,400,'iilog');">
- <% end if %>
- </td>
- </tr>
-
- </table>
-
- </blockquote>
- </form>
- </font>
- <% if not noLogging then %>
- <script language="JavaScript">
- setState(document.userform.hdnLogState.checked,document.userform.LogPlugInClsid);
- setState(document.userform.hdnLogState.checked,document.userform.hdnBtnLogProps)
- setLogUIType(document.userform.LogPlugInClsid)
- </script>
- <% end if %>
- </body>
- </html>
-
-
-