authorize.jsp
72.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.file.Prop" %>
<%@ page import="weaver.general.*,weaver.hrm.common.Tools,weaver.hrm.settings.ChgPasswdReminder,weaver.hrm.settings.RemindSettings,
weaver.login.VerifyLogin"%>
<%@ page import="weaver.systeminfo.SystemEnv" %>
<%@ page import="java.io.BufferedInputStream" %>
<%@ page import="java.io.BufferedOutputStream,java.io.FileInputStream" %>
<%@ page import="java.io.IOException" %>
<%@page import="java.net.InetAddress"%>
<%@page import="java.util.List"%>
<jsp:useBean id="LanguageComInfo" class="weaver.systeminfo.language.LanguageComInfo" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="BaseBean" class="weaver.general.BaseBean" scope="page" />
<jsp:useBean id="rci" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="suc" class="weaver.system.SysUpgradeCominfo" scope="page" />
<%
/**
* OAuth2服务相关
* 注意: 仅供集成组测试使用
*/
String err_msg =Util.null2String( request.getParameter("err_msg"));
%>
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script language="javascript" type="text/javascript" src="/appres/hrm/js/mfcommon_wev8.js"></script>
<SCRIPT type=text/javascript src="/wui/common/jquery/jquery.min_wev8.js"></SCRIPT>
<script type="text/javascript" src="/wui/common/jquery/plugin/jquery.cycle.all_wev8.js"></script>
<script type="text/javascript" src="/js/jquery/plugins/client/jquery.client_wev8.js"></script>
<script type="text/javascript" src="/js/ecology8/lang/weaver_lang_7_wev8.js"></script>
<script type="text/javascript" src="/wui/theme/ecology8/js/jquery.fullscreenBackground.js"></script>
<script type="text/javascript" src="/wui/common/jquery/plugin/qrcode/jquery.qrcode_wev8.js"></script>
<script type="text/javascript" src="/wui/common/jquery/plugin/qrcode/qrcode_wev8.js"></script>
<script language=javascript src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script type="text/javascript" src="/wui/common/jquery/plugin/jquery.overlabel_wev8.js"></script>
<link href="/css/commom_wev8.css" type="text/css" rel="stylesheet">
<!-- 字体设置,win7、vista系统使用雅黑字体,其他系统使用宋体 Start -->
<link type='text/css' rel='stylesheet' href='/wui/common/css/w7OVFont_wev8.css' id="FONT2SYSTEMF">
<%String isMobileTest =Util.null2String(request.getParameter("isMobileTest"));
int languageid = Util.getIntValue(request.getParameter("languageid"),7);
String weaverssoservice=Util.null2String(request.getParameter("service"));
String appid=Util.null2String(request.getParameter("appid"));
String timeZone = (String)request.getSession().getAttribute("timeZone");
String weaver_login_type=Util.null2String(request.getSession(true).getAttribute("weaver_login_type"));
%>
<script type="text/javascript">
jQuery.ajax({
url:"/dateformat/timezonelogin.jsp?timeZoneOffset="+new Date().getTimezoneOffset(),
type:"get",
dataType:"text",
error:function(xhr,msg,e){
if(window.console)console.log("wui/main.jsp#timezone.jsp error!");
}
});
//浏览器版本不支持跳转
var isMobileTest="<%=isMobileTest%>";
var browserName = $.client.browserVersion.browser; //浏览器名称
var browserVersion = parseInt($.client.browserVersion.version);//浏览器版本
var osVersion=$.client.version; //操作系统版本
var browserOS=$.client.os;
function accessFilter(){
//禁止iphone、ipad、android访问
if(isMobileTest!="1"&&(browserOS=="iPhone/iPod"||browserOS=="iPad"||browserOS=="Android")){
window.location.href="/wui/common/page/sysRemind.jsp?labelid=2&browserOS="+browserOS;
return ;
}
//禁止windows下safari访问
if((browserName == "Safari"&&browserOS=="Windows")){
// window.location.href="/wui/common/page/sysRemind.jsp?labelid=3&browserOS="+browserOS+"&browserName="+browserName;
// return ;
}
if((browserName == "FF"&&browserVersion<9)||(browserName == "Chrome"&&browserVersion<14)||(browserName == "Safari"&&browserVersion<5&&browserOS!="Windows")){
window.location.href="/wui/common/page/sysRemind.jsp?labelid=1&browserName="+browserName+"&browserVersion="+$.client.browserVersion.version;
return ;
}
//禁止IE8以下浏览器访问,并提示安装IE8
if(browserName == "IE"&&browserVersion<8&&!document.documentMode){
window.location.href="/wui/common/page/sysRemind.jsp?labelid=4";
return ;
}
}
accessFilter();
</script>
<%
String ldapmode = Util.null2String(Prop.getPropValue("weaver","authentic"));//是否配置LDAP集成
String isrsaopen = Util.null2String(Prop.getPropValue("openRSA","isrsaopen"));//是否开启RSA
int showQRCodeSec = Util.getIntValue(new BaseBean().getPropValue("Others" , "SHOWQRCODESEC"));
if(showQRCodeSec<=0)showQRCodeSec=30;//默认30秒
String dlflg = request.getParameter("dlflg");
if (dlflg != null && "true".equals(dlflg)) {
String fontFileName = "USBkeyTool.rar";
String fontFilePath = "wui/theme/ecology8/page/resources/";
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
String projectPath = this.getServletConfig().getServletContext().getRealPath("/");
if (projectPath.lastIndexOf("/") != (projectPath.length() - 1) && projectPath.lastIndexOf("\\") != (projectPath.length() - 1)) {
projectPath += "/";
}
String filepath = projectPath + fontFilePath + fontFileName;
response.reset();
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType("application/octet-stream;charset=UTF-8");
response.setHeader("Content-disposition", "attachment;filename=\"" + fontFileName + "\"");
bis = new BufferedInputStream(new FileInputStream(filepath));
bos = new BufferedOutputStream(response.getOutputStream());
byte[] buff = new byte[2048];
int bytesRead;
while ((bytesRead = bis.read(buff, 0, buff.length)) != -1) {
bos.write(buff, 0, bytesRead);
}
bos.flush();
//out.clear();
out = pageContext.pushBody();
} catch(IOException e) {
e.printStackTrace();
} finally {
if (bis != null) {
try {
bis.close();
bis = null;
} catch (IOException e) {
}
}
if (bos != null) {
try {
bos.close();
bos = null;
} catch (IOException e) {
}
}
}
return;
}
String logintype = Util.null2String(request.getParameter("logintype")) ;
String templateId = Util.null2String(request.getParameter("templateId"));
String templateType = "";
String imageId = "";
String imageId2 = "";
String loginTemplateTitle="";
String backgroundColor = "";
String backgroundUrl="";
String logo="";
String recordcode="";
int extendloginid=0;
String sqlLoginTemplate1 = "SELECT * FROM SystemLoginTemplate WHERE loginTemplateid=?";
if(templateId.equals("")||templateId.equals("0")){
sqlLoginTemplate1 = "SELECT * FROM SystemLoginTemplate WHERE isCurrent='1'";
rs.executeQuery(sqlLoginTemplate1);
}else{
rs.executeQuery(sqlLoginTemplate1,templateId);
}
if(rs.next()){
templateId=rs.getString("loginTemplateId");
templateType = rs.getString("templateType");
imageId = rs.getString("imageId");
imageId2 = rs.getString("imageId2");
loginTemplateTitle = rs.getString("loginTemplateTitle");
backgroundColor = rs.getString("backgroundColor");
recordcode = rs.getString("recordcode");
out.println("<script language='javascript'>document.title='"+loginTemplateTitle+"';</script>");
}
if(!"".equals(imageId))
backgroundUrl=imageId;
else{
backgroundUrl = "/wui/theme/ecology8/page/images/login/bg_wev8.jpg";
}
if(!"".equals(imageId2)){
logo = imageId2;
}else{
logo = "/wui/theme/ecology8/page/images/login/logo_wev8.png";
}
%>
<%
String formmethod = "post";
if(!"".equals(Util.null2String(BaseBean.getPropValue("ldap", "domain")))){
formmethod = "get";
}
String host = Util.getRequestHost(request);
GCONST.setHost(host);
String acceptlanguage = Util.null2String(request.getHeader("Accept-Language"));
if(!"".equals(acceptlanguage))
acceptlanguage = acceptlanguage.toLowerCase();
String hostaddr = "";
String mainControlIp ="";
try
{
InetAddress ia = InetAddress.getLocalHost();
hostaddr = ia.getHostAddress();
}
catch(Exception e)
{
}
//String qccode = UUID.randomUUID().toString();
mainControlIp = BaseBean.getPropValue(GCONST.getConfigFile() , "MainControlIP");
String qstr = Util.null2String(request.getQueryString());
if(qstr.indexOf("<")!=-1 || qstr.indexOf(">")!=-1 || qstr.toLowerCase().indexOf("script")!=-1) {
response.sendRedirect("/"+request.getContextPath());
return;
}
if((!"".equals(mainControlIp)&&hostaddr.equals(mainControlIp))||"".equals(mainControlIp))
{
Thread threadSysUpgrade = null;
threadSysUpgrade = (Thread)weaver.general.InitServer.getThreadPool().get(0);
int filePercent = 0;
int currentFile = 0, fileList = 0;
if(threadSysUpgrade.isAlive()){
currentFile = weaver.system.SystemUpgrade.getCurrentFile();
fileList = weaver.system.SystemUpgrade.getFileList();
if(currentFile!=0 && fileList!=0){
out.println("<style>.updating{margin:50px 0 0 50px;font-family:MS Shell Dlg,Arial;font-size:14px;font-weight:bold}</style>");
out.println("<script>document.write('<div class=updating><img src=\"/images/icon_inprogress_wev8.gif\"><br/>"+SystemEnv.getHtmlLabelName(84244,languageid)+"<br/><span id=\"updateratespan\">"+MathUtil.div(currentFile*100,fileList,2)+"</span>%</div>');</script>");
}
%>
<script>
function ajaxinit(){
var ajax=false;
try{
ajax = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
ajax = new ActiveXObject("Microsoft.XMLHTTP");
}catch(E){
ajax = false;
}
}
if(!ajax && typeof XMLHttpRequest!='undefined'){
ajax = new XMLHttpRequest();
}
return ajax;
}
var cx = 0;
setTimeout("checkIsAlive()", 1000);
function checkIsAlive(){
var url = 'LoginOperation.jsp';
var pars = 'method=add&cx='+cx;
cx++;
var ajax=ajaxinit();
$.post("LoginOperation.jsp?method=add&cx="+cx,null,function(data){
var mins = data;
var bx = mins.indexOf(",0,");
if(bx == -1){
bx = mins.indexOf(",");
var dx = mins.lastIndexOf(",");
$("#updateratespan").html(mins.substring(bx+1, dx));
setTimeout("checkIsAlive()", 5000);
///document.all("updateratespan").innerHTML = mins.substring(bx+1, dx);
///setTimeout("checkIsAlive()", 5000);
}else{
//alert("cx = " + mins);
self.location.reload();
}
})
}
</script>
<%
return;
}
}
int upgreadeStatus= suc.getUpgreadStatus();
//升级过程中脚本执行出错
if (upgreadeStatus==1) {
out.println("<style>.updating{margin:50px 0 0 50px;font-family:MS Shell Dlg,Arial;font-size:14px;font-weight:bold}</style>");
out.println("<script>document.write('<div class=updating><img src=\"/images/icon_inprogress_wev8.gif\"><br/>"+SystemEnv.getHtmlLabelName(84245,languageid)+suc.getUpgreadLogPath()+SystemEnv.getHtmlLabelName(84247,languageid)+"</div>');</script>");
return;
}
//升级过程中异常中止
if (upgreadeStatus==2) {
out.println("<style>.updating{margin:50px 0 0 50px;font-family:MS Shell Dlg,Arial;font-size:14px;font-weight:bold}</style>");
out.println("<script>document.write('<div class=updating><img src=\"/images/icon_inprogress_wev8.gif\"><br/>"+SystemEnv.getHtmlLabelName(84250,languageid)+"</div>');</script>");
return;
}
//升级程序执行异常
if (upgreadeStatus==3) {
out.println("<style>.updating{margin:50px 0 0 50px;font-family:MS Shell Dlg,Arial;font-size:14px;font-weight:bold}</style>");
out.println("<script>document.write('<div class=updating><img src=\"/images/icon_inprogress_wev8.gif\"><br/>"+SystemEnv.getHtmlLabelName(84252,languageid)+"</div>');</script>");
return;
}
//String templateId="",templateType="",imageId="",loginTemplateTitle="";
//int extendloginid=0;
//modify by mackjoe at 2005-11-28 td3282 邮件提醒登陆后直接到指定流程
String gopage=Util.null2String(request.getParameter("gopage"));
// add by dongping for TD1340 in 2004.11.05
// add a cookie in our system
Cookie ckTest = new Cookie("testBanCookie","test");
ckTest.setMaxAge(-1);
ckTest.setPath("/");
response.addCookie(ckTest);
//xiaofeng, usb硬件加密
ChgPasswdReminder reminder = new ChgPasswdReminder();
RemindSettings settings=reminder.getRemindSettings();
String validitySec = Tools.vString(settings.getValiditySec(), "120");
String needusb = Util.null2String(settings.getNeedusb());
String needusbHt = Util.null2String(settings.getNeedusbHt());
String needusbDt = Util.null2String(settings.getNeedusbDt());
needusb = (needusbHt.equals("1") || needusbDt.equals("1")) ? "1" : "0";
String usbType = Util.null2String(settings.getUsbType());
String firmcode = Util.null2String(settings.getFirmcode());
String usercode = Util.null2String(settings.getUsercode());
String OpenPasswordLock = Util.null2String(settings.getOpenPasswordLock());
String needdactylogram = Util.null2String(settings.getNeedDactylogram());
//String canmodifydactylogram = settings.getCanModifyDactylogram();
String loginid=Util.null2String((String)session.getAttribute("tmploginid1"));
String disLoginId = loginid;
String message0 = Util.null2String(request.getParameter("message")) ;
int focusflg = 0;
String usbMsgparam = Util.null2String(request.getParameter("usbparammsg")) ;
//处理发过动态密码后 刷新页面 不重新发送的问题 20931
if((message0.equals("57") || message0.equals("101")) && loginid.equals("")){
loginid = "";
message0 = "";
}
String message=message0;
if(message0.equals("nomatch")) message = "";
int _messageIV = Util.getIntValue(message0);
boolean transMSG = _messageIV == 16 || _messageIV == 17;
if(!message.equals("")) message = transMSG ? SystemEnv.getHtmlLabelName(124919, languageid) : SystemEnv.getErrorMsgName(_messageIV,languageid) ;
if("16".equals(message0)){
String isADAccount = "";
rs.executeQuery("select isADAccount from hrmresource where loginid=?",loginid);
if(rs.next()) {
isADAccount = rs.getString("isADAccount");
}
if("1".equals(OpenPasswordLock)){
//if(ldapmode == null || ldapmode.equals("") || ("ldap".equals(ldapmode) && !"1".equals(isADAccount))) {
loginid=Util.null2String((String)session.getAttribute("tmploginid1"));
if(ldapmode == null || ldapmode.equals("") || ("ldap".equals(ldapmode) && !"1".equals(isADAccount))) {
rs.executeSql("select id from HrmResourceManager where loginid='"+loginid+"'");
}else{
loginid=loginid.toLowerCase();
rs.executeQuery("select id from HrmResourceManager where lower(loginid)=?",loginid);
}
if(!rs.next()){
String sql="";
if(ldapmode == null || ldapmode.equals("") || ("ldap".equals(ldapmode) && !"1".equals(isADAccount))) {
sql = "select sumpasswordwrong from hrmresource where loginid= ? ";
}else{
sql = "select sumpasswordwrong from hrmresource where lower(loginid)=lower( ? )";
}
rs1.executeQuery(sql,loginid);
rs1.next();
int sumpasswordwrong = Util.getIntValue(rs1.getString(1));
int sumPasswordLock = Util.getIntValue(settings.getSumPasswordLock(),3);
int leftChance = sumPasswordLock-sumpasswordwrong;
if(leftChance==0){
if(ldapmode == null || ldapmode.equals("") || ("ldap".equals(ldapmode) && !"1".equals(isADAccount))) {
sql = "update HrmResource set passwordlock=1,sumpasswordwrong=0 where loginid= ? ";
}else{ //AD
sql = "update HrmResource set passwordlock=1,sumpasswordwrong=0 where lower(loginid)=lower(?)";
}
rs1.executeUpdate(sql,loginid);
message0 = "110";
}else{
message = SystemEnv.getHtmlLabelName(24466,languageid)+leftChance+SystemEnv.getHtmlLabelName(24467,languageid);
}
}
//}
}
focusflg = 1;
}
//session.removeAttribute("tmploginid1");
if(message0.equals("16")) {
loginid = "";
disLoginId = "";
}
if(message0.equals("101")) {
//loginid=Util.null2String((String)session.getAttribute("tmploginid"));
//session.removeAttribute("tmploginid");
message=SystemEnv.getHtmlLabelName(20289,languageid)+SystemEnv.getHtmlLabelName(81913,languageid)+validitySec+SystemEnv.getHtmlLabelName(81914,languageid);
focusflg = 2;
} else if(message0.equals("730")){
message = SystemEnv.getHtmlLabelName(84255,languageid);
message0 = "";
} else if(message0.equals("556")){
message = "短信发送失败,请查看短信模板配置";
message0 = "";
}
if(message0.equals("775"))
{
message=SystemEnv.getHtmlLabelName(383003,languageid);
}
if(message0.equals("110"))
{
loginid = "";
int sumPasswordLock = Util.getIntValue(settings.getSumPasswordLock(),3);
message=SystemEnv.getHtmlLabelName(24593,languageid)+sumPasswordLock+SystemEnv.getHtmlLabelName(18083,languageid)+","+SystemEnv.getHtmlLabelName(24594,languageid);
focusflg = 1;
}
if((message0.equals("101")||message0.equals("57"))&&loginid.equals("")){
message="";
}
if(logintype.equals("")) logintype="1";
//IE 是否允许使用Cookie
String noAllowIe = Util.null2String(request.getParameter("noAllowIe")) ;
if (noAllowIe.equals("yes")) {
message = "IE"+SystemEnv.getHtmlLabelName(83703,languageid)+"Cookie";
}
//用户并发数错误提示信息
if (message0.equals("26")) {
message = SystemEnv.getHtmlLabelName(23656,languageid);
}
if(message0.equals("311")){
message = SystemEnv.getHtmlLabelName(381907,languageid);
}else if ("ERROR_001".equals(message0)) {
message = "账号被锁定,请联系CIS管理员";
} else if ("ERROR_002".equals(message0)) {
message = "验证码输入错误";
} else if ("ERROR_003".equals(message0)) {
message = "统一认证登录失败";
}
if(message0.equals("block")){
message = SystemEnv.getHtmlLabelName(127896,languageid);
}
//CA
if("-21".equals(message0)){
message = "UKEY"+ SystemEnv.getHtmlLabelName(127353,languageid);
}
message = err_msg;
//add by sean.yang 2006-02-09 for TD3609
int needvalidate=settings.getNeedvalidate();//0: 否,1: 是
int validatetype=settings.getValidatetype();//验证码类型,0:数字;1:字母;2:汉字
int islanguid = 7;//7: 中文,9: 繁体中文,8:英文
Cookie[] systemlanid= request.getCookies();
for(int i=0; (systemlanid!=null && i<systemlanid.length); i++){
//System.out.println("ck:"+systemlanid[i].getName()+":"+systemlanid[i].getValue());
if(systemlanid[i].getName().equals("languageidweaver")){
islanguid = Util.getIntValue(systemlanid[i].getValue(), 0);
break;
}
}
if(islanguid == 7){
islanguid = languageid;
}
boolean ismuitlaguage = false;
StaticObj staticobj = null;
staticobj = StaticObj.getInstance();
String multilanguage = (String)staticobj.getObject("multilanguage") ;
if(multilanguage == null) {
VerifyLogin.checkLicenseInfo();
multilanguage = (String)staticobj.getObject("multilanguage") ;
}
//if("y".equals(multilanguage)){
//ismuitlaguage = true;
//}
int enLanguage = GCONST.getENLANGUAGE();
int twLanguage = GCONST.getZHTWLANGUAGE();
if(enLanguage==0 && twLanguage==0) {
ismuitlaguage = false;
} else {
ismuitlaguage = true;
}
ismuitlaguage = false ;
%>
<%
if(message0.equals("46")){
%>
<script language="JavaScript">
flag=confirm('<%=SystemEnv.getHtmlLabelName(83709,languageid)%>')
if(flag){
<%if("1".equals(usbType)){%>
window.open("/weaverplugin/WkRt.exe")
<%}else{%>
window.open("/weaverplugin/HaiKeyRuntime.exe")
<%}%>
}
</script>
<%}%>
<script language="javascript">
function addCssByStyle(cssString){
var doc=document;
var style=doc.createElement("style");
style.setAttribute("type", "text/css");
if(style.styleSheet){// IE
style.styleSheet.cssText = cssString;
} else {// w3c
var cssText = doc.createTextNode(cssString);
style.appendChild(cssText);
}
var heads = doc.getElementsByTagName("head");
if(heads.length) {
heads[0].appendChild(style);
} else {
doc.documentElement.appendChild(style);
}
}
//alert( window.navigator.userAgent+"%%%"+jQuery.client.version +"%%%"+jQuery.client.browser+"%%%"+$.client.os+"&&&&&"+jQuery.client.getOsVersion())
var osV = jQuery.client.version;
var isIE = jQuery.client.browser=="Explorer"?"true":"false";
if (osV < 6) {
document.getElementById('FONT2SYSTEMF').href = "/wui/common/css/notW7AVFont_wev8.css";
addCssByStyle("input { Line-height:100%!important;}");
}
</script>
<!-- 字体设置,win7、vista系统使用雅黑字体,其他系统使用宋体 End -->
<!--[if IE 6]>
<script type='text/javascript' src='/wui/common/jquery/plugin/8a-min_wev8.js'></script>
<![endif]-->
<!--超时跳转,跳出iframe黄宝2011/5/25-->
<script type="text/javascript">
if(top.location != self.location) top.location=self.location;
</script>
<%
if("1".equals(isrsaopen)){
%>
<script type="text/javascript" src="/js/rsa/jsencrypt.js"></script>
<script type="text/javascript" src="/js/rsa/rsa.js"></script>
<%} %>
<SCRIPT language=javascript1.1>
//<!--
function checkall()
{
<%
if("1".equals(isrsaopen)){
%>
__RSAEcrypt__. rsa_encrypt(checkall_1);
<%}else{
%>
checkall_1();
<% }%>
}
var thisId = '';
function enterCheck(){
if(window.event.keyCode == 13) {
var div='_DialogDiv_'+ thisId;
if(document.getElementById(div) == null){
checkall();
}
if(window.event && window.event.preventDefault){
window.event.preventDefault();
}else{
window.event.returnValue = false;//注意加window
}
}
}
function checkall_1()
{
var dactylogram = "";
if(document.all("dactylogram")) dactylogram = document.all("dactylogram").value;
if(dactylogram == ""){
var i=0;
var j=0;
var errMessage="";
var languageid =jQuery("#islanguid").val();
if (form1.loginid.value=="") {
errMessage=errMessage+languageMap[16647]+"\n";
i=i+1;
}
if (form1.userpassword.value=="") {
errMessage=errMessage+languageMap[16648]+"\n";
j=j+1;
}
if (i>0){
//window.top.Dialog.alert(errMessage);form1.loginid.focus(); return false ;
//showmsg(errMessage);
showmsg(errMessage);
return false ;
}else if(j>0){
//window.top.Dialog.alert(errMessage);form1.userpassword.focus(); return false ;
showmsg(errMessage);
return false ;
}
<%if(needusb!=null&&needusb.equals("1")){%>
if(userUsbType=="1"){
if(!checkusb1()){
return false ;
}
}else if(userUsbType=="2"){
if(!checkusb2()){
return false ;
}
}else if(userUsbType=="3"){
if(!checkusb3()){
return false ;
}
}
<%}%>
// else { form1.submit() ; }
}
<%
if("1".equals(isrsaopen)){
%>
var pwd = jQuery("input[name='userpassword']");
pwd.val(__RSAEcrypt__.rsa_data_encrypt(pwd.val()));
<%}%>
$(document.form1).submit() ;
}
function showmsg(mess,func) {
var diag = new window.top.Dialog({
Width: 300,
Height: 80,
normalDialog:false,
Modal:true
});
diag.Title = languageMap[15172];
if(thisId===''){
thisId = new Date().getTime();
}
diag.Id=thisId;
diag.CancelEvent = function () {
thisId='';
diag.close();
if (func) func();
};
diag.OKEvent = function () {
thisId='';
diag.close();
if (func) func();
};
diag.InnerHtml = '<table height="100%" border="0" align="center" cellpadding="10" cellspacing="0">\
<tr><td align="right"><img id="Icon_" src="' + IMAGESPATH + 'icon_alert_wev8.png" style="margin-right:10px;" width="26" height="26" align="absmiddle"></td>\
<td align="left" id="Message_" style="font-size:9pt">' + mess + '</td></tr>\
</table>';
diag.ShowButtonRow=true;
diag.normalDialog= false;
diag.show();
diag.getDialogDiv().style.zIndex = 99999;
jQuery(diag.getContainer()).css("overflow-y","auto");
diag.okButton.style.display = "none";
diag.e8SepLine.style.display = "none";
diag.cancelButton.value = languageMap[826];
diag.cancelButton.focus();
}
var dactylogramStr = "";
var intervalID = 0;
//--------------------------------------------------------------//
// 采集指纹特征
//--------------------------------------------------------------//
function FingerSample(){
init();
if(dactylogramStr==""){
OpenDevice();
if(openStatus==1){
iRet = dtm.GetExtractMBSimple();
if(iRet != 0){
if(intervalID!=0) window.clearInterval(intervalID);
intervalID = setTimeout("FingerSample()", 2000);
}else{
if(intervalID!=0) window.clearInterval(intervalID);
if(intervalID2!=0) window.clearInterval(intervalID2);
dactylogramStr = dtm.strInfo;
document.all("dactylogram").value=dactylogramStr;
form1.submit();
}
CloseDevice();
}
}
if(intervalID!=0) window.clearInterval(intervalID);
intervalID = setTimeout("FingerSample()", 2000);
}
var openStatus = 0;
function OpenDevice()
{
openStatus = 0;
dtm.DataType = 0;
iRet = dtm.EnumerateDevicesSimple();
if(iRet == 0){
devInfo = dtm.strInfo;
devNum = devInfo.split(",")[1];
iRet = dtm.OpenDevice(devNum);
if(iRet == 0){
openStatus = 1;
}
}
}
function CloseDevice()
{
iRet = dtm.CloseDevice();
}
function init(){
try{
OpenDevice();
if(openStatus != 1){
document.all("dactylogramLoginImgId").src="//wui/theme/ecology8/page/images/loginmode/3_wev8.gif";
if(intervalID2!=0) window.clearInterval(intervalID2);
intervalID2=setTimeout("init()", 100);
}else{
if("<%=message0%>"=="nomatch") document.all("dactylogramLoginImgId").src="//wui/theme/ecology8/page/images/loginmode/2_wev8.gif";
else document.all("dactylogramLoginImgId").src="//wui/theme/ecology8/page/images/loginmode/1_wev8.gif";
if(intervalID2!=0) window.clearInterval(intervalID2);
if(document.getElementById("onDactylogramOrPassword").value==0){
if(intervalID!=0) window.clearInterval(intervalID);
intervalID=setTimeout("FingerSample()", 2000);
}
}
CloseDevice();
}catch(e){}
}
if("<%=needdactylogram%>"=="1"||"<%=message0%>"=="nomatch"){
if(intervalID!=0) window.clearInterval(intervalID);
if(intervalID2!=0) window.clearInterval(intervalID2);
intervalID2=setTimeout("init()", 100);
intervalID=setTimeout("FingerSample()", 2000);
}
var intervalID2=0;
if(<%=GCONST.getONDACTYLOGRAM()%>&&"<%=needdactylogram%>"=="1") intervalID2=setTimeout("init()", 100);
function changeLoginMode(modeid){
if(modeid==0){
document.all("dactylogramLogin").style.display = "";
document.all("passwordLogin").style.display = "none";
document.all("loginModeTable").style.margin = "100px 0 0 475px";
if(intervalID2!=0) window.clearInterval(intervalID2);
init();
if(openStatus==1) intervalID=setTimeout("FingerSample()", 2000);
}
if(modeid==1){
document.all("dactylogramLogin").style.display = "none";
document.all("passwordLogin").style.display = "";
if("<%=message0%>"=="nomatch"){
document.all("loginModeTable").style.margin = "150px 0 0 475px";
document.all("loginPasswordTable").style.margin = "0 0 0 570px";
}else{
document.all("loginModeTable").style.margin = "0 0 35px 475px";
}
if(intervalID!=0) window.clearInterval(intervalID);
if(intervalID2!=0) window.clearInterval(intervalID2);
}
}
function VchangeLoginMode(modeid){
if(modeid==0){
document.all("dactylogramLoginV").style.display = "";
document.all("passwordLoginV").style.display = "none";
setTimeout("FingerSample()", 500);
}
if(modeid==1){
document.all("dactylogramLoginV").style.display = "none";
document.all("passwordLoginV").style.display = "";
if(intervalID!=0) window.clearInterval(intervalID);
}
}
function changeLoginMethod(methodtype){
window.top.Dialog.alert(methodtype);
document.getElementById("loginid").disabled = true;
}
//add by sean.yang 2006-02-09 for TD3609
function changeMsg(msg, ele)
{
var languageid = document.getElementById("islanguid").value;
if(msg==0){
<%if(ismuitlaguage){%>
$("#validatecodeDiv").css("left", ($(ele).offset().left + $(ele).width() + 10) + "px");
$("#validatecodeDiv").css("top", $(ele).offset().top + "px");
$("#validatecodeDiv").show();
<%}%>
if(document.getElementById("validatecode").value==languageMap[84270]) {
document.all.validatecode.value='';
}
}else if(msg==1){
<%if(ismuitlaguage){%>
$("#validatecodeDiv").hide();
<%}%>
if(document.getElementById("validatecode").value=='') {
document.getElementById("validatecode").value=languageMap[84270];
}
}
}
// added by wcd 2014-12-19
var pswdDialog;
var common = new MFCommon();
common.initDialog({width:600,height:400,showMax:false,checkDataChange:false});
function forgotPassword(){
var languageid = document.getElementById("islanguid").value;
var thisTitle = languageMap[127899];
pswdDialog = common.showDialog("/hrm/password/commonTab.jsp?fromUrl=forgotPassword&languageid="+languageid,thisTitle);
}
function resetPassword(loginid){
if(pswdDialog) pswdDialog.close();
pswdDialog = common.showDialog("/hrm/password/commonTab.jsp?fromUrl=resetPassword&loginid="+loginid,languageMap[31479]);
}
// -->
</SCRIPT>
<script language="JavaScript">
function click(e) {
if($.browser.msie){
if (event.button == 2 || event.button == 3){
alert(languageMap[16641])
return false;
}
}else{
if (e.which == 2 || e.which == 3){
alert(languageMap[16641])
return false;
}
}
}
document.onmousedown=click
</script>
<%if(needusb!=null&&needusb.equals("1")){%>
<script language="JavaScript">
function checkusb1(){
//验证威步key
try{
rnd=Math.round(Math.random()*1000000000)
form1.rnd.value=rnd
wk = new ActiveXObject("WIBUKEY.WIBUKEY")
MyAuthLib=new ActiveXObject("WkAuthLib.WkAuth")
wk.FirmCode = <%=firmcode%>
wk.UserCode = <%=usercode%>
wk.UsedSubsystems = 1
wk.AccessSubSystem()
if(wk.LastErrorCode==17){
form1.serial.value='0'
return false;
}
if(wk.LastErrorCode>0){
throw new Error(wk.LastErrorCode)
}
wk.UsedWibuBox.MoveFirst()
MyAuthLib.Data=wk.UsedWibuBox.SerialText
MyAuthLib.FirmCode = <%=firmcode%>
MyAuthLib.UserCode = <%=usercode%>
MyAuthLib.SelectionCode= rnd
MyAuthLib.EncryptWk()
form1.serial.value= MyAuthLib.Data
}catch(err){
form1.serial.value= '1'
return false;
}
return true;
}
</script>
<script language="JavaScript">
function checkusb3(){
var languageid = document.getElementById("islanguid").value;
//需要输入动态口令
if(jQuery("#tokenAuthKey").val()==""||jQuery("#tokenAuthKey").val()==languageMap[127901]){
//alert("<%=SystemEnv.getHtmlLabelName(127901,languageid)%>!");
showmsg(languageMap[127901]);
jQuery("#tokenAuthKey").focus();
return false;
}else if(!isdigit(jQuery("#tokenAuthKey").val())){
showmsg(languageMap[127902]);
jQuery("#tokenAuthKey").focus();
return false;
}else if(jQuery("#tokenAuthKey").val().length!=6){
showmsg(languageMap[127903]);
jQuery("#tokenAuthKey").focus();
return false;
}
return true;
}
function isdigit(s){
var r,re;
re = /\d*/i; //\d表示数字,*表示匹配多个数字
r = s.match(re);
return (r==s)?true:false;
}
</script>
<script language="JavaScript">
function checkusb2(){
//验证海泰key
var showError = languageMap[132147]+'<a href="/wui/theme/ecology8/page/login.jsp?dlflg=true" target="_blank"><%=SystemEnv.getHtmlLabelName(84260,languageid)%></a><%=SystemEnv.getHtmlLabelName(84262,languageid)%>';
try{
rnd = Math.round(Math.random()*1000000000);
//alert(rnd);
form1.rnd.value=rnd;
var returnstr = getUserPIN();
if(returnstr != undefined && returnstr != ""){
form1.username.value= returnstr;
var randomKey = getRandomKey(rnd)
if(randomKey != undefined && randomKey != ""){
form1.serial.value= randomKey;
}else{
form1.serial.value= '0';
showmsg(showError);
return false;
}
//alert(randomKey);
}else{
form1.serial.value= '0';
showmsg(showError);
return false;
}
}catch(err){
form1.serial.value= '0';
form1.username.value= '';
showmsg(showError);
return false;
}
return true;
}
</script>
<OBJECT id="htactx" name="htactx"
classid=clsid:FB4EE423-43A4-4AA9-BDE9-4335A6D3C74E codebase="HTActX.cab#version=1,0,0,1" style="HEIGHT: 0px; WIDTH: 0px;display:none"></OBJECT>
<script language="javascript">
function getUserPIN(){
try{
var vbsserial="";
var hCard = htactx.OpenDevice(1);//打开设备
if(hCard==0){
//showmsg(languageMap[132147])
return vbsserial;
}
try{
vbsserial = htactx.GetUserName(hCard)//获取用户名
htactx.CloseDevice(hCard)
return vbsserial;
}catch(e){
//showmsg(languageMap[132147]+"2");
htactx.CloseDevice(hCard);
return vbsserial;
}
}catch(e){
//showmsg(languageMap[132147]);
htactx.CloseDevice(hCard);
return vbsserial;
}
}
function getRandomKey(randnum){
try{
var hCard = htactx.OpenDevice(1);//打开设备
if(hCard == 0 ){
//showmsg(languageMap[132147]+"4");
return "";
}
try{
var Digest = htactx.HTSHA1(randnum, (""+randnum).length);
Digest = Digest+"04040404" //对SHA1数据进行补码
htactx.VerifyUserPin(hCard, (""+form1.userpassword.value)) //校验口令
var EnData = htactx.HTCrypt(hCard, 0, 0, Digest, Digest.length)//DES3加密SHA1后的数据
htactx.CloseDevice(hCard);
return EnData;
}catch(e){
htactx.CloseDevice(hCard);
return "";
}
}catch(e){
//showmsg(languageMap[132147]+"4");
return "";
}
}
</script>
<%}%>
</script>
<script type="text/javascript">
$(document).ready(function() {
$(function() {
if($("#syslangul").length>0&&$("#syslangul").find("li").length==1){
$("#langDiv").hide();
$("#qrcodeDiv").removeClass("left").addClass("right").addClass("m-r-20")
}
//alert($("label.overlabel").length)
$("label.overlabel").overlabel();
var iconImg="/wui/theme/ecology8/page/wui/theme/ecology8/page/images/login/s_wev8.png"
var iconImg_over="/wui/theme/ecology8/page//wui/theme/ecology8/page/images/login/s2_wev8.png"
$("#login").bind("mouseover", function() {
$(this).removeClass("lgsm");
$(this).addClass("lgsmMouseOver");
});
$("#login").bind("mouseout", function() {
$(this).removeClass("lgsmMouseOver");
$(this).addClass("lgsm");
});
$(".crossNav a").hover(function() {
$(this).css("background-position", "0 -29px");
}, function() {
$(this).css("background-position", "0 0px");
});
//检测微软雅黑字体在客户端是否安装
//fontDetection("sfclsid", $("input[name='fontName']").val());
//检测用户当前浏览器及其版本
ieVersionDetection();
setRandomBg();
});
//焦点设置
//$("input[name='loginid']").focus();
//----------------------------------
// form表单提交时check
//----------------------------------
});
function setRandomBg() {
var imgArray=new Array();
var imgPath="";
<%
List imageId2List=Util.TokenizerString(imageId2,",");
for(int i=0;i<imageId2List.size();i++){
String imgId2Temp=(String)imageId2List.get(i);
%>
imgArray[<%=i%>]="<%=imgId2Temp%>";
<%}%>
var discnt = <%=imageId2List.size()%>;
if(discnt==0){ //系统默认图片
imgArray=new Array("bg2_wev8.png","bg3_wev8.png");
discnt=2;
imgPath="/wui/theme/ecology8/page//wui/theme/ecology8/page/images/login/"
}else //用户自定义图片
imgPath="/LoginTemplateFile/";
var i = Math.floor(Math.random()*discnt);
var j = Math.floor(Math.random()*discnt);
var k = Math.floor(Math.random()*discnt);
var img1="",img2="",img3="";
if(discnt>3){
while (i >= discnt ) {
i = Math.floor(Math.random()*discnt);
}
while (j >= discnt || j == i) {
j = Math.floor(Math.random()*discnt);
}
while (k >= discnt || k == i || k == j) {
k = Math.floor(Math.random()*discnt);
}
img1=imgArray[i];
img2=imgArray[j];
img3=imgArray[k];
}else if(discnt==3){
img1=imgArray[0];
img2=imgArray[1];
img3=imgArray[2];
}else if(discnt==2){
img1=imgArray[0];
img2=imgArray[1];
}else if(discnt==1){
img1=imgArray[0];
}
if(discnt>=3){
$("#disimg0").css("background", "url(" +imgPath+img1+ ") no-repeat center");
$("#disimg1").css("background", "url(" +imgPath+img2+ ") no-repeat center");
$("#disimg2").css("background", "url(" +imgPath+img3+ ") no-repeat center");
}else if(discnt==2){
$("#disimg0").css("background", "url(" +imgPath+img1+ ") no-repeat center");
$("#disimg1").css("background", "url(" +imgPath+img2+ ") no-repeat center");
}else if(discnt==1){
$("#disimg0").css("background", "url(" +imgPath+img1+ ") no-repeat center");
}
}
function ieVersionDetection() {
if(navigator.userAgent.indexOf("MSIE")>0){ //是否是IE浏览器
if(navigator.userAgent.indexOf("MSIE 6.0") > 0){ //6.0
$("#ieverTips").show();
return;
}
}
$("#ieverTips").hide();
}
function fontDetection(objectId, fontName) {
//加载系统字体
getSFOfStr(objectId);
if(!isExistOTF(fontName)) {
$("#fontTips").show();
} else {
$("#fontTips").hide();
}
}
//---------------------------------------------
// System font detection. START
//---------------------------------------------
/**
* detection system font exists.
* @param fontName font name
* @return true :Exist.
* false :Does not Exist
*/
function isExistOTF(fontName) {
if (fontName == undefined
|| fontName == null
|| fontName.trim() == '') {
return false;
}
if (sysfonts.indexOf(";" + fontName + ";") != -1) {
return true;
}
return false;
};
/**
* getting to the system font string.
* @param objectId object's id
* @return system font string.
*/
function getSFOfStr(objectId) {
var sysFontsArray = new Array();
sysFontsArray = getSystemFonts(objectId);
for(var i=0; i<sysFontsArray.length; i++) {
sysfonts += sysFontsArray[i];
sysfonts += ';'
}
}
//-------------------------------------------
// Save the system font string,
// used for multiple testing.
//-------------------------------------------
var sysfonts = ';';
/**
* getting to the system font list
*
* @param objectId The id of components of the system font.
* @return fonts list
*/
function getSystemFonts(objectId) {
var a = document.all(objectId).fonts.count;
var fArray = new Array();
for (var i = 1; i <= document.all(objectId).fonts.count; i++) {
fArray[i] = document.all(objectId).fonts(i)
}
return fArray
}
/**
* Returns a string, with leading and trailing whitespace
* omitted.
* @return A this string with leading and trailing white
* space removed, or this string if it has no leading or
* trailing white space.
*/
String.prototype.trim = function(){
return this.replace(/(^\s*)|(\s*$)/g, "");
}
//---------------------------------------------
// System font detection. END
//---------------------------------------------
</script>
<STYLE TYPE="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,select{
font-size:12px;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,select{
font-size:11px;
/*font-family:"微软雅黑","宋体"!important;*/
}
.loginContainer{
width:300px;
height:330px;
background:url(/wui/theme/ecology8/page/images/login/login-bg_wev8.png);
}
.loginTitle{
color:#828282;
font-weight:500px;
font-size:18px;
padding-top:10px;
padding-bottom:20px;
}
/*For slide*/
.slideDivContinar { height: 436px; width: 100%; padding:0; margin:0; overflow: hidden }
.slideDiv {height:436px; width: 100%;top:0; left:0;margin:0;padding:0;}
/*For Input*/
.inputforloginbg{ width:172px;height:21px;border:none;}
.inputforloginbg input{border:none;height:15px;background:none;}
.lgsm {width:124px;height:36px;background:url(/wui/theme/ecology8/page//wui/theme/ecology8/page/images/login/btn_wev8.png) 0px 0px no-repeat; border:none;}
.lgsmMouseOver {width:124px;height:36px;background:url(/wui/theme/ecology8/page//wui/theme/ecology8/page/images/login/btn_wev8.png) 0px 0px no-repeat; border:none;}
.crossNav{width:100%;height:30px;position:absolute;margin-top:105px;padding-left:30px;padding-right:30px;}
.input_out{
height:36px;
width:248px;
line-height:36px;
}
.input_inner{
height:36px;
width:248px;
line-height:36px;
margin-top:1px;
font-size:14px;
}
</STYLE>
</head>
<body style="padding:0;margin:0;margin:0;padding:0;" scroll="no">
<!--style="background:url('<%=backgroundUrl %>') center bottom;"-->
<div class="w-all h-all center" >
<div style="background:url('<%=backgroundUrl %>') center bottom;background-size: 100% 100%;height: 90%">
<div class="h-150"> </div>
<div class=" center " style="width: 600px">
<div>
<img class=" " style="max-width:400px;max-height:150px;border:0;margin:0" src="<%=logo %>"/>
</div>
<div style="height:35px"> </div>
<form id="form1" name="form1" action="/login/authorizeVerify.jsp" method="post" onkeydown="enterCheck()" >
<INPUT type="hidden" value="/wui/theme/ecology8/page/login.jsp?templateId=<%=templateId %>&logintype=<%=logintype%>&gopage=<%=gopage%>" name="loginfile">
<INPUT type="hidden" name="logintype" value="<%=logintype %>">
<input type="hidden" name="fontName" value="<%=SystemEnv.getHtmlLabelName(84210,7)%>">
<input type=hidden name="message" value="<%=message0 %>">
<input type=hidden name="gopage" value="<%=gopage%>">
<input type=hidden name="formmethod" value="<%=formmethod%>">
<INPUT type=hidden name="rnd" >
<INPUT type=hidden name="serial">
<INPUT type=hidden name="username">
<input type="hidden" name="isie" id="isie">
<input type=hidden name="weaverssoservice" value="<%=weaverssoservice%>">
<input type=hidden name="redirect_uri" value="<%=request.getParameter("redirect_uri") %>">
<input type=hidden name="appid" value="<%=appid%>">
<div class="h-15 w-300 center">
<div class="p-l-30 font14 colorfff left w-140" id="messageDivOld" style="text-align: left;">
</div>
<%if(ismuitlaguage){%>
<div class="left w-30" id="qrcodeDiv" style="display: <%=logintype.equals("2")?"none":"" %>"><img id="qrcode" class="hand" src="/wui/theme/ecology8/page/images/login/qrcode_wev8.png"></div>
<div class="last p-r-15 " style="" id="langDiv">
<span class="hand w-80 " id="selectLan" style="text-align:left; color:#D5E7E4;height: 20px;line-height: 20px;"><span class="text" style="padding-left:10px;"><%
if(islanguid==0){
out.println(LanguageComInfo.getLanguagename("7"));
}else{
out.println(LanguageComInfo.getLanguagename(islanguid+""));
}
%></span><span class="right">▼</span></span>
<input id="islanguid" name="islanguid" type="hidden" value="<%=islanguid %>">
<ul class="absolute hide" id="syslangul">
<%=LanguageComInfo.getLiLan(islanguid) %>
</ul>
</div>
<%}else{ %>
<div class="last w-20 p-r-30" id="qrcodeDiv" style="display: <%=logintype.equals("2")?"none":"" %>"><img id="qrcode" class="hand" src="/wui/theme/ecology8/page/images/login/qrcode_wev8.png"></div>
<input id="islanguid" name="islanguid" type="hidden" value="7">
<%} %>
<div class="clear" style="height: 0px;"> </div>
</div>
<div id="normalLogin" class="p-l-5">
<table width="600px;" style="position: absolute;">
<tr>
<td class="center" style="background: url('/wui/theme/ecology8/page/images/login/input_wev8.png');height:45px;background-repeat: no-repeat;background-position: center center;">
<div class="relative center" style="height:45px;width:280px;">
<img class="absolute" style="top:10px;left:20px;" src="/wui/theme/ecology8/page/images/login/username_wev8.png">
<label for="loginid" class="overlabel" id="for_loginid"><%=SystemEnv.getHtmlLabelName(2024,languageid)%></label>
<input class="input" name="loginid" id="loginid" value="<%=disLoginId %>" style="">
</div>
</td>
</tr>
<tr>
<td class="h-10 ">
<div class="font12 colorfff left center absolute " style="width:580px;line-height: 0px" id="messageDiv" ><nobr>
<%
if(message0.equals("45")){
%>
<%=SystemEnv.getHtmlLabelName(84259,languageid)%><a href="/wui/theme/ecology8/page/login.jsp?dlflg=true" target="_blank"><%=SystemEnv.getHtmlLabelName(84260,languageid)%></a><%=SystemEnv.getHtmlLabelName(84262,languageid)%>
<%} else if(message0.equals("16") && usbMsgparam.equals("1")){
focusflg = 1;
%>
<%=SystemEnv.getHtmlLabelName(84264,languageid)%><a href="/wui/theme/ecology8/page/login.jsp?dlflg=true" target="_blank"><%=SystemEnv.getHtmlLabelName(84260,languageid)%></a><%=SystemEnv.getHtmlLabelName(84266,languageid)%>
<%} else if(message0.equals("122")){ //
focusflg = 1;
%>
<%=SystemEnv.getHtmlLabelName(84268,languageid)%> <a href='/login/syncTokenKey.jsp?languageid=<%=languageid %>'><%=SystemEnv.getHtmlLabelName(84269,languageid)%></a>
<%}else {
%>
<span name="errorMessage" id="errorMessage"><%=message %></span>
<%} %>
<nobr/>
</div>
</td>
</tr>
<tr>
<td style="background: url('/wui/theme/ecology8/page/images/login/input_wev8.png');height:45px;background-repeat: no-repeat;background-position: center center;">
<div class="relative center" style="height:45px;width:280px;">
<img class="absolute" style="top:10px;left:20px;" src="/wui/theme/ecology8/page/images/login/password_wev8.png">
<label for="userpassword" class="overlabel" id="for_userpassword"><%=SystemEnv.getHtmlLabelName(409,languageid)%></label>
<input class="input" style="" name="userpassword" id="userpassword" type="password" autocomplete="off">
</div>
</td>
</tr>
<tr id="ca_pin_tr_height" style="display:none;"><td class="h-10"></td></tr>
<tr id="ca_pin_tr" style="display:none;">
<td style="background: url('/wui/theme/ecology8/page/images/login/input_wev8.png');height:45px;background-repeat: no-repeat;background-position: center center;">
<div class="relative center" style="height:45px;width:280px;">
<img class="absolute" style="top:10px;left:20px;" src="/wui/theme/ecology8/page/images/login/password_wev8.png">
<label for="caPin" class="overlabel" id="for_caPin"><%=SystemEnv.getHtmlLabelName(83869,languageid)+"UKEY"%></label>
<input class="input" style="" type="password" id="caPin" type="text">
<input type="hidden" id="ca_msg" value='<%="error:UKEY"+SystemEnv.getHtmlLabelName(127353,languageid) %>' />
</div>
</td>
</tr>
<tr>
<td class="h-10"></td>
</tr>
<!-- 验证码 -->
<tr<%if(needvalidate!=1){ %>display:none<%} %>'>
<%if(needvalidate==1){%>
<td style="">
<div style="width:280px;" class="center">
<div class="relative left " style="width:135px;height:38px;margin-left: 10px;background: url('/wui/theme/ecology8/page/images/login/input_1_wev8.png') no-repeat;background-repeat: no-repeat;background-position: center center;">
<label for="validatecode" style="left:20px!important;line-height:38px!important;" class="overlabel" id="for_validatecode"><%=SystemEnv.getHtmlLabelName(84270,languageid)%></label>
<input type="text" id="validatecode" name="validatecode" class="input1" style=";width:135px;height:38px;">
</div>
<div class="right" style="margin-right:10px;">
<a href="javascript:changeCode()"><img border=0 id='imgCode' align='absmiddle' style="width:112px;height:38px;" src='/weaver/weaver.file.MakeValidateCode' ></a>
<script>
var seriesnum_=0;
function changeCode(){
seriesnum_++;
setTimeout('$("#imgCode").attr("src", "/weaver/weaver.file.MakeValidateCode?seriesnum_="+seriesnum_)',50);
}
</script>
</div>
<div class="clear"></div>
</div>
</td>
<%}%>
</tr>
<tr style='height:26px;display:none' id="trTokenAuthKey">
<td id="tdTokenAuthKey" style="background: url('/wui/theme/ecology8/page/images/login/input_wev8.png');height:45px;background-repeat: no-repeat;background-position: center center;">
<div class="relative center" style="height:45px;width:280px;">
<img class="absolute" style="top:10px;left:20px;" src="/wui/theme/ecology8/page/images/login/password_wev8.png">
<label for="tokenAuthKey" id="for_tokenAuthKey" class="overlabel"><%=SystemEnv.getHtmlLabelName(84271,languageid)%></label>
<input type="text" id="tokenAuthKey" name="tokenAuthKey" class="input">
</div>
</td>
</tr>
<tr style="display:none">
<td style="background: url('/wui/theme/ecology8/page/images/login/input_wev8.png');height:45px;">
<div class="relative center" style="height:45px;width:280px;">
<img class="absolute" style="top:10px;left:20px;" src="/wui/theme/ecology8/page/images/login/password_wev8.png"> <input class="input" style="" name="" id="" type="">
</div>
</td>
</tr>
<tr>
<td class="h-50 relative right" style="height:30px;width:280px;">
<label class="overlabel" style="cursor:pointer;" onclick="forgotPassword()" id="forgotpassword"><%=SystemEnv.getHtmlLabelName(81614,languageid)%></label>
</td>
</tr>
<tr style="">
<td >
<input type="button" name="login" id="login" onclick="checkall()" value="<%=SystemEnv.getHtmlLabelName(674,languageid)%>" class="hand" tabindex="3" style="background: url('/wui/theme/ecology8/page/images/login/btn_login_wev8.png');height:45px;width:280px;border:0px;font-size: 14px;color: #578197;letter-spacing:2px;font-family:Arial,Helvetica,sans-serif,SimSun;">
</td>
</tr>
</table>
</div>
<div id="qrcodeLogin" class="hide">
<div class="h-10"> </div>
<div class="center" >
<div id="qrcodeImg" class="center relative" style="padding-top:20px;padding-left:20px;width:145px;height:145px;background: url(/wui/theme/ecology8/page/images/login/qrcodebg_wev8.png);background-position: center center;background-repeat: no-repeat"></div>
</div>
<div class="h-10"> </div>
<div style="color:#D5E7E4">
<label id="qrcodePrompt">
<%=SystemEnv.getHtmlLabelName(84272,languageid)%>
</label>
</div>
<div class="h-10"> </div>
<div>
<input type="button" name="backbtn" id="backbtn" value="<%=SystemEnv.getHtmlLabelName(131938,languageid)%>" class="hand" style="background: url('/wui/theme/ecology8/page/images/login/iconnormal.png');color:white;padding-left:20px;height:36px;font-size:14px;width:145px;border:0px;">
</div>
</div>
</form>
</div>
</div>
<div class="e8login-recordcode" style="background: url(/images/bottom.png);background-size: 100% 100%;height: 9%">
<style type="text/css">
.e8login-recordcode {
height:80px;
position:absolute;
bottom:0;
width:100%;
left:0;
text-align:center;
line-height: 6px;
}
.e8login-recordcode-view {
height: 40px;
min-width: 600px;
text-align: center;
line-height: 40px;
color: #FFFFFF;
display: inline-block;
vertical-align: middle;
}
.e8login-recordcode-view a{
color: #5B5D57;
}
.e8login-recordcode-view>p {
margin: 0px;
}
.copy{
font-size: 10px;
color: #000;
}
</style>
<div class="e8login-recordcode-view">
<div style="line-height:20px;display:none;">
<span class="copy">上海飞机客户服务有限公司 版权所有 </span><br/>
<span class="copy">沪IPC备12042517号 沪公网安备31011502002390号 </span><br/>
<span class="copy">Hotline : 021-20875431</span>
</div>
</div>
</div>
</div>
<!--detection the system font start -->
<DIV style="LEFT: 0px; POSITION: absolute; TOP: 0px;"><OBJECT ID="sfclsid" CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" WIDTH="0px" HEIGHT="0px"></OBJECT></DIV>
<style type="text/css">
html,body{
height:100%;
}
.input{
left:50px;
top:10px;
height:25px;
width:210px;
background:transparent!important;
color:#5B5D57!important;
border:0px;
position:absolute;
font-size: 15px;
outline:none;
}
.input1{
left:30px;
height:25px;
width:210px;
background:transparent!important;
color:#ffffff!important;
border:0px;
position:absolute;
font-size: 15px;
outline:none;
}
.langOver{
color:#797E81!important;
}
.overlabel{
position:absolute;
z-index:1;
font-size:14px;
left:50px;
font-size:14px;
color:#5B5D57!important;
line-height: 40px!important;
}
#qrcodeImg table{
position:absolute;
top:10px;
left: 10px;
}
#syslangul{
width:80px;
list-style: none;
background: #f3fbf9;
z-index: 1000;
margin: 0px;
padding: 0px;
top:20px;
}
#syslangul li{
text-align: left;
height:20px;
line-height:20px;
cursor:pointer;
color:#646767;
padding-left: 9px;
}
#syslangul .selected{
color:#ffffff!important;
background: #4695c4!important;
}
.selectLanOver{
background: #ecf4f7;
color:#646767!important;
}
#background-image img{
height:100% !important;
width:100% !important;
}
</style>
<script type="text/javascript">
var qrCodeGetCount = 0 ;
jQuery(document).ready(function () {
var fflg = <%=focusflg %>;
$("label.overlabel").overlabel();
if(navigator.userAgent.toUpperCase().indexOf("MSIE 8.0")>0){
$(".w-all").css("background","");
$(".w-all").css("background-size","");
$("#background-image").show();
$("#background-image").fullscreenBackground();
}else{
$("#background-image").hide();
}
if (fflg == 0) {
$("input[name='loginid']").focus();
$(".overlabel[for='loginid']").css( { 'text-indent': '-10000px' });
$("input[name='loginid']").parents("td").css("background","url('/wui/theme/ecology8/page/images/login/inputOver_wev8.png') center center no-repeat")
} else if (fflg == 1) {
$("input[name='userpassword']").focus();
$(".overlabel[for='userpassword']").css( { 'text-indent': '-10000px' });
$("input[name='userpassword']").parents("td").css("background","url('/wui/theme/ecology8/page/images/login/inputOver_wev8.png') center center no-repeat")
} else if (fflg == 2) {
$("input[name='tokenAuthKey']").focus();
$(".overlabel[for='tokenAuthKey']").css( { 'text-indent': '-10000px' });
$("input[name='tokenAuthKey']").parents("td").css("background","url('/wui/theme/ecology8/page/images/login/inputOver_wev8.png') center center no-repeat")
}
jQuery(".input").bind("blur",function(){
$(this).parents("td").css("background","url('/wui/theme/ecology8/page/images/login/input_wev8.png') center center no-repeat")
})
jQuery(".input").bind("focus",function(){
$(this).parents("td").css("background","url('/wui/theme/ecology8/page/images/login/inputOver_wev8.png') center center no-repeat")
})
jQuery("#qrcode").hover(
function(){
$(this).attr("src","/wui/theme/ecology8/page/images/login/qrcodeOver_wev8.png")
},
function(){
$(this).attr("src","/wui/theme/ecology8/page/images/login/qrcode_wev8.png")
});
jQuery("#login").hover(
function(){
$(this).css("background","url(/wui/theme/ecology8/page/images/login/btnLoginOver_wev8.png)")
},
function(){
$(this).css("background","url(/wui/theme/ecology8/page/images/login/btn_login_wev8.png)")
});
jQuery("#backbtn").hover(
function(){
$(this).css("background","url(/wui/theme/ecology8/page/images/login/iconhot.png)")
},
function(){
$(this).css("background","url(/wui/theme/ecology8/page/images/login/iconnormal.png)")
});
var qccode = "" ;
jQuery("#qrcode").bind("click",function(){
// init image
$('#qrcodeImg').html('');
$.ajax({
url : "/login/LoginOperation.jsp?method=getQccode",
type : "get",
async:false,
dataType : "json",
success : function(d){
qccode=d['qccode'] ;
$('#qrcodeImg').qrcode({render : "div",
size:125,
background : "none",
fill : "#424345",
text : "ecologylogin:"+d['qccode']+",actionName:QR_LOGIN,randomNumber:"+d['random']+",bizSN:-1"
});
$("#normalLogin").hide();
$("#messageDivOld").hide();
$("#qrcodeDiv").hide();
$("#langDiv").removeClass("last").removeClass("p-r-30")
$("#qrcodeLogin").show();
qrCodeGetCount = 0 ;
},
error : function(){
// 128265,128220
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelNames("128265,128220",languageid)%>");
}
});
});
jQuery("#backbtn").bind("click",function(){
$("#normalLogin").show();
$("#messageDivOld").show();
$("#qrcodeDiv").show();
$("#langDiv").addClass("last").addClass("p-r-15")
$("#qrcodeLogin").hide();
})
// $('#qrcodeImg').qrcode({
// render : "div",
// text :
// size:125,
// background : "none",
// fill : "#424345"
// });
loginInterval = window.setInterval(function () {
getloginstatus(qccode);
}, 1000);
$("#selectLan").bind("click",function(event){
var left = jQuery(this).offset().left;
var top = jQuery(this).offset().top+20;
$("#syslangul").show();
$("#syslangul").css("left",left+"px");
$("#syslangul").css("top",top+"px");
$(this).addClass("selectLanOver");
event.stopPropagation();
});
$("#syslangul").find("li").hover(function(){
$("#syslangul").find(".selected").removeClass("selected");
$(this).addClass("selected");
},function(){
})
$("#syslangul").find("li").bind("click",function(){
var langlid = $(this).attr("lang");
setSyslangulChange(langlid)
$("#islanguid").val($(this).attr("lang"));
$("#selectLan").find(".text").text($(this).text());
$("#syslangul").hide();
$(this).addClass("selected");
$("#selectLan").removeClass("selectLanOver")
})
$(document).bind("click",function(){
$("#syslangul").hide();
$("#selectLan").removeClass("selectLanOver")
})
setSyslangulChange($("#islanguid").val())
});
var languageMap = {};
function setSyslangulChange(languageid){
jQuery.ajax({
url : "/wui/common/page/changeLanguageInfo.jsp",
type : "post",
processData : false,
data : "languageid="+languageid,
dataType : "html",
cache:false,
success: function (data){
$.each(JSON.parse(data),function(index,item){
if(item.key != ""){
if(item.id=="674"||item.id=="131938"){
jQuery("#"+item.key).val(item.value);
}else{
jQuery("#"+item.key).html(item.value);
}
}
languageMap[item.id] = item.value;
})
}
});
if("8"==languageid){
jQuery("#forgotpassword").css("left","0px");
}else{
jQuery("#forgotpassword").css("left","50px");
}
jQuery("#login").css("letter-spacing","2px");
}
function getloginstatus(key) {
var langid = $("#islanguid").val();
if(!$("#qrcodeLogin").is(":hidden")){
qrCodeGetCount ++;
if(qrCodeGetCount >= <%=showQRCodeSec%>){
$('#backbtn').click();
return;
}
jQuery.ajax({
url: "/mobile/plugin/login/QCLoginStatus.jsp?langid="+langid+"&loginkey=" + key + "&rdm=" + new Date().getTime(),
dataType: "text",
contentType : "charset=UTF-8",
error:function(ajaxrequest){},
success:function(content){
var flag = jQuery.trim(content) ;
if('-99' == flag){
$('#backbtn').click();
$('#errorMessage').html('<%=SystemEnv.getHtmlLabelName(385009,languageid) %>');
return ;
}
if (jQuery.trim(content) != '0' && jQuery.trim(content) != '9') {
//alert("Successful user login!");
if(jQuery.trim(content)==""){
content = "/wui/main.jsp";
}
window.clearInterval(loginInterval);
window.location.href = jQuery.trim(content);
}
}
});
}
}
// added by wcd 2015-01-07 动态密码过期 start
var vNumber = Number("<%=validitySec%>");
function pJob(){
if(document.all("errorMessage")){
if(languageMap[20289]){
document.all("errorMessage").innerHTML = languageMap[20289]+languageMap[81913]+(vNumber--)+languageMap[81914];
}
if(vNumber <= 0){
document.all("message").value = "";
document.all("errorMessage").innerHTML = languageMap[84255];
return;
}
setTimeout("pJob()",1000);
}
}
// added by wcd 2015-01-07 动态密码过期 end
function getUserUsbType(){
var loginid=jQuery("#loginid").val();
if(loginid!=""){
loginid=encodeURIComponent(loginid);
//根据填写的用户名检查是否启用动态口令
jQuery.post("/login/LoginOperation.jsp?method=checkTokenKey",{"loginid":loginid},function(data){
userUsbType=jQuery.trim(data);
if(userUsbType=="3"){
//$("#tokenAuthKey").remove();
$("#trTokenAuthKey").show();
//$("#tdTokenAuthKey").find("div").append('<input type="text" id="tokenAuthKey" name="tokenAuthKey" class="input">');
$("#for_tokenAuthKey").overlabel();
}else{
$("#trTokenAuthKey").hide();
//$("#tokenAuthKey").remove();
}
});
}
}
var userUsbType="0";
jQuery(document).ready(function(){
<%
if(weaver_login_type.equalsIgnoreCase("ADSSO")){
%>
clearAuthenticationCache();
<%
}
%>
$("#isie").val(isIE);
//需要usb验证,且采用的是动态口令
if("<%=needusb%>"=="1"){
jQuery("#loginid").bind("blur",function(){
getUserUsbType();
if(document.all("errorMessage")) document.all("errorMessage").innerHTML = "";
var _message = document.all("message");
if(_message && _message.value == "101"){
_message.value = "";
}
});
getUserUsbType();
}else{
jQuery("#loginid").bind("blur",function(){
if(document.all("errorMessage")) document.all("errorMessage").innerHTML = "";
var _message = document.all("message");
if(_message && _message.value == "101"){
_message.value = "";
}
});
}
jQuery.getScript('/wui/common/js/cacheck.js?t='+new Date().getTime(),function(){
var checkall_bak = checkall ;
window.checkall = function(){
SafeEngineCtlObj.submit() ;
}
SafeEngineCtlObj.ajaxCheck('loginid','form1','login','<%=settings.getNeedca() %>',checkall_bak);
})
if("<%=message0%>" == "101"){
$("input[name='userpassword']").focus();
pJob();
}
if($("input[name='loginid']").val() != ''){
$(".overlabel[for='loginid']").css( { 'text-indent': '-10000px' });
}
if ($("input[name='userpassword']").val() != '') {
$(".overlabel[for='userpassword']").css( { 'text-indent': '-10000px' });
}
})
//清除所有cookie函数
function clearAuthenticationCache() {
document.execCommand("ClearAuthenticationCache");
}
jQuery(window).bind("resize",function(){
jQuery(".overlabel-wrapper").css("position","relative");
})
</script>
<div id="background-image">
<img src="<%=backgroundUrl%>" alt="" />
</div>
</body>
</html>