http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / userapps / broadcom / cfm / html / scdmz.html
index d4d02a1..6b736a3 100755 (executable)
 <html>
    <head>
       <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
+      <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
       <link rel="stylesheet" href='stylemain.css' type='text/css'>
          <link rel="stylesheet" href='colors.css' type='text/css'>
             <script language="javascript" src="util.js"></script>
             <script language="javascript">
-<!-- hide
+<!-- hide\r
+parent.helpframe.location.href="hlpdmz.html";
+var randomNum = '<%ejGet(CheckNum)%>';
+var addr = '<%ejGetOther(dmzHost)%>';
 
-function frmLoad() {
-   var addr = '<%ejGetOther(dmzHost)%>';
-
-   with ( document.forms[0] ) {
-      dmzAddr.value = addr;
-   }
-}
-
-function btnApply() {
-   var loc = 'scdmz.cmd?';
-   with ( document.forms[0] ) {
-      if ( dmzAddr.value != '' &&
-           isValidIpAddress(dmzAddr.value) == false ) {
-         alert('DMZ host address "' + dmzAddr.value + '" is invalid IP address.');
-         return;
-      }
-      loc += 'address=' + dmzAddr.value;
-   }
-   var code = 'location="' + loc + '"';
-   eval(code);
-}
-
-// done hiding -->
-</script>
-   </head>
-   <body onLoad='frmLoad()'>
-      <blockquote>
-         <form>
-            <b>NAT -- DMZ Host</b><br>
-            <br>
-            The DSL router will forward IP packets from the WAN that do not belong to any 
-            of the applications configured in the Virtual Servers table to the DMZ host 
-            computer.<br>
-            <br>
-            Enter the computer's IP address and click "Apply" to activate the DMZ host.<br>
-            <br>
-            Clear the IP address field and click "Apply" to deactivate the DMZ host.<br>
-            <br>
-            <table border="0" cellpadding="0" cellspacing="0">
-               <tr>
-                  <td width="140">DMZ Host IP Address:</td>
-                  <td><input type='text' name='dmzAddr'></td>
-               </tr>
-            </table>
-            <br>
-            <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>
-         </form>
-      </blockquote>
-   </body>
-</html>
+function setRadio(){\r
+       if (document.getElementById("dmzdisable").checked == true){\r
+               document.getElementById("dmzIpstr").style.color="#666666";\r
+               document.getElementById("dmzAddr").disabled=true;\r
+               document.getElementById("dmzAddr").value="";\r
+               } else {\r
+               document.getElementById("dmzIpstr").style.color="#000000";\r
+               document.getElementById("dmzAddr").disabled=false;\r
+               document.getElementById("dmzAddr").value=addr;\r
+       }\r
+}\r
+\r
+\r
+function enbdmzInfo(){\r
+       with ( document.forms[0] ) {\r
+               document.getElementById('DMZInfo').innerHTML =\r
+               '<table border="0" cellpadding="0" cellspacing="0">'+\r
+            '<tr>'+\r
+               '<td width="25"><input type="radio" name="dmzradio" id="dmzdisable" onClick="setRadio()"></td>'+\r
+                       '<td colspan="2">Discarded</td>'+\r
+                       '</tr>'+\r
+                       '<tr>'+\r
+               '<td width="25"><input type="radio" name="dmzradio" id="dmzenable" onClick="setRadio()"></td>'+\r
+               '<td colspan="2">Forwarded to the DMZ host</td>'+\r
+                       '</tr>'+\r
+                       '<td width="25">&nbsp;</td>'+\r
+               '<td width="160" name="dmzIpstr" id="dmzIpstr">IP address of DMZ host:</td>'+\r
+               '<td><input type="text" name="dmzAddr" id="dmzAddr"></td>'+\r
+               '</table>';\r
+       }\r
+}\r
+\r
+function frmLoad() {\r
+\r
+               enbdmzInfo();\r
+\r
+       if (addr == '' || addr == '0.0.0.0'){\r
+               document.getElementById("dmzdisable").checked=true;\r
+               document.getElementById("dmzenable").checked=false;\r
+               document.getElementById("dmzAddr").value="";\r
+               document.getElementById("dmzIpstr").style.color="#666666";\r
+               document.getElementById("dmzAddr").disabled=true;\r
+       } else {\r
+               document.getElementById("dmzdisable").checked=false;\r
+               document.getElementById("dmzenable").checked=true;\r
+               document.getElementById("dmzAddr").value=addr;\r
+               document.getElementById("dmzIpstr").style.color="#000000";\r
+       }\r
+\r
+}\r
+\r
+function btnApply() {\r
+       with ( document.forms[0] ) {\r
+               if (dmzradio[0].checked == true){\r
+                       if (addr == '' || addr == '0.0.0.0'){\r
+                               var loc = 'scdmz.html';\r
+               var code = 'window.location.href="/';\r
+                               code += loc + '"';\r
+               eval(code);\r
+            } else {\r
+               do_cgi();\r
+            }\r
+               } else {\r
+                       if (addr == dmzAddr.value && addr != ''){\r
+                               var loc = 'scdmz.html';\r
+               var code = 'window.location.href="/';\r
+                               code += loc + '"';\r
+               eval(code);\r
+                       } else {\r
+                               do_cgi();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+function do_cgi() {\r
+       var loc = 'scdmz.cmd?';\r
+       loc += 'checkNum=' + randomNum + '&';\r
+       with ( document.forms[0] ) {\r
+       if (dmzradio[0].checked == true){\r
+               loc += 'address=0.0.0.0';\r
+       } else {\r
+               if (isValidIpAddress(dmzAddr.value) == false){\r
+                       alert('DMZ host address "' + dmzAddr.value + '" is invalid IP address.');\r
+                       return;\r
+               }\r
+               loc += 'address=' + dmzAddr.value;\r
+       }\r
+       }\r
+       var code = 'window.location.href="/'; // for Mac safari browser compatibility\r
+       code += loc + '"';\r
+       eval(code);\r
+}\r
+\r
+// done hiding -->\r
+</script>\r
+\r
+   </head>\r
+   <body onLoad='frmLoad()'>\r
+\r
+         <form onsubmit="return false" class="formpadding">\r
+<table border="0" cellpadding="0" cellspacing="3" width="98%">
+<tr>
+  <td><b><font class="netgear">DMZ Host</font></b></td>
+</tr>
+<tr><td>&nbsp;</td></tr>
+<tr>\r
+  <td background="liteblue.gif" height="12">&nbsp;</td>\r
+</tr>
+</table>
+            \r
+            <table border="0" cellpadding="0" cellspacing="0">\r
+            <tr><td width="580">\r
+            A DMZ host is a computer on your local network that can be accessed from the Internet regardless of port forwarding and firewall settings.\r
+            </td></tr>\r
+\r
+            </table>\r
+            <br>\r
+            <table border="0" cellpadding="0" cellspacing="0">\r
+            <tr><td width="580">\r
+               Those IP packets from the Internet that do NOT belong to any applications configured in the port forwarding table will be:\r
+               </td></tr>\r
+            </table>\r
+            <br>\r
+            <p ID="DMZInfo"></p>\r
+\r
+<table border="0" cellpadding="0" cellspacing="3" width="98%">
+<tr>\r
+  <td background="liteblue.gif" height="12">&nbsp;</td>\r
+</tr>
+</table>\r
+            <table width="520" border="0">\r
+            <tr>\r
+            <td align="left">\r
+                   <input type='button' onClick='btnApply()' value='Apply'> \r
+                    <input type="button" onClick="btnCancel('scdmz.html')" value="Cancel">\r
+            </td>\r
+            </tr>\r
+\r
+            </table>\r
+         </form>\r
+\r
+   </body>\r
+</html>\r