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