home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iifvs.asp
< prev
next >
Wrap
Text File
|
1997-11-12
|
11KB
|
403 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<% if Session("FONTSIZE") = "" then %>
<!--#include file="iito.inc"-->
<% else %>
<%
' 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,false)
Case "IPPort"
ipport=Binding(1)
writeBinding=inputbox(err,"TEXT","hdnPort",ipport,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly,false)
Case "IPAddress"
ipaddress=Binding(0)
writeBinding=inputbox(err,"TEXT","hdnIPA",ipaddress,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly,false)
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.title.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,Arial; font-size:10pt;">
<font size="1" face="HELV,ARIAL">
<b><%= L_VIRTUALSERVERID_TEXT %></b>
<form name="userform">
<blockquote>
<table border="0" cellpadding="0">
<tr>
<td valign="bottom">
<font size="1" face="HELV,ARIAL">
<%= L_DESCRIPTION_TEXT %>
</font>
</td>
<td valign="bottom" colspan="2">
<font size="1" face="HELV,ARIAL">
<%= text("ServerComment",25,"","","",false,false) %>
</font>
</td>
</tr>
<tr>
<td valign="bottom">
<font size="1" face="HELV,ARIAL">
<%= L_IPADDRESS_TEXT %>
</font>
</td>
<td valign="bottom" colspan="2">
<font size="1" face="HELV,ARIAL">
<%= 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,ARIAL">
<%= L_TCPPORT_TEXT %>
</font>
</td>
<td valign="bottom">
<font size="1" face="HELV,ARIAL">
<%= 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,ARIAL">
<%= printradio("MaxConnections", (currentobj.MaxConnections >=2000000000), "SetMax(0);",true) %>
<%= L_UNLIMITED_TEXT %>
</font>
</td>
</tr>
<tr>
<td valign="bottom">
<font size="1" face="HELV,ARIAL">
<%= 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,ARIAL">
<% if (currentobj.MaxConnections < 2000000000) then %>
<%= inputbox(0,"TEXT","hdnMaxConnections",currentobj.MaxConnections,10,"","", "isNum(this,1,2000000001);SetMaxConn();",True,True,False) %>
<% else %>
<%= inputbox(0,"TEXT","hdnMaxConnections","",10,"","", "isNum(this,1,2000000001);SetMaxConn();",True,True,False) %>
<% end if %>
</td>
<td valign="bottom">
<font size="1" face="HELV,ARIAL">
<%= L_CONNECTIONS_TEXT %>
</font>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td valign="bottom"><font size="1" face="HELV,ARIAL"><%= 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,ARIAL">
<%= L_SECONDS_TEXT %>
</font>
</td>
</tr>
<tr>
<td colspan="2" height="4"></td>
</tr>
</table>
</blockquote>
<hr>
<font size="1" face="HELV,ARIAL">
<%
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.title.Global.updated=true;">
<% else %>
<input type="checkbox" name="hdnLogState" onclick="setState(this.checked,document.userform.hdnBtnLogProps);setState(this.checked,document.userform.LogPlugInClsid);top.title.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,ARIAL">
<%= 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 %>
<% if Session("FONTSIZE") = "LARGE" then %>
<input type="button" name="hdnBtnLogProps" value="<%= L_EDIT_TEXT %>" onclick="popBox('LogDetail',450,400,'iilog');">
<% else %>
<input type="button" name="hdnBtnLogProps" value="<%= L_EDIT_TEXT %>" onclick="popBox('LogDetail',400,400,'iilog');">
<% end if %>
<% 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>
<% end if %>