%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<% if Session("FONTSIZE") = "" then %>
<% 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="Web Site Identification"
Const L_WORKINGSERVER_TEXT="Warning! You are changing a property on the site you are currently connected to, and may disable your remote session."
Const L_MULTIBINDING_TEXT="This resource has multiple bindings"
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_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..."
Const DEFAULTPORT = 80
Const L_DEFAULTMAXCONNECTIONS_NUM = 1000
Const L_CHGBINDING_TEXT="WARNING!\r\rYou are modifying the bindings of the server you are currently connected to. Changing these bindings will result In you loosing connection to this site.\r\rAre you sure you want to continue?"
Const L_SAVING_TEXT="Saving..."
'On Error Resume Next
Dim blanks,path,currentobj, ipport, ipaddress, readonly,i, multibind, oWebService
path=Session("spath")
Session("path")=path
Session("SpecObj")=path
Session("SpecProps")="ServerBindings"
Set currentobj=GetObject(path)
blanks=""
for i=0 to 23
blanks=blanks & " "
Next
%>
<%
function writeBinding(fieldname,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly)
On Error Resume Next
Dim aBinding, aSecBinding
Dim Binding
Dim SecBinding
Dim host,ipport, ipaddress, secport, j
aBinding=currentobj.ServerBindings
if Session("vtype") = "svc" then
multibind = false
readonly = true
Binding=getBinding(aBinding(0))
else
if aBinding(0) <> "" then
'global readonly variable...
multibind=(UBound(aBinding)>0)
readonly = multibind
Binding=getBinding(aBinding(0))
else
readonly=false
aBinding(0)=":" & DEFAULTPORT & ":"
Binding=getBinding(aBinding(0))
end if
end if
if fieldname="Host" then
host=Binding(2)
if readonly then
if host="" then
host="(none)"
end if
writeBinding=host
else
writeBinding=inputbox(err,"hidden","hdnHost",host,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly,False)
end if
elseif fieldname="IPPort" then
ipport=Binding(1)
if readonly then
if ipport="" then
ipport=DEFAULTPORT
end if
writeBinding=ipport
else
writeBinding=inputbox(err,"TEXT","hdnPort",ipport,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly,False)
end if
elseif fieldname="IPAddress" then
ipaddress=Binding(0)
if ipaddress="" then
ipaddress=L_ALLUNASSIGNED_TEXT
end if
if readonly then
writeBinding=ipaddress
else
writeBinding=inputbox(err,"TEXT","hdnIPA",ipaddress,fieldsize,onchangeproc,onfocusproc, onblurproc,True,adminonly,False)
end if
elseif fieldname="SecureBinding" then
secPort=""
aSecBinding=currentobj.SecureBindings
if aSecBinding(0) <> "" then
arraybound=UBound(aSecBinding)
for j=0 to arraybound
SecBinding=getBinding(aSecBinding(0))
if SecBinding(0)=Binding(0) then
secPort=SecBinding(1)
exit for
end if
Next
end if
if readonly then
writeBinding=secPort
else
writeBinding=inputbox(err,"TEXT","hdnSecBinding",secPort,fieldsize,onchangeproc,onfocusproc, onblurproc,hidden,adminonly,False)
end if
end if
end function
function allBindings()
dim sBinding,sBindingList
for each sBinding in currentobj.ServerBindings
sBindingList = sBindingList & sBinding & ","
next
allBindings = sBindingList
end function
function writeLogTypes(fieldname,value, id, adminonly)
On Error Resume Next
if id = currentobj.Get("LogPluginClsid") then
writeLogTypes="