1 /* -------------------------------------------------------------------------- */
3 (c) 2004-2005 U.S. Robotics Corporation.
5 /* -------------------------------------------------------------------------- */
10 User name: "admin" or "power" or "user"
11 Standard: "annex_c" or ... what?
12 Protocol: "Bridge" or ... what?
21 var strUsername = "<%ejGetJS(curUserName)%>";
22 if (strUsername == "user")
23 return createMenuUser();
25 return createMenuAdmin();
29 /* --------------------------------------------------------------------------
31 These represent the various menus. There is a main menu bar and some sub-menus.
33 The second and third strings in each item need to be translated.
34 The first string is a filename and does not need to be translated.
36 This is the only section that contains text to be translated.
38 The tag below must not be modified. It is used by
39 Translation to extract the text to be translated.
40 *** TRANSLATION START -->
43 // N.B.: All filenames must be in lowercase here.
45 function createMenuUser()
47 var strWireless = "<%ejGetWlJS(wlInterface)%>";
49 var bar = new MenuBar(7);
51 var dropdown = bar.addDropdown("Status", 10);
52 dropdown.addItem("General", "", "info.html");
53 dropdown.addItem("DSL", "", "wancfg.cmd?action=view");
54 dropdown.addItem("System Log", "", "logintro.html");
55 dropdown.addItem("LAN Statistics", "", "statsifc.html");
56 dropdown.addItem("WAN Statistics", "", "statswan.cmd");
57 dropdown.addItem("ATM Statistics", "", "statsatm.cmd");
58 dropdown.addItem("ADSL Statistics", "", "statsadsl.html");
60 dropdown = bar.addDropdown("LAN", 10);
61 dropdown.addItem("Routing - Routing Table", "", "rtroutecfg.cmd?action=view");
62 dropdown.addItem("Routing - ARP Table", "", "arpview.cmd");
64 dropdown = bar.addDropdown("Device", 10);
65 dropdown.addItem("Back up Settings", "", "backupsettings.html");
66 dropdown.addItem("Diagnostics", "", "diag.html");
67 if (strWireless == "1")
68 dropdown.addItem("SNMP", "", "snmpconfig.html");
74 function createMenuAdmin()
76 var strStd = "<%ejGetOther(sysInfo, adslStd)%>";
77 var strProtocol = "<%ejGetOther(sysInfo, noBrPrtcl)%>";
78 var bIPext = <%ejGetOther(sysInfo, pppIpExtension)%>;
79 var bFirewall = <%ejGetOther(sysInfo, enblFirewall)%>;
80 var bNAT = <%ejGetOther(sysInfo, enblNat)%>;
81 var bQoS = <%ejGetJS(enblQos)%>;
82 var strWireless = "<%ejGetWlJS(wlInterface)%>";
84 var bar = new MenuBar(7);
89 var dropdown = bar.addDropdown("Status", 10);
90 dropdown.addItem("General", "", "info.html");
91 dropdown.addItem("DSL", "", "wancfg.cmd?action=view");
92 dropdown.addItem("System Log", "", "logview.cmd");
93 dropdown.addItem("LAN Statistics", "", "statsifc.html");
94 dropdown.addItem("WAN Statistics", "", "statswan.cmd");
95 dropdown.addItem("ATM Statistics", "", "statsatm.cmd");
96 dropdown.addItem("ADSL Statistics", "", "statsadsl.html");
102 dropdown = bar.addDropdown("Internet", 17);
103 dropdown.addItem("WAN Setup", "", "wancfg.cmd");
104 if (strStd == "annex_c")
105 dropdown.addItem("ADSL Settings", "", "adslcfgc.html");
107 dropdown.addItem("ADSL Settings", "", "adslcfg.html");
109 // Only add these if VPN is unlocked
110 if (<%ejGetOther(sysInfo,enblVpn)%> == 1)
112 dropdown.addItem("VPN", "", "ipsec.cmd?action=view");
113 dropdown.addItem("VPN Local Certificates", "", "certlocal.cmd");
114 dropdown.addItem("VPN Trusted Certificates", "", "certca.cmd");
117 dropdown.addItem("Purchase VPN", "", "purchase.html");
119 if ( ((strProtocol == "PPPoE") && !bIPext) ||
120 ((strProtocol == "PPPoA") && !bIPext) ||
121 (strProtocol == "MER") ||
122 (strProtocol == "IPoA"))
124 dropdown.addItem("Default Gateway", "", "rtdefaultcfg.html");
125 dropdown.addItem("DNS Server", "", "dnscfg.html");
128 if (strProtocol != "Bridge")
130 dropdown.addItem("Access Control - IP Addresses", "", "scacccntr.cmd?action=view");
131 dropdown.addItem("Access Control - Services", "", "scsrvcntr.cmd?action=view");
133 dropdown.addItem("Dynamic DNS", "", "ddnsmngr.cmd");
139 if ( ((strProtocol == "PPPoE") && !bIPext) ||
140 ((strProtocol == "PPPoA") && !bIPext) ||
141 (strProtocol == "MER") ||
142 (strProtocol == "IPoA") ||
143 (strProtocol == "Bridge"))
145 dropdown = bar.addDropdown("LAN", 13);
146 if ( ((strProtocol == "PPPoE") && !bIPext) ||
147 ((strProtocol == "PPPoA") && !bIPext) ||
148 (strProtocol == "MER") ||
149 (strProtocol == "IPoA"))
151 dropdown.addItem("DHCP Server", "", "lancfg2.html");
152 dropdown.addItem("Mapped Interfaces", "", "portmap.cmd");
153 dropdown.addItem("Routing - Routing Table", "", "rtroutecfg.cmd?action=view");
154 dropdown.addItem("Routing - Static Routes", "", "rtroutecfg.cmd?action=viewcfg");
155 dropdown.addItem("Routing - RIP", "", "ripcfg.cmd?action=view");
156 dropdown.addItem("Routing - ARP Table", "", "arpview.cmd");
157 dropdown.addItem("DHCP Clients", "", "dhcpinfo.html");
159 dropdown.addItem("Quality of Service", "", "qoscls.cmd?action=view");
161 else if (strProtocol == "Bridge")
163 dropdown.addItem("DHCP Server", "", "lancfg2.html");
164 dropdown.addItem("Mapped Interfaces", "", "portmap.cmd");
167 dropdown.addItem("Quality of Service", "", "qoscls.cmd?action=view");
175 if (strWireless == "1")
177 dropdown = bar.addDropdown("Wireless", 11);
178 dropdown.addItem("Setup", "", "wlcfg.html");
179 dropdown.addItem("Client List", "", "wlstationlist.cmd?");
180 dropdown.addItem("AP Mode", "", "wlwds.cmd?action=view");
181 dropdown.addItem("Advanced Settings", "", "wlcfgadv.html");
182 dropdown.addItem("Quality of Service", "", "wlqos.cmd");
189 dropdown = bar.addDropdown("Security", 17);
190 if (strWireless == "1")
192 dropdown.addItem("Wireless", "", "wlsecurity.html");
193 dropdown.addItem("MAC Filter", "", "wlmacflt.cmd?action=view");
195 //WHY? if (strProtocol != "Bridge")
196 dropdown.addItem("Device Login", "", "password.html");
197 if ((strProtocol != "Not Applicable") && !bIPext)
199 if (strProtocol == "Bridge")
201 dropdown.addItem("Internet Access Control", "", "todmngr.tod?action=view");
202 dropdown.addItem("LAN MAC Filter", "", "scmacflt.cmd?action=view");
206 If it's not a bridge and the firewall is on, display filter commands
208 if ((strProtocol != "Bridge") && bFirewall)
210 dropdown.addItem("Internet Access Control", "", "todmngr.tod?action=view");
211 dropdown.addItem("IP Filtering - Outbound Filters", "", "scoutflt.cmd?action=view");
212 dropdown.addItem("IP Filtering - Inbound Filters", "", "scinflt.cmd?action=view");
216 If NAT is enabled, display virtual server commands
220 dropdown.addItem("Virtual Servers", "", "scvrtsrv.cmd?action=view");
221 dropdown.addItem("Port Triggering", "", "scprttrg.cmd?action=view");
222 dropdown.addItem("DMZ Host", "", "scdmz.html");
230 dropdown = bar.addDropdown("Device", 10);
231 dropdown.addItem("Time", "", "sntpcfg.html");
232 dropdown.addItem("Print Server", "", "ippcfg.html");
233 dropdown.addItem("Back Up Settings", "", "backupsettings.html");
234 dropdown.addItem("Restore Settings", "", "updatesettings.html");
235 dropdown.addItem("Restart", "", "resetrouter.html");
236 dropdown.addItem("Upgrade", "", "upload.html");
237 dropdown.addItem("Restore Defaults", "", "defaultsettings.html");
238 dropdown.addItem("Diagnostics", "", "diag.html");
239 if (strWireless == "1")
240 dropdown.addItem("SNMP", "", "snmpconfig.html");
246 <-- TRANSLATION END ***
247 Nothing after this needs to be translated.
248 The above tag must not be modified. It is used by
249 Translation to extract the text to be translated.