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.

158 lines
3.4 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. <%
  8. dim quote
  9. quote = chr(34)
  10. %>
  11. <!--#include file="iimimehd.str"-->
  12. <!--#include file="iisetfnt.inc"-->
  13. <HTML>
  14. <HEAD>
  15. <TITLE></TITLE>
  16. </HEAD>
  17. <BODY BGCOLOR="<%= Session("BGCOLOR") %>" LINK="#000000" VLINK="#000000" TOPMARGIN=10 TEXT="#000000" onLoad="loadList();loadHelp();">
  18. <FORM name="hiddenform">
  19. <INPUT TYPE="hidden" NAME="index" VALUE=-1>
  20. </FORM>
  21. <FORM NAME="userform">
  22. <P>
  23. <TABLE BORDER=0 BGCOLOR="<%= Session("BGCOLOR") %>" WIDTH=99% CELLPADDING=0 CELLSPACING = 0>
  24. <TR><TD>
  25. <%= sFont("","","",True) %>
  26. <%= L_REGTYPES_TEXT %>
  27. </TD></TR>
  28. </TABLE>
  29. </FORM>
  30. <SCRIPT LANGUAGE="JavaScript">
  31. <!--#include file="iijsfuncs.inc"-->
  32. <!--#include file="iijsls.inc"-->
  33. function loadList(){
  34. parent.list.location.href = "iimimels.asp";
  35. }
  36. function loadHelp(){
  37. top.title.Global.helpFileName="iipxrdir";
  38. }
  39. function moveItem(dir){
  40. }
  41. function buildListForm(){
  42. numrows = 0;
  43. for (var i = 0; i < cachedList.length; i++) {
  44. if ((!cachedList[i].deleted) && ((cachedList[i].ext + cachedList[i].app) != "")){
  45. numrows = numrows + 1;
  46. }
  47. }
  48. qstr = "numrows="+numrows;
  49. qstr = qstr+"&cols=ext&cols=app"
  50. parent.parent.hlist.location.href = "iihdn.asp?"+qstr;
  51. <% 'the list values will be grabbed by the hiddenlistform script... %>
  52. }
  53. function SetListVals(){
  54. listForm = parent.parent.hlist.document.hiddenlistform;
  55. j = 0;
  56. for (var i = 0; i < cachedList.length; i++) {
  57. if ((!cachedList[i].deleted) && ((cachedList[i].ext + cachedList[i].app) != "")){
  58. listForm.elements[j++].value = cachedList[i].ext;
  59. listForm.elements[j++].value = cachedList[i].app;
  60. cachedList[i].updated = false;
  61. }
  62. }
  63. }
  64. openedby = top.opener.location.href;
  65. if (openedby.indexOf("comp") > -1){
  66. top.poptools.toolFunc.mainframe = top.opener.top.opener.top;
  67. mf = top.opener.top.opener.top;
  68. }
  69. else
  70. {
  71. mf = top.opener.top;
  72. }
  73. listFunc = new listFuncs("ext","",mf);
  74. // Override the addItem method of the listFunc object
  75. function addItemOverload()
  76. {
  77. var i=cachedList.length;
  78. if( this.sel > -1 )
  79. {
  80. // Validate the current selected item
  81. if( cachedList[this.sel].ext == "" ||
  82. cachedList[this.sel].app == "" )
  83. {
  84. alert( "<%= L_EMPTYFIELDERROR_TEXT %>" );
  85. return;
  86. }
  87. }
  88. // Add the new item
  89. listFunc.noupdate = true;
  90. cachedList[i]=new listObj(i);
  91. cachedList[i].newitem=true;
  92. cachedList[i].updated=true;
  93. listFunc.sel=i;
  94. loadList();
  95. }
  96. listFunc.addItem = addItemOverload;
  97. function listObj(i,e,a){
  98. this.id = i;
  99. this.deleted = false;
  100. this.newitem = false;
  101. this.updated = false;
  102. this.ext = initParam(e,"");
  103. this.app=initParam(a,"");
  104. }
  105. cachedList = new Array();
  106. <%
  107. On Error Resume Next
  108. Dim path, currentobj, aMimeMap, Map, i, mapsize, mext, mtype
  109. path = Session("dpath")
  110. Session("path") = path
  111. Session("SpecObj") = path & "/MimeMap"
  112. if Session("vtype") = "comp" then
  113. Set currentobj=GetObject(path & "/MimeMap")
  114. else
  115. Set currentobj=GetObject(path)
  116. end if
  117. Session("SpecProps")=""
  118. i = 0
  119. aMimeMap = currentobj.GetEx("MimeMap")
  120. for each Map in aMimeMap
  121. mext = Map.Extension
  122. mtype = Map.MimeType
  123. if mext <> "" and mtype <> "" then
  124. %>cachedList[<%= i %>] = new listObj(<%= i %>,"<%= mext %>","<%= mtype %>");<%
  125. i = i+1
  126. end if
  127. Next
  128. %>
  129. </SCRIPT>
  130. </BODY>
  131. </HTML>
  132. <% end if %>