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.

195 lines
4.3 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="iifilthd.str"-->
  8. <%
  9. On Error Resume Next
  10. Dim path, currentobj
  11. path = Session("spath")
  12. Session("path") = Session("spath")
  13. Set currentobj = GetObject(path)
  14. Session("SpecObj")=path & "/Filters"
  15. Session("SpecProps")=""
  16. %>
  17. <!--#include file="iiset.inc"-->
  18. <!--#include file="iisetfnt.inc"-->
  19. <HTML>
  20. <HEAD>
  21. <TITLE></TITLE>
  22. <SCRIPT LANGUAGE="JavaScript">
  23. top.title.Global.helpFileName="iipy_31";
  24. top.title.Global.siteProperties = true;
  25. function SetList(){
  26. self.location.href = "iiapphd.asp"
  27. }
  28. function disableDefault(dir,fromCntrl, toCntrl){
  29. if (!dir){
  30. if (fromCntrl.value != ""){
  31. toCntrl.value = fromCntrl.value;
  32. fromCntrl.value = "";
  33. }
  34. }
  35. else{
  36. if (toCntrl.value != ""){
  37. fromCntrl.value = toCntrl.value;
  38. toCntrl.value = "";
  39. }
  40. }
  41. }
  42. function enableDefault(chkCntrl){
  43. chkCntrl.checked = true;
  44. }
  45. </SCRIPT>
  46. </HEAD>
  47. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" TOPMARGIN=5 TEXT="#000000" onLoad="loadList();" LINK="#000000" VLINK="#000000" >
  48. <%= sFont("","","",True) %>
  49. <FORM NAME="userform" onSubmit="return false">
  50. <B><%= L_FILTERS_TEXT %></B>
  51. <P>
  52. <TABLE WIDTH=490 BORDER=0>
  53. <TR>
  54. <TD>
  55. <%= sFont("","","",True) %>
  56. <% if Session("vtype") = "svc" then %>
  57. <%= L_MASTERFILTERORDER_TEXT %><BR>&nbsp;
  58. <% else %>
  59. <%= L_FILTERORDER_TEXT %><BR>&nbsp;
  60. <% end if %>
  61. </FONT>
  62. </TD>
  63. </TR>
  64. </TABLE>
  65. <SCRIPT LANGUAGE="JavaScript">
  66. <!--#include file="iijsfuncs.inc"-->
  67. <!--#include file="iijsls.inc"-->
  68. function loadList(){
  69. parent.list.location.href = "iifiltls.asp";
  70. }
  71. function buildListForm(){
  72. numrows = 0;
  73. for (var i = 0; i < cachedList.length; i++) {
  74. if (!cachedList[i].deleted){
  75. numrows = numrows + 1;
  76. }
  77. }
  78. qstr = "numrows="+numrows;
  79. qstr = qstr+"&cols=FilterName&cols=FilterPath";
  80. parent.parent.hlist.location.href = "iihdn.asp?"+qstr;
  81. <% 'the list values will be grabbed by the hiddenlistform script... %>
  82. }
  83. function SetListVals(){
  84. listForm = parent.parent.hlist.document.hiddenlistform;
  85. j = 0;
  86. for (var i = 0; i < cachedList.length; i++) {
  87. if (!cachedList[i].deleted){
  88. listForm.elements[j++].value = cachedList[i].filter;
  89. listForm.elements[j++].value = cachedList[i].filterpath;
  90. cachedList[i].updated = false;
  91. }
  92. }
  93. }
  94. function statMsg(num){
  95. if (num == 0){
  96. return "<%= L_LOADED_TEXT %>"
  97. }
  98. if (num == 3){
  99. return "<%= L_LOADING_TEXT %>"
  100. }
  101. if (num == 4){
  102. return "<%= L_UNLOADED_TEXT %>"
  103. }
  104. if (num == 2){
  105. return "<%= L_UNLOADING_TEXT %>"
  106. }
  107. return ""
  108. }
  109. function listObj(id,f,s,e,en,p){
  110. this.id = id;
  111. this.order = id;
  112. this.deleted = false;
  113. this.newitem = false;
  114. this.updated = false;
  115. this.filter = initParam(f,"");
  116. this.status=initParam(s,4);
  117. this.filterpath=initParam(e,"");
  118. this.enabled = initParam(en,"");
  119. this.priority = initParam(p,"");
  120. this.displaystatus = statMsg(this.status);
  121. this.displayexe = crop(this.filterpath,35);
  122. }
  123. listFunc=new listFuncs("id","",top);
  124. cachedList = new Array();
  125. <%
  126. Dim filterspath, filtersCollection, loadOrder, i, filtername, fltr, priority
  127. Dim aFiltersInOrder, sFilter
  128. filterspath = path & "/Filters"
  129. Set filtersCollection = GetObject(filterspath)
  130. if err = 0 then
  131. ' hack to get around MMC not setting Filters key type...
  132. filtersCollection.KeyType = "IIsFilters"
  133. filtersCollection.SetInfo
  134. filtersCollection.GetInfo
  135. loadOrder = filtersCollection.FilterLoadOrder
  136. aFiltersInOrder = split(filtersCollection.FilterLoadOrder, ",")
  137. i = 0
  138. for each sFilter in aFiltersInOrder
  139. filtername = Trim(sFilter)
  140. Set fltr = GetObject(filterspath & "/" & filtername)
  141. if err = 0 then
  142. if fltr.NotifyOrderHigh then
  143. priority = L_HIGH_TEXT
  144. elseif fltr.NotifyOrderMedium then
  145. priority = L_MEDIUM_TEXT
  146. elseif fltr.NotifyOrderLow then
  147. priority = L_LOW_TEXT
  148. else
  149. priority = L_LOW_TEXT
  150. end if
  151. %>cachedList[<%= i %>] = new listObj(<%= i %>,"<%= filtername %>","<%= fltr.FilterState %>","<%= replace(fltr.FilterPath,"\","\\") %>","<%= fltr.FilterEnabled %>","<%= priority %>");<%
  152. i = i+1
  153. end if
  154. next
  155. end if
  156. %>
  157. </SCRIPT>
  158. </BODY>
  159. </HTML>
  160. <% end if %>