home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_03.cab / iicomp.asp < prev    next >
Text File  |  1997-11-12  |  5KB  |  180 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <% if Session("FONTSIZE") = "" then %>
  6.     <!--#include file="iito.inc"-->
  7. <% else %>
  8.  
  9. <% 
  10. Const L_ENTERINTEGER_ERRORMESSAGE="Please enter an integer"
  11. Const L_UNSAVEDCHANGES_ERRORMESSAGE="You have unsaved changes. Save now?"
  12. Const L_IIS_TEXT="Internet Information Server"
  13. Const L_ENABLETHROTTLE_TEXT="Enable Bandwith Throttling"
  14. Const L_LIMIT_TEXT="Limit network use by all Internet Information Server Virtual Servers on this computer."
  15. Const L_MAXUSAGE_TEXT="Maximum Network Use:"
  16. Const L_MASTER_TEXT="Master Properties"
  17. Const L_EDITPROPERTIES_TEXT="Edit the properties inherited by all Virtual Servers created on this computer."
  18. Const L_WWWSERVICE_TEXT="WWW Service"
  19. Const L_FTPSERVICE_TEXT="FTPSERVICE"
  20. Const L_EDIT_TEXT="Edit..."
  21. Const L_ACCESSDENIED_TEXT="Access Denied" 
  22. Const L_ENABLEBANDWIDTH_TEXT="Enable Bandwidth Throttling"
  23. Const L_LIMITNET_TEXT="Limit network use by all Internet Information Services on this computer."
  24. Const L_KBS_TEXT="KB/S"
  25. Const L_MAXNETUSAGE_TEXT="Maximum network use:"
  26.  
  27. Const L_MIMEMAP_TEXT = "MIME Map"
  28. Const L_CONFIGURE_TEXT = "To configure the MIME types the Web Service sends to browsers in the HTTP header, click File Types"
  29. Const L_FILETYPES_TEXT="File Types..."
  30.  
  31.  
  32.  
  33. On Error Resume Next 
  34.  
  35. Dim path, currentobj, L_TITLE_TEXT, mbw
  36.  
  37. L_TITLE_TEXT = "Server Properties - [" & Request.ServerVariables("SERVER_NAME")  &"]"
  38.  
  39. path=Session("dpath")
  40. Session("path")=path
  41. Session("SpecObj")=""
  42. Session("SpecProps")=""
  43. Set currentobj=GetObject(path)
  44.  %>
  45.  
  46. <!--#include file="iiset.inc"-->
  47.  
  48. <HTML>
  49. <HEAD>
  50. <TITLE><%= L_TITLE_TEXT %></TITLE>
  51. <SCRIPT LANGUAGE="JavaScript">
  52.  
  53.     function loadHelp(){
  54.         top.title.Global.helpFileName="iipx";
  55.     }
  56.  
  57.     function isNum(txtcntrl,min,max) {
  58.         str=txtcntrl.value;
  59.         for (var i=0; i < str.length; i++) {
  60.               num = parseInt(str);
  61.             if (isNaN(num)){
  62.                    alert("Please enter an integer.");
  63.                 return false;
  64.               }
  65.             else{
  66.                 if (num < min) {
  67.                     alert("Please enter an integer greater than " + (min-1) + ".");
  68.                     return false;
  69.                 }
  70.                 if (num > max) {
  71.                     alert("Please enter an integer less than " + (max + 1) + ".");
  72.                     return false;
  73.                 }            
  74.             }
  75.          }
  76.         return true;
  77.     }
  78.  
  79.     function SetMaxBW(isChecked){
  80.         if (isChecked){
  81.             document.userform.hdnMaxBandwidth.value=document.userform.hdnhdnMaxBandwidth.value;
  82.             document.userform.MaxBandwidth.value = document.userform.hdnhdnMaxBandwidth.value;
  83.         }
  84.         else{
  85.             document.userform.hdnhdnMaxBandwidth.value=document.userform.hdnMaxBandwidth.value;
  86.             document.userform.hdnMaxBandwidth.value="";
  87.             document.userform.MaxBandwidth.value = -1;
  88.         }
  89.     }
  90.     
  91.     function calcBW(thiscntrl){
  92.         num = parseInt(thiscntrl.value);
  93.         if (!isNaN(num)){
  94.         document.userform.MaxBandwidth.value = thiscntrl.value * 1024;
  95.         }
  96.     }
  97.  
  98.  
  99.     function popBox(title, width, height, filename){
  100.         thefile=(filename + ".asp");
  101.         thefile="iipop.asp?pg="+thefile;
  102.         <% if Session("Browser") <> "IE3" then %>
  103.             width=width +25;
  104.             height=height + 50;                
  105.         <% end if %>
  106.  
  107.         popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  108.         if(popbox !=null){
  109.             if (popbox.opener==null){
  110.                 popbox.opener=self;
  111.             }
  112.         }
  113.     }
  114.     
  115.  
  116. </SCRIPT>
  117. </HEAD>
  118.  
  119. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 LEFTMARGIN=5 TEXT="#000000" onLoad="loadHelp();">
  120.  
  121. <FONT SIZE=1 FACE="Helv,ARIAL">
  122. <B><%= L_IIS_TEXT %></B>
  123.  
  124. <FORM NAME="userform" onSubmit="return false">
  125. <BLOCKQUOTE>
  126.  
  127. <% if currentobj.MaxBandwidth > 0 then %>
  128.     <INPUT TYPE="checkbox" NAME="hdnchkMaxBandwith" CHECKED onClick="SetMaxBW(this.checked);top.title.Global.updated=true;">
  129. <% else %>
  130.     <INPUT TYPE="checkbox" NAME="hdnchkMaxBandwith" onClick="SetMaxBW(this.checked);top.title.Global.updated=true;">
  131. <% end if %>
  132.  <%= L_ENABLEBANDWIDTH_TEXT %>
  133. </B>
  134. <BLOCKQUOTE>
  135. <TABLE>
  136. <TR>
  137.     <TD COLSPAN=2>
  138.         <FONT SIZE=1 FACE="Helv,ARIAL">
  139.         <%= L_LIMITNET_TEXT %><P>
  140.  
  141.         <%= L_MAXNETUSAGE_TEXT %> 
  142.         
  143.         <%
  144.         if currentobj.MaxBandwidth < 0 then
  145.             mbw = ""
  146.         else
  147.             mbw = currentobj.MaxBandwidth/1024
  148.         end if
  149.         %>
  150.         
  151.         <%= inputbox(0,"text","hdnMaxBandwidth",mbw,10,"","","isNum(this,1,32767);calcBW(this);",true,false,false) %> 
  152.         <%= L_KBS_TEXT %>
  153.         <INPUT TYPE="hidden" NAME="MaxBandwidth" VALUE="<%= currentobj.MaxBandwidth%>">
  154.         </FONT>
  155.     </TD>
  156. </TR>
  157. </TABLE>
  158.  
  159. </BLOCKQUOTE>
  160.  
  161. </BLOCKQUOTE>
  162.  
  163. <HR>
  164. <FONT SIZE=1 FACE="Helv,ARIAL">
  165. <B><%=L_MIMEMAP_TEXT%></B>
  166. </FONT>
  167.  
  168. <TABLE>
  169. <TR>
  170.     <TD><IMG SRC="images/mime.gif" WIDTH=32 HEIGHT=32 BORDER=0>  </TD>
  171.     <TD><FONT SIZE=1 FACE="Helv,ARIAL"><%=L_CONFIGURE_TEXT%></TD>
  172.     <TD><INPUT TYPE="button" NAME="btnMimeMap" VALUE="<%=L_FILETYPES_TEXT%>" onClick='popBox("MIMEmap", 425, 375, "iimime");'></TD>
  173. </TR>
  174. </TABLE>
  175.  
  176. </FORM>
  177. </FONT>
  178. </BODY>
  179. </HTML>
  180. <% end if %>