- <script language="JavaScript" type="text/javascript">
{: r6 p4 w3 o0 o
) r h) `' A9 T" T- var WapiFlag = '0';) h; y# Z$ e' X5 u$ {" x
- var aWiFiCustFlag = '0';
9 ^4 o' ~$ A, b( b @" u - var aWiFiSSID2GInst = '';
; W7 I) Z: ]! i8 i3 z( V) | - var wifiPasswordMask='1';
! y' Y1 w+ D' o7 K9 s - var CfgMode ='HUBCMCC_RMS'; j0 o9 ^( {: J' p5 W. V; y: I
- var CurrentBin = 'CMCC';
. n1 q1 ]) D1 J% Q% ]5 L2 E8 X$ o - var curUserType='0';# m+ l2 J1 ~- i; l
- var MngtJsCmcc = '0';
- K" E8 L) `& A. ?) S0 ?( _ - var TianyiFlag = '0';' m, b/ a8 ~: P# `1 s9 l; u# i
- var wep1password;
) s% h$ a' U! w6 ^- a6 m - var wpapskpassword;& k- C; V0 c' d
- var radiuspassword;7 [( e1 C9 b* f' z
- var wep1PsdModFlag = false;. p$ \& r& ~) {, T. [9 c
- var pskPsdModFlag = false;
: g; _ b( p0 f$ R8 ]$ Y - var radPsdModFlag = false;" [7 g# V% L) |
% k) E I" x4 T: P- var g_flags = new Array();' K; S. D% C5 r) j
- g_flags[0] = 0;
# ]1 m& P' i- g# }6 d1 Q* o2 o - g_flags[1] = 0;
& @: @! R8 O2 }# \% W/ \& i - g_flags[2] = 0;
/ w& }, H) t6 o6 U7 p/ x7 K - var desc_show = "点击显示密码";$ j! a6 A: m1 ?1 H8 a2 m
- var desc_hide = "点击隐藏密码";
- x! q' W: I; `4 |' c& }2 Y" ?
F+ F/ P) v5 P; E" \2 V, _ z- J' A- function GetLanguageDesc(Name)
2 z$ g, y, Q& O* F - {
8 E' E d6 x$ w: @1 P2 Z$ O - return cfg_wlancfgdetail_language[Name];( p- R$ i) y* D9 j/ b, K
- }
# R/ ?. u& y# ]8 @* \2 O' T0 U
- G: e/ H7 D7 u! U7 p( J- var wlanpage;7 S; o3 j8 ], C9 j
- if (location.href.indexOf("e8cWlanBasic.asp?") > 0)
' |3 m, L# s) p: W. @( ]" z9 I - {3 \$ N7 v1 z8 |* _+ u5 O0 D5 {" S7 R
- wlanpage = location.href.split("?")[1];
2 @; n$ ~! D9 ~1 F. K2 F - top.WlanBasicPage = wlanpage;7 ~; V) G- m% I; F7 a7 J
- }
2 {% X- Y4 V& |- x; j - 3 n" [) n8 c, l
- wlanpage = top.WlanBasicPage;
/ r, \% B8 ^3 W5 A- N ]: i, G - 1 J$ ~8 ^7 X+ ^: c4 |
- 4 ~& {) @- a7 q+ O c% ~. m1 R9 b
- function ShowOrHideText(flag, checkBoxId, passwordId, textId, value)
4 e" R" u( A z* e7 L - {, z' L) m+ m: t& Z
- if (1 == g_flags[flag])4 ]; z( `/ v/ p6 V, n% a
- {
; Q! k( V' ]) U, b q& P' c6 D - getElById(checkBoxId).innerHTML = desc_show;
" i- }$ w. W: ]5 ]7 z8 l( A" ? - setDisplay(passwordId, 1);
2 \6 s, B8 K& P& o2 L! k - setDisplay(textId, 0);& O3 T4 N* a/ g: a, D" D" A# l
- g_flags[flag] = 0;( J7 i L3 k: Z/ @7 u/ N" V. z( E6 L
- }
; W* X9 ?1 Z9 S1 T - else
' o' y3 f, K; q9 [* `* S; D - {6 s' A6 W4 E" q7 z/ Q. Y3 m
- getElById(checkBoxId).innerHTML = desc_hide;
; T6 u! R) B4 k \ - setDisplay(passwordId, 0);
9 s9 z9 p' ^& R. L | - setDisplay(textId, 1);
# Y& A4 }$ A% u7 [* ^ - g_flags[flag] = 1;/ {/ [2 N$ ]9 J6 D. w2 b8 ~: m
- }1 B$ R6 y7 e4 l+ W
- }
& @+ Q1 D/ f& e# c+ t8 Z
+ P. a* T9 X: r; k3 X( S# H- function stWlan(domain,name,enable,ssid,BeaconType,BasicEncryptionModes,BasicAuthenticationMode,$ S2 z. `) X/ j% K! q$ f! Q2 t+ I
- KeyIndex,EncryptionLevel,WPAEncryptionModes,WPAAuthenticationMode,IEEE11iEncryptionModes,IEEE11iAuthenticationMode,& k7 ~; l+ U1 M/ m
- X_HW_WPAand11iEncryptionModes,X_HW_WPAand11iAuthenticationMode,RadiusServer,RadiusPort,RadiusKey,X_HW_ServiceEnable, LowerLayers,
1 d! l; ~* F6 }8 X, ? - X_HW_WAPIEncryptionModes,X_HW_WAPIAuthenticationMode,X_HW_WAPIServer,X_HW_WAPIPort)* }. m5 C, j0 i. `+ d) Z# j
- {
8 C2 {7 b g) T6 i/ c - this.domain = domain;
9 L8 D& c* a# V# g - this.name = name;
- ?6 S$ @5 f$ Q1 M - this.enable = enable;* W& m; X9 L* o& w
- this.ssid = ssid;
1 ~* m/ R% j4 X/ |7 |4 C7 M - this.BeaconType = BeaconType;
- _7 \% n6 w* o( B% N/ @ - this.BasicEncryptionModes = BasicEncryptionModes;8 ~0 Y# j8 W6 E; o' [4 v# P' Z; F
- this.BasicAuthenticationMode = BasicAuthenticationMode;4 M y. r& [/ p }! h
- this.KeyIndex = KeyIndex;' p X" {/ W3 ]8 ^" g2 Q
- this.EncypBit = EncryptionLevel;
$ E$ ~9 }; ?4 ` - this.WPAEncryptionModes = WPAEncryptionModes;% H+ O8 l1 c3 o
- this.WPAAuthenticationMode = WPAAuthenticationMode;
0 j# d. j& |0 a1 \: u9 E' o - this.IEEE11iEncryptionModes = IEEE11iEncryptionModes;
: a, M' @( t& x' | - this.IEEE11iAuthenticationMode = IEEE11iAuthenticationMode; D3 h+ o* E4 A/ v) p8 e
- this.X_HW_WPAand11iEncryptionModes = X_HW_WPAand11iEncryptionModes;# F; h% I4 j4 S1 L' E
- this.X_HW_WPAand11iAuthenticationMode = X_HW_WPAand11iAuthenticationMode;
# h; Q" l1 i6 d' K - this.RadiusServer = RadiusServer;8 I" m+ b# V8 k5 _# T7 \
- this.RadiusPort = RadiusPort;; d. z7 K4 `9 M2 {+ H
- this.RadiusKey = RadiusKey;$ Q" R. n/ s. R
- this.X_HW_ServiceEnable = X_HW_ServiceEnable;
% W* {* Z% `2 X) O( O: u5 q9 | - this.LowerLayers = LowerLayers;
7 W8 y) P" L% T+ n1 b2 [7 d+ F - this.X_HW_WAPIEncryptionModes = X_HW_WAPIEncryptionModes;
# K. ]& d1 Z- M1 r0 [* ]! i3 r - this.X_HW_WAPIAuthenticationMode = X_HW_WAPIAuthenticationMode;# P6 W$ V2 G' D7 }9 |' R0 O
- this.X_HW_WAPIServer = X_HW_WAPIServer;2 \! q, ]5 M) _: _) \
- this.X_HW_WAPIPort = X_HW_WAPIPort;$ } L" F6 e. _& x0 j( ^, ]
- }0 Q7 p6 v7 ]6 f
- 6 ]2 u* ]% K- W& a+ M; i* D* E* K
$ G" [/ J6 k' z9 N- function stWEPKey(domain, value)
7 V; {* Q* F4 z( v - {
2 d" L* A9 k9 ]" E4 O5 z! ?% V - this.domain = domain;3 e- l# O4 U* [# `( _
- this.value = value;* b9 k, {0 q) B- }; e
- }7 _( f/ L1 O8 {, P) ]( S4 l
- d5 A) m9 H2 y! G: [! Y- function stPreSharedKey(domain, value)$ }4 ?+ i( p% `
- {
6 i" q: i4 y, F9 V/ M- S6 Y; T - this.domain = domain;
0 o) ]+ b) D5 H& W* P - this.value = value;
0 R g+ ]: V4 w# b7 m - }
6 Z# O/ M5 M" g* M% Z" g
9 n+ V: H E0 z% n- function stMaxWLAN(idx, lang)
6 ]) J% Z9 G1 l - {( b6 J$ [. Y9 _8 f$ {) |1 O2 w" ]
- this.MAX_ID = idx;5 s5 W% A6 H; \3 ^/ [
- this.MAX_ID_LANG = lang;1 A: u! b: D- t$ m* P9 Q/ c! E
- }# M. R" K9 C8 `" P" \
* p8 a* \+ ^! a% u2 Z. m- function stIndexMapping(index,portIndex)
) Q! D9 R( w1 P# n - {
, R" v: @, \" K) i* U - this.index = index;
/ s/ a5 r) l5 x7 d - this.portIndex = portIndex;
% j' k& f) O; C: `. ?% b - }
# O9 w. y3 C @9 `/ A1 M
% m! Z2 C3 r7 s6 t. ^- function stWlanWifi(domain,name,enable,ssid,mode,channel,power,Country,AutoChannelEnable,channelWidth)7 R* [6 ]* I( D! k" `; o
- {
& [+ t# W+ W4 J" V6 A3 W1 t' @ - this.domain = domain;& j4 x1 A6 E, J& w; {
- this.name = name;
! p9 t9 s/ }# k# Z - this.enable = enable;
: v% R8 n, i( U6 I+ {1 b0 h0 a - this.ssid = ssid;- o8 i% ]( z8 O' e* F; I% l( \
- this.mode = mode;
" H) K- T8 Y/ |7 C - this.channel = channel;
' p& y+ w, D" ?8 a. h2 P - this.power = power;* I/ f& X, r9 m/ m" P, [# M
- this.RegulatoryDomain = Country;
3 ~0 c) Q# B3 U8 ~6 Z6 a - this.AutoChannelEnable = AutoChannelEnable;8 B) C% S/ l/ x, ^% ` Z& p
- this.channelWidth = channelWidth;
1 ]6 Y4 j% L2 m# } F - }/ x$ O, c& \# Z% Z' ~4 K! x6 V* M$ L
- 1 ~* o2 `- g) ?/ L
+ a; ?' E4 p# z5 u5 ~! _. B' s% U- var WlanWifiArr = new Array(new stWlanWifi("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1","ath0","1","CMCC\x2dSheenHome","11bgn","0","80","CN","1","1"),null);! n0 p+ p) H" M% S) @
- var WlanWifi = WlanWifiArr[0];5 f9 @5 ^1 K, N, C- q) A' t) W1 q c
- if (null == WlanWifi)" {& {$ X0 s3 N5 a2 q
- {% S4 C1 S9 C; F: P4 Q7 ?
- WlanWifi = new stWlanWifi("","","","","11n","","","","","");, ?" c! H, K W! H5 P0 h: I
- }0 D/ [; ?+ _8 g1 [! V
- - W9 A' }7 x' I, j/ J$ q
- var enbl = '1';
! _$ u& K" O0 I# Y3 y* D - 5 g2 o' c& \! c8 [ p4 S+ n6 Y
- var Wlan = new Array();2 h) G+ z3 L1 P: [$ S* p- P4 C
* F1 A$ [" r* C/ j- var WlanArr = new Array(new stWlan("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1","ath0","1","CMCC\x2dSheenHome","WPAand11i","None","None","1","104\x2dbit","TKIPEncryption","PSKAuthentication","TKIPandAESEncryption","PSKAuthentication","AESEncryption","PSKAuthentication","192\x2e168\x2e0\x2e100","1812","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a","1","InternetGatewayDevice\x2eLANDevice\x2e1\x2eWiFi\x2eRadio\x2e1","SMS4","WAPIPSK","192\x2e168\x2e100\x2e200","3810"),null);8 P# B( N- u$ K9 Q- e, R9 g
- 2 i' X: M/ {$ n* n
- var wlanArrLen = WlanArr.length - 1;. o! i& d9 f. q# `2 u8 {
- ' V& Z$ ]% q1 [8 \: N0 B* z
- for (i=0; i < wlanArrLen; i++), n- W2 `7 p0 {5 E) t8 A
- {
7 J9 N7 }0 j$ o4 A: Z - Wlan[i] = new stWlan();
3 d2 |9 x# s0 w9 v! y7 [0 n - Wlan[i] = WlanArr[i];
j8 W2 ^4 J! m# b/ k! E - }
0 n. n) Y* L; k7 O
5 |. [' g$ W0 w- var g_keys = new Array(new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e1","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e2","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e3","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e4","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),null);
9 n* i' Y% t! L5 p# C# T - if (null != g_keys)5 H' X# X+ y9 T' {* |
- {$ x4 B0 Z6 a l$ r- T
- wep1password = g_keys[0];, C! X" o0 }! g% Y. a
- }2 |3 o- i& U& w9 Z9 i; `
- ' P4 c; t7 |4 g* o/ _5 b
- var wpaPskKey = new Array(new stPreSharedKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2ePreSharedKey\x2e1","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),null);- D u1 ~' N/ A
- 0 i& K( N3 u" p1 _
- var wlanMac = '78\x3a58\x3a60\x3aD4\x3aD3\x3a44';1 ^2 h* N' @4 O6 j7 C+ F4 e
6 C! s$ A+ m/ P2 Y7 l- var ssidIdx = -1;
# N, n/ E. _! x; r# O* X - var ssidAccessAttr = 'Subscriber';
4 g- \4 A( w6 u' S9 B9 d4 K - var AddFlag = true;
9 @1 }# M+ N s+ n - var currentWlan = new stWlan();1 U% a; ?& b& {: N% T& v6 L
- var maxSingleWLAN = new stMaxWLAN(4,'four');
4 u$ h$ r' P6 O: f+ _1 o - var maxDoubleWLAN = new stMaxWLAN(8,'eight');$ P% j( p$ I3 u; l
3 _' w8 V# l7 J# j- function getWlanPortNumber(name)7 ?3 a# O; i4 j: ^
- {
3 |8 x# L' H; V# g! K - var length = name.length;
1 j" R- c% H# m! { - var number;" R7 F" @$ ? s1 k6 d7 n, d% p
- var str = parseInt(name.charAt(length-1));; O% Q" a/ G/ a
- return str;
q# }& N U9 Q$ E* E5 ]3 C4 o# i - }
% q' r5 A2 z- P" T
1 r& H9 ]! |" x- var uiFirstRecordFor5G = 0;
: U P7 K2 J! } - var RecordFor5G = 0;4 N5 \/ M' z4 Z2 i6 i
- var flag5Ghide = 0;
2 g! X' h7 ~3 K( e: a+ @. P) i% Q - function FirstRecordFor5G()
6 Y/ @4 I9 D- e8 I" y2 C5 g - {, e" h; t1 \* h6 ^
- if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))$ k0 R" |& q. @; O8 }( @; f5 X
- {2 u: M/ w$ P, H+ N" S+ v/ |
- for (var loop = 0; loop < WlanMap.length; loop++)
$ ]; c6 F4 v- J4 z8 j - {
. w; N, ?+ n; m& P% ?4 e4 j# ` - if (WlanMap[loop].portIndex > 3)
- d* L1 r* P7 T0 H* i' h, g( S% [ - {- s3 L- O1 [. }! L' u% j
- uiFirstRecordFor5G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));
: {& M3 E( K0 {5 o y4 ? - WlanWifi = WlanWifiArr[uiFirstRecordFor5G];
: ]1 K% I7 m; ~( T - RecordFor5G = loop;
4 T9 O: _1 `0 M6 J, Z - break;7 W- u! T( T& f9 O1 H( K1 T
- }
) g% f" X5 ]9 T% L& F W4 r - }# f, G' _. x, ?! }8 j- X
- }& m6 c8 p4 R) O8 s
- }
& b( \ r' s8 t# W8 c% G - 5 w+ q3 O6 t a* B, v
- var uiFirstRecordFor2G = 0;5 N8 G9 i& w7 a2 D7 e C
- var RecordFor2G = 0;, [. _2 T7 C9 k
- function FirstRecordFor2G()# \3 H$ c2 c; k7 B" ^9 r
- {0 J- @0 x `, r0 M) a$ m
- if ((1 == DoubleFreqFlag) && ("2G" == wlanpage))
" ]) E- X: K1 K. Q3 _ - {
) v5 W8 J, ]# _ }, q% U) f- ? - for (var loop = 0; loop < WlanMap.length; loop++)
7 H/ k/ w/ I6 Q6 H - {
& q, V" S2 @8 v0 Y - if (WlanMap[loop].portIndex < 4)# ~% l6 K3 d$ ^, c2 a6 E2 Q6 t g
- {. Y' u2 J L& ^2 z# B$ Q+ [
- uiFirstRecordFor2G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));
, |) ^, l# `% h$ g1 k: O1 F5 Q2 A - WlanWifi = WlanWifiArr[uiFirstRecordFor2G];
& j7 K0 e% E. B/ @% N) Q/ Z4 i - RecordFor2G = loop;
3 |# `0 J& X# Z, b - break;" g: a4 ~9 x4 e. x& \+ H) r
- }4 {' r' Z8 P+ K9 n- Y1 h9 A
- }) ~( j- R& J1 P% ^
- }
% v3 O$ {5 G4 _6 E - }5 p- e0 j: R9 U4 {* J0 y" M
- ! N& D5 I6 {; s/ G$ E; c7 u, w" q. Y3 u2 P
- var uiTotal2gNum = 0;
$ i2 W. }+ S0 R' F - var uiTotal5gNum = 0;4 @" V, x4 P3 U$ B/ @
- var uiTotalNum = 0;
6 x l$ U) W2 e3 k5 N% k - function Total2gNum()
* t0 b9 D# t A* [ - {
# Z: `. ~: n9 G: F0 W; G! U - uiTotal2gNum = 0;" t' I) h, I% v5 D5 M; Y4 r9 g
- uiTotal5gNum = 0;
9 D% t5 P& P# m; b - uiTotalNum = Wlan.length;
# R+ C. ^% ~' o
9 }* f' I3 W- m0 ~4 @& z! R% \- for (var loop = 0; loop < Wlan.length; loop++)
; G+ Y+ x7 h W - {
2 H U5 N; k H$ R1 @) ?" Z - if ('' == Wlan[loop].name)2 }! y$ f! c1 r* w6 n
- {
: G4 e" L" l# a" n$ u - continue;; X, W6 x) Q) @/ N+ x2 l
- }
0 X: \- M+ C8 t) `% \
1 L) F7 f3 Q' p7 e$ W# S% L# [- if (getWlanPortNumber(Wlan[loop].name) > 3): w" Z, G$ q* F& `# c" e# c7 Q
- {
$ N7 }0 D$ e" w7 r - uiTotal5gNum++;: U4 F( ~5 w( }7 p5 H
- }
B" Y' \ h9 }, |+ m2 S - else5 q7 C) c' L0 m6 I+ ~, q- i9 a6 `
- {
8 v# f& x' ^4 J/ q0 J& h1 O3 a0 y7 H - uiTotal2gNum++;
) ^6 q! _6 Y! j" r F - }( g7 }2 {: x8 k# s7 H
- }5 \8 K; _: e& W: k1 g6 @
- }
" k; G+ ?: u" z C - var ShowISPSsidFlag = '0';9 \3 p1 t# Z$ `( w5 {) s# }
1 k( J' C( x2 D8 _- var WlanMap = new Array();
8 f! w; X4 T8 s6 R5 P; ^% }# y - var j = 0;/ f% H6 e7 \) } |
- for (var i = 0; i < Wlan.length; i++)
5 b9 Y( a3 }7 L( Q - {
2 ~1 k; g6 p* p- Q- S- n4 {* J1 }1 M - var index = getWlanPortNumber(Wlan[i].name);- l! h3 m8 f0 C
- var wlanInst = getWlanInstFromDomain(Wlan[i].domain);6 A( S# Y9 z9 z! ?8 U8 }, t- [
; W2 g8 N: S0 B8 W h- if ((isSsidForIsp(wlanInst) == 1) && (1 != ShowISPSsidFlag))- l! a+ u" B' K: q- H) U
- {
3 ?& Q7 p2 q/ A( w - continue;
6 A! _5 V' e* X) z1 y - }
+ s( J1 X2 }* \, d- | - else+ C& W% m+ }. r; b
- {3 y! a$ m* a* y l+ P
- WlanMap[j] = new stIndexMapping(i,index);3 ^8 Z6 }( S% k% ]- |
- j++;" F& b4 R' [# B
- }. i8 ~" ^6 D- @3 q! R- S
- }) g3 \) \% ^) p7 O4 {1 f
l# |! `: w8 ^" B' ~% y- if (WlanMap.length >= 2)
. w8 o0 k1 u/ D: |" T* | - {
9 X3 ]0 y$ m6 @' u$ J - for (var i = 0; i < WlanMap.length-1; i++)
5 K/ k5 ~$ [! w6 @1 Q! y1 _ - {' `+ w' |9 t' ]# Y5 \
- for( var j =0; j < WlanMap.length-i-1; j++)
; g3 D9 m5 {, }7 @. E! e- z - {2 P3 w6 f+ V0 P* s! l# d H
- if (WlanMap[j+1].portIndex < WlanMap[j].portIndex)
4 ]; _3 F+ i |( t* G1 s, k- m - {
( @; S0 x# I6 E% @/ [( G7 Q - var middle = WlanMap[j+1];- V3 ]9 X! ^2 _9 ~0 _
- WlanMap[j+1] = WlanMap[j];
* h) |2 f' M/ [4 H6 u - WlanMap[j] = middle;
1 \# t8 k2 N. o, M9 M - }5 j2 m$ u; Q+ a, ~
- }+ V4 w, W$ Q& Y0 _
- }
" F( a- Y* B+ H, T& y1 E - }9 M# q' i- R8 {6 H! g8 \, L. r0 J$ L
5 @, }0 a6 F1 b$ O+ n9 ^6 c% P! f- function getIndexFromPort(index)
& U5 K' o# L, a+ ^" r7 l8 c - {0 j2 z& n: [/ N: C
- for (var i = 0; i < WlanMap.length; i++)( C5 Y& b K) ]
- {6 e, @; H7 o/ i% y, c& X
- if (index == WlanMap[i].portIndex)6 a8 N7 w* q5 Y' X
- {
! R3 \! j: x. Z& L' g - return WlanMap[i].index;
: v9 M' A4 }) _; S/ V. n/ x - }
: v$ z' m; m- F5 A - }
: P+ r% J1 e, S) L8 M, K' A0 y# p9 M - }, O0 E) P8 e& D; u n' _
- 5 m, C ^& ] f
- function getPortFromIndex(index)8 k! g* r+ P; q) k! k( Q6 m: A( N3 `
- {7 H; e1 ^) w* q0 U
- for (var i = 0; i < WlanMap.length; i++)" @7 r6 C, n ~. r! q
- {7 M4 f [3 r$ m5 w% L
- if (index == WlanMap[i].index)( i( `" X- |: h9 m: O( s
- {' o" c; m7 r. k7 g3 ]
- return WlanMap[i].portIndex;
# ?% j0 T) ^% ?) ]8 b4 l - }4 R6 p) }2 K3 z9 q' F/ h
- }$ T5 m }# \4 W6 x2 @$ r; ?7 D5 \" ]
- } 0 H1 Q/ @- [4 `4 [0 a+ H
- $ N) J% k3 n+ t! R# G. V5 |6 o3 A
- function getEncryLevel(encrylevel)2 s4 F) M, d, e% V& D
- {7 N; G' U1 Q8 Z" M* u' b/ D
- var level = '';, h5 I3 A9 ~$ H7 A
- for (var i = 0; i < encrylevel.length; i++)
$ K) q+ f5 y9 ^. i) G( i1 M6 c1 [ - {
/ b1 z! d5 f" n, r& R4 T: o - if (encrylevel.charAt(i) != '-')! j6 U7 T) O5 {$ S$ |. v: z
- {
8 h! q7 T- G! q, W - level += encrylevel.charAt(i);
! c& G1 V+ J$ [$ l8 B2 a - }
* Y6 ~$ A. F7 T - else
) j1 K" N0 }( B* I: F& N! R0 H& j - {
( B* K1 C Y7 H9 @ - break;# ?! l# s# e3 }* o. i
- }3 e& D; e& l4 j# h3 S9 c
- }
# ~2 u: b1 v2 j7 @" q, v* Z9 ^ - return level;( D0 }: g x& v. ?# d$ s6 S
- }
3 _( H* C* U* {+ D: m. w - 2 p9 J! n) i, K
- var auth_none = "NONE";
# y* g* _( o) c9 c" F - var auth_wep = "WEP";
" K- I( z% R6 `! |* A - var auth_wpa_psk = "WPA-PSK";
. b% b# y* d- q6 Z7 S& I) H - var auth_wpa2_psk = "WPA2-PSK";# o6 B+ B. E+ B) O* J T
- var auth_wpawpa2_psk = "WPA-PSK/WPA2-PSK";6 z0 Q& _5 }# y
- var auth_wpa = cfg_wlancfgdetail_language['amp_auth_wpa'];
: ~ Z* r5 K3 n+ s - var auth_wpa2 = cfg_wlancfgdetail_language['amp_auth_wpa2'];8 q- B$ S+ j# N' P- O
- var auth_wpawpa2 = cfg_wlancfgdetail_language['amp_auth_wpawpa2'];
- n- O6 K: V! j% m; U1 S - 7 V% a6 @! L5 N5 J$ g1 M8 }6 `' Q
- var encrypt_none = "NONE";7 v! g- P/ k. L7 m) m
- var encrypt_open = "OPEN";1 _- d- i* A5 _, V; m0 S8 u$ X
- var encrypt_share = "SHARE";
/ F2 o! j$ t8 W# |3 @7 P3 C - var encrypt_both = "OPEN+SHARE"; C# d+ Q# [, O6 m
- var encrypt_tkip = "TKIP";
& a( y7 U& d8 D, b - var encrypt_aes = "AES";
1 h" R- ]4 ]1 C& C; Y( y6 @ - var encrypt_tkipaes = "TKIP+AES";. T0 j8 f0 R; G6 H) I
- 8 F) b4 D# i$ f# s8 T
- function addAuthModeOption()
2 j7 d& o- _; V; D. } - {
: ^* p7 M" v% Y5 y: h$ b - var len = document.forms[0].WlanAuthMode_select.options.length;
3 {1 L+ Z3 k6 q9 b, {+ T) c/ C - var authMode = getSelectVal('WlanAuthMode_select'); 6 I7 o3 f! c3 ~; ?# w. i
- var mode = WlanWifi.mode;
# V. l- x# `8 A0 ^( U - : q% T# a8 V' D7 F9 B
- for (i = 0; i < len; i++)" ]" V1 |2 Q; E) v
- {, Q7 G9 h- @: c$ b+ ^! \; o
- document.forms[0].WlanAuthMode_select.remove(0);9 _# w% G: Q* d% ?8 \
- }
" N& N2 W" i, l- v q- p+ Q
9 l) B4 ]: T" h% e- if (mode == "11n")! W3 z% ^9 n# C) C R
- {% W# j6 N3 Q4 C4 G( C
- document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");7 a# D3 ]' K5 F4 ^; ?
- document.forms[0].WlanAuthMode_select[1] = new Option(auth_wpa_psk, "wpa-psk");' K' u8 c9 J9 H# ?6 S5 [* h
- document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa2_psk, "wpa2-psk");0 O, s4 D! v; D- H8 h: p
- document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");! `9 [5 W2 N8 b+ G3 M9 e8 Y7 `. c
- document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpa, "wpa");
0 l6 \' W4 \7 Z - document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa2, "wpa2");
+ K( N/ P/ L# s. j! [" F$ z - document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpawpa2, "wpa/wpa2");) e! w* }# n0 _: b" ^. n/ z' o. F
- }
+ r \3 Y/ t2 q6 ] v( O - else
6 `& J1 R# {2 \- V; V I0 R9 @ - {
9 s% q/ y% L7 X5 y* |0 T$ W. R ]4 h - document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");" t& o) z _' ?
- document.forms[0].WlanAuthMode_select[1] = new Option(auth_wep, "shared");
. Q% Q/ F) b& K4 f* m# ` - document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa_psk, "wpa-psk");* Q& D, t# E+ t* }8 ^
- document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpa2_psk, "wpa2-psk");* R9 C! A+ U, Z9 {0 [
- document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");5 c* g3 Z7 l2 s4 l8 o7 k% B
- document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa, "wpa");! D4 ~( t2 y" U) i' S5 n8 e
- document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpa2, "wpa2");
$ U. x- |6 G. ?1 A8 H - document.forms[0].WlanAuthMode_select[7] = new Option(auth_wpawpa2, "wpa/wpa2");9 F3 I6 }" l% o# q" b6 E
- if(1 == WapiFlag); M, g( @5 y. U7 ^! P
- {
1 S' c7 Q% c+ G! L5 ^ - document.forms[0].WlanAuthMode_select[8] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi_psk'], "wapi-psk");1 r1 A! o* ?- X! L* E
- document.forms[0].WlanAuthMode_select[9] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi'], "wapi");
6 x2 |4 G' g. L, l$ \% P! b7 `1 _ - }
& z ^8 e( w, r1 w - }
: G5 g' R# @1 l6 U* D -
/ A) A _# p# u, J - setSelect('WlanAuthMode_select',authMode);! ^! W- ^2 w5 ?, j
- }
9 _ r6 p2 J0 S, Y+ A$ m! Y - + e: g b/ o" v# s0 N3 s- }
- function addWapiEncryMethodOption()
) I% k, n* b% o8 ?% S - {
3 k7 U: G3 H: u, T3 h& r1 E - var len = document.forms[0].WlanPwdMode_select.options.length;3 ^& J1 c2 c+ T: Y# Q- _# s2 Y
- for (i = 0; i < len; i++)) h- Y: O) J# C* Y2 B
- {8 _) b9 x C" A( p) x, U: T, Y" O
- document.forms[0].WlanPwdMode_select.remove(0);
7 Q, h7 ~ ]$ Q: u - }
5 t0 c1 L- H7 k: z - document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_sms4'], "SMS4");
: ]# Q9 Z" g+ v& T* m0 I - 2 r) q6 n, y% i* q5 @! e
- }: H/ o$ l( j; ^. z
- u& \# p( @0 ]; Y1 v
- function addEncryMethodOption(type1,type2)
) x2 S, G: h5 N! n$ J0 R - {7 S' |3 \+ |: ~( y
- var len = document.forms[0].WlanPwdMode_select.options.length;, J f* I3 Q" v4 j
- var mode = WlanWifi.mode;
% ?; a1 X+ D. }9 H: d0 v4 D -
' Q. Z) T d) M0 L9 v3 {2 ^# j - for (i = 0; i < len; i++); T' M. `4 O2 S* W4 Q
- {
9 Z4 n" J; c: |% K4 \' E' q- M4 l3 w - document.forms[0].WlanPwdMode_select.remove(0);
4 K- C8 V& A4 |) m& P9 I - }
9 C8 R/ @" v4 Z* e- Q. m/ b
: d7 o$ A0 x: G6 @: z# D8 j- if ((type1 == 0) && (type2 == 0)), N" e5 u) Z( m
- {4 K. P0 s8 ?% p5 H9 M! G
- }
9 K9 q. o8 { g9 g0 q$ Z- o$ o - else if ((type1 == 0) && (type2 == 1))
# Q$ _( q. P+ I A" q! a( w: m - {0 u' l* ~7 p Q- \* A" @, p- n
- }! t5 k& N% v9 [+ r
- else+ a+ c+ c. o) A% A
- {* j- m; O# T* t1 r
- if (mode == "11n")% p/ N2 k& ^8 Q: w6 [1 ~
- {% p+ J) J: a" u3 S
- document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");
# ?( n2 E) A7 g) Z - }' r) ]: z: W* B4 ?$ K2 A0 y a
- else4 Q( j. A5 p! H0 M' Y9 m
- {& } h* [7 x) O* n
- document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");
" H- O8 M" L4 ^! a* { - document.forms[0].WlanPwdMode_select[1] = new Option(cfg_wlancfgdetail_language['amp_encrypt_tkip'], "TKIPEncryption");( P; v _2 F4 p7 t% F) m
- document.forms[0].WlanPwdMode_select[2] = new Option(encrypt_tkipaes, "TKIPandAESEncryption");2 ^5 n$ d9 d& W/ ?( h! F& [ @
- }
! w4 T4 q% L. `/ ~ - }
, T6 T" I. E6 ^+ x8 f: p; E: `# k - }
: S5 x5 H$ s( m. `3 M& W - - I1 Z: a) L7 s2 z
- function GetWepEncrypt(BasicAuthenticationMode)( c( F! [8 Z$ G* S, R) p: [
- {
. |* l2 L; K2 I& Q) s - if ((BasicAuthenticationMode == 'None') ||(BasicAuthenticationMode == 'OpenSystem'))
* ?7 X; ^& |" F. ~, z - {
& K, `3 s* V+ C6 _; `" x - return 'OpenSystem';
* P# g! N, h) X; T/ }3 V0 ? - }
. |6 x& u7 z( @5 C, \% `% E' A - else if ((BasicAuthenticationMode == 'SharedAuthentication') ||(BasicAuthenticationMode == 'SharedKey'))
6 v0 R) _3 i- Q7 K - { }9 `0 ?' V5 Y7 i# ~8 Q7 y% A
- return 'SharedKey';
% L3 f1 ?: o7 I' c) E - }* ` R1 O; R3 J
- else
! a4 |6 E" c3 z0 G - {
0 w4 H+ M/ |- n% d - return 'Both';3 o" E9 I3 j- ?2 f
- }6 ~/ D3 j9 }4 n. L0 s, u
- }8 Q7 i2 R @& X
5 g; O+ e" \- A/ p. x& b" z- function ClearPsdModFlag()
9 f' i! D& I2 @( ?6 x - {+ v0 t- J. V% K8 s
- wep1PsdModFlag = false;
5 u) }" a3 j. d. f) { - pskPsdModFlag = false;
" S3 I: b' d; f' x, ]" l - radPsdModFlag = false;
" O9 T7 R c; K9 s) |: H8 Z4 t - }
! }5 T. U6 H2 Q& X, b/ o) k7 O - 9 r0 C$ ?3 R- J+ x. a4 d
- function authModeChange()5 l4 G) K6 M; ?, ~3 M( r
- {
% q1 i$ {, T- k5 {0 ^ - ClearPsdModFlag();; [# R. K2 B& j2 b4 S9 }
! E7 I0 \7 G. f+ y, k# d6 j% Q- setDisplay("wlEncryMethod",0);
4 _5 \ Q% ^/ i8 r - setDisplay("wlEncryWep",0);
; C1 R+ D# G$ H) }0 X6 U - setDisplay("keyInfo", 0);
3 r3 D. Q7 b* O, ^& N - setDisplay("wlRadius", 0);: i& y- m: U9 F) F9 z9 y
- setDisplay("wpaPreShareKey", 0);) p* k* v, O% c5 C0 J3 }
- setDisable("WlanPwdMode_select",0);9 K* [% @5 t+ d' \9 E
- setDisplay('wlWapi',0);
& F% o! \5 N* Y2 ^# X
7 M9 g- `5 g, U- var authMode = getSelectVal('WlanAuthMode_select');
8 Q( T8 X O" h& v. B6 V. U+ `
, N/ b5 G' j m) {- switch (authMode)
& d4 |- k4 Z! f. y1 _ - {
! o n8 Z" U6 s# ^- z) t - case 'open':" f/ q8 J9 O+ Y A
- break;
" @7 }5 Q/ n' ` - 6 Y+ D/ K$ x1 v" J% G
- case 'shared':! K. T2 S' i1 X0 N# u
- var level = getEncryLevel(Wlan[ssidIdx].EncypBit);! `+ D$ x5 P; Z
- var mode = WlanWifi.mode; : S# B- E) r; U! G) ?
-
5 }1 b. r: }' K - if (mode == "11n"); f D7 v+ b+ A; {
- {
: A0 K7 Z& }: O5 E' w8 q* V) R - }
; k3 |% R L8 Y: r/ J$ F* [ - else8 r* c: y1 P9 s
- {$ {3 Y, |4 m7 r2 r" M0 D& N
- setDisplay("wlEncryWep",1);
# T- l" m& o4 w5 a - setDisplay('keyInfo', 1);
8 l. R/ H& C4 N; q% l6 S - if (AddFlag == false)4 V: g7 g8 y2 G
- {# q3 J# g' v5 G) _3 p
- setSelect('WlanWepPwd_select', GetWepEncrypt(Wlan[ssidIdx].BasicAuthenticationMode));
! z4 y0 h7 z6 V; h8 k- `9 p - setSelect('WlanKeyBit_select', parseInt(level)+24);
M% d& S6 f# H: x - setText('wlKeys1',g_keys[ssidIdx * 4].value);
& n7 s: `& O' x - wep1password = g_keys[ssidIdx * 4].value;
G6 L8 I# g+ e7 Q9 {) J- E2 z - setText('twlKeys1',g_keys[ssidIdx * 4].value);
# @5 `* I& B* \8 A+ P# O - }. Z9 P0 U* {) C, U
- else
4 H9 F- [- y, u - {
6 H+ G1 G* V: `# H - setSelect('WlanWepPwd_select', 'Both');
: W0 c& \" C3 i; Q3 K, A* o - setSelect('WlanKeyBit_select', 128);
1 N( { O. B) X% h) I/ h9 R5 A - setText('wlKeys1','');
$ h4 u, Q1 L3 @( M - wep1password = ''; setText('twlKeys1','');+ L2 g. b) `+ Q# ?+ J
- }1 w% u* M4 Z- p, m' H2 z
- } " a: m9 q* @+ T+ U
- break;
$ I( z. j) D/ r
1 Y( Q& e, Y: J' i" y8 u! b, B/ x- case 'wpa':
0 C: ^" d0 z8 a9 y) Z. u, P - case 'wpa2':
7 L+ m; v8 K( I' W! i; O - case 'wpa/wpa2':
: D9 K# Q+ q7 l. b2 D* _( P/ C - setDisplay('wlEncryMethod',1);) I( O1 K ?- y3 c
- addEncryMethodOption(1,0);" Z, o. C% K7 A1 B* x& l) k7 n
- setDisplay('wlRadius', 1);
' }/ w( m$ `' j! f* X% U# W7 x - if (AddFlag == false); e$ J$ D4 f" q. ^
- {
; X% t) F$ {! e% P! p, o% o9 L - if (authMode == 'wpa')& s. `/ Q/ `3 u. F# P; O
- {8 g( W+ y1 h; X- o7 _ s* `
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);, t1 B5 t7 d8 D1 q7 S3 ~
- }
' s8 E# @: G8 j+ Z0 X$ T3 A5 J4 j - else if (authMode == 'wpa2')
: S8 a: v7 x. ]9 [6 L; g8 X - {* h$ U" r7 g2 p4 A
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);: q/ G2 \/ {2 T& T, S) i' w/ U
- }
+ P, `) y# |4 C% a - else
6 w ]4 D i, o8 L4 S7 R - {! A( a$ @: F1 K7 o8 o+ F5 S# k1 X
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);: t2 e( ?2 J* @" k2 V
- }
' w' u" P0 y" C* x - setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
0 r. N: a! K. x0 `2 P - setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);% F v1 q1 }0 C4 B& Z! J
- setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);
2 [" F/ v4 a, o( \ P: x - radiuspassword = Wlan[ssidIdx].RadiusKey; 6 @0 H6 `! U+ ~. E
- setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);8 A8 O9 S- g- s: w) m6 S$ m
- }2 w4 b* G4 q v+ M2 t, z, i0 d
- else
; h+ L/ t Z$ M- J8 c- f" m: r - {$ t+ P7 g: E6 c: G+ g0 g
- setText('wlRadiusIPAddr','');
T4 C, X& h8 w& @ - setText('wlRadiusPort','');$ g: U' f' P! Q- U- I6 h
- setText('wlRadiusKey','');
0 N7 Z9 \3 r6 R( o - radiuspassword = ''; - O6 C% d; g+ x
- setText('twlRadiusKey','');) X; L+ \4 G# T# I5 }- a. b5 w
- }0 p: a6 k. W( I& A2 r0 `
- break;
& P) M) H' i3 W6 z - ) } I) D/ u6 F; p
- case 'wpa-psk':* o* H1 n" o8 Q# O" W" `7 V$ k
- case 'wpa2-psk':! ? W% g7 {+ J+ D i" {$ H0 D# X
- case 'wpa/wpa2-psk':
) u* e2 ~3 o* W, K& x - setDisplay('wlEncryMethod',1);
& w" B4 Q+ P, K& }5 L+ v# M: c - addEncryMethodOption(1,0);- }% W) ~/ ^$ ~2 w
2 G/ h# A1 Y; y' D$ D' M- setDisplay('wpaPreShareKey', 1);8 Z7 Y! F/ t' c9 ?$ M. v% N
- if (AddFlag == false)- [0 R4 Y0 V0 o; _. G+ d
- {
! i3 ]2 W$ Y4 z$ m - if (authMode == 'wpa-psk')
$ Q# k4 J$ O! N. V9 k - {
- R( R$ H. x3 _4 m2 o M6 {: F' Y - setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);% i& Z+ | |3 N0 v, n/ B, y
- }
+ D' N: S5 H, u% H. E- m( E7 M - else if (authMode == 'wpa2-psk')% u$ B2 l4 L) g
- {
$ x" r. K: m: ~: E! R& k - setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);7 X3 h+ @/ h/ f4 ]* B. d
- }
3 L9 g8 ~2 \2 b& [" o: Y - else0 N) K% |* y" S, j8 F5 d
- {
1 E6 A, A: v3 B- U - setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);7 _' m, z, @- j0 b+ f
- }
' U; R9 z0 L: @" F+ ? - setText('WlanPassword_password',wpaPskKey[ssidIdx].value);: q4 V; m! i& M1 O6 a& m
- wpapskpassword = wpaPskKey[ssidIdx].value;9 k3 \. ~; J: Y* n, \
- setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
/ t* w) M% V6 H6 E* Z# o t0 T - }% \# ?- P8 m2 v# n7 d
- else' s9 J, o0 T# R8 [! \$ I
- {; K$ n5 W' ^1 L! h/ u3 f
- setText('WlanPassword_password','');; i3 B4 j: ?: b, ~ W9 o7 Y
- wpapskpassword = '';: o. X! O2 H: @+ S/ ?' @7 D
- setText('tWlanPassword_password','');
+ ]/ f0 u+ \$ ?. H- p( q/ B - }
9 q, u% b1 v% l - break;$ K _& Q. E& J+ Q5 T
- case 'wapi-psk':" Z- y5 ~* m" M/ F {
- setDisplay('wlEncryMethod',1); 6 g1 ?/ H6 A2 ~2 i V
- addWapiEncryMethodOption(); 2 }8 B3 o9 \0 Q6 }+ S6 W
- document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
6 n2 k" N/ n, B% i1 K/ Z - setDisable('WlanPwdMode_select',1);
! F% V z: N0 }3 F* ~! _; G - setDisplay("wpaPreShareKey", 1);
& L6 S9 m& }8 b3 Q) K$ A" n3 A - setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
, }, i2 e! Z2 h7 r - setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);/ s" Y6 S$ v: M( c3 |
- wpapskpassword = wpaPskKey[ssidIdx].value;, ^* B i2 w0 ~, C3 p
- if(AddFlag == false)
& N# [ l, O: [# T( S0 U: ?9 C - {# [8 u$ R! d @: b
- - a; |0 r% ` A; a- j; `$ }$ j
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);; M/ G f1 X' C- v. ~: {1 |9 ]
- }
! C3 y9 [, S; b& |' c8 u - break;
" d- b. I$ Q7 J# q# x - case 'wapi':
6 E! M5 `9 b- d0 Z* d - setDisplay('wlEncryMethod',1);
. E2 j4 z2 t' l6 ] - addWapiEncryMethodOption(); 5 z. m; _1 L% x# E4 c! v. _
- setDisable('WlanPwdMode_select',1);
3 A# F! X) C% d - setDisplay('wlWapi',1);
+ X5 a, ?+ j. M) l \; q- l8 f1 x - setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
" e+ o2 e! p) y, q3 @ - setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
+ q3 |, L6 t7 l. z+ R - if(AddFlag == false)
0 F" a$ D' o& J - {/ _3 K; t, P; `# H6 _
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);8 s: A$ X# ?- p7 s6 D! A
- }
: \3 ?5 r% d1 h* _ - break;7 R T3 D. ?' R; M+ e1 D
- default:3 x# w4 J4 b$ ^
- break;8 }/ D$ h2 X6 X
- }; d9 [$ G& U% e7 t3 o" ~
- }
6 g/ h7 g" p( a - ) J* K d% l/ M1 Q
- function isValidKey(val, size)
8 x6 g( v( {- b8 N/ e" T+ f- y - {
5 i+ I: {* Q: ^7 J' v* w - var ret = false;
6 L' c/ `# }& W% w6 Z - var len = val.length;
7 s9 L X% D6 q9 G: ]/ }- R - var dbSize = size * 2;" r1 ?$ n2 G: R: n; x2 O+ i
-
# q2 q P ~. o0 L1 |4 L - 6 Z# c# I# a" v% h
- if (isValidAscii(val) != '')
$ ~3 m- V* U+ D* G# R - {
4 U! s' N7 G' [8 n$ i4 E - return false;
" c; ?8 W o5 g9 K" N2 G4 {- d; ^ - }
; v! E Z) |+ R3 f
( u- W J2 M2 W' ]! K- if ( len == size )
* F4 @( y* K' B3 y7 _ - ret = true;
! F7 Z& R0 k6 S6 g0 O! A - else if ( len == dbSize )
9 i4 O% H8 D/ D5 i - {6 n! X( h! a _9 `
- for ( i = 0; i < dbSize; i++ )
' Z; }2 t" f3 O7 v& M* b) L2 f# { - if ( isHexaDigit(val.charAt(i)) == false )
& j1 X- K4 y+ w8 o/ e' a2 S' C3 N V - break;4 i! ?, E0 G/ c4 t a, G* s1 {
- if ( i == dbSize )7 Z4 b9 Z. F0 p: U$ b0 ^
- ret = true;
0 V4 s" L) M5 n" v) j1 u - }( N N5 H" [' ?: X
- else
, a, [& y0 I' e* F, V1 M- s% F - ret = false; u0 s& w- O& |& |/ I8 X, Y
) b+ t* F; {, E- return ret;- o5 A v+ H* \; r6 q# X! N
- }
4 N4 ^, D3 _/ e) e* D; z8 \( W* l% T2 G - / l% J/ p; @% u9 l; G
- function displaywepkey()* q6 u" o9 u0 O* ]
- {
H1 }6 y4 Q. o6 e V - if (AddFlag == false)
, Z. I* K+ D3 X - {
! b$ T. o" e6 i5 I2 ? - setText('wlKeys1',g_keys[ssidIdx * 4].value);7 ?! j4 v6 l1 v$ o, P
- wep1password = g_keys[ssidIdx * 4].value; + d# ]4 I1 E- ~, |0 a
- setText('twlKeys1',g_keys[ssidIdx * 4].value);+ v. \! Y4 I5 Z& B m$ M9 r
- }3 k9 L$ l7 T3 N4 B& ~
- else' m, {% c* d- K, ^- x/ `! x1 {
- {
" {3 Z. S; s1 k9 Q' X - setText('wlKeys1',''); n. `9 o$ x' ^7 M6 [
- wep1password = ''; " y( X9 ]. n' ~+ q0 e" S1 @# z0 l
- setText('twlKeys1', '');
* m( e# }! m4 ~+ ]1 j - }
! k2 s" a* N6 v% U" X! _ - }5 X: Z. Q0 W' _* w# m, \: m
- 3 }: K; d. Q; u1 q$ h( _! n! p
- function beaconTypeChange(mode)7 ^) L9 s) N9 F9 n& z& v
- {
3 |1 B" i5 [7 u: w0 q6 D - setDisplay('wlEncryMethod',0);, j( U: k/ T: k4 u3 A
- setDisplay("wlEncryWep",0);
; D0 h1 w P( o5 t8 a F - setDisplay('keyInfo', 0);
: D" B' w9 x* t$ p) U) J - setDisplay('wlRadius', 0);
8 l; f7 L- I6 _& ?! a - setDisplay('wpaPreShareKey', 0);
5 C4 k) I2 F# T* U- e - setDisplay('wlWapi',0);2 F/ ]/ H* ~4 y" h
-
" y6 T& \- W: Q4 t1 N$ ?: V - if (mode == 'Basic')
/ R! Q) h: U5 B7 ?( R - {
( V6 r& J4 p S- V/ h8 u - var BasicAuthenticationMode = Wlan[ssidIdx].BasicAuthenticationMode;
; o6 c2 P5 ?! I* N - var BasicEncryptionModes = Wlan[ssidIdx].BasicEncryptionModes;$ p% c5 R- k9 Z% F! k; A) M
- if (BasicEncryptionModes == 'None')
# W; ^. G+ m5 G* n5 ~! n - {
& h: j, \3 |$ W" O/ H1 b' C - setSelect('WlanAuthMode_select','open');, s* o5 v9 B0 T% |& K4 ]0 Y
- }
: _$ w& W4 }7 T$ ^1 Z. @' _& { - else
4 B7 v+ H3 P8 Z. h% v) c - {
9 r5 ^% @- V+ e" b# B - var level = getEncryLevel(Wlan[ssidIdx].EncypBit);, m( b- S" h, v+ s9 V3 b! ~
- setDisplay("wlEncryWep",1);' q" c( ^2 r# @ B3 }
- setDisplay('keyInfo', 1);
" q3 N- o! ~& o J, z9 B9 Z1 Q( R - setSelect('WlanAuthMode_select','shared');
3 u; j1 h; W$ ~) v _ - setSelect('WlanWepPwd_select',GetWepEncrypt(BasicAuthenticationMode));$ }! w, z$ j3 a; X
- setSelect('WlanKeyBit_select', parseInt(level)+24);, b1 d& }8 e6 _7 Y N5 A
- WlanKeyBit_selectChange();
/ l: C9 C/ J' Q4 @ - displaywepkey();! N3 v% u6 K- u
- }
! J( W) O6 X" s- l( t - }. w& Y6 t D) ^8 ~ X+ x' ~
- else if (mode == 'WPA')3 v$ g2 H/ A+ m( U: ~& H9 ]5 o. J
- {
3 p N) s4 H, ~" M5 S4 H - if (Wlan[ssidIdx].WPAAuthenticationMode == 'EAPAuthentication')
% M* H2 i" T% U& j6 x - {
2 w5 {9 R8 k& ~+ n - setDisplay("wlEncryMethod",1);
' B) ^9 m$ }9 k" ^ v5 e( n5 g7 { - addEncryMethodOption(1,0);
4 ?, o9 m- s/ f: s* i - setDisplay("wlRadius", 1);
2 i7 x. w; ]% \ - setSelect('WlanAuthMode_select','wpa');/ e7 m4 }8 |0 f% w: N
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);; I O( j9 t0 r; g' b+ W
- setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);8 @( u* g9 H7 @" [
- setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);2 d. R, [! ^! c b4 V. b
- setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);" o5 c6 B j* [5 Z" [
- radiuspassword = Wlan[ssidIdx].RadiusKey; 0 } U) _: s# I' P! B- R
- setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);4 U( R" S w" E. e1 H
- }
* s) I8 b6 Y# T - else2 i$ M! X0 `6 C+ z# a
- {
" c1 i6 I8 ]2 B Y! j - setDisplay("wlEncryMethod",1);6 `5 D. |' l) K6 J% H" k+ M' r
- addEncryMethodOption(1,1);
9 z$ `* l! l7 i: a+ C - setDisplay("wpaPreShareKey", 1);
1 C% X, ~4 S1 q7 A - setSelect('WlanAuthMode_select','wpa-psk');& \/ L/ J& L" X2 I, Z
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);# p7 P" [% o- Y5 i/ s
- setText('WlanPassword_password',wpaPskKey[ssidIdx].value); : q, d6 E! I" z: z3 t' G* h& |$ f
- wpapskpassword = wpaPskKey[ssidIdx].value;
2 I! p& T3 n/ R2 g) j - setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
9 H- E+ Z% a# t6 `4 @ - }9 `" e/ i' s& b5 f1 d2 P! L" E
- }
' \0 a( Y1 B. O7 o( z6 d - else if ((mode == '11i') || (mode == 'WPA2') )
& ^# y! @* [: L# O6 W - {: m, E( p" N" M$ g5 y
- if (Wlan[ssidIdx].IEEE11iAuthenticationMode == 'EAPAuthentication')9 Z q# t% |& R( y e
- {
; ^, s- K+ X6 E4 S5 x) ]+ n$ |3 ^ - setDisplay("wlEncryMethod",1);
, B2 z5 f- e9 \8 j3 Z, n, a - addEncryMethodOption(1,0);
* N* A1 v7 {7 S# H' R2 s: _- ^# c - setDisplay("wlRadius", 1); g# U; ?. Q9 m$ x* T( O
- setSelect('WlanAuthMode_select','wpa2');
3 o) S, @3 r) q4 I) Y$ v/ S3 N - setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);6 _1 S5 s x7 i9 U: t) I! J' g
- setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
& o/ ] e" ], n( I N - setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);( V. G) c- z) k& d' i
- setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);
- w+ }* S! o9 Y% ^+ \ - radiuspassword = Wlan[ssidIdx].RadiusKey; ! h% q" m( Q6 ]
- setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);: q) t8 W1 l$ `8 O" k
- }
* n- [" R/ D* c( K) h - else+ m. ~$ q' `* X8 O( D& A
- {
1 }) s; q# x0 m# M! Q% H2 Q - setDisplay("wlEncryMethod",1);
, O7 w& X' |0 x. @ - addEncryMethodOption(1,2);9 V# D" F/ X* A# ?
- setDisplay("wpaPreShareKey", 1);
% d. V. I& G8 d( i* i- D; C) c7 |! L - setSelect('WlanAuthMode_select','wpa2-psk');/ f! A5 D+ x7 f$ f6 }& d+ @
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);4 E0 i* u" }7 A, F, E; U
- setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
5 w' P( \! Z6 B1 J- T' j7 q S - wpapskpassword = wpaPskKey[ssidIdx].value; 4 c! k" M( [- o* c
- setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
: a% U( ?& E5 j6 } - }3 j' _9 x8 U$ U3 ^
- }& V6 U# t" T6 ^/ G
- else if ((mode == 'WPAand11i')|| (mode == 'WPA/WPA2'))
3 E T* A- {% H4 _' ~2 M+ ^ - {; V! L; i% N; y: W! E
- if (Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode == 'EAPAuthentication')2 z+ o8 d, o& |* i: o$ \
- {
! F8 R. w- n) X6 M$ N' b7 l - setDisplay("wlEncryMethod",1);
( e0 J% R- D2 q! b - addEncryMethodOption(1,0);5 m: Q) H r& G
- setDisplay("wlRadius", 1);1 u" e) {: V" @9 e% ~! ?" L
- setSelect('WlanAuthMode_select','wpa/wpa2');
; p7 s1 w* Y* s - setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);5 E1 t) Q* b0 r9 c
- setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);$ |5 A. E+ o' r6 G1 x
- setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);9 X; `0 Q+ G# @2 Z$ X
- setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);. m5 V+ X0 O, [0 n; i) p4 L6 t$ f9 S
- radiuspassword = Wlan[ssidIdx].RadiusKey;
4 |& \4 `/ R; F- @7 s; {' d3 k) ] - setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);
, M' I; m X, S7 A; \! w# L, Q; g - } Z* k+ T/ E2 M. \- ~# K/ W: U5 S
- else7 o$ a# _7 @4 r! l& X6 x
- {
) F6 K; J5 c! C - setDisplay("wlEncryMethod",1);
( [5 _0 E+ s0 M2 H - addEncryMethodOption(0,2);: N5 ]! O2 T8 m( G6 [
- setDisplay("wpaPreShareKey", 1);" y3 P1 x2 t j
- setSelect('WlanAuthMode_select','wpa/wpa2-psk');# q) q. {1 Q9 Y6 h2 N* v) ?, k) b- D
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes); F2 U$ r7 ]3 r2 m7 Q+ h; Y
- setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
9 ^. L* o. s8 L, y, \, w# U - wpapskpassword = wpaPskKey[ssidIdx].value;
- P) a( m' h3 N b - setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
* L, b, w6 M& }3 \& l& t - }4 f" n5 }. f/ A6 N8 U! Q' L6 ^
- }0 j6 M* }' _9 |6 r$ Q$ N
- else if(mode == 'X_HW_WAPI')
/ d" J6 x, K' [5 v - {
) ~, O; [ `7 @( A j - if(Wlan[ssidIdx].X_HW_WAPIAuthenticationMode == 'WAPIPSK')% k: t( c: Q" E. p! o" |
- {2 S5 e6 U% P/ H7 d4 I7 j
- setSelect('WlanAuthMode_select','wapi-psk');
9 t& i& o a# U2 k0 R" B# R - setDisplay('wlEncryMethod',1);
- s+ N: [9 A/ f* \1 _ - addWapiEncryMethodOption(); # ^8 @' t- Y/ D4 D+ {) M5 T
d+ M% [8 Z; ]0 p2 e- setDisable('WlanPwdMode_select',1);
( o' `8 A' x! m) b - setDisplay("wpaPreShareKey", 1);
; \6 C* q* I4 K9 N' f/ r3 o/ v - document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
4 R8 ~6 v9 I: E, r5 F+ I$ W - setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
5 s1 s5 z& p1 y: ^* u - setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);+ O" C6 x! I! Z0 O- x
- wpapskpassword = wpaPskKey[ssidIdx].value; ) y R: W- p3 b' d% ]
- 6 t2 G7 Z; z) H, Z) [* C
- # Z, ^8 I% h0 Q+ `4 b$ I% [
- H2 y# Q1 _; M* w! K3 b
- setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);
+ X& g0 [6 _7 ?# O5 S! k' B9 r1 y - }. m. i9 \) ?; e, O/ Y
- else1 z: N- D* f6 _& _8 x
- {. {' X: O4 R+ U
- setSelect('WlanAuthMode_select','wapi');
9 z# ^6 c) t& i6 _1 D - setDisplay('wlEncryMethod',1);
/ t$ R6 r" S/ }/ S/ I - addWapiEncryMethodOption();
9 ^( v; X2 n; ^" q5 \9 u - setDisable('WlanPwdMode_select',1);
: a2 i' B2 x' C6 Q) k, {) m - setDisplay('wlWapi',1); $ _0 A4 m2 `5 _
- setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
$ x" w/ y6 K/ d - setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
0 C' W" N% z# @" E - }
+ r6 \9 P" d& |; Q, f - }4 f9 [& k+ i+ m5 S, b& k# d1 |
- else
- m& w" }9 }. o9 n0 g - {& t- v5 e9 ?6 t, p7 t# Y: ~
- setSelect('WlanAuthMode_select','open');& I8 M9 O. ^* A" {8 u8 f7 k" c
- }
/ s. b2 c- s; |* d2 H U3 Z6 }! O - }; b1 n3 V& R5 o( x; g# k2 p
: ?( o$ V8 b( T5 p" T$ h. N$ N- function WlanKeyBit_selectChange()/ o* [ }% z& n/ s. }6 n. |
- {9 D' f* Y: F5 N, l; |
- var desc;2 H& G( f! P* t4 @
. R* u+ C& u7 @1 v/ `* O( A% O6 @- if (getSelectVal('WlanKeyBit_select') == 128)( p" v6 t6 {9 f E
- {
/ R+ D+ _ @! z! X+ q0 \ - desc = "128位无线网络密钥需输入13个ASCII字符或26个十六进制数";
* q/ U* E I2 f! k - }
) Q" }$ [% |" v4 T1 w - else% c: H" M4 o, |5 s; p
- {8 P* z8 m8 ]( v/ b
- desc = "64位无线网络密钥需输入5个ASCII字符或10个十六进制数";! U/ k, B+ G3 X, o4 h3 \
- }
) k- f2 v4 D3 ?2 k$ g {" e - * m( `" U: `4 |7 D6 T
- getElById("Title_wlan_key_tips_lable").innerHTML = desc;
9 b+ y+ c; f3 e) j/ \8 ] H( Z8 N - }
0 [9 _( I1 R2 s) B8 g, v' [ - 0 k* v' w V1 Y+ }4 Z% I8 M
- function onMethodChange(isSelected)
) A5 k6 g. f7 V( {5 G - { 1 x4 a* O- u% I9 d* h y: S
- var authMode = getSelectVal('WlanAuthMode_select');
% y( T1 D2 h- e, y( Z - if (authMode == 'open')" A- q X& G5 O; z# e. V
- {
( ^6 \3 f. }- x/ ^ - var var2 = getSelectVal('WlanPwdMode_select');. Z( }* c# N+ X* Y
9 u* ^( D* r% Y% z; B8 E- if (var2 == 'None')9 f; g5 T/ x8 M
- {
y# R7 W* A2 [' y$ ?7 g - setDisplay('keyInfo', 0);! h( \# r+ W- _1 D; V
- }3 o- j0 L7 ~8 n7 ]8 n8 ]# t+ w
- else
+ I/ H5 U/ \) T1 T8 t - {4 X% [! \0 F0 O# i% V4 J/ V
- if (AddFlag == false); B" g5 A" L9 S. K6 c2 x
- {# j( C8 S# s' _! Z: ?
- var level = getEncryLevel(Wlan[ssidIdx].EncypBit);
1 ?) U1 J( i } J - setDisplay('keyInfo', 1);
! `0 r# x) c' E1 N1 N8 J - setSelect('WlanKeyBit_select', parseInt(level)+24);
* f6 ?3 Q; [4 ^8 @% l - 7 v8 O) F7 a9 y! G
- setText('wlKeys1',g_keys[ssidIdx * 4].value);6 m* I) m# L0 P" f t9 ]6 ]
- wep1password = g_keys[ssidIdx * 4].value; ( J; r. x4 I% T7 ~/ X }; T, N
- setText('twlKeys1',g_keys[ssidIdx * 4].value);3 c7 e" Q; i+ m: [4 \: P2 X
- }+ F' V" { o3 ~. G* w
- else# V0 ^( l5 }& Y, s
- {
: P8 }- `; B9 Q: b e/ _$ S4 b- Z - setDisplay('keyInfo', 1);% ^3 y: i& C2 C t1 r" A/ |
- setSelect('WlanKeyBit_select', 128);% v7 |) M+ s2 |7 B2 ?; v! \, ~
- % \1 g( V$ o7 M& L2 w# [6 Z
- setText('wlKeys1','');
- x$ {: o ?, z3 H7 d V; X - wep1password = '';
; ]2 N2 e, X+ h% r - setText('twlKeys1','');9 q7 W! O7 b3 \6 e4 D$ Q& a' i( p! N
- }2 m5 a# Y: v3 `3 y' b' h! Y! v% N
- }: X) ] e/ m% O' d. @7 p3 v
- }' x' _/ |% @3 z" q5 q
- else \+ o. h s& T- t( @/ I2 a; y0 [
- {
8 }; o+ G; K; B- Q0 m- b7 { - setDisplay('keyInfo', 0);
4 g- r% w+ F1 b. z/ H R: ?/ R - }
, Q" L; A' s4 e - }& m$ } ~: I, @- b: c8 r
- h4 i- U6 K5 `" ]) W* w8 R- function onWepChange()
1 }' t4 w: h2 ]) K( V) K3 @" \% M - { U1 l6 d: j' h1 F
! c$ i8 L/ Y7 {+ h9 H8 K4 z1 O/ R- }
) z4 o5 o+ z$ q$ A
0 a; z- G( K0 B+ k- function SsidEnable()
+ x& z$ W$ Q8 D) P3 {9 z; s7 q - {
# H3 X3 C% W! S$ M; C e - if (true == AddFlag)
2 `) f% ^. P- B6 M7 Y4 y - {" _$ C3 d0 L3 x2 z" e4 e, a: l
- return;
# f1 u, _/ e2 O0 x/ W - }2 i, d- F8 u( b. O
. ]5 v* M' H4 o0 v& g- if (Wlan[ssidIdx].X_HW_ServiceEnable == 1)
# b: d' v- P0 M - {
t8 x7 F% |3 H i4 u - }
4 s6 i$ ]; H, C* O+ q9 X - else" k! L& V8 v. C6 h, v! g
- {( { b6 s5 O" G3 h+ I8 P2 K! e2 l" R
- AlertEx(cfg_wlancfgother_language['amp_ssid_state']);
) ]3 r) H+ y. t! M5 F - setCheck('wlEnable', 0);" D6 I8 m/ @0 N& G
- }7 c1 K9 V# r3 t+ Y& N$ E
- ; G) F# v9 L, @. M
- return;
8 F7 N$ P3 l$ z B2 a5 @ - }) k+ V, Z7 z: w# O4 I$ l
. R% m1 o/ Z% A/ G& V) S- function ShowSsidEnable(currentWlan)
" @. ~% @/ }" u/ M6 l" H1 ] - {
$ O; O/ C4 J: t4 f8 o8 J9 d - if (currentWlan.X_HW_ServiceEnable == 1)
7 m# s: k4 J' H" i9 k9 C - {6 N/ Y& L4 @) V0 w* n
- setCheck('wlEnable', currentWlan.enable);( Y$ ]& n" U& {9 W) s" l( Z3 P0 M- o
- }; v: r! ^) S5 e Y
- else) {3 J2 ~5 V* ^+ \
- {' s" u3 b5 J5 Q, J' T
- setCheck('wlEnable', 0);. V, n1 A3 J' \: j5 x! B$ `# T
- }
" w- N- D: B" T% T: n
( b% q- M" n; p' k3 r- return;( p+ w2 ?+ T2 k u- G
- }$ L/ w9 C1 ~' |' r# |. l
1 Q) p: H/ X6 ]# ?# b- function ltrim(str)
6 M0 g4 r D8 W& Z - {
3 U' I1 I( i2 C: O5 y; c. w - return str.replace(/(^\s*)/g,""); [) `7 p; Z% V* l, \4 z$ _/ [/ H3 t
- }: N- m+ T7 n8 D5 ~" Q3 ^1 V
- " j q: A D- X: h
- function IsCharandNum(str)# U$ c9 L- S4 n7 ?
- {
8 B: F1 Y; L0 \- b; A - var prefix='';
, p) W) W* j3 N& K - var postfix = '-5G';& H2 f$ n* Q2 W3 N5 s4 }
- var endPos = str.length;- O" e2 c: J4 n% o' N1 s" q
- var ErrorNote = "SSID-1 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串。";. y' Z* c7 N: } Y5 j0 d& H
2 j$ I4 r! Q" `6 r% J- if (0 == getWlanPortNumber(currentWlan.name)): V* E6 L; l" e, N/ L/ s5 z
- {; ^* p& @2 g3 B. q# ^% k: u9 V+ t7 r. p
- prefix = "CMCC-";
7 _0 T1 z' |" y - }
8 }8 s, Z- q* U1 I! |* X - . S( S$ J' P6 c1 `+ f
- if ((1 == DoubleFreqFlag) && (4 == getWlanPortNumber(currentWlan.name)))
; z7 o8 x5 y7 ? - {' a2 N2 P* L5 ~
- prefix = "CMCC-";- H+ Z4 M2 H/ o( E' l7 z3 m
" y. W5 i# T' l$ _, i' k9 r( \5 ], L- endPos = str.length - postfix.length;
6 J+ d* P& ?% W8 ~ q9 V - if (endPos != str.lastIndexOf(postfix))& a8 k) d' Q s% c: \$ H
- {8 W) {. |+ `- U% ?' o/ w0 p7 |
- endPos = str.length;- A( ~3 F1 X% U1 F3 l6 V
- }/ f3 e4 b8 I! [4 a
9 e. m! W4 b/ @ [' B( m- ErrorNote = "SSID-5 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串,并且允许以“-5G”结尾。";
$ K, W) |( C0 O; E* v6 a - }% L5 M; _/ o$ _
- * }) {4 f$ S) {; U$ _. q
- for( var i = prefix.length; i < endPos; i++ )
6 m* k, A# w9 W8 [: [/ `+ f - { - ~2 j0 V) J# C9 ^- P
- if(str.charAt(i) < '0' || str.charAt(i) > '9')
' L4 f# M: W9 M9 M: M" [" c - {% ^$ s$ G/ \% C* o+ h+ f1 X# W
- if(str.charAt(i) < 'a' || str.charAt(i) > 'z')2 I, B/ g9 l: W3 e8 U2 R
- {& P' T2 i: X/ I
- if(str.charAt(i) < 'A' || str.charAt(i) > 'Z')) W! l( d/ n: ]! z |7 ], l; M- m
- {
( U0 z& `, F3 O2 e& z2 } - AlertEx(ErrorNote);. Z/ Q3 S/ @& X( f& @) C4 k# i
- return false;9 ^8 }- W r' S% `$ z. |
- }
5 L/ ]1 |* F6 j! N5 ]/ p - }
2 W3 J4 q# e% X - }
) ]. N7 P2 R, ^9 F; M+ ` - }2 i+ v. c( l+ A& q, n; V# _0 s& ^
- 5 E4 E7 r2 t# J4 }$ Z3 [6 i9 q( q
- return true;
6 Y& W, w! `: T, e$ m8 I - }. M. S5 j5 }5 K6 u3 t/ ]
- % H+ O+ @) o* J8 }2 {2 s5 k
- function addParameter1(Form)
$ w' m# s2 H% `7 q - {
6 j9 S7 c7 R; d( W% t - Form.addParameter('y.Enable',getCheckVal('wlEnable'));
9 |& h1 C/ @; I - var ssid;
; h0 M$ j8 p( K - ssid = ltrim(getValue('WlanSsid_text'));7 F- T( h- v/ N
- if (ssid == '')7 f+ K1 J; x9 t+ h. B0 t& w
- { j( P0 k: H# W5 I$ {0 \1 ]
- AlertEx(cfg_wlancfgother_language['amp_empty_ssid']);
& D7 ?% s# g6 U - return false;
3 p) w& F7 Q( Z E# {/ q& ^& k - }
' p$ J/ m; t; ~+ U2 r
) I% H* v& E* w& P9 I5 _- if (ssid.length > 32)# P, c$ u3 @7 f/ y4 o! V! K
- {
. H4 U3 B+ V9 ^/ \8 A - AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_too_loog']);/ U) T8 ?. h, F; p+ l, _
- return false;
$ E1 i, M T2 k6 ?; p2 D - }: q8 O# G2 k1 s4 `/ Q
- : l! h7 d3 S% k+ a8 _$ k
- if (isValidAscii(ssid) != '')* D+ Q! [6 x0 V4 Y
- {, t# m1 l- W& m9 L4 f+ z7 b8 Z8 K/ H
- AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_invalid'] + isValidAscii(ssid));8 {! {! e# I$ g3 m- L
- return false;
7 j% R6 q7 V: b# S# y$ X! a; i9 O - }
& F: b+ Z4 r8 c/ C; G - 8 p F7 o1 N2 a7 S; a) F. ~2 [3 C
- for (i = 0; i < Wlan.length; i++)
# `" G+ R; ^! n2 Y7 C - {3 W' ^4 z1 ^+ m( x
- if ((getWlanPortNumber(Wlan[i].name) > 3) && ((1 == DoubleFreqFlag) && ("2G" == wlanpage)) )
9 p- }) ^4 u9 r! U) _ - { s2 q1 ~2 J% [6 [; U6 l- K
- continue;
; f3 Z2 D* {! q# Z - }
% ^ L: l' G& ^; D0 b$ @7 G -
% k- M" f6 U7 \5 @ - if ((getWlanPortNumber(Wlan[i].name) <= 3) && ((1 == DoubleFreqFlag) && ("5G" == wlanpage)) )
! @7 b% O6 b6 b ?- K - {. V4 g' Z# \, l1 \8 ?" `7 ?, }/ {
- continue;) d k- ?+ ?. }) |) {" g
- }
7 l- M. E* ~1 _ - 4 |4 ?4 m' o0 s+ _5 ?: W) N4 T& A1 j
- if (ssidIdx != i)
/ M! \6 O; G l - {- Z! q9 @9 I C6 B2 A3 B5 Z
- if (Wlan[i].ssid == ssid)6 y3 \& V h/ O, Q3 k
- {$ P( n* }4 n% W- m- Q( H
- AlertEx(cfg_wlancfgother_language['amp_ssid_exist']);* I. I O2 D& s, n. B
- return false;
5 K" x. M, Q& K) q! S" _9 ]$ z - }
6 k. K& y8 t+ A+ b' w3 H - }' f0 T+ R2 T' l, Y4 s
- else' N. t+ W9 u( j
- {
! P h7 B7 |) D" g - continue;
9 f0 i$ i7 _+ }4 C, T - }
4 _5 \/ x2 ^$ Z8 X8 e$ a' h1 I - }
2 n+ @- @- ~ o - 1 w6 s8 ^' R2 d2 `
- if ('E8C' == CurrentBin.toUpperCase() && '0' == TianyiFlag)
% }: w8 Q& a% d j. b3 `4 y3 s - {, Q' \* V) q/ E! p2 ?
- if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) ), Q R6 Q' V+ N, ` Q! Z! Q
- {6 `5 s) v b+ j* `+ ^
- AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet']);" Q1 s2 |* E! m0 k) x7 _& K
- return false;3 `' J; H T1 t) n# }, M/ D) n
- }7 X' n' x: K( q0 g' U2 G' l5 F& P
- ) d- T3 r- y9 F6 B9 j
- if (1 == DoubleFreqFlag)
% O6 h0 a7 }* F; q! y+ b - {# ]- F" W1 q6 p' i5 u3 g' H: M
- if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) )
3 a v9 B6 g8 U& ]- h5 p4 f9 t - {
7 |8 o. i" W) _, g$ r t - AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet_5G']);
" u3 s# U2 h+ J& _" ~; ?: u3 n+ N - return false;) }; y- h" x0 j, l) \9 K
- }
- s! g5 W, S5 @, | - }
& I2 \- G! f: @3 j) w - }4 N+ S+ U! ~+ M7 Z7 Z+ ?. i
- 8 j+ z& V+ S" d" Y1 T+ u" } @) _
- if ('CMCC' == CurrentBin.toUpperCase() && MngtJsCmcc != 1)5 L2 x" n4 L$ U2 u* a# I0 L$ ]
- {" n3 `8 v% h# }3 K7 z
- if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) ) z$ h4 o: R+ B5 d$ T. o
- {
( N* p. I/ U2 b4 V+ R/ V - AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc']);
; R. k0 a8 ?/ S4 b/ J& t; M* J - return false;' {) |# h. h6 w# G0 j; A. V* p& C
- }( ^$ c3 ]6 R/ A6 C
1 T0 m% I. B5 r. y ]- if (1 == DoubleFreqFlag)/ C' b, \) T' Y$ r) ~
- {; F0 q) H% i- R& R% S/ i) o' O6 f+ w
- if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) ): x3 m) e) \: F# o8 b
- {
) ^4 J$ Z, {1 z - AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc_5G']);8 ~8 C/ t+ [& N" t* m, J W. d
- return false;
& \, s8 I1 K( R$ @3 V0 q* ` - }
" T% g, X% n8 b$ Z - }
( k! f4 _; L5 d( b+ {& |$ S - } ; |, h# S" I1 D$ W# i
- : u5 m+ ^, ^4 Q& n$ U0 [7 i/ I5 w' ]# ^
- if ('SHXCNCATV' == CfgMode.toUpperCase())
: g' v' t& O; _/ L7 ` - {
/ x/ Y2 k* d4 Z8 V# M - if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) )4 l5 C3 m: P7 n" x9 m
- {- t o0 s. I4 s
- AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv']);7 l1 g6 \3 o/ q) w7 Q: W
- return false;: B( b: U2 L' i! Z
- }
& d1 b, a: `1 T1 J - 7 V6 Q7 h5 r: U# H3 F2 _
- if (1 == DoubleFreqFlag)
: U2 H( o: `+ `! E - {, M$ n7 e. q; {: w8 F) i! X
- if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) ); U, J+ p, ~+ l& h4 [+ v; Y ?
- {
7 r2 S$ q9 [" A/ I# B5 f7 Z - AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv_5G']);1 g k; o5 t$ I1 D# P3 h
- return false;6 a* j1 k& W3 a
- }
+ n# b! x5 x) h* P! ^8 h - }" B: ^ \5 A& N X6 {4 n
- }
9 N8 s4 t; @/ H, S) R5 h - $ _/ o/ K$ F. v }
- if (('1' == aWiFiCustFlag) && (aWiFiSSID2GInst == getWlanInstFromDomain(currentWlan.domain)))
( O1 C, q8 f% o - {
$ L5 L5 Z3 G" V9 H: W& d4 h - if ((ssid != 'aWiFi') && (0 != ssid.indexOf("aWiFi-")))
& Q$ b( q5 A" E+ b" G' J - {* Z& @ Y) P% J9 \6 i+ U
- AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_awifi']);
" d- {6 N1 z& `+ d Q - return false;
8 y4 g1 \4 ~2 ~8 x( J0 y - }
6 o3 n/ p1 S! x& D - if (ssid == 'aWiFi-')
/ U; d; G# m6 c( |7 { F - {
+ [% i4 \7 K! U4 y# v - ssid = 'aWiFi';5 z4 ^7 C7 D; u- m, W" L, e" l/ [
- }7 v- m, F; B: D3 S- S: o
- }# p3 r, Z5 S5 Z2 l& ~
- 3 h% \. A5 J% Y" {
- Form.addParameter('y.SSID',ssid);
! V% Y) ~- z. F5 r- O9 G7 g2 K - }
3 F* |* o/ D' k0 h; `8 ]& G& w - @ D) N# `! C$ L
- function addParameter2(Form)
$ G: K [' G% o! [$ M - { : r2 C( l; @6 `4 v7 J' m& }
- var url = '';
* U- B( _( C7 d1 t3 G8 N: ^8 ~ - var temp = '';( b* q5 h% r. T/ p0 {
+ l8 @) l. h& s8 _ b/ i4 _- var AuthMode = getSelectVal('WlanAuthMode_select');
* T+ `$ D8 C: Z/ N- i* k
* _$ Z' b; ]; z: `) n+ r2 Y- if (AuthMode == 'open'), W# V. ~+ w" e! ?4 [
- {# \! l( C/ P. O& C1 Y) W# P
- Form.addParameter('y.BeaconType','None');2 Y+ v" c2 }2 k M6 ]. i" Y5 l
- Form.addParameter('y.BasicAuthenticationMode','OpenSystem');( _5 y8 `/ u* C- w
- Form.addParameter('y.BasicEncryptionModes','None');
$ |4 y! f! R# U) [( e - }
6 Q2 a% k, g4 G0 p2 H: h - else if (AuthMode == 'shared')
; e0 A# ^) @5 T3 I7 W - {
$ ?' Q- x/ ]4 Q6 Y" c - var KeyBit = getSelectVal('WlanKeyBit_select');
1 ~: b* P2 k c. h: \: j% _& | - var index = 1;
: f k, I; o0 L1 B6 R, q! t W - var wlKeys1 = getValue('wlKeys1');% o& L3 a" B, f" ~! B3 v* I
- var val;% Y6 K/ y+ |, k6 S# T! ~
- var i;
9 }+ O; ~( p4 q- G( M e1 n - var vKey = 0;
0 ]: w2 h% d! R' L- B0 y2 W3 q - var KeyDesc;
* T0 K! p9 S! ^# Z t - ( ]6 y s! M' p# u, n" }2 e4 `
- for (vKey = 0; vKey < 1; vKey++)
, d' [% h) f5 i. | - {; b. j! P/ g8 b: c1 I
- if (vKey == 0)6 ^* e4 @& y* E/ C
- {3 O) i# E4 K1 v* I% t
- val = wlKeys1;
3 I) l s# u/ G, j - KeyDesc = cfg_wlancfgdetail_language['amp_encrypt_key1'];7 n& Q! k! a% C4 M( c
- }9 O9 x, s1 V9 b9 L% o
% C3 b- z5 w4 V/ v/ Y- if ( val != '' && val != null)) J" o, h( p2 y
- {
1 J" Q4 I( b3 h - if ( KeyBit == '128' )3 p6 g* _9 \7 O) Y+ \& g) @
- {8 i3 |0 h. t3 d
- if (isValidKey(val, 13) == false )
2 |! R" `, }& X1 v - { N; z( x6 B: {+ F. `
- AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid1']);
& e5 O" X2 z, V: b2 y4 d; F - return false;* x, M2 Q; o! [; @$ q% c9 ^
- }
6 g3 U& x( ?# G; y7 k3 h& n I - } m2 Y. ]# `* y# }: Y) U
- else- i) d# e# {+ t6 u+ H8 D( x" q
- {- d& O9 [/ G9 d% S
- if (isValidKey(val, 5) == false ), N- B# \9 D Y
- {5 Z9 s/ Y" c. {- s0 ?! P6 Y, l
- AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid2']);- m! v1 W( S0 i. H7 U4 ]
- return false;
/ v) U% s: K5 d - }
. h( y- @2 k/ I+ {0 b: \# J - }3 C( }& \0 X( G; c3 j( `8 A
- 5 B% i; v/ z* u, w
- }
+ Z0 ^+ l6 X. d2 o# D - else
3 t2 D, I* z% j) I# q* E. n7 z - {$ O& i5 \% e' S2 |1 s8 K& g
- AlertEx(cfg_wlancfgdetail_language['amp_key_invalid3']);4 t. ^+ V0 ?% t4 u8 ]
- return false;
3 J# D6 Z! I, G& y1 p. F! B - }% _, k o% l3 F4 v. W( S$ _- H1 S
- }3 A8 ]4 M9 d B! F/ [
- Form.addParameter('y.WEPEncryptionLevel',(KeyBit-24)+'-bit');2 y. w/ r! B$ U8 [. ~3 M5 y
- Form.addParameter('y.WEPKeyIndex',index);" x+ ^4 ?' D7 W: q1 k' z
- 3 g$ W! b2 P8 G0 B& H# d
- if (wifiPasswordMask == '1')4 N) s& W& `6 O
- {* X1 a3 S$ r6 [: u( x: H
- if (KeyBit == '128')
* W$ A; E0 L+ m5 C! G - {4 v. S. ?5 \" @) d6 p3 ~7 [
- if ( (wlKeys1 != "*************") || (wep1PsdModFlag == true) )
# L _) Q& o7 p, {, U) [+ N+ u - {
1 U* U0 v: C& h3 [" \4 D1 o- ]8 z$ }* T - Form.addParameter('k1.WEPKey', wlKeys1);
2 B/ k$ ?0 X/ r$ o' h' J - Form.addParameter('k2.WEPKey', wlKeys1);4 w3 \ ^ w9 t2 Y$ `8 n* B
- Form.addParameter('k3.WEPKey', wlKeys1);# G" C7 c; ~( |1 b, k" W$ o
- Form.addParameter('k4.WEPKey', wlKeys1); : \% T( U/ v: u; n9 K. @
- }
9 Y5 ?# s5 g, ~+ h0 F0 r4 ~" J - }
; ]- _ I8 [7 }) Q. f - else
6 C' R4 p' s. I3 a - {0 a+ v5 V4 w; @& J2 U# d
- if ( (wlKeys1 != "*****") || (wep1PsdModFlag == true) )
3 ]2 E. O1 F- u1 x. J3 o8 V - {
+ a: r5 s0 U9 C - Form.addParameter('k1.WEPKey', wlKeys1);
7 _7 O: ~, a! d6 u; W - Form.addParameter('k2.WEPKey', wlKeys1);7 L4 v- X( n3 R/ E- V5 u
- Form.addParameter('k3.WEPKey', wlKeys1);
" U q2 k2 L# D- F - Form.addParameter('k4.WEPKey', wlKeys1);
/ Q7 W9 C* L* X5 k' I! A6 i7 T7 Z, C - }
! \6 b: O2 R1 @( d { - }0 r# j9 ]) Z" b% }$ ]4 l
- }/ y$ f: ^# }+ D4 d# u
- else x" u1 e) A0 V7 \& T |+ Z
- {& |, _0 s0 |, O: g+ y' K
- Form.addParameter('k1.WEPKey', wlKeys1);1 m) ?- w& b1 w, g) L6 O
- Form.addParameter('k2.WEPKey', wlKeys1);: s2 ~! T- l/ J
- Form.addParameter('k3.WEPKey', wlKeys1);# E& ^6 L1 b& ^4 P; n# o7 {5 v
- Form.addParameter('k4.WEPKey', wlKeys1);
8 c1 n& I* Q2 R7 J; j+ {: z T+ y/ ` - }! t6 A1 K7 i3 V! O& R1 @4 L* b
$ s" p) M; r7 s E* m-
/ Z, K/ ^, E6 g: n - Form.addParameter('y.BeaconType','Basic');% m% A2 d, q5 M/ x9 b3 C
- Form.addParameter('y.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));7 T3 b1 n; R* a" b
- Form.addParameter('y.BasicEncryptionModes','WEPEncryption');
( ?( ?& A4 t7 J+ w. m3 Q I/ z - }; Z) U* N: D1 J7 e/ K5 g/ V
- else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')2 N& z! ^7 M* \* a
- {
; G( Q* P( ^) `$ | B: ]: U" c - var wlRadiusKey = getValue('wlRadiusKey');
) n* [$ H( K: F- a" {% \; C - var wlRadiusIPAddr = getValue('wlRadiusIPAddr');
2 [; p/ L# [. l" _- ^' U - var wlRadiusPort = getValue('wlRadiusPort');1 j% t. ^$ w5 Y: y: ?0 j" h" O
- 6 f2 F7 q7 ?) v- B
- if (wlRadiusIPAddr == '' || wlRadiusPort == '' || wlRadiusKey == '')
" Z- \% }3 X) S9 j: R& ^1 ~ - {2 b( \& U0 m- v& L9 q' X7 J* M9 t
- AlertEx(cfg_wlancfgother_language['amp_empty_para']);
) W& o5 p* j! _( S( ?5 q - return false;
V3 g6 D7 ]5 F0 q' Z4 s - }
) ^4 D* e+ @) j0 C0 ~0 n - 3 t$ c5 J- ?5 G- H0 C( E
- if (isValidRaiusKey(wlRadiusKey) == false)
# R% l2 w; }% `, I; V7 { - {
8 x2 }" r% o- x( u2 z+ V6 c - AlertEx(cfg_wlancfgdetail_language['amp_radius_keyinvalid']);1 {3 h) \" ~2 e6 Q9 ]
- return false;
. F; V1 `4 i5 E: ~. L5 v: V - }/ `5 q( d! D2 m
7 s. C# a8 ^1 x$ Q2 b' i5 n- 7 |+ R( e3 r t8 g8 T4 d. B7 k9 d
- if (isAbcIpAddress(wlRadiusIPAddr) == false)4 j& h9 V% F9 n2 G( p
- {
) q7 R. a1 b2 R+ [ - AlertEx(cfg_wlancfgdetail_language['amp_srvip_invalid']);* o# {' P2 l" ~; B- l
- return false;
. x, F p; B6 M5 M1 Y) @" v- I: L9 [ - }
' P* f7 C6 m" F* e- z5 Z
* s' m6 H4 k/ A* i- if (isValidRadiusPort(wlRadiusPort) == false)
# z3 _5 Q V( E" [/ b; r - {
: ]* U5 L7 p2 c3 ]* X/ I" Z4 t: g& f - AlertEx(cfg_wlancfgdetail_language['amp_srvport_invalid']);
9 ]2 d& c% E% b- m! d - return false;
" g% z5 M% Z" C+ v# L0 i3 R - }
4 D9 P2 X# \. ^; w) H" u0 d* ? V$ c& U -
6 \% K' j' V! ] - if (AuthMode == 'wpa')
- e: q( C8 l% r - {& _+ B X5 P/ P O, m7 R+ } ]
- Form.addParameter('y.BeaconType','WPA');' B( ^# x" @! H! ?
- Form.addParameter('y.WPAAuthenticationMode','EAPAuthentication');
' I9 S2 \( ?: ]+ c4 J - Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
2 f& a, g% _7 k - }& e4 t2 x3 K$ b# C9 \$ p' y7 Y
- else if (AuthMode == 'wpa2'); r4 ~" i0 X: \ t
- {# N1 C* I3 g2 k2 k0 g( G0 w0 J
- Form.addParameter('y.BeaconType','11i');
1 [' V+ s$ g+ [# {% I, c - Form.addParameter('y.IEEE11iAuthenticationMode','EAPAuthentication');
; T9 b9 u( P/ b - Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
' [" k; f) q/ U3 o - }
' w. \3 k o+ i/ Y/ o - else* V6 O2 x6 a% | ?1 P$ W7 z
- {* f: i5 Z# `% n' h- ~
- Form.addParameter('y.BeaconType','WPAand11i');
( m# C P3 f* i& r8 B - Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','EAPAuthentication');, \$ \. o: {: b6 O
- Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));6 d! `8 B ^4 m/ Y9 ?
- }' i/ o9 j+ X# l t3 m! @6 I7 |( l' Y
-
9 R C0 V2 Z9 M& c2 o, q5 u% ^ - if (wifiPasswordMask == '1')
, A9 L# d3 ]2 }( R- }% b% E: o6 o - {: Y( N/ [1 n D" `, _
- if ( (wlRadiusKey != "********") || (radPsdModFlag == true) )
- U5 ?/ f4 ^- a4 W - {
! u5 n/ g& u/ z, A - Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);
0 v% T) f+ Z3 v) I' b2 g* \, ` - }+ O6 E; g! N6 R% Z0 f
- }
* @0 X4 H q8 P3 j" M( y0 f4 O* @ - else, t: T& f; P# K$ `0 {( w! y" i% p' R' f
- {, e: m! b, O. i7 P
- Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);1 H, V* a" j' C: N( U
- }
) E9 b/ X$ [7 S+ l$ p* e
5 e. I! A( ]; w0 n+ Z0 A4 L- Form.addParameter('y.X_HW_RadiuServer',wlRadiusIPAddr);
+ X) r3 y f2 v( D
4 L3 c2 f/ P6 e+ u- wlRadiusPort = parseInt(getValue('wlRadiusPort'),10);
# c# L+ i% y1 s @- h! F - Form.addParameter('y.X_HW_RadiusPort',wlRadiusPort);
# V- T6 Y/ f6 k. d7 S7 n - }* r" K3 P4 M6 b$ x0 g& `
- else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk')0 Q9 t6 `# R( R9 |: P
- {
7 s3 y, {5 A) `9 X - var value = getValue('WlanPassword_password');$ j/ e' X) P" D% V7 {
- var wapiIP = getValue('wapiIPAddr');
( @0 ?; w2 v0 E, y6 W# x - var wapiPort = getValue('wapiPort');8 l6 i+ Z# b5 y9 c$ f6 G6 J z
- 4 a, k) d: u' J4 P# y! u" c: k
9 }" j1 j, C: Q) u7 ~1 Q- if(AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk')
4 |9 c* @" c2 D# F$ ^ - {
! G1 z z. r& u* a. m7 J& h - * U: t! n+ n3 q
- if (value == ''): t+ h* T1 u7 l5 F" ^1 I- R
- {% e, q6 |# h& l3 X4 P/ D' F" ^
- AlertEx(cfg_wlancfgother_language['amp_empty_para']);
& y4 M* q" d; ^' x) q" v* G3 z9 | - return false;, O0 s. N3 _: \' p3 ]. ^) D- ?
- }$ @, c' p+ i. L* T/ G
. M }, C4 _2 W6 k- if (isValidWPAPskKey(value) == false)
7 a4 x/ x7 H" z6 F7 R2 }: j - {& L3 ?0 {7 B! x( @: y4 F
- AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);7 A* ^. @% j/ p) T7 J0 H* w: O
- return false;4 N+ |# U T3 S/ M; p1 k$ N( o8 W
- }9 d Z+ n7 b; @" G* C- @" L
- }
5 J5 y7 D" S5 v! S) f - 1 k+ Y7 A/ R* E
- if (AuthMode == 'wpa-psk')4 ]7 y( d9 X; g+ D1 }
- {) {' {# X0 o4 `4 m, l' ?
- Form.addParameter('y.BeaconType','WPA');/ J7 w) e! d6 m
- Form.addParameter('y.WPAAuthenticationMode','PSKAuthentication');
* \9 F L2 |# [& e5 e4 N4 R- P - Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));( c' s# w2 w0 k" a- u
- }$ G O' K/ C% f$ L5 W8 o
- else if (AuthMode == 'wpa2-psk')
2 W. K0 o1 ]# @% g' K7 a( Z0 f - {' i0 e! W( x7 p$ }4 |( l
- Form.addParameter('y.BeaconType','11i');
& r4 B8 R Q2 X/ l+ G6 m) a - Form.addParameter('y.IEEE11iAuthenticationMode','PSKAuthentication');5 ^4 z$ q1 E |: K3 E' e
- Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));' K9 W% |1 l" K6 m
- } 6 [- v! r" T, T) u
- else if(AuthMode == 'wapi')' ^7 E# C/ h B0 ^
- {, @& V! B3 J9 I7 i: j! q8 x
- if (isAbcIpAddress(wapiIP) == false)
5 Q. H' ?; ?7 S9 B - {
3 @: W; m% A; V8 C - AlertEx(cfg_wlancfgdetail_language['amp_wapisrvip_invalid']);& c# ~* w: c0 a) L* d
- return false;
I( y; }7 T2 p - }
R/ ^) r2 H" L) Z4 s- ~1 M( I - ' i3 m- B2 D" ]" l7 W: j6 A
- if (isValidRadiusPort(wapiPort) == false)8 Z4 f7 A9 x8 X$ Q/ K( @ K+ L
- {" W8 I7 o% Z; {
- AlertEx(cfg_wlancfgdetail_language['amp_wapisrvport_invalid']);9 B- {* A0 H* t) A8 |
- return false;$ i; ]! F1 W c
- }- b, n. Y; p* q1 _- z+ d, z
- Form.addParameter('y.BeaconType','X_HW_WAPI');
# `% W+ H# u+ V - Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPICERT');7 c4 y5 r5 s) S# {
- Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');
" {3 A: z# u" _" U" j. i5 x - Form.addParameter('y.X_HW_WAPIServer',wapiIP);
& ]) H$ I/ h3 z7 s) y - Form.addParameter('y.X_HW_WAPIPort',parseInt(getValue('wapiPort')),10);* V) b; K" x$ G* x! T* l3 F1 V' I
- }
2 U5 j* X ]& m0 C - else if(AuthMode == 'wapi-psk')
* I2 c/ K& Q8 B! f4 w$ G8 ] - {
, J: D+ t6 H& M7 b - if (value == '')9 C$ n5 \; G% t% I* D
- {( N+ \% @" m. ?4 a
- AlertEx(cfg_wlancfgother_language['amp_empty_para']);
: {3 i$ z8 A6 k- i - return false;
+ U; ?; P* O, r5 g& B* a) L! m) z% }! d - }
/ N, `' U4 P. I8 v0 M5 h) ` - ( \$ |( B4 \6 q
- if (isValidWPAPskKey(value) == false)/ Q6 E2 W5 g1 v( W5 \
- {3 W; v5 c. S4 E' F a
- AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);
$ o+ r t* J6 [# W# a9 j! g - return false;
# X5 }- Y+ X# [3 l3 E - }4 H$ S8 y' t2 H- e" V r
- Form.addParameter('y.BeaconType','X_HW_WAPI');0 U# R2 X' P$ f
- Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPIPSK');
8 w# ]4 l E; q& M2 A$ e9 @5 k: G - Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');
; \$ _7 A- B* n) S$ N - }5 `: c+ b1 `$ N) w4 A2 s
- else0 M' ~3 g& _+ j
- {3 M- d! J4 i9 w' F( _. ~
- Form.addParameter('y.BeaconType','WPAand11i');
! o9 o/ g$ {% o* l5 X% Z - Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','PSKAuthentication');
. m; j+ f! y) w - Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
6 X. i! U0 D# G7 ] - }
" J. M6 D" H, f& t# R0 f" c0 S' M8 \ - 3 |( w. d, D2 d. n
- if (wifiPasswordMask == '1')
8 C4 d" |5 O( F+ b: m& @( A - { ?9 T4 h1 T4 C( S( ?
- if ( (value != "********") || (pskPsdModFlag == true) )1 E, R' A2 P) Y
- {7 _, N0 I5 j0 ]) W/ Q; B/ ]
- Form.addParameter('k.PreSharedKey',value);3 S, i* k% M- B* T @* w
- }
- t' V7 _3 X9 P6 |+ S9 w+ N% e5 w -
! u+ j5 N' x0 {( X - }
1 M( ?) D2 z( Z. |( V - else
' Q2 V' W" [6 W6 E - {
: |9 Y% i1 n1 z; `# l; }% z1 Y2 ` - Form.addParameter('k.PreSharedKey',value);7 ? s% C5 e0 q1 |9 Y0 i9 h l2 P
- }
0 x' G' O) j# O5 @8 P - }: L: G6 H9 g& h% \; \9 \
- else
9 m0 m0 R. [* m4 @5 H' v! d: n - {
! {8 Q$ u Z T/ {0 a5 a9 v. e - }
5 x# a- I* Z+ M2 S - , u9 ]8 b6 |, P8 w
- return true;
: `( G9 t8 s; a, @' i - }: d Z* s: k/ A7 [
- ! r3 x1 z% [6 R7 I. U e
- var guiCoverSsidNotifyFlag = 0;1 f o h; ]8 ^/ x2 e$ w6 E
3 I4 x' \7 H: q7 p6 z3 v, m6 z- function setCoverSsidNotifyFlag(DBvalue, WebValue)5 }7 r, J4 s8 {. X. g" j: P
- {
5 M6 u0 G1 {( n - if (DBvalue != WebValue)
) p% [3 I( t0 U9 y2 p% `( a - {
, ~4 f2 ~3 H( Y9 W* U4 @1 @ - guiCoverSsidNotifyFlag++;
' \/ G8 F" F; \0 E- S - }1 {4 m2 U+ I0 P6 p
- }: j8 E, y' t7 d5 H- h
- % E& D7 }; U/ z7 e# L) C! D. E
- function stExtendedWLC(domain, SSIDIndex)- F% ~2 o( `" u
- {
4 s% u& d, `6 j, z - this.domain = domain;
& w6 S' y/ Q" K. G - this.SSIDIndex = SSIDIndex;
0 y& ^6 b( e8 a$ L8 }7 W - }
0 i( ^! k5 l! V
$ ]/ N W3 L) ]6 j. t- var apExtendedWLC = new Array(null);3 X: Z; m$ l7 _( `6 O; }
- : q7 V( w0 e" [4 s
- function isWifiCoverSsidNotify()
: N o! f7 @- ?+ s+ C+ s0 r - {
* t6 j* n L' u: V2 g - if (guiCoverSsidNotifyFlag > 0)4 w4 x+ J. ?$ A) h. Y% Y
- {+ Z' [7 e6 J1 J" K. g! h
- return true;& F8 o. E& G# J2 O6 E# w* ^+ y
- }" w6 B/ G4 V, h1 A5 `$ ~! [
- return false;
; k9 e1 M Q+ j; W% k0 t) X1 s6 T. B - }* E3 M8 v% u$ K/ z
7 i7 B' o/ @' }) a$ P0 e- function isWifiCoverSsid(wlanInst)7 A9 ]' f( ?9 }2 e1 {& o
- {
( t" z: w+ s. R9 l/ b: ^3 e9 u - for (var j = 0; j < apExtendedWLC.length - 1; j++)
, D% p6 L8 q8 }5 `5 t3 w3 j5 | - {, B+ o* G) z: t( _& |, F, m) ~
- if (wlanInst == apExtendedWLC[j].SSIDIndex)
$ P1 L9 S7 O( j, a k$ b - {
5 _( x7 U1 q, f# W1 y2 e - if (isWifiCoverSsidNotify())! k, R4 |. a! G- x3 ^. g6 X
- { c1 w4 @7 k( h
- return true; g, `- V! o4 H. t; M. W( x' l
- }
/ a- ]4 K1 W3 u) f; D - }
0 S5 V$ L5 e* \; d% O6 f - }
% e' |+ ]6 l) f& h) a
/ `: X p6 C, B3 q K- return false: r& x8 D' }" d7 x
- }- Z: d/ i0 Y- Z7 c" a7 n
- 1 H* t, w! N% k
- function AddParaForCover(Form). b3 r m% P9 x' X3 D6 ` u' N
- {+ |4 X4 L3 v! Y1 C
- var wlandomain = Wlan[ssidIdx].domain;0 {% o8 Z, |* m2 x/ `* t
- var length = wlandomain.length;% a6 o1 }" L x& Y' J' j
- var wlanInstId = parseInt(wlandomain.charAt(length-1));) z$ W) s2 e. a* ^4 V
- var beaconType = "Basic";
! r, c0 i2 `' j0 k - 2 {9 s) S& e/ F% {! `* K
- Form.addParameter('w.SsidInst',wlanInstId);( k: G% X5 J! H# C" M/ j( O
- ) K F' B2 q- S! ^5 L1 R$ U
- Form.addParameter('w.SSID',ltrim(getValue('WlanSsid_text')));
5 _* [1 [3 I1 y" F5 N! x F - setCoverSsidNotifyFlag(Wlan[ssidIdx].ssid, ltrim(getValue('WlanSsid_text')));6 C6 {* I, X8 c" f& L$ }8 C
-
* A: h+ {' o! M - Form.addParameter('w.Enable',getCheckVal('wlEnable'));. a/ e0 o- p6 J* I- x* Q4 B
- . ?- e" G* x5 `4 P/ z- }
- Form.addParameter('w.Standard',WlanWifi.mode);3 T; k" G4 s6 p5 T, H' W
6 X! O) X) v! P% z7 m9 Q# \- Form.addParameter('w.BasicAuthenticationMode','None');* j1 @1 {* k' T- q# m9 f8 f
- Form.addParameter('w.BasicEncryptionModes','WEPEncryption');5 l5 T3 y6 w+ {% X# t+ H
- Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');
/ c. c3 I3 T% A - Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
' L% f' W8 d! M; G9 o& X1 H' S) Z - Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');* @3 m+ e# b$ i8 h
- Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
: T9 e; e9 E+ j0 Y4 J - Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');0 F1 e! g P. G% g8 q- g
- Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
3 k5 k7 L) i) W6 v" |% ^7 x -
0 x: X( ^9 k5 Y# W) d% C: V - var AuthMode = getSelectVal('WlanAuthMode_select');7 F& ]/ n4 w, i* [0 h( ]# T) p3 C/ Y# ]
- if (AuthMode == 'shared' || AuthMode == 'open')' _4 ^) f/ L4 Y' f8 i" j' K
- { # Z* w3 h& ~( [/ ]6 r% D
- Form.addParameter('w.BeaconType','Basic');
* x( W8 E8 G" z* L0 w8 S ^ T7 B - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'Basic');
1 I2 H& X% ` y6 Z8 a* O - : M# J1 G( p8 q: _
- Form.addParameter('w.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));4 \2 C7 e% M4 D
- setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicAuthenticationMode, getSelectVal('WlanWepPwd_select')); 2 ]. |: f: L! m7 z6 G8 D
-
! e+ E! G, C8 v - Form.addParameter('w.BasicEncryptionModes','WEPEncryption');
7 G7 D. X: U* p - setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicEncryptionModes, 'WEPEncryption');8 u" K! Y a% W( R" r1 a! U
- } 5 H; _. ]+ D* q2 O
- else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')
0 k4 Q- _1 Y3 s2 y - {* Z7 R7 J. B r: ^
- if (AuthMode == 'wpa')1 r, y# T; L- }) }
- {" k6 J2 i c; ^1 D. w
- Form.addParameter('w.BeaconType','WPA');9 k/ o! [/ F# r$ u
- setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA'); $ D2 M1 V; |! T/ p9 K9 A6 o
- 2 B& ]* x3 t! b# g7 s! N
- beaconType = "WPA";
. ~ T9 L; F* f% g* E - Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');6 N! Y( C: d8 Y2 W: M1 C$ f
- setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'EAPAuthentication');
) i/ z& r' [% A5 m -
+ ?9 @0 h. o1 ]. p - Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
O/ N% [8 x3 _$ E' |2 ` - setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
c. a( U4 J4 |8 n+ K C - }
% m0 x S0 t, v9 r# [2 d1 R - else if (AuthMode == 'wpa2')
5 v, }# M/ i" ^( G. h' I! n: g - {% e- z% e4 t# \+ V& y
- Form.addParameter('w.BeaconType','11i');
, M: }8 a. R7 F% P - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');4 P3 Z" ?) e8 v# ?9 G3 f9 _: A
- ) L( Y0 C7 K/ L& ?& m
- beaconType = "11i";
' W$ C+ f1 @' u7 D - Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');
B/ I: d. Y8 s3 Y& |% h7 Y - setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'EAPAuthentication');4 N/ o' p. ?' H7 X/ T2 Q8 c# o
-
8 D) l: C" p5 N. ~ - Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));1 \- N, k, }; X7 F* G
- setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));' t$ h6 l$ W. k+ @5 \/ {2 W
- }
q) |6 i% D/ U - else& M) ? s1 y/ G7 Q1 s
- {7 b( _( ^8 g; A) t
- Form.addParameter('w.BeaconType','WPAand11i');
' j+ o) J5 a* i5 n0 [ - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');. _, l6 V# m" n) |2 Q' T2 g+ ^
-
8 N- O. Q) Z; f k5 {" Q - beaconType = "WPAand11i";
9 t( _2 }% ]0 ~" v - Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');! i' t. w* B; {/ e0 s
- setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'EAPAuthentication');
, m: v v: ]- ^- w% z! J8 I - , K# [/ p0 H+ a9 q) b6 t7 ]
- Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));6 i! ^% y# b) B# _ K" i+ {; Q4 J# h; G
- setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));* Z# Q# t8 Q7 A+ a1 N
- }
% {% ~) n# `8 W1 D# G2 h( S - }
+ O- z2 m' f& ^6 U0 F+ z% D! O - else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk'): [5 V& Q" D2 M/ k$ {
- {
0 a/ q8 W! R$ `! G( ?3 \ - if (AuthMode == 'wpa-psk')' d2 C, M8 F5 k5 h5 R( I, W1 Q
- {5 i. `3 w0 [ u1 g' f2 u
- Form.addParameter('w.BeaconType','WPA');, ~4 D X+ j, v1 |# b" s
- setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA');
q0 A% p v. p+ v -
8 R0 o, @- M4 i - beaconType = "WPA";: {% n/ C" e0 W: m' A
- Form.addParameter('w.WPAAuthenticationMode','PSKAuthentication');
! M+ m$ z" t' H, f" i; x2 O - setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'PSKAuthentication');
$ H5 p5 g! i# V' e/ i& X! y -
+ L- Y& u* g' w" |, T9 j - Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));8 B: h3 J+ c8 E! n$ Y0 Q2 A4 p
- setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
4 `9 Z7 H% ]% G& P8 a! @, j - }( Y! `6 u$ B7 O, g, f! O" d! V
- else if (AuthMode == 'wpa2-psk'); X( v. P' H4 E4 v9 Q9 S
- {( w N S4 g7 Y; c/ V% b' i
- Form.addParameter('w.BeaconType','11i');
! \! d9 E$ l; ]' H/ H3 Q4 M - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');
5 D" S1 [! |2 T - % \' x3 r5 ^) p7 W1 R/ x
- beaconType = "11i";
- U$ g/ Y' C0 Y4 b# R1 P2 K) f - Form.addParameter('w.IEEE11iAuthenticationMode','PSKAuthentication');
# F/ |# P' `2 k0 B2 w+ K7 @- } - setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'PSKAuthentication');
4 k* y6 c) J! }5 i3 N -
: T; ~! u9 U) f7 X* I$ B/ f - Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
! @% [$ { N. D3 H7 l - setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));* N( Y+ Y% h1 K2 l) ^
- }
! j; S; R6 a% D7 t - else if(AuthMode == 'wapi')5 ^$ z! b' u6 Q+ c" i- o( M
- {
# P; C- b6 r. m. _0 S2 _ - Form.addParameter('w.BeaconType','X_HW_WAPI');
- I) _! N7 N6 p; T0 L$ ^% Z - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');
8 e3 z9 {; G7 G% C6 V" R" v -
7 J& n5 i# k8 l - beaconType = "X_HW_WAPI";) _3 _2 h( r* Q* s( p
- # n' t9 N/ k3 r
- }( s J* E! z/ |' X
- else if(AuthMode == 'wapi-psk')0 c/ U2 Z2 v9 c5 j" D. O' p0 s2 t
- {5 K' d! h, v6 y( T$ F
- Form.addParameter('w.BeaconType','X_HW_WAPI');
2 U a+ f1 _) x - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');
1 [( A* N& S1 W/ p0 |9 S9 R% \ -
# \- J8 F# h- I$ ~- ~) L0 y+ G - beaconType = "X_HW_WAPI";7 f1 E' d" ?4 T" b7 o( q0 r
- }
* b8 |6 o% ]3 v% I8 ?, H - else
/ a w/ ]$ E( L0 ^2 c ] - {2 [1 n4 n2 W; X" f4 p- r. b
- Form.addParameter('w.BeaconType','WPAand11i');
6 P% P! g$ @- i% l3 V" A - setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');# ^" w% f0 M0 s+ X8 }7 M4 n/ X
- ; a8 G1 y3 S3 w4 _0 c6 \
- beaconType = "WPAand11i";
: [' K/ G$ _) [, K: c2 e& N - Form.addParameter('w.MixAuthenticationMode','PSKAuthentication');
1 S6 j, }) v9 P; _! F - setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'PSKAuthentication');
1 M6 Z T7 }5 v7 y& K. z - ! `0 J" L6 u9 y$ L, z% Y+ n/ a
- Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
: o0 u$ @3 e) z; k& t9 s' U3 {' F - setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));
' A6 Z0 e3 f0 D, L/ l6 f2 Q5 y - }
$ U- S9 U; ?9 t0 }2 ^ - }
9 a2 G! z5 y9 ]* ~* D3 y* C8 [" H - var KeyBit = getSelectVal('WlanKeyBit_select'); 2 I* P4 [" I* ~' q9 [
- Form.addParameter('w.WEPEncryptionLevel',(KeyBit-24)+'-bit');& a( v% z; f1 Y& u A1 d
- setCoverSsidNotifyFlag(Wlan[ssidIdx].EncypBit, (KeyBit-24)+'-bit');
. b5 y0 K4 E0 `: q$ J -
& U: x0 ]7 {& W$ {7 ]- n1 J - //var keyIndex = getSelectVal('wlKeyIndex');8 c1 z n8 K1 M; v7 O% f; ~
- var keyIndex = 1;
; `) U- Y! ]) P' D* f+ L/ m a' b - Form.addParameter('w.WEPKeyIndex', keyIndex);
/ V( [' A b; m$ i" u" s! z -
& q( \6 d$ d5 [! y2 } - var weppsdModifyFLag = false;4 ]8 R @$ W+ a) t$ d
- var key;
. o) s( I! _% Q5 N - if (1 == keyIndex)8 K! c2 G2 k+ A& R" D* G3 A! ?
- {
7 z& v3 t4 e" ~' x - key = getValue('wlKeys1');
5 I5 @3 v/ K6 C1 R% N& L4 x - weppsdModifyFLag = wep1PsdModFlag;
* S% H E) s3 Y* R+ g7 ?; w - }9 }& ~/ ?( o; U/ c7 h) w0 }
- else if (2 == keyIndex)3 W7 O a ? O: N5 P1 H7 T
- {
3 ^- h1 r/ S) c v8 R, L/ V5 c) ]& D - key = getValue('wlKeys2');8 |# ^. w! B v5 Y9 o; h \, u
- weppsdModifyFLag = wep2PsdModFlag;( s2 ` V- ~, \) |
- }3 U: f8 b6 \; E; r
- else if (3 == keyIndex)* C5 ~* W, {; l* u+ K' n$ M
- {6 c7 E6 X$ P6 A; Y( [- o% H( ^
- key = getValue('wlKeys3');
/ B2 \# T) H: j b4 ~ - weppsdModifyFLag = wep3PsdModFlag;: e/ s- w: v9 y0 t
- }
8 a- ~' C X7 z* i/ J - else if (4 == keyIndex)
: K% L+ h' \; m# l! Y. B - {, b I/ L1 E* j# \- Z, D
- key = getValue('wlKeys4');; E0 r# q$ `* O& A; @
- weppsdModifyFLag = wep4PsdModFlag;+ e7 b+ T3 c% `
- } 0 O8 _! {: N6 m- \; X* V0 |
- 9 m) }6 u- E6 l. D4 |
- if ("Basic" != beaconType)1 T% A9 ^- l4 j( v- H- m* H6 R( @# L) z
- {
! l. b/ t1 L$ E. R3 T - key = getValue('WlanPassword_password');5 ^$ d6 \* \% ]: J! B& S5 v7 J. E1 F% U
- }
1 P# t3 k" p" x3 h, V' H1 M - / n+ u( W$ v3 V/ e
- if (wifiPasswordMask == '1')" D( Z- ~/ l, f( z7 n' _0 t, `) s" G: q
- {; L. [) t. ^# z8 K4 v+ u/ S
- if ("Basic" != beaconType) . r3 x y) b0 `" _7 T' Z
- {
e% H5 m( E: |! G0 U1 b( f& z2 I - if ( (key != "********") || (pskPsdModFlag == true) )
- A, u1 D# N `) _! e2 u; J - {
, ?9 i5 k# w3 Y7 t; \ - Form.addParameter('w.Key', key);
0 }! u6 W. \. A3 A5 L, m: p0 o- H - } B2 L* {8 o, |9 j q/ m4 m% V
- }# W0 d1 ?: k( `, t3 f1 r" O: N
- else
' D$ c( l2 V( [ b9 Z9 j - {+ _. b" n2 n9 k. n
- if ('WEPEncryption' == getSelectVal('WlanPwdMode_select'))( C6 b) G; X7 k
- {0 R0 k3 V# P$ ?: T `
- if (KeyBit == '128')
! C. M N9 C# q- G9 H6 R/ b$ O - {+ e7 _2 @( p& G% ]4 v: m5 D( z
- if ( (key != "*************") || (weppsdModifyFLag == true) )
) i: r% L7 y' b0 O+ J9 v - { - |" x. [6 a6 P" A
- Form.addParameter('w.Key', key);' X6 f4 F7 {7 I" _: M, z
- }
4 A$ N: m1 h) ~3 y" O - }; D5 U1 x1 E1 Q5 y& X
- else ?, t+ h" I4 B3 I$ h- }
- {
. y) G' I& r& Y) K1 ?! l' j) I - if ( (key != "*****") || (weppsdModifyFLag == true) )
, i7 y" V. Q8 A - {; f9 @# \7 K) i) O
- Form.addParameter('w.Key', key);( Q' x' `$ d9 q1 n5 v
- }! N* S3 [ T" k6 A0 P5 D) }
- }& E2 A- {3 z, {! s
- }% a$ j; u4 B. p. B
- }9 N& U+ h* s; N+ H6 s
- }7 \* i5 P% R8 v& K8 g( X3 N. |
- else
& k1 D9 _! ^: b - {1 B3 |# v' Z7 a- e% q
- Form.addParameter('w.Key', key);
2 a `! k+ W0 u" M% O ?( [0 M - }) m, N3 s( {6 p+ O! x& J
-
- Z g% Z4 \& G" |* e$ E% H) S$ t
# b7 Y9 f7 b' Q9 e/ j2 c- if ("Basic" != beaconType)
5 b& y V2 F* ]% _* ~2 ? - {$ d8 A% E& q; w8 X
- setCoverSsidNotifyFlag(wpaPskKey[ssidIdx].value, key);
9 O9 M* r# r' q) e' K - }
( [1 C3 ?' W$ J8 h - else0 N% q7 B `# z2 @$ m3 a3 n, b. A
- {
) m8 Y! W& O) b1 m5 _ - if (('WEPEncryption' == getSelectVal('WlanPwdMode_select')) && (1 <= keyIndex) && (keyIndex <= 4))
% R# h' v) p8 G7 }/ k P6 @5 R - {
" t% w1 v- l- r( |: f - setCoverSsidNotifyFlag(Wlan[ssidIdx].KeyIndex, keyIndex);
+ k/ J z& g( ~/ j5 ]. x$ S - setCoverSsidNotifyFlag(g_keys[ssidIdx * 4 + (keyIndex - 1)].value, key);2 e5 J' v# p! F) S+ P; Y3 _
- }
& q- z7 s1 j& O0 R1 J! d4 G+ _: M - }7 ^/ v! _) x5 {0 ^# d" S1 k( A. w
- * W) c2 d4 A) X" u" q1 {
- return true;
& N9 F% G, d4 h' Y/ p$ Q - }5 s9 l" ^9 w1 O5 l
- ; s2 ~" C: [; A0 X) N% j0 C! ]
- function SubmitForm()" y1 [0 I+ b8 J! P4 p
- {
* X6 {7 u- Q0 a8 m - var Form = new webSubmitForm();2 B+ F9 q9 R0 v" ?5 l
- " Q8 K* j; y* n: q9 l6 V6 p1 ~/ Z
- if (addParameter1(Form) == false)7 ^% E$ X1 B0 k! L* o" d- z
- {- e8 E9 `4 f$ a, Z
- setDisable('Save_button',0);
7 N( R3 ^& x. Z2 {" A( F - setDisable('Cancel_button',0);
* C7 Y0 Q+ O$ X+ h7 k. ~ - return;
( N9 G4 R8 V5 R' w) {/ D- ] - }7 n8 z% @2 ^" A* Z+ H2 a+ A5 T3 G' c
-
6 z# o, e, y0 `$ T - if (addParameter2(Form) == false)3 I- N2 i# ^! s ` i- I
- {
8 Y, T8 x. _9 r* Y' Z6 |4 @ - setDisable('Save_button',0);
8 i, {4 Z W% b" ` - setDisable('Cancel_button',0); * L4 B, A( f2 d. o% T$ J
- return;' ^& o5 F% I' }0 y
- }
( j8 O% |! c) N# G3 C4 h9 l; z -
# V8 @2 g% D& k9 c - if (AddParaForCover(Form) == false)" k9 `+ k5 ^2 a7 e! S% e. e
- {
* ?- \- u2 Y1 E/ x. ^% C. s3 o! [ - setDisable('Save_button',0);
, H7 q/ I8 N4 L! Y0 t, F1 d - setDisable('Cancel_button',0); * A7 }. y- O/ ~( j2 ?7 i! R, [
- return;
2 W- m1 I' O; x8 e+ R/ D8 A - }' [+ `& G3 I8 S
- : d+ n. ]7 A7 w" [. P3 `3 v) Z
- var wlandomain = Wlan[ssidIdx].domain;
8 n- c: e1 G8 _# | - var AuthMode = getSelectVal('WlanAuthMode_select');
8 M. B9 f% ?8 k5 [4 U
3 ]+ G+ G- Y+ c- if (isWifiCoverSsid(getWlanInstFromDomain(wlandomain)))
, D+ C* P r& T: e5 h. X5 x - {& T+ [- y; y5 p" i3 o1 \ K
- if (false == ConfirmEx(cfg_wificover_basic_language['amp_wificover_ssid_change_notify'])) / V8 D7 V, j1 B5 U4 q- Y2 V6 ]
- { U. l* e2 e: b% `$ \) d
- guiCoverSsidNotifyFlag = 0;) N1 n& o1 ~: l; H
- setDisable('Save_button',0);( S. E U2 w' }
- setDisable('Cancel_button',0); / C) W% r, K: N, b" C, F
- return;
! [. v2 f/ X6 a5 | - }
: c5 q2 F2 v) r9 B - }
1 G& r& O# t8 n @* q1 d; O; ? - % N) z8 {3 N- u/ Z+ ]' X0 g
- / q/ Z& H* h1 I9 X
- var url;
4 L! a1 k( v6 L M1 |( n8 b4 J - 5 y l; S) v6 o& o
- if (AuthMode == 'open')
, r+ `5 M, l# O+ Y3 ?/ t - {. ~- x3 Q/ {$ I! T4 d4 A
- url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;) [5 c: e/ u- o. I: v7 v) |6 e
- }! c7 A K, H7 W3 X0 D e1 ^
- else if (AuthMode == 'shared')( z9 ?9 c& Q" Y, ~5 ~! f
- {) W+ l; s7 a% O) ?: j
- url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
" r' \' Q7 B) s, r* y - + '&k1=' + wlandomain + '.WEPKey.1'
H6 c4 g5 y5 a z9 F - + '&k2=' + wlandomain + '.WEPKey.2'& u& u7 s- d, I9 h' p+ T
- + '&k3=' + wlandomain + '.WEPKey.3'
! _ U& h' J& H - + '&k4=' + wlandomain + '.WEPKey.4';) ^1 r7 T' n: S2 G
- }! W$ J# `7 b+ n/ Y7 f" A
- else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')! `# o/ q6 P t# y$ ~( t
- {
( B6 G( a7 b3 x - url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;4 x L, S. h9 Q/ y5 d$ I
- }
5 m0 [% X% j/ r! S% f - else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk')
" F2 |9 Y; d8 k5 V9 s0 G/ k' E* H - {
2 N- w- X' S% J( } - url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
' S' S* g% o% A; Y - + '&k=' + wlandomain + '.PreSharedKey.1';
# U& `' \* l3 J5 H1 q, K- g - }
' X+ t( {/ e" t) b. W) \( |& F/ Q - else if(AuthMode == 'wapi' || AuthMode == 'wapi-psk')8 y8 O' n$ W y" ?" y, ]( t; X# O6 n
- {
7 Z7 v& a: U3 Z& v& ~ - url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain" i: {% M% {0 q+ \
- +'&k=' + wlandomain + '.PreSharedKey.1';# |0 f: j8 @: c# d5 N7 u! [
- }
/ V0 c6 M3 J# v - else ]* c6 q/ ?! f2 D# y& `/ m
- {
4 h2 ?+ q' y( Z4 h1 f/ N6 K - url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&x=InternetGatewayDevice.LANDevice.1'4 q/ U" x c0 |
- + '&y=' + wlandomain;% ]7 r9 J( W& d: I( G" |
- }
b* z" t; a" ~8 @+ n* l, a
: V! e; q' o+ p. S' s3 `% y- url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';
( Q) e' `" }) V9 V4 Q# k - Form.setAction(url);
( o. Z1 d+ _% I+ E
; s# G8 }) n% h% Y; q% E4 U- setDisable('Save_button',1);
B' a4 W4 {6 u - setDisable('Cancel_button',1);
" \! r. z" {7 t9 v - Form.addParameter('x.X_HW_Token', getValue('onttoken'));- K: |. a v: Q
- Form.submit();* ^0 I& H5 Q. R& D) S- f5 p
- }9 v1 h* ]8 @* t2 T+ z; s
# x: d' D- Y# E* ]2 r- function WlanBasic(enable)+ z, E% q: V, e. m4 P; k
- {
. U( e1 m/ _# J0 o$ T - setDisplay('wlanBasicCfg',1);4 p0 i1 E% H' v1 e) e
- setCheck('WlanEnable_checkbox', enable);+ p! {$ x6 p0 a# f9 C) W
- i- f- y- G j
- if ((1 == enable) && (WlanArr[0] != null))) N) F. D% v5 i! J m
- {9 y; {9 @& Q" `8 y
- ssidIdx = 0;
( c( t. W% H0 A$ k+ E- M# X7 x
+ G: J; {* @3 _( \1 j- if ((1 == DoubleFreqFlag) && ("5G" == wlanpage) && (uiTotal5gNum > 0))
% U; c5 D$ V7 Y" M6 i* r& Z, @ - {
+ S/ a( s- Y1 O, \ - FirstRecordFor5G();+ _5 r) i$ L) b( K k
- selectLine('record_' + RecordFor5G);! M4 x" i- h" |8 s4 K% v. c
; q3 S" f, _' H6 l; y- ^- }
- U. m# {' r: F4 u8 C% \6 N- m - else if((1 == DoubleFreqFlag) && ("2G" == wlanpage) && ((uiTotal2gNum > 0)))4 X- Y! F, |3 [8 V0 V2 O# O
- {
! P2 o8 o7 S, o8 p3 C - FirstRecordFor2G();, O; ?( [+ F# C! s$ ? z, L# g
- selectLine('record_' + RecordFor2G);
7 v2 ~& v) M9 l _! s' I6 y/ M - }
J2 Q- Y: C* a( j; d V - else if (uiTotalNum > 0) q) E! N9 T9 P8 R+ m
- {
/ q% A1 v' ^8 g - selectLine('record_0');
w, e+ H: @; h$ }: T1 f - }; @/ v/ R8 B* R& g2 N+ q% P& M
- 0 {# ?3 e+ a; ?+ b: E2 v
- setDisplay('wlanCfg',1);
( q5 m) p0 X: H; A9 |1 t - var authMode = Wlan[ssidIdx].BeaconType;
7 ~' q$ m" y1 H j4 i' F - beaconTypeChange(authMode);
; H" J$ `; K) C5 Y7 B* s& n - }& j. U* |4 e/ U& c# M( {3 H
- else1 M! G6 M& D: P$ \! ]
- {
# \2 o2 F& ~3 `6 g' X9 v - setDisplay('wlanCfg',0);
; O* d* V7 k& a6 u! X* M% e - }
* ]8 {! V$ q" O8 V2 q X2 k - }$ A; ?" z, r4 N* S4 a: I/ p) N
- ( \3 J$ T5 L% E
- function BindPsdModifyEvent()
+ r( }+ v/ u4 {+ a - {
# U! r1 S3 f( z: J - $('#wlKeys1').bind("propertychange input", function(){ ~/ i0 R5 Y* J& g' K
- var KeyBit = getSelectVal('WlanKeyBit_select');
: C [2 B+ L {# } - if (KeyBit == '128')2 W5 W2 n1 e4 V, r0 Q# r
- {
9 r0 D( n* `+ w) K+ g! w/ e - if (getValue('wlKeys1') != "*************")
' x# Q h1 J9 b6 b; U3 u% r- u7 T - {% L" q; l( A& ]/ m" g+ _' B% c P
- wep1PsdModFlag = true;; D7 @; d3 C8 \2 |0 X0 R
- } . ?+ D% Q9 C) b9 b. M) X* j; A
- }
5 I7 _5 Z3 A. _7 S% D7 e - else & ^7 D; R) K; |8 \8 o% t( [
- {
* @0 |. o3 \7 A4 R- @9 n( d - if(getValue('wlKeys1') != "*****") 7 v6 x* D `" K9 k9 h6 P% W0 Z4 C
- {
: H, {; K+ ]6 P5 P9 B* a4 d - wep1PsdModFlag = true;+ T# y; z. `5 H
- }
6 g2 U' Z/ ^: _/ g6 Q) P. `; B - }
, e3 Q5 K: Y$ i3 K - } );
2 r! O7 Q3 c+ }. m - " I3 h7 W: I! I" W6 l
- $('#WlanPassword_password').bind("propertychange input", function(){
% H9 k1 i! |7 ~' Y - if(getValue('WlanPassword_password') != "********")
$ }& X6 E$ b. V- z, H8 S - {6 p/ M/ t! e$ L/ \* n
- pskPsdModFlag = true;
9 e* C; I) D3 y4 } - }
2 _1 w( a; L6 W) Q% D' y" y5 H - } );
9 ^7 H" t. d* h - 3 @, E& y0 A8 |0 c
- $('#wlRadiusKey').bind("propertychange input", function(){
$ v5 G& e; l, H; ~ - if(getValue('wlRadiusKey') != "********") d4 Z) W, D2 E' ]7 t& o6 H
- {7 u1 u2 p: m0 T( `( ^( h6 X
- radPsdModFlag = true;6 S* w; C* f! r' l
- }
- ?4 M# _; B# I* _- B0 p5 F# N - } );
1 G) D* X: |3 Q! ]0 M9 p - }
$ `+ L0 c ?5 B+ C+ B& f3 Q" O - 0 f) W' b0 d" N) h) O3 i3 A9 [/ L
/ Y9 J) t" C& z* K- 8 e$ V: E6 Y' W2 A7 v `
- function LoadFrame()) m) v1 A3 J; N' I, l
- {
- O6 c3 ^* o, r; s; _# M - var flag5G =0;
$ ~- M: c! d. C - var flag2G =0;* G' _. ]) c9 E. G6 }
1 y% i6 R/ r- i2 N- o' w- Total2gNum();
: }5 r5 Q, x! T1 Z7 q, S1 M% c3 \ - # a" d9 j0 }3 L
- if (enbl == '')( s6 }6 r4 a; A+ Z0 f0 c7 ~% w
- {0 y# a/ c% u+ t$ e1 \! X I% W0 E$ l
- setDisplay('wlanBasicCfg',0);+ C7 }4 u4 }5 e& P1 a( y* N3 A
- }8 a" m% M/ z7 q. K
- else
( Q; p: [- u! t' ^' b- X, m+ E2 G - {- y+ V: A) k* U
- setDisplay('ConfigForm',1);
& l7 B s% P7 q4 s - if (1 == DoubleFreqFlag)0 |! g$ g) _' ]3 o: I
- {
3 G# F- X x- D5 S1 d/ A - FirstRecordFor5G();
) S+ x: i, K( b3 V2 r( k - $ ~: G& n7 L3 [9 V$ Q, A' Z4 y
- if ('2G' == wlanpage)9 J4 _+ @' `( J
- {
: K6 q4 l: O" e$ q, d - WlanBasic(enbl2G);
" o& t. Z* z$ L! J - }( x8 h6 O; h# u; N. \2 E" k: q: l \1 ?
- " |0 X. u# E3 \; u& p
- if ('5G' == wlanpage)
9 o8 ~+ { w6 L) s" S+ k2 p1 a' y$ A. C - {
) u* q* f+ X" k, e7 j - WlanBasic(enbl5G);
3 D6 ?' V+ W& P" ~$ @1 O - }
8 C: h. [ f; D5 B4 Y: T0 E - }0 k h. I6 p2 g2 y+ v+ h+ n
- else l3 \* K' q- r' j8 i4 e, E" Z/ K
- {
( g$ f4 J# T, c0 v6 Z - WlanBasic(enbl);7 \- y$ F" @! G/ s
- }
, r, ^' g2 R4 z/ ] - }
4 K, }+ s5 `" J9 [
( h4 c7 @% m/ v! @3 w; F0 F& ?; q: Y- if (1 == DoubleFreqFlag)% |/ |: g @6 o5 F7 ?2 h
- {
5 X, f: F1 `% Q# y - if("2G" == wlanpage)4 J$ R v( h& M. e5 w
- {
' A2 t9 E( d( u# ~ d, G% w1 k" } - for(var j = 0; j < WlanMap.length; j++)2 H& R6 _* H+ l3 j0 F7 ]; n1 w- n3 l
- {
) a! B, Q2 s! N2 A0 d0 ]4 P; C - if(WlanMap[j].portIndex < 4 )6 B7 P* i0 ]; C2 D- T5 r. x! k
- {
5 t! W( R# _; f3 H4 `. L( O - flag2G++% C: w' I7 u2 j$ ^# D. X
- }
- M! q$ V4 B' E# Z# a - }
5 e' K, }1 _( l7 k5 z: B - if(flag2G > 0)
4 q! I- n3 i) e/ X8 G - {
) n4 E2 E' @: I" {* ^2 M2 l" C - setDisplay('ssidDetail',1);. @' G0 i/ Y2 }. j
- }0 g' N' t" N: q2 ~& y9 b" M7 l' O: `
- else7 p3 S6 I) H2 b) M" } @( M$ L
- {# U2 K1 L) u8 l& d3 K6 }
- setDisplay('ssidDetail',0);6 u/ L$ ]5 U$ o9 m0 m( ^) ]
- } `' w3 s' R# A3 I' }+ d
- }
4 P' B3 O. r7 z, T3 ?9 I - ) [- x& n& {! k7 t/ ]
- if("5G" == wlanpage)9 c" v6 d, H4 @2 l z/ G% V9 M: S
- {$ W D) s7 l5 O
- for(var j = 0; j < WlanMap.length; j++)7 P; v q1 ?, _" q8 n& Z
- { I+ N4 Z+ E+ _0 P: ]
- if(WlanMap[j].portIndex >= 4 )8 o D: [# _ R/ c* U' V
- {
O( c7 t3 _* ?8 g; r9 m% G - flag5G++
' ?) A9 G- U/ Q& Z% p# U - }9 Q% h3 D, ]9 x7 c& x7 t4 A
- }" d/ B& k7 e4 d% e
- if(flag5G > 0)
( y5 z/ w/ Z1 x8 W/ Q6 @7 V - {
$ V- L+ P( b# O8 J - setDisplay('ssidDetail',1);
- F, s9 ?: \! I: ]6 P; T- b' X9 d - }
6 `: l" m# `* J - else
: l% N6 p$ p$ s. K' ?& ~9 s' X7 H - {
) i; i1 l! D v' U) _6 l - setDisplay('ssidDetail',0);+ J/ A* \8 `# R: J
- }2 A6 F. D1 l9 J1 O1 e B, [6 @
- } X& _1 a& v' ~# U$ F, q$ B
- }
N7 r1 Z. W5 U7 X, o* b3 m) H. v - else
2 s& g7 c0 b+ ]: q4 @+ x3 s - {
G9 z2 n1 M5 l - if(0 == WlanMap.length)+ k+ Y% y( N* F
- {
7 u. e, c& F& u: T& ?+ g - setDisplay('ssidDetail',0);1 I; j* S4 r4 Z5 A# d% X# J
- }
; `+ q; ~" O( S# t4 r% s - }6 J+ j. f4 \( @
- + Q5 E& X3 F9 ?. C/ {
- addAuthModeOption();: ` [5 X9 c, M" i g
- 0 V% H; o$ _4 x& \
- WlanKeyBit_selectChange();
, Z7 N' H/ a6 Q: E; w7 [ - R0 I7 i2 d/ L# a
- if (1 == '0')
0 ]* V6 L8 d8 L& v - {0 f: L' O, w& x G2 j
- setDisable("WlanPwdMode_select",1);3 d# G4 Q1 Q: f2 a0 {- E% x
- setDisable("WlanAuthMode_select",1);( T2 i+ i& s$ z3 ]2 Y
- }# o5 U4 d. b+ X( z( u9 {1 y
- m! Y) r! X" m( O4 {+ X
- if (wifiPasswordMask == 1)1 b& K8 R6 o4 g0 Q4 j6 b9 s7 Q( M0 {/ b
- {0 x6 Z/ w/ g0 U3 g, a
- BindPsdModifyEvent();0 h1 G( ~7 r2 \$ u
- : \8 Y6 z+ [% X" c( p/ j
- setDisable('hidewlRadiusKey', 1);; L* t4 H8 ?: Z! q
- setDisable('hidewlKeys', 1);- a) H& x2 l5 z# J( W& `6 O
- setDisable('CheckoutPassword_button', 1); & X8 L( H* ?# k# ]7 y: ?' I5 w1 `
- }! i& X1 B" O1 g7 P; P' _1 X* x* Z( A
! |9 M! p4 S6 `. T ]- a- var all = document.getElementsByTagName("td");/ x- I" S3 f8 p9 ]( Y0 u
- for (var i = 0; i <all.length ; i++) ( y& c- X; ~$ t0 S" W& v
- {
6 s( n: g, ]1 q1 a" l6 e+ I4 G - var b = all[i];
! `" M, {' e Y4 N - if(b.getAttribute("BindText") == null)
- I8 l- ?( @+ i2 V, b - {. F; k/ D+ W1 N6 a% g1 Y; @; n6 q
- continue;# G( z8 Q& I7 e
- }6 q; e' Z, f+ O0 v& K `
- % {. O3 {6 n" [: C% |, [- w/ K
- if (cfg_wlancfgbasic_language[b.getAttribute("BindText")]) {
" h# d& P1 B5 b$ \1 Z, u9 X - b.innerHTML = cfg_wlancfgbasic_language[b.getAttribute("BindText")];; B8 s) P) L1 A0 q. w
- } else if (cfg_wlancfgdetail_language[b.getAttribute("BindText")]) {5 S" |0 i/ V% D- }, x! X# {
- b.innerHTML = cfg_wlancfgdetail_language[b.getAttribute("BindText")];
5 v$ E3 x" ] z! ?9 E R/ @6 N _ - } else if (cfg_wlancfgadvance_language[b.getAttribute("BindText")]) {- Z3 b9 Q2 P5 A7 J$ F, F1 _
- b.innerHTML = cfg_wlancfgadvance_language[b.getAttribute("BindText")];
1 W7 W+ |' p2 f8 z3 S% l! u - } else if (cfg_wlancfgother_language[b.getAttribute("BindText")]) {
4 V% _" s0 K; U. d: a& Q - b.innerHTML = cfg_wlancfgother_language[b.getAttribute("BindText")];
V. v7 [1 C6 {/ x( M4 E - } else if (cfg_wlanzone_language[b.getAttribute("BindText")]) {9 G0 E* m% T% k' O
- b.innerHTML = cfg_wlanzone_language[b.getAttribute("BindText")];3 j: @) V2 C7 G1 U \! W
- }9 }: _+ A& L! {, c! f# u; e1 _
- }
" A9 W' X" X. G0 [ - 5 R: ^. U; V. F
- if (g_keys[0] != null)
1 k: p7 N% h* `$ E# ~ - {
0 V' ?4 G+ T% T) ^3 a - document.getElementById('wlKeys1').title = posswordComplexTitle;
. I2 K8 A: B A% u0 c - document.getElementById('twlKeys1').title = posswordComplexTitle; ( t c. \8 _0 W+ C
- } ( \" y, T; p& E1 F& C$ z
- document.getElementById('WlanPassword_password').title = posswordComplexTitle;# p* S) s. o4 x/ d+ {
- document.getElementById('tWlanPassword_password').title = posswordComplexTitle;& q0 t' w, ^( G7 k* h* T( j1 B4 ? K
- document.getElementById('wlRadiusKey').title = posswordComplexTitle;6 U4 Y# P$ _9 |+ ]( A
- document.getElementById('twlRadiusKey').title = posswordComplexTitle;8 a0 Z- D. M: J+ P
- }, ^$ |; j+ w5 [$ y ^; P
- ; l7 U, C M+ v; G2 m; W9 e# B
- function ApplySubmit1()
+ H" y& ~# U7 g& F) Y& j- _ - { ]- \- V$ H. w! K, y" h: N! O$ x- q
- var Form = new webSubmitForm(); % ~5 W" u1 x( G% w; r& N
- 8 J/ O& U' G) x$ C( P
- if (addParameter1(Form) == false)5 n% a$ U( J" u- b1 g; t5 m
- {
/ ?1 |( r' x) y/ M - setDisable('Save_button',0);
: O/ F! i0 ^/ S! ]2 J* S - setDisable('Cancel_button',0);
* I0 w9 m% @6 @1 ~ - return;% v6 v+ t/ L# O5 y
- }, L0 P" W6 e5 r& i
-
& ^) A' C, ~3 N$ m! d: e+ R5 E - if (1 == DoubleFreqFlag)# H+ {! ^8 \* y
- {
% e% q0 K8 L6 m Y - if ("2G" == wlanpage). Z5 V0 ^( l7 i- Q/ i
- {# {8 _4 n* |3 W Y) j% ^! G! M
- Form.addParameter('y.LowerLayers', node2G);
6 D- k: }" j7 ?1 f4 J - Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
4 _- ^8 ~' ^* N/ L - + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');
1 y& y* L5 f o& x( q8 e# h) A7 E - }
4 z; n- b- Z3 U5 X) H - else if ("5G" == wlanpage)1 J) B+ q4 G5 f9 E/ N' j
- {
0 d6 ^+ _+ ?4 t - Form.addParameter('y.LowerLayers', node5G);
K1 `8 v6 A& C( s% f# w - Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'. f# M0 Q: V4 D. J2 b Q( }
- + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');8 |, f+ \) s% k
- }( v5 l% Y, Z, ?6 T2 [7 [
- else% r1 Z. e/ f6 i! Z$ u/ M- q0 _
- {}% f: J! L3 V; F9 N+ r: G/ }9 ^+ r
4 W# r3 B- z$ d* X r7 j- }
- V. o% F5 `! p! u8 d. o - else
; V* U# x8 v7 f* D - {9 ?$ n! p& \, I# c
- Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
2 M9 V9 ~; T8 A - + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');; W9 Y: \. T6 [8 k- o9 O
- }
- c" Z8 S7 D& @" d j8 @% ~. ?& [ - & y# E0 f6 o" i( b& Y9 A; C& t3 o
- setDisable('Save_button',1);4 ?" G7 d) o% @7 t f/ ^6 @
- setDisable('Cancel_button',1);: m" N$ ~: w; I* ], O+ @# c
- Form.addParameter('x.X_HW_Token', getValue('onttoken'));
& N: \1 Q3 H1 y/ B0 q# k( E9 \ - Form.submit();
& M$ a7 A" ^0 f z - }
; I. e* M& q" f9 V( L' ^
9 ]5 _# f4 ~5 E7 t: W }; S; S) s- function ApplySubmit2()
) R1 ? I# ?' z, k5 S2 l - {
1 u& Y- u' m! i2 L - SubmitForm();
! v$ ]2 ]+ K% n% a, u - }
+ x! b- {$ } `9 G4 ] - 3 `, j- D, N+ r" e/ [
- function ApplySubmit()7 g R' _1 l/ }, m% X* ?2 m" h
- {# V! H+ r5 d, u1 y a
- if (AddFlag == true)3 I* l) k# t( A. Z+ n8 x
- { Z- O j" ~5 z, g; ~
- setDisable('BtnAdd', 1);
- U5 t4 i2 g* E% ^, r6 ~ - setDisable('BtnRemove', 1);
- I( D' f7 E, Y& d- k+ {; o8 `- C - setDisable('Save_button',1);. x- y. z3 c! P$ m# [% K8 B
- setDisable('Cancel_button',1); ?7 E' K+ w) m' n$ B( [$ A
/ @) f( B0 @, |; {0 E- ApplySubmit1();4 e! N2 Y' F8 c) [6 [
- }
! S0 W0 z! t9 }6 e4 v% }- k, q" p - else
( f$ K1 _$ F6 ?) c y' Z6 G - {
0 O3 ~" \( ]) Y5 l - ApplySubmit2();
( G. B# W8 ]9 w0 y A - }3 s7 |7 o4 Z% R9 N1 d0 i- H: r
- }
+ d3 k8 E' e; m5 F
& n/ D! G. K1 ^# F9 }$ g- function EnableSubmit()
) \1 E [. X- G% x, [# f2 Y - {1 U5 m& Z3 B% U/ s( n% ?
- setDisable('WlanEnable_checkbox', 1);9 [* I) L# K D A
- AddFlag = false;
% U2 P9 r! B' [* _8 ^* [4 `# \ - var Form = new webSubmitForm();
. k! f( |6 J" y P - var enable = getCheckVal('WlanEnable_checkbox');& i; j% u' H: ?
- var url;( m' h$ d2 S3 o7 K
- " K& R/ D8 U O7 P$ ` z: R) D
- setDisable('Save_button', 1);7 b$ }: `$ S: w5 F1 R
- setDisable('Cancel_button', 1);% E* W) r( L1 z4 Y& r$ A6 M
- . K% y+ ~4 L" e7 a1 o, j
- if (1 == DoubleFreqFlag). w& m' N; C2 h- z4 N: V, Y2 d. k
- { o: R- a6 f+ {* z! \
- if ("2G" == wlanpage)
2 k2 j. i/ V ^8 k - {; M. I. x( U+ _( ^* r' ] e
- Form.addParameter('x.Enable',enable);
D( H: ^) A3 S3 Y+ s! Y - if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node2G)! q! h3 ]% U8 K- H% O) z' ~& ?
- {
0 V: g' e; f9 h/ C# s, ~# H+ q - url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1';
: K, N: k2 Q, q6 f - }6 n, |2 K* j( Q/ m) Q
- else: v2 r; W; X. m' K' u5 r" p$ O! C
- {
# } D7 n$ @( Z9 E3 N% V: V1 v D - url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';
5 A: p2 r8 W. l! y/ K - }2 V1 a, C) w, Z& W5 X
- }
: C, Q* q- [* a' u4 l, d" N4 E1 ]( Y - else if ("5G" == wlanpage)7 }; f# d- ^+ D1 k* \
- {
8 \4 X0 c6 k7 i6 W( `5 b4 S7 Y* U - Form.addParameter('x.Enable',enable);
- o4 m5 l/ y: j; Y - if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node5G)
; |' f4 K5 x' \" m - {$ f# g9 K' ^% A' v/ e! E) l8 w
- url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1'; 9 f- |0 m, X3 G+ Z3 _& Q) f" @: Y
- }
5 Z3 N* p- q! H& f - else) i: A/ w' x. H- J" X
- {
/ q7 N" W, |3 N: i5 D5 S - url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';
4 t, b. J- @" o - }5 I# W! t5 w2 ]' {
- }( `9 g4 Q" J) o8 w3 u+ Y1 [5 X
- else' m9 @$ E7 ?. p' d6 @# c7 e$ ?6 Z& \
- {1 | T% U' E! k* b
- " m" F0 x1 `, a7 h K$ l
- }1 V" }1 f* E$ a1 N2 |' g& y4 a
- }
2 ~% s: f+ H7 y! G: { - else. z0 r$ \ b% v' O) i' p: S
- {/ L$ R) m+ W; r8 E7 D; A9 D
- Form.addParameter('x.X_HW_WlanEnable',enable);
6 g. }" q7 x- j( G5 ?2 t - url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1';0 D: Z# p6 r! \0 s4 J, {
- }
7 o! s: `. Z2 e) p% P) H - 4 L A& b' g# Q& Q! S7 K) k
- url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';- ^, K* y w# c( k
- Form.setAction(url);5 E( ]6 X$ W8 N; s9 A5 Q; w
- & o0 G7 p3 d# U" @, I. D
- Form.addParameter('x.X_HW_Token', getValue('onttoken'));/ b+ M3 B1 @( M/ z/ w7 ~% y: Z. ~
- Form.submit();
' r. B7 I) S" J2 t, L; M - }7 L2 u! k; Q6 e& d9 C! z5 N
/ @9 b/ |6 i! g) N# g- function showWlan(currentWlan)
. A# C( U2 j5 x0 S - {
0 s8 [7 U7 t+ C$ @- R' C- T1 j - with (document.forms[0]), a/ |8 ^: u1 j
- {& j4 o& m/ g/ Z' X5 ]
- ShowSsidEnable(currentWlan);
/ L* p) w$ V# }; P$ g% P) J" Q! S& B" D - setText('WlanSsid_text',currentWlan.ssid);
/ \* o9 z' q9 v9 K) D- t% ^% q7 Q - if (ssidAccessAttr.indexOf('Subscriber') < 0)
% b* Y1 y8 j: `. B - {
A1 W; s" g/ X* ^2 V( P - setDisable('WlanSsid_text',1);
* m" u9 c1 M( j: ]- W - }) @0 s& n' [9 X( y2 v U$ x+ ?; G
) z) T6 o( G$ j$ _ F9 W" o( @$ I- beaconTypeChange(currentWlan.BeaconType);
% n1 w8 W' J; Q - }" N! q# P; |; i# h9 w& i
- }4 a" {: E$ d9 n* ]% C
* d# Y& F& x1 ?' ^+ \- function setControl(idIndex)' A1 R; p4 _# b, h4 `) [/ D- U
- {
% L3 u0 P$ |7 m v0 v7 M - if (-1 == idIndex)/ `0 m/ t. _9 M
- { * M h( M2 c2 L( J* H- \/ E7 A7 ]# q
- if (1 == SingleFreqFlag)4 H+ n3 E* [$ d7 W; X- w" N5 X' C
- {
# C9 C( r1 |+ u% o1 K' X - if (Wlan.length >= maxSingleWLAN.MAX_ID)- S: v) R: c' Z$ O3 y$ ^
- {1 r; I) [) I3 t" s& h
- setDisplay('cfg_table', 0);
7 @) \( L1 [5 Q5 _4 G, i - AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
5 a: B- _' m. l4 A! c - return;
c. k. V3 C0 `4 V! a - }3 }# N$ \* A: ?
- }
4 O Q! Q4 \+ u: E! t - else if (1 == DoubleFreqFlag)+ p6 Y" ~/ z, K: M' _
- {* h! P5 O' S$ {! E
- Total2gNum();
; x% Y8 k/ E0 H& T% u: j - ' _: L) x! E) u' T
- if ("2G" == wlanpage)
, i% e& ]( Z2 y0 z3 G$ U1 I - {
. R _" {# w% \ - if ((uiTotal2gNum >= 4) || (uiTotalNum >= 8))5 p h I* _; h: D
- {
. P- A* b1 }7 F% b - setDisplay('cfg_table', 0);( O( w* Z1 x1 { q+ l
- AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
' R1 @' l9 t- I6 q4 I - return;
/ P d4 s, R/ {$ V$ w - }
4 X5 J+ q+ p1 T9 j( g - }
6 `5 L6 }1 }- U' I: B0 c - % ^# A0 D/ y( Q* C
- else if("5G" == wlanpage)
+ U( i3 r- D3 Y - {
' b) v2 Y7 l i - if ((uiTotal5gNum >= 4) || (uiTotalNum >= 8))
& J& h6 [) h" E$ X( g - {: O( k& c, m; `
- setDisplay('cfg_table', 0);% t$ W; m, `' Y: e% S
- AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
' a+ u" ?+ Y$ P. D6 ]$ [0 U - return;
. t) y# n" u; D, E" ? - }
" A& k R* X/ k - }
( N3 v/ D+ G' i6 `: h2 c - }5 v8 B) b1 N5 L; y
-
3 w* R, {8 g$ h/ w2 l, O - ssidIdx = -1;( O/ \& i+ }. N y' D9 ~
- AddFlag = true;
8 l* J5 L4 T+ X- L4 N
" @8 e% y5 M6 h# C7 {, ~- currentWlan = new stWlan('','','','',1,32,1,'','','','','','','','','','','','','','','');
1 A6 F/ b6 X$ }/ i* c8 z! u; z
5 M# P7 \7 I0 |6 _' k: {, L- setDisplay('ssidDetail', 1);) a% {0 J8 B' O/ Q
- setDisplay('securityCfg',0);
: z$ Q! P. e, ]4 {; R! k- u; x - }* @' r/ \5 P& ~1 p
- else1 Y5 Z |7 o8 U! I7 S- x# Q) h
- {
$ k% w( ] s6 G% |8 F - setDisplay('cfg_table', 1);
3 @* |+ `, m$ |0 g$ e0 D - setDisplay('securityCfg',1);
! k+ h; P$ l* H0 e0 E1 W - ssidIdx = parseInt(WlanMap[idIndex].index);
9 r% W: [8 y, g [6 Q - AddFlag = false;' Z$ m4 o" O' w; e7 _
- - r' K1 ~, ^$ V- p- X1 X7 c# q' [
- currentWlan = Wlan[ssidIdx];
& q5 U( y- h0 i- f; R; o9 j! p - }/ C$ V% u. O+ m: h
$ Z5 n. Z+ H, c5 M z0 Z2 z, j; v- showWlan(currentWlan);
4 R/ X" C! O) e% ]6 }
$ j9 i4 s" A) ^' s- setDisable('Save_button', 0);
8 g9 X5 {: l. \ - setDisable('Cancel_button', 0);
. W. { G* F' A7 V1 p' z: d, ^
3 O9 A0 H% L' e( Y( R% _- var curWlanInst = getWlanInstFromDomain(currentWlan.domain);' r/ Z: i3 r& y% i d: C6 _
- & H# _4 K. H+ j- f0 {
- if ((1 == isSsidForIsp(curWlanInst)) && (1 == ShowISPSsidFlag))! |: j( X8 ]( h u% i0 D
- {
% j* F2 |0 Z: Y# F5 ] - if ('CMCC' != CurrentBin.toUpperCase() )/ ^0 y% ~' F" H" F7 W: V9 y
- {2 K" F" R" E" p! I, F. f) h
- setDisable('Save_button', 1);
6 \& ~1 g. F7 R6 O - setDisable('Cancel_button', 1);, Z( b. q1 A a3 J' n1 D
- }
. i1 F( t+ ?- j4 R% E5 K6 R - }
9 p$ p: U$ f, N7 A9 d
( C8 E5 D, |9 u+ J
! J4 O, P) F- c x- ClearPsdModFlag();: D$ f" g! Y6 P3 e1 Z
- 5 w9 L5 k8 e4 r/ N0 J8 R# b" P; L4 ~+ y
- if (1 == MngtJsCmcc && 1 != curWlanInst && 5 != curWlanInst): b* @% _3 M4 u) E$ a) d/ D* j1 B
- {
& f- W3 f. l9 g' M - setDisable('Save_button', 1);8 {; v F2 d& Z) J8 V: g
- setDisable('Cancel_button', 1); h" g2 j+ A# C% k8 A8 `
- }
0 ^ C) n) b9 F" j - }
0 ]+ z/ l/ X W. R* Y, u* f
! X/ e; r# o3 j. V9 P8 j c- function selectRemoveCnt(curCheck)' }& @8 g0 |% }4 X/ Y4 r
- {" h2 h5 s- f4 U
- }+ b& X. z) t0 g! b% k
: @) J3 F2 r" p# k4 \( e; t% g3 K- function Cancel_buttonValue()) F+ x% M C/ z: y1 Y' x
- {- e. D+ n1 [0 j* h7 F9 Q# q7 m
- var temp1 =0; M) a9 }# [: @/ I: G) X
- var temp2 =0;
7 |; `& z! ~! \$ x - if (AddFlag == true)0 a$ A+ n5 ]( U3 ~: z
- {" r& U( ?: j+ `
- var tableRow = getElement("wlanInst");) Q# n/ E3 B2 ~! `3 C$ h9 Y
- if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))7 N% E# M5 z, E4 s. w6 s: o% Y
- {& o7 B2 j, T0 `6 B9 A
- FirstRecordFor5G();
+ F8 {# s# M+ d9 r/ V - selectLine('record_' + RecordFor5G);0 D7 D& P! x- F9 c1 N
0 X8 q- F7 b! Z3 q% x8 n- |; ^- for(var i = 0; i < WlanMap.length; i++)
2 P! y' F# t, I4 q2 e6 S4 S' Y - {+ B; ]: X& p. l! o1 {0 J
- if(WlanMap[i].portIndex >3)
5 V$ Q2 L7 m5 P( F* h3 C, m) ? - {& L- H0 h1 S$ I' _! n
- temp1++;
; T: b* ^1 b: ?+ Z% K - }; J2 y6 z7 J, u' j8 ?$ a1 p
- }
, M5 q7 E, Q! U9 U - if(temp1==0)4 F# h: t: Y6 H" j0 b, a! [2 K
- {
* K- O% ?7 l5 J, l0 T8 c& f Q - setDisplay('ssidDetail',0);
, S+ X. Z0 w0 t0 M' s - }9 p0 u$ a8 D! u9 d8 R+ [& B/ n9 q; ^* p$ J
- }. J8 g3 f8 D6 A' H* M' H
- else if((1 == DoubleFreqFlag) && ("2G" == wlanpage))
! t: q9 n3 q9 |" \5 X7 K# V- l6 e; Z - {
3 a+ p. W6 \% X - FirstRecordFor2G();
, ]) j( \; p3 ^' c2 { - selectLine('record_' + RecordFor2G);$ |9 p& T* @! b% f
- , I8 J, b/ X+ D5 H. H4 ~& p( n
- for(var j = 0; j < WlanMap.length; j++). M+ ?# `7 x$ B
- {
6 U* ^: `& o! f6 Z - if(WlanMap[j].portIndex < 4)3 N! n8 x) H+ R, f& @: @
- {: z4 [; n' H, G+ `& P+ n- k! c
- temp2++;+ c9 V/ h- q7 k
- }5 c! s( W& y$ C* K3 Q r1 G, k, J
- }1 _6 v7 J; R7 ?% D# r, m" {
- if(temp2==0)# S" M; J# O) V5 D
- {
5 O4 G ?8 U. K6 l% g& p( p N - setDisplay('ssidDetail',0);
# G9 M* Z: h; O+ U, `4 y - }0 y& u+ V! F( O5 ~( y9 w6 O. ]
-
. U4 J! t) q* F4 ^3 |+ K - }
1 f# U) f. b5 L$ e4 G - else6 ?7 ^( ~. B/ Q
- {
' U4 b5 J# g' `6 o# b2 f- O - selectLine('record_0');
# m0 t; M M; q* Y - }
: ^ G7 H8 d' L- \, |' a: w. s5 \ -
* s, A3 i7 [: d/ w - tableRow.deleteRow(tableRow.rows.length-1);
+ U/ J. d) [' m9 I+ R" H' D - }
- ?5 t) p+ W, d1 @2 ]9 g - else
: M! L0 q4 h& `0 E0 c6 A - {
, M% B6 e& O# |1 H, J+ H1 e - var currentWlan = Wlan[ssidIdx];
" j. `% B, U6 c - showWlan(currentWlan);+ H' N* u4 t+ P2 r% F# v7 [# }
- }
+ S8 q# V1 n3 s! W$ O5 l* n
# q. T. Q2 }% X# v- b2 v' U' P- ClearPsdModFlag();
: v5 L; }& l/ [3 | - }$ M( [ k! y( G
- ' F2 a1 c w) L- z4 L# @
- var authmode = cfg_wlancfgdetail_language['amp_authmode_help'];- e8 L6 c4 @% E! `4 b" t; n
- var encryption = cfg_wlancfgdetail_language['amp_encrypt_help'];
6 s2 `9 A7 V0 ^4 M8 H: i' e - var ssid = cfg_wlancfgdetail_language['amp_ssid_help'];* F, y% @- s0 v8 L/ h; ?% J
- var posswordComplexTitle = cfg_wlancfgdetail_language['amp_wlanpasswordcomplex_title'];
6 F" Q5 s- V& r0 |4 R
- H2 }( I; P9 ]- </script>
复制代码 4 r4 v- H2 ^' F3 }/ K! |
6 ]; ?) L: ~" J- M# b4 \6 A
我这有台移不动HG8545M,JS里是这样的 |