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.

120 lines
3.8 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="iiaccess.str"-->
  5. <!--#include file="iisetfnt.inc"-->
  6. <!--#include file="iiacssls.str"-->
  7. <HTML>
  8. <HEAD>
  9. <TITLE></TITLE>
  10. <SCRIPT LANGUAGE="JavaScript">
  11. <!--#include file="iijsfuncs.inc"-->
  12. function chgStatus(indexnum){
  13. parent.head.listFunc.sel=indexnum
  14. self.location.href="iiacssls.asp";
  15. }
  16. function chkFull(thiscntrl,defval){
  17. if (this.value==defval){
  18. alert("<%= L_ENTERVALUE_TEXT %>");
  19. }
  20. }
  21. function clearDomain(){
  22. if (document.listform.editMe.value !="" || document.listform.Subnet.value !=""){
  23. document.listform.domain.value="";
  24. }
  25. }
  26. function clearIP(){
  27. if (document.listform.domain.value !=""){
  28. document.listform.editMe.value="";
  29. document.listform.Subnet.value="";
  30. }
  31. }
  32. function SetUpdated(){
  33. //check to see if our event was triggered by a delete. if so, we don't
  34. //want to set the cached object values, or we'll be overwriting
  35. //the wrong item.
  36. if (parent.head.listFunc.noupdate){
  37. parent.head.listFunc.noupdate = false;
  38. }
  39. else{
  40. var i=parent.head.listFunc.sel;
  41. parent.head.cachedList[i].ip=document.listform.editMe.value;
  42. parent.head.cachedList[i].Subnet=document.listform.Subnet.value;
  43. parent.head.cachedList[i].domain=document.listform.domain.value;
  44. parent.head.cachedList[i].updated=true;
  45. }
  46. }
  47. </SCRIPT>
  48. </HEAD>
  49. <BODY BGCOLOR="#FFFFFF" LEFTMARGIN=0 TOPMARGIN=0>
  50. <FORM NAME="listform">
  51. <SCRIPT LANGUAGE="JavaScript">
  52. editOK=false;
  53. var headframe = parent.head;
  54. sel=eval(headframe.listFunc.sel);
  55. //can't store hidden form vals as boolean...
  56. Grant=(headframe.document.userform.GrantbyDefault.value=="True");
  57. var writestr = "<TABLE WIDTH = <%= L_ACCSSTABLEWIDTH_NUM %> BORDER=0 CELLPADDING = 2 CELLSPACING = 0>"
  58. for (var i=0; i < headframe.cachedList.length; i++) {
  59. if (headframe.cachedList[i].access){
  60. accessstr = "<%= L_GRANTED_TEXT %>";
  61. }
  62. else{
  63. accessstr = "<%= L_DENIED_TEXT %>";
  64. }
  65. if (Grant != headframe.cachedList[i].access){
  66. if (!headframe.cachedList[i].deleted){
  67. if (sel!=i) {
  68. writestr += "<TR>"
  69. writestr += headframe.listFunc.writeCol(1,<%= L_ACCESSCOLWIDTH_NUM %>,"<A HREF='javascript:chgStatus("+i+");'>" + accessstr + "</A>","");
  70. writestr += headframe.listFunc.writeCol(1,<%= L_IPCOLWIDTH_NUM %>,headframe.cachedList[i].ip,"");
  71. writestr += headframe.listFunc.writeCol(1,<%= L_SUBNETCOLWIDTH_NUM %>,headframe.cachedList[i].Subnet,"");
  72. writestr += headframe.listFunc.writeCol(1,<%= L_DOMAINCOLWIDTH_NUM %>,headframe.cachedList[i].domain,"");
  73. writestr += "</TR>";
  74. }
  75. else{
  76. editOK=true;
  77. writestr += "<TR BGCOLOR=#DDDDDD>"
  78. writestr += headframe.listFunc.writeCol(1,<%= L_ACCESSCOLWIDTH_NUM %>,"<A HREF='javascript:chgStatus("+i+");'>" + accessstr + "</A>","");
  79. writestr += headframe.listFunc.writeCol(1,<%= L_IPCOLWIDTH_NUM %>,"<INPUT NAME='editMe' VALUE='"+headframe.cachedList[i].ip +"' SIZE=10 <%= Session("DEFINPUTSTYLE") %> onBlur='clearDomain();SetUpdated();'>","");
  80. writestr += headframe.listFunc.writeCol(1,<%= L_SUBNETCOLWIDTH_NUM %>,"<INPUT NAME='Subnet' VALUE='"+headframe.cachedList[i].Subnet+"' SIZE=10 <%= Session("DEFINPUTSTYLE") %> onBlur='clearDomain();SetUpdated();'>","");
  81. writestr += headframe.listFunc.writeCol(1,<%= L_DOMAINCOLWIDTH_NUM %>,"<INPUT NAME='domain' VALUE='"+headframe.cachedList[i].domain + "' SIZE=10 <%= Session("DEFINPUTSTYLE") %> onBlur='clearIP();SetUpdated();'>","");
  82. writestr += "</TR>";
  83. }
  84. }
  85. }
  86. }
  87. writestr += "</TABLE>";
  88. document.write(writestr);
  89. // Allow updates once the list is written
  90. parent.head.listFunc.noupdate = false;
  91. </SCRIPT>
  92. </FORM>
  93. <SCRIPT LANGUAGE="JavaScript">
  94. if (editOK){
  95. document.listform.editMe.focus();
  96. }
  97. </SCRIPT>
  98. </BODY>
  99. </HTML>