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.

145 lines
4.6 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iimlti.str"-->
  5. <!--#include file="iimltils.str"-->
  6. <!--#include file="iisetfnt.inc"-->
  7. <%
  8. dim TotalWidth
  9. TotalWidth = L_IPADDRESSCOLWIDTH_NUM + L_IPPORTCOLWIDTH_NUM + L_SSLPORTCOLWIDTH_NUM + L_HOSTCOLWIDTH_NUM
  10. %>
  11. <HTML>
  12. <HEAD>
  13. <TITLE></TITLE>
  14. <SCRIPT LANGUAGE="JavaScript">
  15. <!--#include file="iijsfuncs.inc"-->
  16. function chgStatus(sel){
  17. parent.head.listFunc.sel=sel;
  18. self.location.href="iimltils.asp";
  19. }
  20. function SetUpdated(){
  21. if (parent.head.listFunc.noupdate){
  22. parent.head.listFunc.noupdate = false;
  23. }
  24. else{
  25. i=parent.head.listFunc.sel;
  26. reSort = setVals(parent.head.cachedList[i],"ipaddress",document.listform.editMe);
  27. reSort = reSort || setVals(parent.head.cachedList[i],"ipport",document.listform.ipport);
  28. reSort = reSort || setVals(parent.head.cachedList[i],"sslport",document.listform.sslport);
  29. reSort = reSort || setVals(parent.head.cachedList[i],"host",document.listform.host);
  30. parent.head.cachedList[i].updated=true;
  31. if (reSort){
  32. parent.head.listFunc.reSort();
  33. }
  34. }
  35. }
  36. function setVals(cachedItem, propName, formCntrl){
  37. if (cachedItem[propName] != formCntrl.value){
  38. cachedItem[propName] = formCntrl.value;
  39. return (parent.head.listFunc.sortby == propName);
  40. }
  41. else{
  42. return false;
  43. }
  44. }
  45. function SetSecure(item,formCntrl,isSecure)
  46. {
  47. if (formCntrl.value != "")
  48. {
  49. parent.head.cachedList[item].isSecure = isSecure;
  50. }
  51. return true;
  52. }
  53. </SCRIPT>
  54. </HEAD>
  55. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  56. <FORM NAME="listform">
  57. <SCRIPT LANGUAGE="JavaScript">
  58. editOK=false;
  59. writeSecHdr = true;
  60. writeHdr = true;
  61. sel=eval(parent.head.listFunc.sel);
  62. list = writeList();
  63. writeLine(list);
  64. function writeList(){
  65. writestr = "<TABLE WIDTH = <%= TotalWidth %> BORDER=0 CELLSPACING=0 CELLPADDING=4 >";
  66. for (var i=0;i < parent.head.cachedList.length; i++) {
  67. if (parent.head.cachedList[i].sslport != ""){
  68. if (writeSecHdr){
  69. writestr += "<TR>"
  70. writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>,"&nbsp;","");
  71. writestr += "</TR>";
  72. writestr += "<TR BGCOLOR=<%= Session("BGCOLOR") %>>"
  73. writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>,"<B><%= L_SECURE_TEXT %></B>","");
  74. writestr += "</TR>";
  75. writeSecHdr = false;
  76. }
  77. }
  78. else{
  79. if (writeHdr){
  80. writestr += "<TR BGCOLOR=<%= Session("BGCOLOR") %>>"
  81. writestr += parent.head.listFunc.writeCol(4,<%= TotalWidth %>,"<B><%= L_SERVER_TEXT %></B>","");
  82. writestr += "</TR>";
  83. writeHdr = false;
  84. }
  85. }
  86. if (parent.head.listFunc.sel !=i) {
  87. if (parent.head.cachedList[i].deleted){
  88. }
  89. else{
  90. writestr += "<TR>"
  91. writestr += parent.head.listFunc.writeCol(1,<%= L_IPADDRESSCOLWIDTH_NUM %>,"<A HREF='javascript:chgStatus("+i+");'>" + displayVal(parent.head.cachedList[i].ipaddress,"<%= L_ALLUNASSIGNED_TEXT %>") + "</A>","");
  92. writestr += parent.head.listFunc.writeCol(1,<%= L_IPPORTCOLWIDTH_NUM %>,displayVal(parent.head.cachedList[i].ipport,"<%= L_NA_TEXT %>"),"");
  93. writestr += parent.head.listFunc.writeCol(1,<%= L_SSLPORTCOLWIDTH_NUM %>,displayVal(parent.head.cachedList[i].sslport,"<%= L_NA_TEXT %>"),"");
  94. writestr += parent.head.listFunc.writeCol(1,<%= L_HOSTCOLWIDTH_NUM %>,parent.head.cachedList[i].host,"");
  95. writestr += "</TR>";
  96. }
  97. }
  98. else{
  99. editOK=true;
  100. writestr += "<TR>"
  101. writestr += parent.head.listFunc.writeCol(1,<%= L_IPADDRESSCOLWIDTH_NUM %>,"<INPUT NAME='editMe' VALUE='"+parent.head.cachedList[i].ipaddress +"' SIZE=13 <%= Session("DEFINPUTSTYLE") %> onBlur='SetUpdated();'>","");
  102. writestr += parent.head.listFunc.writeCol(1,<%= L_IPPORTCOLWIDTH_NUM %>,"<INPUT NAME='ipport' VALUE='"+parent.head.cachedList[i].ipport +"' SIZE=5 <%= Session("DEFINPUTSTYLE") %> onBlur='SetSecure(" + i + ",this,false);SetUpdated();'>","");
  103. writestr += parent.head.listFunc.writeCol(1,<%= L_SSLPORTCOLWIDTH_NUM %>,"<INPUT NAME='sslport' VALUE='"+parent.head.cachedList[i].sslport +"' SIZE=5 <%= Session("DEFINPUTSTYLE") %> onBlur='SetSecure(" + i + ",this,true);SetUpdated();'>","");
  104. writestr += parent.head.listFunc.writeCol(1,<%= L_HOSTCOLWIDTH_NUM %>,"<INPUT NAME='host' VALUE='"+parent.head.cachedList[i].host +"' SIZE=25 <%= Session("DEFINPUTSTYLE") %> onBlur='SetUpdated();'>","");
  105. writestr += "</TR>";
  106. }
  107. }
  108. writestr += "</TABLE>";
  109. return writestr;
  110. }
  111. function writeLine(str){
  112. document.write(str);
  113. }
  114. </SCRIPT>
  115. </FORM>
  116. </BODY>
  117. <SCRIPT LANGUAGE="JavaScript">
  118. if (editOK){
  119. document.listform.editMe.focus();
  120. document.listform.editMe.select();
  121. }
  122. </SCRIPT>
  123. </HTML>