home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_03.cab
/
iiperf.asp
< prev
next >
Wrap
Text File
|
1997-11-14
|
9KB
|
339 lines
<%@ LANGUAGE=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<% if Session("FONTSIZE") = "" then %>
<!--#include file="iito.inc"-->
<% else %>
<%
' strings for localization
Const L_PERFORMANCE_TEXT = "Performance"
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_CONNECTIONCONFIG_TEXT="Connection Configuration"
Const L_KEEPALIVES_TEXT="HTTP Keep Alives enabled"
Const L_TUNING_TEXT="Tuning"
Const L_TUNESERVER_TEXT="Tune your server performance based on the number of hits expected per day."
Const L_FEWER_TEXT="Fewer than"
Const L_MORE_TEXT="More than"
Const L_10000_TEXT="10,000"
Const L_100000_TEXT="100,000"
Const L_ENABLEBANDWIDTH_TEXT="Enable Bandwidth Throttling"
Const L_LIMITNET_TEXT="Limit network bandwidth available to this Web site. This number cannot be more than the global setting on machine properties."
Const L_KBS_TEXT="KB/S"
Const L_MAXNETUSAGE_TEXT="Maximum network use:"
Const L_SAVING_TEXT="Saving..."
On Error Resume Next
Dim path, currentobj, mbw, maxtext
path=Session("spath")
Session("path")=path
Session("SpecObj")=""
Session("SpecProps")=""
Set currentobj=GetObject(path)
%>
<!--#include file="iiset.inc"-->
<%
function writeSlider(prop, stops, width, selnum)
dim slidestr, i
slidestr="<IMG SRC='images/sliderend.gif' WIDTH=1 HEIGHT=26 BORDER=0>"
for i=0 to stops-2
slidestr=slidestr & drawStop(i,prop, selnum)
slidestr=slidestr & "<IMG SRC='images/slidersp.gif' WIDTH=" & width & " HEIGHT=26 BORDER=0>"
Next
slidestr=slidestr & drawStop(i, prop, selnum)
slidestr=slidestr & "<IMG SRC='images/sliderend.gif' WIDTH=1 HEIGHT=26 BORDER=0>"
writeSlider=slidestr
end function
function drawStop(curr,prop, selnum)
dim thisname, slidestr,formname
thisname=quote & prop & curr & quote
if Session("IsIE") then
formname = "parent.document.userform."
else
formname = "document.userform."
end if
slidestr="<A HREF='javascript:moveSlider(" & formname & prop & ", " & quote & prop & quote & "," & curr & ")'>"
if curr=selnum then
drawStop=slidestr & "<IMG NAME=" & thisname & " SRC='images/slideron.gif' WIDTH=11 HEIGHT=26 BORDER=0></A>"
else
drawStop=slidestr & "<IMG NAME=" & thisname & " SRC='images/slideroff.gif' WIDTH=11 HEIGHT=26 BORDER=0></A>"
end if
end function
%>
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT LANGUAGE="JavaScript">
top.title.Global.helpFileName="iipy_30";
top.title.Global.siteProperties = true;
<% if not Session("IsIE") then %>
slideron=new Image(11,26);
slideron.src="images/slideron.gif";
slideroff=new Image(11,26);
slideroff.src="images/slideroff.gif";
lastslide="ServerSize<%= currentobj.ServerSize %>";
<% end if %>
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;
}
else{
txtcntrl.value = parseInt(str);
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 SetMaxBW(isChecked){
if (isChecked){
if (document.userform.hdnhdnMaxBandwidth.value == "")
{
document.userform.hdnhdnMaxBandwidth.value = 1024;
}
document.userform.hdnMaxBandwidth.value=document.userform.hdnhdnMaxBandwidth.value;
document.userform.MaxBandwidth.value = document.userform.hdnhdnMaxBandwidth.value * 1024;
}
else{
document.userform.hdnhdnMaxBandwidth.value=document.userform.hdnMaxBandwidth.value;
document.userform.hdnMaxBandwidth.value="";
document.userform.MaxBandwidth.value = -1;
}
}
function calcBW(thiscntrl){
if (thiscntrl.value == ""){
document.userform.hdnchkMaxBandwith.checked = false;
SetMaxBW(false);
}
else{
str = stripChar(thiscntrl.value,",");
num = parseInt(str);
if (!isNaN(num)){
document.userform.MaxBandwidth.value = num * 1024;
}
}
}
function stripChar(str,chr){
while (str.indexOf(chr) != -1){
str = str.substring(0,str.indexOf(chr)) + str.substring(str.indexOf(chr)+1,str.length);
}
return str;
}
function moveSlider(control, prop,num){
top.title.Global.updated=true;
<% if Session("IsIE") then %>
slideurl="iislider.asp?selnum="+num+"&stops=3&width=180&prop="+prop;
control.value=num;
document.Slider.location.href=slideurl;
<% else %>
turnSlideOff(lastslide);
lastslide=prop+num;
thisprop=prop+num;
document [thisprop].src=slideron.src;
control.value=num;
<% end if %>
}
function turnSlideOff(prop){
document [prop].src=slideroff.src;
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" LINK="#000000" STYLE="font-face: Helv,Arial; font-size:10pt;">
<FONT SIZE=1 FACE="Helv,Arial">
<B><%= L_PERFORMANCE_TEXT %></B>
<P>
<%= L_TUNING_TEXT %>
<BLOCKQUOTE>
<TABLE>
<TR>
<TD><FONT SIZE=1 FACE="Helv,Arial">
<%= L_TUNESERVER_TEXT %><P>
<TABLE BORDER=0>
<TR>
<TD COLSPAN=5><FONT SIZE=1 FACE="Helv,Arial">
<% if Session("IsIE") then %>
<IFRAME NAME="Slider" HEIGHT=30 FRAMEBORDER=0 WIDTH=415 SRC="iislider.asp?stops=3&width=180&prop=ServerSize&selnum=<%= currentobj.ServerSize %>">
</IFRAME>
<% else %>
<%= writeSlider("ServerSize", 3, 180, currentobj.ServerSize) %>
<% end if %>
<FONT FACE="Helv,Arial" SIZE=1>
</FONT>
</TD>
</TR>
<TR>
<TD WIDTH= 130 ALIGN="left">
<FONT FACE="Helv,Arial" SIZE=1>
<A HREF="javascript:moveSlider(document.userform.ServerSize,'ServerSize',0)">
<%= L_FEWER_TEXT %><BR>
<%= L_10000_TEXT %>
</A>
</FONT>
</TD>
<TD WIDTH= 130 ALIGN="center">
<FONT FACE="Helv,Arial" SIZE=1>
<A HREF="javascript:moveSlider(document.userform.ServerSize,'ServerSize',1)">
<%= L_FEWER_TEXT %><BR>
<%= L_100000_TEXT %>
</A>
</FONT>
</TD>
<TD WIDTH= 130 ALIGN="right">
<FONT FACE="Helv,Arial" SIZE=1>
<A HREF="javascript:moveSlider(document.userform.ServerSize,'ServerSize',2)">
<%= L_MORE_TEXT %><BR>
<%= L_100000_TEXT %>
</A>
</FONT>
</TD>
</TR>
</TABLE>
</FONT>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<HR>
<FORM NAME="userform">
<FONT SIZE=1 FACE="Helv,Arial">
<INPUT TYPE="hidden" NAME="ServerSize" VALUE="<%= currentobj.ServerSize %>">
<% if Session("vtype") <> "svc" then %>
<%= checkboxVal(0, currentobj.MaxBandwidth > 0 , "hdnchkMaxBandwith", "SetMaxBW(this.checked);", True) %>
<%= L_ENABLEBANDWIDTH_TEXT %></B>
<BLOCKQUOTE>
<TABLE>
<TR>
<TD COLSPAN=2>
<FONT SIZE=1 FACE="Helv,Arial">
<%
if currentobj.MaxBandwidth < 0 then
mbw = ""
else
mbw = currentobj.MaxBandwidth/1024
end if
%>
<%= L_LIMITNET_TEXT %><P>
<%= L_MAXNETUSAGE_TEXT %> <%= inputbox(0,"text","hdnMaxBandwidth",mbw,10,"","","isNum(this,1,32767);calcBW(this);",True,True, not Session("IsAdmin") ) %> <%= L_KBS_TEXT %>
<INPUT TYPE="hidden" NAME="MaxBandwidth" VALUE="<%= currentobj.MaxBandwidth%>">
</FONT>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<% else %>
<FONT SIZE=1 FACE="Helv,Arial" COLOR="Gray">
<IMG SRC="images/checkoff.gif" WIDTH=13 HEIGHT=13 BORDER=0>
<%= L_ENABLEBANDWIDTH_TEXT %>
</B>
<BLOCKQUOTE>
<TABLE BORDER = 0 WIDTH = 500>
<TR>
<TD COLSPAN=4>
<FONT SIZE=1 FACE="Helv,Arial" COLOR="Gray">
<%= L_LIMITNET_TEXT %><P>
</FONT>
</TD>
</TR>
<TR>
<TD WIDTH = 125>
<FONT SIZE=1 FACE="Helv,Arial" COLOR="Gray">
<%= L_MAXNETUSAGE_TEXT %>
</FONT>
</TD>
<TD WIDTH =75>
<FONT SIZE=1 FACE="Helv,Arial" COLOR="Gray">
<%
maxtext = disableintstart & " " & disabletextend
%>
<%= maxtext %>
</FONT>
</TD>
<TD WIDTH =25>
<FONT SIZE=1 FACE="Helv,Arial" COLOR="Gray">
<%= L_KBS_TEXT %>
</FONT>
</TD>
<TD WIDTH =275>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
</FONT>
<% end if %>
<HR>
<%= L_CONNECTIONCONFIG_TEXT %>
<BLOCKQUOTE>
<TABLE>
<TR>
<TD COLSPAN=2>
<FONT SIZE=1 FACE="Helv,Arial">
<%= checkbox("AllowKeepAlive","",True) %> <%= L_KEEPALIVES_TEXT %>
</FONT>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
</FORM>
<% if Session("vtype") <> "svc" then %>
<SCRIPT LANGUAGE="JavaScript">
if (document.userform.MaxBandwidth.value==-1){
document.userform.MaxBandwidth.value=""
}
</SCRIPT>
<% end if %>
</FONT>
</BODY>
</HTML>
<% end if %>