Ticket #3513: text.html

File text.html, 13.6 KB (added by Fernando Pelliccioni <fpelliccioni@…>, 13 years ago)

HTML file that contains the text to parse

Line 
1<script language=JavaScript>
2var statusPara = new Array(
32,
40,
516,
620000,
7152,
8"4.0.1 Build 080909 Rel.52917n ",
9"WA500G v2/WA501G v1 081520C2",
100,0 );
11</script>
12<script language=JavaScript>
13var lanPara = new Array(
14"00-23-CD-CC-64-D3", "192.168.0.254", "255.255.255.0",
150,0 );
16</script>
17<script language=JavaScript>
18var wlanPara = new Array(
195,
20"HG520s",
211,
222,
23"00-23-CD-CC-64-D3",
24"192.168.0.254",
250,
265,
27"10 dB",
280,0 );
29</script>
30<script language=JavaScript>
31var statistList = new Array(
321173528, 236492, 1595, 1428,
330,0 );
34</script>
35<script language=JavaScript>
36var wanPara = new Array(
370, "00-23-CD-CC-64-D3", "0.0.0.0", 1, "0.0.0.0", 0, 0, "0.0.0.0", 2, 1, 0, "0.0.0.0 , 0.0.0.0", "", 0,
380,0 );
39</script>
40<meta http-equiv="pragma" content="no-cache">
41<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
42<LINK href="/dynaform/css_main.css" rel=stylesheet>
43<script language="JavaScript" src="/dynaform/common.js" type="text/JavaScript"></script>
44<script language="JavaScript"><!--
45if(window.parent == window){window.location.href="http://192.168.0.254";}
46function Click(){ window.event.returnValue=false;}
47document.oncontextmenu=Click;
48//--></script>
49
50<script language=javascript><!--//
51function doRefresh(){location.href="StatusRpm.htm"; return true;}
52function doConnect(n){
53var s = "&wan="+n;
54location.href="StatusRpm.htm?Connect=Connect"+s;return true;
55}
56function doDisConnect(n){
57var s = "&wan="+n;
58location.href="StatusRpm.htm?Disconnect=Disconnect"+s;return true;
59}
60function doRenew(n){
61var s = "&wan="+n;
62location.href="StatusRpm.htm?RenewIp=Renew"+s;return true;
63}
64function doRelease(n){
65var s = "&wan="+n;
66location.href="StatusRpm.htm?ReleaseIp=Release"+s;return true;
67}
68function doLogin(n){
69var s = "&wan="+n;
70location.href="StatusRpm.htm?Login=Login"+s;return true;
71}
72function doLogout(n){
73var s = "&wan="+n;
74location.href="StatusRpm.htm?Logout=Logout"+s;return true;
75}
76var wanTypeStringArray = new Array(
77" ",
78"<span id = \"t_dyn_ip\">Dynamic IP</span>",
79"<span id =\"t_static_ip\">Static IP</span>",
80"PPPoE",
81"<span id = \"t_ie_dyn\">IEEE802.1X + Dynamic IP</span>" ,
82"<span id = \"t_ie_static\">IEEE802.1X + Static IP</span>",
83"<span id = \"t_big_pond_cable\">Big Pond Cable</span>",
84"L2TP",
85"PPTP"
86);
87var wanStatusStringArray = new Array(
88" ",
89"<span id = \"t_disabled\">Disabled</span>",
90"<span id = \"t_timeout\">Timeout</span>",
91"<span id = \"t_link_down\">Link Down</span>",
92"<span id = \"t_link_up\">Link Up</span>"
93);
94var wlanTypeStringArray = new Array(
95" ",
96"11Mbps (802.11b)",
97"54Mbps (802.11g)",
98"<span id=\"t_sta\">108Mbps (Static)</span>",
99"<span id=\"t_dyn\">108Mbps (Dynamic)</span>",
100" "
101);
102var IEEE8021xLoginStringArray = new Array(
103" ",
104"<span id = \"t_not_log_in\">Not log in</span>" ,
105"<span id = \"t_logging_in\">Logging in, please wait...</span>" ,
106"<span id = \"t_longin_successfully\">Login successfully</span>"
107);
108var DHCPStringArray = new Array(
109" ",
110"<span id = \"t_obtaining_net_paramenter\">Obtaining network parameters...</span>"
111);
112var maskArray = new Array(
113"255.0.0.0",
114"255.255.0.0",
115"255.255.255.0"
116);
117var wlanChannelWidthArray = new Array(
118"",
119"20M",
120"Auto",
121"40M"
122);
123--></script></head>
124<BODY onload="LoadHelp('StatusHelpRpm.htm');setTagStr(document,'ntw_status'); resize(this);" onResize="resize(this);">
125<center><form action="StatusRpm.htm" enctype="multipart/form-data" method="get">
126<TABLE id="autoWidth">
127<TBODY>
128<TR><TD class=h1 colspan=3 id = "t_title">Status</TD></TR>
129<TR><TD class=blue colspan=3></TD></TR>
130<TR><TD class=Item id = "t_firm_vs">Firmware Version:</TD><TD colspan=2><DIV ID="fversion"></DIV></TD></TR>
131<TR><TD class=Item id = "t_hd_vs">Hardware Version:</TD><TD colspan=2><DIV ID="hversion"></DIV></TD></TR>
132<TR><TD class=blue colspan=3></TD></TR>
133<script language="JavaScript">
134if(statusPara[1]!=0){document.write('<TR><TD class=h2 colspan=3 id = "t_lan">LAN</TD></TR>');}
135else{document.write('<TR><TD class=h2 colspan=3 id = "t_wired">Wired</TD></TR>');}
136</script>
137<TR><TD width=25% class=Item id = "t_mac_addr">MAC Address:</TD><TD colspan=2><DIV ID="lanMac">-</DIV></TD></TR>
138
139<TR><TD class=Item id = "t_ip_addr">IP Address:</TD><TD colspan=2 ><DIV ID="lanIP">-</DIV></TD></TR>
140<TR><TD class=Item id = "t_sub_mask">Subnet Mask:</TD><TD colspan=2 ><DIV ID="lanMask">-</DIV></TD></TR>
141<TR><TD class=blue colspan=3></TD></TR>
142<script language="JavaScript"><!--
143var apModeName = new Array(
144"<span id=\"t_node_disable\">Disabled</span>",
145"<span id=\"t_acc_point\">Access Point</span>",
146"<span id=\"t_client1\">Client</span>",
147"<span id=\"t_client2\">Client</span>",
148"<span id=\"t_repeater\">Repeater</span>",
149"<span id=\"t_unRepeater\">Universal Repeater</span>",
150"<span id=\"t_bridge_p2p\">Bridge (Point to Point)</span>",
151"<span id=\"t_bridge_p2m\">Bridge (Point to Multi-Point)</span>",
1520, 0
153);
154var maskType = lanPara[2];
155if (statusPara[0] >= 1)
156{
157var wlanMode = apModeName[wlanPara[0]];
158var wlanSta = (wlanPara[0] == 0)?"<span id = \"t_disable\">Disable</span>":"<span id = \"t_enable\">Enable</span>" ;
159var wlanName =wlanPara[1];
160while(wlanName.indexOf(" ")!=-1)
161{
162 wlanName = wlanName.replace(" ", "&nbsp;");
163}
164var wlanChannel=wlanPara[2];
165var wlanModeIndex=wlanPara[3];
166var wlanMac=wlanPara[4];
167var wlanIp=wlanPara[5];
168var wlanRssi=wlanPara[8];
169document.write('<TR><TD class=h2 colspan=3 id = "t_wireless">Wireless</TD></TR>');
170if ((statusPara[0] == 2) && (wlanPara[0] > 0)){
171document.write('<TR><TD class=Item id="t_mode1">Operating Mode:</TD><TD colspan=2>' + wlanMode +'</TD></TR>');
172}
173else{
174document.write('<TR><TD class=Item id = "t_wireless_radio">Wireless Radio:</TD><TD colspan=2>' + wlanSta +'</TD></TR>');
175}
176if (wlanPara[0] >= 2){
177document.write('<TR><TD class=Item id="t_signal">Signal:</TD><TD colspan=2>' + wlanRssi +'</TD></TR>');
178}
179if ((wlanPara[0] == 1) || (wlanPara[0] == 2) || (wlanPara[0] == 4) || (wlanPara[0] == 5)){
180document.write('<TR><TD class=Item>SSID:</TD><TD colspan=2>' + wlanName +'</TD></TR>');
181}
182else if (wlanPara[0] > 0){
183document.write('<TR><TD class=Item id="t_remoteMAC">Remote MAC:</TD><TD colspan=2>' + wlanName +'</TD></TR>');
184}
185document.write('<TR><TD class=Item id = "t_channel">Channel:</TD><TD colspan=2>' + wlanChannel +'</TD></TR>');
186if (wlanPara[7]!=7){
187document.write('<TR><TD class=Item id = "t_mode">Mode:</TD><TD colspan=2>' + wlanTypeStringArray[wlanModeIndex] +'</TD></TR>');
188}
189 document.write('<TR><TD class=Item id = "t_mac_addr2">MAC Address:</TD><TD colspan=2>' + wlanMac +'</TD></TR>');
190 document.write('<TR><TD class=Item id = "t_ip_addr2">IP Address:</TD><TD colspan=2>' + wlanIp +'</TD></TR>');
191 document.write('<TR><TD class=blue colspan=3></TD></TR>');
192}
193
194/* -------------------------------------------------------------------------------------------------------------------- */
195var row = 0;
196var wanStatusIndex;
197var wanTypeIndex;
198var IEEE8021xStatusIndex;
199var DHCPBtnStatus;
200var DHCPStatusIndex;
201for (var i=1; i<=statusPara[1]; i++)
202{
203 row = (i-1) * statusPara[2];
204
205 if (statusPara[1] == 1)
206 {
207 document.write('<TR><TD class=h2 colspan=3 id = "t_wan1">WAN</TD></TR>');
208 }
209 else
210 {
211 wanStatusIndex = wanPara[row];
212 document.write('<TR><TD class=h2 colspan=3>WAN'+ i +'</TD></TR>');
213 document.write('<TR><TD class=Item id = "t_status">Status:</TD><TD colspan=2>' +
214 wanStatusStringArray[wanStatusIndex] +'</TD></TR>');
215 }
216
217 document.write('<TR><TD class=Item id = "t_mac_addr1" name = "t_mac_addr1">MAC Address:</TD><TD colspan=2>' + wanPara[row+1] +'</TD></TR>');
218 wanTypeIndex = wanPara[row+3];
219 document.write('<TR><TD class=Item id = "t_ip_addr1" name = "t_ip_addr1">IP Address:</TD><TD>' + wanPara[row+2] +'</TD><TD>' + wanTypeStringArray[wanTypeIndex] +'</TD></TR>');
220 document.write('<TR><TD class=Item id = "t_sub_mask1" name = "t_sub_mask1">Subnet Mask:</TD><TD>' + wanPara[row+4] +'</TD>');
221
222 IEEE8021xStatusIndex = wanPara[row+6];
223 if (wanPara[row+5] == 1)
224 {
225 document.write('<TD class=emp><input name=Logout type=button class=button value=Logout onClick="return doLogout(' + i +');">&nbsp;&nbsp;' + IEEE8021xLoginStringArray[IEEE8021xStatusIndex] +'</TD></TR>');
226 }
227 else if(wanPara[row+5] == 2)
228 {
229 document.write('<TD class=emp><input name=Login type=button class=button value=Login onClick="return doLogin(' + i +');">&nbsp;&nbsp;' + IEEE8021xLoginStringArray[IEEE8021xStatusIndex] +'</TD></TR>');
230 }
231 else
232 {
233 document.write('<TD>&nbsp;</TD></TR>');
234 }
235
236 document.write('<TR><TD class=Item id = "t_def_gt" name = "t_def_gt">Default Gateway:</TD><TD>' + wanPara[row+7] +'</TD>');
237 DHCPBtnStatus = (wanPara[row+9] == 0)?"disabled":" ";
238 DHCPStatusIndex = wanPara[row+10];
239 if (wanPara[row+8] == 1)
240 {
241 document.write('<TD class=emp><input name="ReleaseIP" type=button class=button value="Release" onClick="return doRelease(' + i +');" ' + DHCPBtnStatus +'>&nbsp;&nbsp;' + DHCPStringArray[DHCPStatusIndex] +'</TD></TR>');
242 }
243 else if (wanPara[row+8] == 2)
244 {
245 document.write('<TD class=emp><input name="RenewIP" type=button class=button value="Renew" onClick="return doRenew(' + i +');" ' + DHCPBtnStatus +'>&nbsp;&nbsp;' + DHCPStringArray[DHCPStatusIndex] +'</TD></TR>');
246 }
247 else
248 {
249 document.write('<TD>&nbsp;</TD></TR>');
250 }
251 document.write('<TR><TD class=Item id = "t_ddns_ser">DNS Server:</TD><TD colspan=2>' + wanPara[row+11] +'</TD></TR>');
252 if(3==wanTypeIndex || 6==wanTypeIndex || 7==wanTypeIndex || 8==wanTypeIndex)
253 {
254 var pre = /\d+/;
255 var front=pre.exec(wanPara[row+12]);
256 var back = /\D\d+\S+/;
257 var end=back.exec(wanPara[row+12]);
258 //document.write('<TR><TD class=Item id = "t_online_time">Online Time:</TD><TD>' + wanPara[row+12] +'</TD>');
259 document.write('<TR><TD class=Item id = "t_online_time">Online Time:</TD><TD>' + front + '<span id="t_days">&nbsp;day(s)</span>'+ end +'</TD>');
260 if (wanPara[row+13] == 0)
261 document.write('<TD><input name=Connect type=button class=button id=Connect value=Connect onClick="return doConnect(' + i +');" ></TD></TR>');
262 else if(wanPara[row+13] == 1)
263 document.write('<TD><input name=Disconnect type=button class=button id=Disconnect value=Disconnect onClick="return doDisConnect(' + i +');" ></TD></TR>');
264 else if (wanPara[row+13] == 2)
265 document.write('<TD class=emp id="t_connecting">Connecting...</TD></TR>');
266 }
267 document.write('<TR><TD class=blue colspan=3></TD></TR>');
268}
269--></script>
270
271<!-- ******************************************************************************************** -->
272<TR><TD class=h2 colspan=3 id = "t_trff_stat">Traffic Statistics</TD></TR>
273<TR><TD colspan=3>
274<table border=0>
275<script language="JavaScript"><!--
276if (statusPara[1] == 1 || statusPara[1] == 0)
277{
278 document.write('<TR><TD width=30%></TD><TD class=ListTC2 width=30% id = "t_received">Received</TD><TD class=ListTC2 id = "t_sent">Sent</TD></TR>');
279 document.write('<TR><TD class=Item id = "t_byt">Bytes:</TD><TD class=ListC2>' + statistList[0] + '</TD><TD class=ListC2>' + statistList[1] + '</TD></TR>');
280 document.write('<TR><TD class=Item id = "t_pcks">Packets:</TD><TD class=ListC2>' + statistList[2] + '</TD><TD class=ListC2>' + statistList[3] + '</TD></TR>');
281}
282else
283{
284 document.write('<tr><td>&nbsp;</td><td class = ListTC2 id = "t_rate" >Rate</td><td class=ListTC2 id = "t_rece_byt">Received (Bytes)</td><td class=ListTC2>Sent (Bytes)</td><td class=ListTC2 id = "t_rece_pck">Received (Packets)</td><td class=ListTC2 id = "t_sent_pcks">Sent (Packets)</td></tr>');
285 var total1=0;
286 var total2=0;
287 var total3=0;
288 var total4=0;
289 for (var i=0; i<statusPara[1]; i++)
290 {
291 total1 = total1 + statistList[i*4];
292 total2 = total2 + statistList[i*4+1];
293 total3 = total3 + statistList[i*4+2];
294 total4 = total4 + statistList[i*4+3];
295 }
296 document.write('<tr><td class=Item id = "t_total">Total</td><td class=ListC2>' + total1 + '</td><td class=ListC2>' + total2 + '</td><td class=ListC2>' + total3 + '</td>' +'<td class=ListC2>'+ total4 +'</td></tr>');
297 for (var i=1; i<=statusPara[1]; i++)
298 document.write('<tr><td class=Item>WAN'+i + '</td><td class=ListC2>' + statistList[i*4-4] + '</td><td class=ListC2>' + statistList[i*4-3] + '</td><td class=ListC2>' + statistList[i*4-2] + '</td> '+ '<td class=ListC2>' + statistList[i*4-1] + '</td></tr>');
299}
300--></script>
301
302</table></TD></TR>
303
304<!-- ******************************************************************************************** -->
305<TR><TD class=blue colspan=3></TD></TR>
306<TR><TD class=Item id = "t_sys_up_time">System Up Time:</TD><TD><DIV ID="activeTime">-</DIV></TD><TD><input name="Refresh" class="button" type="button" id="Refresh" value="Refresh" onClick="return doRefresh();"></TD></TR>
307</TBODY></TABLE>
308</form></center></BODY></HTML>
309
310<!-- ******************************************************************************************** -->
311<script language="JavaScript"><!--
312var timeout = statusPara[3];
313window.setTimeout("doRefresh()",timeout);
314var unDays = parseInt(statusPara[4]/(24*60*60),10);
315var unHours = parseInt((statusPara[4]%(24*60*60))/(60*60),10);
316var unMinutes = parseInt(((statusPara[4]%(24*60*60))%(60*60))/60,10);
317var unSeconds = ((statusPara[4]%(24*60*60))%(60*60))%60;
318unHours = (unHours < 10)?("0"+unHours):unHours;
319unMinutes = (unMinutes < 10)?("0"+unMinutes):unMinutes;
320unSeconds = (unSeconds < 10)?("0"+unSeconds):unSeconds;
321var upTime = unDays+" " + "<span id = \"t_day\"> day(s) </span>"+unHours+":"+unMinutes+":"+unSeconds;
322document.getElementById("activeTime").innerHTML = upTime;
323document.getElementById("fversion").innerHTML = statusPara[5];
324document.getElementById("hversion").innerHTML = statusPara[6];
325document.getElementById("lanMac").innerHTML = lanPara[0];
326document.getElementById("lanIP").innerHTML = lanPara[1];
327document.getElementById("lanMask").innerHTML = lanPara[2];
328--></script>