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