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.

200 lines
4.1 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% 'Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iierrhd.str"-->
  5. <!--#include file="iisetfnt.inc"-->
  6. <HTML>
  7. <HEAD>
  8. <TITLE></TITLE>
  9. </HEAD>
  10. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" LINK="#000000" VLINK="#000000" TEXT="#000000" >
  11. <FORM NAME="userform">
  12. <%= sFont("","","",True) %>
  13. <B><%= L_CERR_TEXT %></B>
  14. <P>
  15. <TABLE WIDTH=490 BORDER=0>
  16. <TR>
  17. <TD COLSPAN=3 >
  18. <%= sFont("","","",True) %>
  19. <%= L_CUSTOMERR_TEXT %>
  20. <BR>&nbsp;
  21. </FONT>
  22. </TD>
  23. </TR>
  24. </TABLE>
  25. </FORM>
  26. </BODY>
  27. <SCRIPT LANGUAGE="JavaScript">
  28. <!--#include file="iijsfuncs.inc"-->
  29. <!--#include file="iijsls.inc"-->
  30. top.title.Global.helpFileName="iipy_13";
  31. function loadList(){
  32. parent.list.location.href = "iierrls.asp";
  33. }
  34. function buildListForm(){
  35. numrows=0;
  36. for (var i=0; i < cachedList.length; i++) {
  37. if (cachedList[i].outType !=""){
  38. numrows=numrows + 1;
  39. }
  40. }
  41. qstr="numrows="+numrows;
  42. qstr=qstr+"&cols=HttpErrors";
  43. parent.parent.hlist.location.href="iihdn.asp?"+qstr;
  44. <% 'the list values will be grabbed by the hiddenlistform script... %>
  45. }
  46. function SetListVals(){
  47. listForm = parent.parent.hlist.document.hiddenlistform;
  48. j=0;
  49. for (var i=0; i < cachedList.length; i++) {
  50. if (cachedList[i].outType !=""){
  51. if (cachedList[i].Subcode == 0){
  52. sc = "*";
  53. }
  54. else{
  55. sc = cachedList[i].Subcode;
  56. }
  57. listForm.elements[j++].value=cachedList[i].error+","+sc+","+cachedList[i].outType+","+cachedList[i].msgPath;
  58. }
  59. cachedList[i].updated=false;
  60. }
  61. }
  62. function listObj(i,e,s,o,p,d,t){
  63. this.id = i;
  64. this.deleted=false;
  65. this.newitem=false;
  66. this.updated=false;
  67. this.error=initParam(e,"");
  68. this.Subcode=initParam(s,"");
  69. this.outType=initParam(o,"");
  70. this.msgPath=initParam(p,"");
  71. this.msgDefault=initParam(d,"");
  72. this.types=initParam(t,"");
  73. //lookup from Custom_Error_Desc
  74. if (s !=0){
  75. this.errcode=e +":" + s;
  76. }
  77. else{
  78. this.errcode=e
  79. }
  80. this.displayPath = crop(this.msgPath,50);
  81. }
  82. listFunc=new listFuncs("error","",top);
  83. cachedList=new Array()
  84. <%
  85. On Error Resume Next
  86. Dim path, currentobj, infoobj, i, ErrItem, thisErr
  87. Dim aErrs, aErrDescs
  88. path=Session("dpath")
  89. Session("path")=path
  90. Session("SpecObj")=""
  91. Session("SpecProps")=""
  92. Set currentobj=GetObject(path)
  93. Set infoobj=GetObject("IIS://localhost/w3svc/info")
  94. aErrs=currentobj.GetEx("HttpErrors")
  95. aErrDescs=infoobj.GetEx("CustomErrorDescriptions")
  96. if err <> 0 then
  97. %>cachedList[0]=new listObj("","","","","","");<%
  98. else
  99. i = 0
  100. For Each ErrItem in aErrDescs
  101. thisErr=getError(ErrItem,aErrs)
  102. %>cachedList[<%= i %>]=new listObj(<%= i %>, "<%= thisErr(0) %>","<%= thisErr(1) %>","<%= thisErr(2) %>","<%= thisErr(3) %>","<%= thisErr(4) %>", <%= thisErr(5) %>);<%
  103. i = i+1
  104. Next
  105. Response.write "loadList();"
  106. end if
  107. function getError(errstr,aErrs)
  108. On Error Resume Next
  109. Dim i, one, two, three, four, five, error
  110. Dim Subcode, errtext, Subcodetext, def, path, otype, thistype
  111. Dim CErr, aCErr
  112. one=Instr(errstr,",")
  113. two=Instr((one+1),errstr,",")
  114. three=Instr((two+1),errstr,",")
  115. four=Instr((three+1),errstr,",")
  116. five=Instr((four+1),errstr,",")
  117. otype=0
  118. error=Mid(errstr,1,(one-1))
  119. subcode=Mid(errstr,(one+1),((two-one)-1))
  120. errtext=Mid(errstr,(two+1), (three-two)-1)
  121. subcodetext=Mid(errstr,(three+1), (four-three)-1)
  122. otype=Mid(errstr,(four+1))
  123. path=errtext & " " & Subcodetext
  124. def=path
  125. thistype=""
  126. if aErrs(0) <> "" then
  127. For Each CErr in aErrs
  128. aCErr=getCustomErr(CErr)
  129. if ((error=aCErr(0)) and (subcode=replace(aCErr(1),"*","0"))) then
  130. thistype=aCErr(2)
  131. path=aCErr(3)
  132. exit for
  133. end if
  134. i = i + 1
  135. Next
  136. end if
  137. getError=Array(error, subcode, thistype,path,def,otype)
  138. end function
  139. function getCustomErr(errstr)
  140. Dim one, two, three, code, Subcode, src, path
  141. one=Instr(errstr,",")
  142. two=Instr((one+1),errstr,",")
  143. three=Instr((two+1),errstr,",")
  144. code=Mid(errstr,1,(one-1))
  145. Subcode=Mid(errstr,(one+1),((two-one)-1))
  146. src=Mid(errstr,(two+1), (three-two)-1)
  147. path=Mid(errstr,(three+1))
  148. path=replace(path,"\","\\")
  149. getCustomErr=Array(code, Subcode, src, path)
  150. end function
  151. %>
  152. </SCRIPT>
  153. </HTML>