Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
6.5 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <% if Session("FONTSIZE") = "" then %>
  5. <!--#include file="iito.inc"-->
  6. <% else %>
  7. <!--#include file="iiw3mstr.str"-->
  8. <%
  9. Const HTTPCOMPRESSIONPATH = "IIS://localhost/w3svc/Filters/Compression/Parameters"
  10. On Error Resume Next
  11. Dim path,currentobj,Inst
  12. path=Session("spath")
  13. Session("path")=path
  14. Session("SpecObj")="IIS://localhost/w3svc/Filters/Compression/Parameters"
  15. Session("SpecProps")="HCDoStaticCompression,HCDoDynamicCompression,HCCompressionDirectory,HCDoDiskSpaceLimiting,HCMaxDiskSpaceUsage"
  16. Set currentobj=GetObject(path)
  17. %>
  18. <!--#include file="iiset.inc"-->
  19. <!--#include file="iisetfnt.inc"-->
  20. <HTML>
  21. <HEAD>
  22. <TITLE></TITLE>
  23. <SCRIPT LANGUAGE="JavaScript">
  24. <!--#include file="iijsfuncs.inc"-->
  25. top.title.Global.helpFileName="iipy_38";
  26. function disableDefault(dir,fromCntrl, toCntrl){
  27. if (!dir){
  28. if (fromCntrl.value !=""){
  29. toCntrl.value=fromCntrl.value;
  30. fromCntrl.value="";
  31. }
  32. }
  33. else{
  34. if (toCntrl.value !=""){
  35. fromCntrl.value=toCntrl.value;
  36. toCntrl.value="";
  37. }
  38. }
  39. }
  40. function enableDefault(chkCntrl){
  41. chkCntrl.checked=true;
  42. }
  43. function PageValidation()
  44. {
  45. }
  46. validatePage = new PageValidation();
  47. function ContinueSave()
  48. {
  49. // Perform any sync validation.
  50. if( document.userform.HCCompressionDirectory.value == "" )
  51. {
  52. alert( "<%= L_NOPATH_ERR %>" );
  53. document.userform.HCCompressionDirectory.focus();
  54. }
  55. // We always want to validate the path, so we always return false.
  56. return false;
  57. }
  58. function SaveCallback()
  59. {
  60. // Called back from iitool if ContinueSave returns false
  61. // Perform any async (ASP) based validation
  62. path = document.userform.HCCompressionDirectory.value;
  63. if( path != "" )
  64. {
  65. parent.hlist.location.href = "iichkpath.asp?path=" + escape(path) + "&ptype=0" +
  66. "&donext=top.body.tool.toolFuncs.dosave();";
  67. }
  68. // If path is empty just return without saving.
  69. }
  70. function checkValueChange( ctrl )
  71. {
  72. if( !top.title.Global.updated )
  73. {
  74. if( ctrl.value != ctrl.defaultValue )
  75. {
  76. top.title.Global.updated = true;
  77. }
  78. }
  79. }
  80. function MtoB(thiscntrl){
  81. num = parseInt(thiscntrl.value);
  82. if (!isNaN(num)){
  83. return thiscntrl.value * 1048576;
  84. }
  85. }
  86. function BtoM(thiscntrl){
  87. num = parseInt(thiscntrl.value);
  88. if (!isNaN(num)){
  89. return thiscntrl.value/1048576;
  90. }
  91. }
  92. </SCRIPT>
  93. <% if Session("canBrowse") then %>
  94. <SCRIPT SRC="JSDirBrowser/JSBrowser.js">
  95. </SCRIPT>
  96. <SCRIPT>
  97. JSBrowser = new BrowserObj(null,false,TDIR,<%= Session("FONTSIZE") %>);
  98. function BrowserObjSetPathOverride()
  99. {
  100. if( this.currentPath != "" )
  101. {
  102. this.pathCntrl.value = this.currentPath;
  103. this.pathCntrl.focus();
  104. this.pathCntrl.blur();
  105. }
  106. }
  107. function popBrowser()
  108. {
  109. JSBrowser = new BrowserObj(document.userform.HCCompressionDirectory,false,TDIR,<%= Session("FONTSIZE") %>);
  110. JSBrowser.BrowserObjSetPath = BrowserObjSetPathOverride;
  111. JSBrowser.BrowserObjOpen();
  112. }
  113. </SCRIPT>
  114. <% end if %>
  115. </HEAD>
  116. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000">
  117. <TABLE WIDTH = 500 BORDER = 0>
  118. <TR>
  119. <TD>
  120. <FORM NAME="userform">
  121. <%= sFont("","","",True) %>
  122. <B><%= L_MASTERPROPS_TEXT %></B>
  123. <P>
  124. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  125. <%= L_DEFAULTWEBSITE_TEXT %>
  126. <IMG SRC="images/hr.gif" WIDTH=<%= L_DEFAULTWEBSITE_HR %> HEIGHT=2 BORDER=0 ALIGN="middle">
  127. <P>
  128. <TABLE WIDTH = 400>
  129. <TR>
  130. <TD>
  131. <%= sFont("","","",True) %>
  132. <%= L_DEFWEBTEXT_TEXT %>
  133. <P>
  134. </FONT>
  135. </TD>
  136. </TR>
  137. </TABLE>
  138. <%= writeSelect("DownlevelAdminInstance", "","top.title.Global.updated=true;", false) %>
  139. <%
  140. For Each Inst in currentobj
  141. if isNumeric(Inst.Name) then
  142. if currentobj.DownlevelAdminInstance = Inst.Name then
  143. Response.write "<Option Selected VALUE='" & Inst.Name & "'>" & Inst.ServerComment
  144. else
  145. Response.write "<Option VALUE='" & Inst.Name & "'>" & Inst.ServerComment
  146. end if
  147. end if
  148. Next
  149. %>
  150. </SELECT>
  151. </FONT>
  152. <%
  153. 'Redefine currentobj here so our controls will still work...
  154. ' we need to be reading data from the Http Compression node.
  155. Set currentobj=GetObject(HTTPCOMPRESSIONPATH)
  156. 'If we get an error reading the compression properties, then the filter
  157. 'has been uninstalled. We will then hide the whole compression properties
  158. 'section.
  159. %>
  160. <% if err = 0 then %>
  161. <P>
  162. <%= sFont("","","",True) %>
  163. <IMG SRC="images/hr.gif" WIDTH=5 HEIGHT=2 BORDER=0 ALIGN="middle">
  164. <%= L_HTTPCOMPRESS %>
  165. <IMG SRC="images/hr.gif" WIDTH=<%= L_HTTPCOMPRESS_HR %> HEIGHT=2 BORDER=0 ALIGN="middle">
  166. </FONT>
  167. <P>
  168. <TABLE BORDER=0 BGCOLOR="<%= Session("BGCOLOR") %>" CELLPADDING=0 CELLSPACING=0>
  169. <TR>
  170. <TD COLSPAN=2>
  171. <%= sFont("","","",True) %>
  172. <%= checkbox("HcDoStaticCompression","",false) %>
  173. <%= L_STATICFILES %><BR>
  174. <%= checkbox("HCDoDynamicCompression","",false) %>
  175. <%= L_APPFILES %> <P>
  176. </FONT>
  177. </TD>
  178. </TR>
  179. <TR>
  180. <TD VALIGN = "top">
  181. <%= sFont("","","",True) %>
  182. <%= L_TEMPFOLDER %>
  183. </FONT>
  184. </TD>
  185. <TD VALIGN = "top" ALIGN="right">
  186. <%= sFont("","","",True) %>
  187. <%= text("HCCompressionDirectory",L_TEMPFOLDER_NUM,"","","checkValueChange(this);",true,false) %>
  188. <P>
  189. <INPUT TYPE="button" NAME="hdnBrowser" VALUE="<%= L_BROWSE_TEXT %>" OnClick="popBrowser();">
  190. </FONT>
  191. </TD>
  192. </TR>
  193. <TR>
  194. <TD VALIGN = "top">
  195. <%= sFont("","","",True) %>
  196. <%= L_MAXFOLDERSIZE %>&nbsp;&nbsp;&nbsp;&nbsp;
  197. </FONT>
  198. </TD>
  199. <TD VALIGN = "top">
  200. <%= sFont("","","",True) %>
  201. <INPUT TYPE="hidden" NAME="HCDoDiskSpaceLimiting" VALUE="<%= currentobj.HCDoDiskSpaceLimiting %>">
  202. <%= printradio("HCDoDiskSpaceLimiting", not currentobj.HCDoDiskSpaceLimiting,"document.userform.HCDoDiskSpaceLimiting.value = 'False';setCntrlState(false,hdnHCMaxDiskSpaceUsage);",true) %>
  203. <%= L_UNLIMITED %>
  204. <P>
  205. <%= printradio("HCDoDiskSpaceLimiting", currentobj.HCDoDiskSpaceLimiting,"document.userform.HCDoDiskSpaceLimiting.value = 'True';setCntrlState(true,hdnHCMaxDiskSpaceUsage);",true) %>
  206. <%= L_LIMITTO %>:&nbsp;
  207. <%= inputbox(0,"text","hdnHCMaxDiskSpaceUsage", cInt(currentobj.HCMaxDiskSpaceUsage/1048576),L_LIMITTO_NUM,"","", "isNum(this,1,4294967295);HCMaxDiskSpaceUsage.value=MtoB(hdnHCMaxDiskSpaceUsage);HCDoDiskSpaceLimiting.value = 'True';rdoHCDoDiskSpaceLimiting[1].checked=true;",False,False,False) %>
  208. &nbsp;<%= L_MB %>
  209. <BR>
  210. <%= writehidden("HCMaxDiskSpaceUsage") %>
  211. </FONT>
  212. </TD>
  213. </TR>
  214. </TABLE>
  215. <SCRIPT LANGUAGE="JavaScript">
  216. setCntrlState(document.userform.rdoHCDoDiskSpaceLimiting[1].checked,document.userform.hdnHCMaxDiskSpaceUsage);
  217. </SCRIPT>
  218. <% end if %>
  219. </BODY>
  220. </HTML>
  221. </FORM>
  222. </TD>
  223. </TR>
  224. </TABLE>
  225. <% end if %>