http://downloads.netgear.com/files/GPL/DM111PSP_v3.61d_GPL.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / wlqosedit.html
index 402f722..d411259 100755 (executable)
@@ -1,24 +1,14 @@
-<!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>Add Wireless QoS Rule</title>
-       <meta http-equiv="Pragma" content="no-cache">
-
-       <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css">
-       <script src="usr_menus_dropdown.js" type="text/javascript"></script>
-       <script src="usr_menus_build.js" type="text/javascript"></script>
-       <link href="usr_layout.css" type="text/css" rel="stylesheet" /><script src="usr_layout.js" type="text/javascript"></script>
-       <link href="usr_device.css" type="text/css" rel="stylesheet" /><script src="usr_device.js" type="text/javascript"></script><link href="usr_91xx.css" type="text/css" rel="stylesheet" /><script src="usr_91xx.js" type="text/javascript"></script><script src="usr_resources.js" type="text/javascript"></script>
-
-       <script type="text/javascript" src="util.js"></script>
-       <script type="text/javascript" src="portName.js"></script>
-       <script type="text/javascript">
+   <head>
+      <meta http-equiv="Pragma" content="no-cache">
+      <LINK href="stylemain.css" type="text/css" rel="stylesheet">
+         <LINK href="colors.css" type="text/css" rel="stylesheet">
+            <script language="javascript" src="util.js"></script>
+            <script language="javascript" src="portName.js"></script>
+            <script language="javascript">
 <!-- hide
 
-<%ejGetWlStr(wlQosVars)%>
+<%ejGetWl(wlQosVars)%>
 
 function frmLoad() {
    with ( document.forms[0] ) {
@@ -48,66 +38,79 @@ function btnApply() {
    var loc = 'wlqos.cmd?action=editsubmit';
 
    with ( document.forms[0] ) {
+
       if ( txtclsname.value == '' ) {
-         alert('Please enter the QoS class name.');
+         msg = 'Please enter QoS class name.';
+         alert(msg);
          return;
       }
 
       if ( isValidName(txtclsname.value) == false ) {
-         alert("The QoS class name cannot use special characters.");
+         msg = 'Please enter valid QoS class name: No special characters.';
+         alert(msg);
          return;
-      }
+      }       
 
       if ( srcaddr.value == "" && srcmask.value == "" && srcport.value == "" &&
            dstaddr.value == "" && dstmask.value == "" && dstport.value == "" &&
-           protocol.selectedIndex < 0 ) {
-         alert("At least one condition must be specified.");
+           protocol.selectedIndex == 0 ) {
+         msg = 'At least one condition must be specified.'
+         alert(msg);
          return;
       }
 
       if ( srcaddr.value != "" && isValidIpAddress(srcaddr.value) == false ) {
-         alert('Source address "' + srcaddr.value + '" is an invalid IP address.');
+         msg = 'Source address "' + srcaddr.value + '" is invalid IP address.';
+         alert(msg);
          return;
       }
 
       if ( srcmask.value != "" && isValidSubnetMask(srcmask.value) == false ) {
-         alert('Source subnet mask "' + srcmask.value + '" is an invalid subnet mask.');
+         msg = 'Source subnet mask "' + srcmask.value + '" is invalid subnet mask.';
+         alert(msg);
          return;
       }
 
       if ( srcaddr.value == "" && srcmask.value != "" ) {
-         alert('A source subnet mask requires a source IP address.');
+         msg = 'Cannot have source subnet mask without source IP address.';
+         alert(msg);
          return;
       }
-
+  
       if ( srcport.value != "" && isValidPort(srcport.value) == false ) {
-         alert('Source port "' + srcport.value + '" is an invalid port number or port range.');
+         msg = 'Source port "' + srcport.value + '" is invalid port number or port range.';
+         alert(msg);
          return;
       }
 
       if ( dstaddr.value != "" && isValidIpAddress(dstaddr.value) == false ) {
-         alert('Destination address "' + dstaddr.value + '" is an invalid IP address.');
+         msg = 'Destination address "' + dstaddr.value + '" is invalid IP address.';
+         alert(msg);
          return;
       }
 
       if ( dstmask.value != "" && isValidSubnetMask(dstmask.value) == false ) {
-         alert('Destination subnet mask "' + dstmask.value + '" is an invalid subnet mask.');
+         msg = 'Destination subnet mask "' + dstmask.value + '" is invalid subnet mask.';
+         alert(msg);
          return;
       }
 
       if ( dstaddr.value == "" && dstmask.value != "" ) {
-         alert('A destination subnet mask requires a destination IP address.');
+         msg = 'Cannot have destination subnet mask without destination IP address.';
+         alert(msg);
          return;
       }
 
       if ( dstport.value != "" && isValidPort(dstport.value) == false ) {
-         alert('Destination port "' + dstport.value + '" is an invalid port number or port range.');
+         msg = 'Destination port "' + dstport.value + '" is invalid port number or port range.';
+         alert(msg);
          return;
       }
-
-      if ( (srcport.value != "" || dstport.value != "") &&
-           (protocol.selectedIndex > 2) ) {
-         alert('TCP or UDP Protocol must be selected together with port number.');
+      
+      if ( (srcport.value != "" || dstport.value != "") && 
+           (protocol.selectedIndex == 0 || protocol.selectedIndex == 4) ) {
+         msg = 'TCP or UDP Protocol must be selected together with port number.';
+             alert(msg);
              return;
       }
 
@@ -118,8 +121,8 @@ function btnApply() {
       loc += '&clsName=' + encodeUrl(txtclsname.value);
 
       // priority
-      var idx = priority.selectedIndex;
-      var val = priority.options[idx].value;
+      idx = priority.selectedIndex;
+      val = priority.options[idx].value;
       loc += '&priority=' + val;
 
       // protocol
@@ -151,83 +154,97 @@ function btnApply() {
       if ( dstport.value != "" )
          loc += '&dstPort=' + dstport.value;
    }
-   eval('location = "' + loc + '"');
+   var code = 'location="' + loc + '"';
+   eval(code);
 }
 
 // done hiding -->
-   </script>
-</head>
-<body onload="frmLoad(); initMenu();">
-
-<script type="text/javascript">
-       writeHeader("Add Wireless QoS Rule");
-</script>
-
-<form>
-       <p>A wireless QoS rule consists of a class name and at least one of the conditions below.
-       All of the specified conditions in this classification rule must be satisfied for the
-       rule to take effect.
-       Press the <b>Save</b> button to save and activate the rule.</p>
-
-       <table border="0">
-               <tr>
-                       <td><label for="txtclsname">Traffic class name:</label></td>
-                       <td><input type="text" size="22" maxlength="22" name="txtclsname" id="txtclsname"></td>
-               </tr>
-               <tr>
-                       <td><label>Transmit priority:</label></td>
-                       <td><select name="priority">
-                                       <option value="0" selected>0 - WMM Best Effort (default)</option>
-                                       <option value="1">1 - WMM Background</option>
-                                       <option value="2">2 - WMM Background</option>
-                                       <option value="3">3 - WMM Best Effort</option>
-                                       <option value="4">4 - WMM Video Priority</option>
-                                       <option value="5">5 - WMM Video Priority</option>
-                                       <option value="6">6 - WMM Voice Priority</option>
-                                       <option value="7">7 - WMM Voice Priority</option>
-                               </select></td>
-               </tr>
-               <tr>
-                       <td>Protocol:</td>
-                       <td><select size="1" name="protocol">
-                                       <option value="0">TCP/UDP</option>
-                                       <option value="1">TCP</option>
-                                       <option value="2">UDP</option>
-                                       <option value="3">ICMP</option>
-                               </select></td>
-               </tr>
-               <tr>
-                       <td><label for="srcaddr">Source IP address:</td>
-                       <td><input type="text" size="22" maxlength="22" name="srcaddr" id="srcaddr"></td>
-               </tr>
-               <tr>
-                       <td><label for="srcmask">Source subnet mask:</td>
-                       <td><input type="text" size="22" maxlength="22" name="srcmask" id="srcmask"></td>
-               </tr>
-               <tr>
-                       <td><label for="srcport">UDP/TCP source port:</td>
-                       <td><input type="text" size="22" maxlength="22" name="srcport" id="srcport"> <span class="clsNote">(port or port:port)</span></td>
-               </tr>
-               <tr>
-                       <td><label for="dstaddr">Destination IP address:</td>
-                       <td><input type="text" size="22" maxlength="22" name="dstaddr" id="dstaddr"></td>
-               </tr>
-               <tr>
-                       <td><label for="dstmask">Destination subnet mask:</td>
-                       <td><input type="text" size="22" maxlength="22" name="dstmask" id="dstmask"></td>
-               </tr>
-               <tr>
-                       <td><label for="dstport">UDP/TCP destination port:</td>
-                       <td><input type="text" size="22" maxlength="22" name="dstport" id="dstport"> <span class="clsNote">(port or port:port)</span></td>
-               </tr>
-       </table>
-
-       <p><input type='button' onClick='btnApply()' value="Save"></p>
-</form>
-
-<script type="text/javascript">
-       writeFooter();
-</script>
-
-</body>
+      </script>
+   </head>
+   <body onLoad='frmLoad()'>
+      <blockquote>
+         <form>
+            <b>Add/Edit Wireless Quality of Service Rule</b><br>
+            <br>
+            The screen controls&nbsp; a wireless traffic QoS rule. A rule 
+            consists of a class name and at least one condition below. All of the specified 
+            conditions in this classification rule must be satisfied for the rule to take 
+            effect. Click 'Save/Apply' to save and activate the rule.
+            <br>
+            <br>
+            <table cellSpacing="0" cellPadding="0" border="0">
+               <tr>
+                  <td>Traffic Class Name:</td>
+                  <td><input type="text" size="22" maxlength="22" name="txtclsname"></td>
+               </tr>
+               <tr>
+                  <td colSpan="2">&nbsp;</td>
+               </tr>
+               <tr>
+                  <td align="left" colSpan="2"><b>Assign Wireless Priority</b><br><br></td>
+               </tr>
+               <tr>
+                  <td>Wireless Transmit Priority:</td>
+                  <td><select name="priority">
+                        <option value="0" selected>0 - WMM Best Effort (default)</option>
+                        <option value="1">1 - WMM Background</option>
+                        <option value="2">2 - WMM Background</option>
+                        <option value="3">3 - WMM Best Effort</option>
+                        <option value="4">4 - WMM Video Priority</option>
+                        <option value="5">5 - WMM Video Priority</option>
+                        <option value="6">6 - WMM Voice Priority</option>
+                        <option value="7">7 - WMM Voice Priority</option>
+                     </select></td>
+               </tr>
+               <tr>
+                  <td colSpan="2">&nbsp;</td>
+               </tr>
+               <tr>
+                  <td align="left" colSpan="2">
+                     <P><b>Specify Traffic Classification Rules </P>
+                     </B>
+                  </td>
+               <TR>
+                  <td colSpan="2">&nbsp;</td>
+               <tr>
+                  <td>Protocol:</td>
+                  <td><select size="1" name="protocol">
+                        <option value="-1" selected>
+                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<option value="0">
+                        TCP/UDP<option value="1">
+                        TCP<option value="2">
+                        UDP<option value="3">ICMP</option>
+                     </select></td>
+               </tr>
+               <tr>
+                  <td>Source IP Address:</td>
+                  <td><input type="text" size="22" maxlength="22" name="srcaddr"></td>
+               </tr>
+               <tr>
+                  <td>Source Subnet Mask:</td>
+                  <td><input type="text" size="22" maxlength="22" name="srcmask">&nbsp;</td>
+               </tr>
+               <tr>
+                  <td>UDP/TCP Source Port (port or port:port):</td>
+                  <td><input type="text" size="22" maxlength="22" name="srcport"></td>
+               </tr>
+               <tr>
+                  <td>Destination IP Address:</td>
+                  <td><input type="text" size="22" maxlength="22" name="dstaddr"></td>
+               </tr>
+               <tr>
+                  <td>Destination Subnet Mask:</td>
+                  <td><input type="text" size="22" maxlength="22" name="dstmask"></td>
+               </tr>
+               <tr>
+                  <td>UDP/TCP Destination Port (port or port:port):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
+                  <td><input type="text" size="22" maxlength="22" name="dstport"></td>
+               </tr>
+               </table>
+            <br>
+            <br>
+            <center><input type='button' onClick='btnApply()' value='Save/Apply'></center>
+         </form>
+      </blockquote>
+   </body>
 </html>