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.

104 lines
2.9 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iimime.str"-->
  5. <!--#include file="iimimels.str"-->
  6. <!--#include file="iisetfnt.inc"-->
  7. <HTML>
  8. <HEAD>
  9. <TITLE></TITLE>
  10. <SCRIPT LANGUAGE="JavaScript">
  11. <!--#include file="iijsfuncs.inc"-->
  12. function chgStatus(sel){
  13. parent.head.listFunc.sel=sel;
  14. <% if Session("Browser") = "IE3" then %>
  15. self.location.href="iimimels.asp#here";
  16. <% else %>
  17. self.location.href="iimimels.asp";
  18. <% end if %>
  19. }
  20. function SetUpdated(){
  21. //check to see if our event was triggered by a delete. if so, we don't
  22. //want to set the cached object values, or we'll be overwriting
  23. //the wrong item.
  24. if (parent.head.listFunc.noupdate){
  25. parent.head.listFunc.noupdate = false;
  26. }
  27. else{
  28. i = parent.head.listFunc.sel
  29. parent.head.cachedList[i].app = document.listform.app.value;
  30. parent.head.cachedList[i].ext = document.listform.editMe.value;
  31. parent.head.cachedList[i].updated = true;
  32. }
  33. }
  34. </SCRIPT>
  35. </HEAD>
  36. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  37. <FORM NAME="listform">
  38. <SCRIPT LANGUAGE="JavaScript">
  39. editOK=false;
  40. sel=eval(parent.head.listFunc.sel);
  41. var writestr = "<TABLE WIDTH =<%= L_MIMETABLEWIDTH_NUM %> BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"
  42. for (var i=0;i < parent.head.cachedList.length; i++) {
  43. if (!parent.head.cachedList[i].deleted)
  44. {
  45. if (sel!=i)
  46. {
  47. if( parent.head.cachedList[i].ext != "" &&
  48. parent.head.cachedList[i].app != "" )
  49. {
  50. writestr += "<TR>";
  51. if (i+4 == sel)
  52. {
  53. writestr += parent.head.listFunc.writeCol(1,<%= L_EXTCOLWIDTH_NUM %>,"<A NAME='here'></A><A HREF='javascript:chgStatus("+i+");'>" + crop(parent.head.cachedList[i].ext,20) + "</A>","");
  54. }
  55. else
  56. {
  57. writestr += parent.head.listFunc.writeCol(1,<%= L_EXTCOLWIDTH_NUM %> ,"<A HREF='javascript:chgStatus("+i+");'>" + crop(parent.head.cachedList[i].ext,20) + "</A>","");
  58. }
  59. writestr += parent.head.listFunc.writeCol(1,<%= L_CONENTTYPECOLWIDTH_NUM %>,parent.head.cachedList[i].app,"");
  60. writestr += "</TR>";
  61. }
  62. else
  63. {
  64. parent.head.cachedList[i].deleted = true;
  65. }
  66. }
  67. else
  68. {
  69. editOK=true;
  70. writestr += "<TR BGCOLOR=#DDDDDD>";
  71. writestr += parent.head.listFunc.writeCol(1,<%= L_EXTCOLWIDTH_NUM %>,"<INPUT NAME='editMe' SIZE = 10 VALUE='" + parent.head.cachedList[i].ext + "' onBlur='SetUpdated();' <%= Session("DEFINPUTSTYLE") %>>","");
  72. writestr += parent.head.listFunc.writeCol(1,<%= L_CONENTTYPECOLWIDTH_NUM %>,"<INPUT NAME='app' SIZE = 20 VALUE='" + parent.head.cachedList[i].app + "' onBlur='SetUpdated();' <%= Session("DEFINPUTSTYLE") %>>","");
  73. writestr += "</TR>";
  74. }
  75. }
  76. }
  77. writestr += "</TABLE>";
  78. document.write(writestr);
  79. </SCRIPT>
  80. </FORM>
  81. <SCRIPT LANGUAGE="JavaScript">
  82. <% if Session("isAdmin") then %>
  83. if (editOK){
  84. document.listform.editMe.focus();
  85. }
  86. <% end if %>
  87. </SCRIPT>
  88. </BODY>
  89. </HTML>