http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / userapps / broadcom / cfm / html / scdmz.html
index e4b24a8..6b736a3 100755 (executable)
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--
-       (c) 2005 U.S. Robotics Corporation
--->
 <html>
-<head>
-       <title>Security &raquo; DMZ Host</title>
-
-       <link href="usr_main.css" rel="stylesheet" type="text/css">
-       <script src="usr_menus.js" type="text/javascript"></script>
-       <script src="usr_common.js" type="text/javascript"></script>
-
-       <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
-
-   <script type="text/javascript" src="util.js"></script>
-   <script type="text/javascript">
-<!-- hide
-
-setPageTitle("<%ejGetWl(wlInterface)%>");
-
-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.assign("' + loc + '")';
-   eval(code);
-}
-
-// done hiding -->
-</script>
-</head>
-<body onload="initMenu('idMenu'); frmLoad();">
-
-<script type="text/javascript">
-       writeHeader("Security", "<%ejGet(curUserName)%>", "<%ejGetOther(sysInfo, adslStd)%>", "<%ejGetOther(sysInfo, noBrPrtcl)%>", <%ejGetOther(sysInfo, pppIpExtension)%>, <%ejGetOther(sysInfo, enblFirewall)%>, <%ejGetOther(sysInfo, enblNat)%>, "<%ejGetWl(wlInterface)%>", <%ejGet(enblQos)%>);
-</script>
-
-       <h3>DMZ Host</h3>
-
-       <p>The router will forward from the WAN to the DMZ host computer
-       any IP packets that do not belong to
-   the applications configured in the <b>Virtual Servers</b> table.</p>
-
-       <p>To activate the DMZ host, enter the computer's IP address and press <b>Apply</b>.</p>
-
-       <p>To deactivate the DMZ host, clear the IP address field and press <b>Apply</b>.</p>
-
-<form>
-       <p><label for="dmzAddr">DMZ host IP address:</label> <input type='text' name='dmzAddr' id='dmzAddr'></p>
-
-       <p><input type='button' onClick='btnApply()' value='Apply'></p>
-</form>
-
-<script type="text/javascript">
-       writeFooter();
-</script>
-
-</body>
-</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\r
+parent.helpframe.location.href="hlpdmz.html";
+var randomNum = '<%ejGet(CheckNum)%>';
+var addr = '<%ejGetOther(dmzHost)%>';
+
+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