OutterSysEdit.jsp 65 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
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>

<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.interfaces.outter.OutterUtil"%> 
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<link rel="stylesheet" href="/wui/theme/ecology8/weaveredittable/css/WeaverEditTable_wev8.css">
<script  src="/wui/theme/ecology8/weaveredittable/js/WeaverEditTable_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDrag_wev8.js"></script>
</head>
<%
if(!HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
 	response.sendRedirect("/notice/noright.jsp");
 	return;
}
%>
<%
OutterUtil ut=new OutterUtil();
String sysid = Util.null2String(request.getParameter("id"));
String backto = Util.null2String(request.getParameter("backto"));
String isDialog = Util.null2String(request.getParameter("isdialog"));
sysid = java.net.URLDecoder.decode(sysid,"UTF-8");  
//sysid = new String(sysid.getBytes("iso8859-1"),"GBK");
String tiptitle = SystemEnv.getHtmlLabelName(125496,user.getLanguage());//"选择MD5加密解密时,我们会使用标准的MD5加密,如果填写了加密密钥,将可以进行解密还原出明文;如果选择的是自定义加密算法,那么需要填写加密程序的路径以及方法,传递的参数将只有需要加密的需求本身,返回值必须是加密后的数据.";
rs.executeSql("select * from outter_sys where sysid='"+sysid+"'");
//out.println("select * from outter_sys where sysid='"+sysid+"'");

String name = "";
String iurl = "";
String ourl = "";
String requesttype = "";
String baseparam1="";
String urlparaencrypt1 = "";
String encryptcode1 = "";
String encryptiv1 = "";
String baseparam2="";
String urlparaencrypt2 = "";
String encryptcode2 = "";
String encryptiv2 = "";
String typename = "";
String accountcode = "";
String urlparaencrypt = "";
String encryptcode = "";
String encrypttype = "";
String encryptclass = "";
String encryptmethod = "";

 String urllinkimagid ="";
String urlencodeflag ="";
String autologinflag ="";
String encryptclassId ="";  //自定义加密id
String imagewidth ="";  //宽度
String imageheight =""; //高度
String encodeflag =""; //登录系统编码方式
String client_id = "";
String client_secret = "";

String email263_domain = "";
String email263_cid = "";
String email263_key = "";

// 单点登录地址
String entranceurl = "";
// 显示顺序
String showorder = "";
// 加密后的密文处理
String result = "";

int basetype1=0;
int basetype2=0;
if(rs.next()) {
	name = Util.toScreenToEdit(rs.getString("name"),user.getLanguage());
	iurl = Util.toScreenToEdit(rs.getString("iurl"),user.getLanguage());
    ourl = Util.toScreenToEdit(rs.getString("ourl"),user.getLanguage());
    requesttype = Util.toScreenToEdit(rs.getString("requesttype"),user.getLanguage());
	baseparam1 = Util.toScreenToEdit(rs.getString("baseparam1"),user.getLanguage());
	urlparaencrypt1 = Util.toScreenToEdit(rs.getString("urlparaencrypt1"),user.getLanguage());
	encryptcode1 = Util.toScreenToEdit(rs.getString("encryptcode1"),user.getLanguage());
	encryptiv1 = Util.toScreenToEdit(rs.getString("encryptiv1"),user.getLanguage());
	baseparam2 = Util.toScreenToEdit(rs.getString("baseparam2"),user.getLanguage());
	urlparaencrypt2 = Util.toScreenToEdit(rs.getString("urlparaencrypt2"),user.getLanguage());
	encryptcode2 = Util.toScreenToEdit(rs.getString("encryptcode2"),user.getLanguage());
	encryptiv2 = Util.toScreenToEdit(rs.getString("encryptiv2"),user.getLanguage());
	basetype1 = Util.getIntValue(rs.getString("basetype1"),0);
	basetype2 = Util.getIntValue(rs.getString("basetype2"),0);
	urlparaencrypt = Util.toScreenToEdit(rs.getString("urlparaencrypt"),user.getLanguage());
	encryptcode = Util.toScreenToEdit(rs.getString("encryptcode"),user.getLanguage());
	typename = Util.toScreenToEdit(rs.getString("typename"),user.getLanguage());
	accountcode = Util.toScreenToEdit(rs.getString("ncaccountcode"),user.getLanguage());
	encrypttype = Util.toScreenToEdit(rs.getString("encrypttype"),user.getLanguage());
	encryptclass = Util.toScreenToEdit(rs.getString("encryptclass"),user.getLanguage());
	encryptmethod = Util.toScreenToEdit(rs.getString("encryptmethod"),user.getLanguage());
	
	urllinkimagid = Util.toScreenToEdit(rs.getString("urllinkimagid"),user.getLanguage());
	urlencodeflag = Util.toScreenToEdit(rs.getString("urlencodeflag"),user.getLanguage());
	autologinflag = Util.toScreenToEdit(rs.getString("autologin"),user.getLanguage());
	encryptclassId = Util.toScreenToEdit(rs.getString("encryptclassId"),user.getLanguage());
	imagewidth = Util.toScreenToEdit(rs.getString("imagewidth"),user.getLanguage());
	imageheight = Util.toScreenToEdit(rs.getString("imageheight"),user.getLanguage());
	encodeflag = Util.toScreenToEdit(rs.getString("encodeflag"),user.getLanguage());
	client_id = Util.toScreenToEdit(rs.getString("client_id"),user.getLanguage());
	client_secret = Util.toScreenToEdit(rs.getString("client_secret"),user.getLanguage());
	
	email263_domain = Util.null2String(rs.getString("email263_domain"));
	email263_cid =  Util.null2String(rs.getString("email263_cid"));
	email263_key =  Util.null2String(rs.getString("email263_key"));
	
	entranceurl = Util.toScreenToEdit(rs.getString("entranceurl"),user.getLanguage());
	showorder = Util.toScreenToEdit(rs.getString("showorder"),user.getLanguage());
	result = Util.toScreenToEdit(rs.getString("result"),user.getLanguage());
}

if("".equals(encrypttype))
{
	encrypttype = "0";
}
if("".equals(imagewidth))
{
	imagewidth = "32";
}
if("".equals(imageheight))
{
	imageheight = "32";
}
String imagefilename = "/images/hdHRMCard_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(20961,user.getLanguage());
String needfav ="1";
String needhelp ="";
boolean canEdit = false;


//得到网段策略

String addipinf=SystemEnv.getHtmlLabelName(18890,user.getLanguage())+"["+SystemEnv.getHtmlLabelName(83726,user.getLanguage())+"]"+SystemEnv.getHtmlLabelName(125421,user.getLanguage())+".";
ArrayList ips=new ArrayList();

String sql="select id,inceptipaddress,endipaddress from HrmnetworkSegStr order by id ";
rs.executeSql(sql);
while(rs.next()){
	String inceptipaddress=Util.null2String(rs.getString("inceptipaddress"));
	String endipaddress=Util.null2String(rs.getString("endipaddress"));
	ips.add(inceptipaddress+"~"+endipaddress);
}


ArrayList outternetwork=new ArrayList();
sql="select id,inceptipaddress,endipaddress from outter_network where sysid='"+sysid+"' order by id ";
rs.executeSql(sql);
while(rs.next()){
	String inceptipaddress=Util.null2String(rs.getString("inceptipaddress"));
	String endipaddress=Util.null2String(rs.getString("endipaddress"));
	outternetwork.add(inceptipaddress+"~"+endipaddress);
}

Map mEncryptclass=ut.getEncryptclass();


//类型的标签ID
int typeLable = 0;
sql = "select * from outter_type where id = '" + typename + "' ";
rs.executeSql(sql);
if(rs.next()) {
	typeLable = Util.getIntValue(rs.getString("shownamelable"));
}

//是否需要密钥或向量
String isneedpwd = "0";
String isneediv = "0";
%>
<BODY>
<%if("1".equals(isDialog)){ %>
<div class="zDialog_div_content">
<script language=javascript >
var parentWin = parent.parent.getParentWindow(parent);
</script>
<%} %>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
if(HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
	canEdit = true;
RCMenu += "{"+SystemEnv.getHtmlLabelName(86,user.getLanguage())+",javascript:onSave(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
if(HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
RCMenu += "{"+SystemEnv.getHtmlLabelName(91,user.getLanguage())+",javascript:onDelete(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
if(HrmUserVarify.checkUserRight("SystemSetEdit:Edit", user)){
RCMenu += "{"+SystemEnv.getHtmlLabelName(25496,user.getLanguage())+",javascript:onTest(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}
%>	
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table id="topTitle" cellpadding="0" cellspacing="0">
	<tr>
		<td></td>
		<td class="rightSearchSpan" style="text-align:right; width:500px!important">
			<%
			if(HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
				canEdit = true;
			%>
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(86 ,user.getLanguage()) %>" class="e8_btn_top" onclick="onSave()"/>
			<%}
			if(HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
			%>
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(91 ,user.getLanguage()) %>" class="e8_btn_top" onclick="onDelete()"/>
			<% } 
			if(HrmUserVarify.checkUserRight("intergration:outtersyssetting", user)){
			%>
			<input type="button" value="<%=SystemEnv.getHtmlLabelName(25496 ,user.getLanguage()) %>" class="e8_btn_top" onclick="onTest()"/>
			<% } %>
			<span id="advancedSearch" class="advancedSearch" style='display:none;'><%=SystemEnv.getHtmlLabelName(21995 ,user.getLanguage()) %></span>&nbsp;&nbsp;
			<span title="<%=SystemEnv.getHtmlLabelName(23036 ,user.getLanguage()) %>" class="cornerMenu"></span>
		</td>
	</tr>
</table>
<div id="tabDiv" >
   <span style="font-size:14px;font-weight:bold;"><%=titlename%></span> 
</div>
<div class="cornerMenuDiv"></div>
<div class="advancedSearchDiv" id="advancedSearchDiv" style='display:none;'>
</div>
<FORM id=weaver name=frmMain action="OutterSysOperation.jsp?isdialog=1" method=post enctype="multipart/form-data" >
<wea:layout>
	<wea:group context='<%=SystemEnv.getHtmlLabelName(20961,user.getLanguage())%>' attributes="{'samePair':'BaseInfo','groupOperDisplay':'none'}">
		<wea:item><%=SystemEnv.getHtmlLabelName(63,user.getLanguage())%></wea:item>
		<wea:item>
			<%=SystemEnv.getHtmlLabelName(typeLable,user.getLanguage())%>
		</wea:item>
		<wea:item><%=SystemEnv.getHtmlLabelName(195,user.getLanguage())%></wea:item>
		<wea:item>
		<!-- QC293001 [80][90]集成登录-编辑集成登陆设置页面,解决不允许名称内填入特殊符号的问题          -->
			<%if(canEdit){%>
            <wea:required id="nameimage" required="true" value='<%=name%>'>
            	<input class=inputstyle type=text style='width:280px!important;' size=30 maxlength="30" name="name" id="name"  value="<%=name%>" onchange="isExist(this.value);checkinput('name','nameimage');" >
            </wea:required>
            <%}else{%><%=name%><%}%>
		</wea:item>
		
		
		<% if(!urllinkimagid.equals("0")&&!urllinkimagid.equals("") ) { %>
				<wea:item><%=SystemEnv.getHtmlLabelName(82627,user.getLanguage())%></wea:item>
		       	<wea:item>
		       		<BUTTON class=delbtn accessKey=D onClick="delpic()" type="button" title="<%=SystemEnv.getHtmlLabelName(82746,user.getLanguage())%>"></BUTTON>
		       		<span style="vertical-align: middle;"><%=SystemEnv.getHtmlLabelName(82746,user.getLanguage())%></span>
		       		<input class=inputstyle type=hidden name=oldurllinkimagid value="<%=urllinkimagid%>">
		       	</wea:item>
		<% } else { %>
				<wea:item><%=SystemEnv.getHtmlLabelName(82627,user.getLanguage())%></wea:item>
				<wea:item><input class=inputstyle type=file name=urllinkimagid id="urllinkimagid" value='<%=urllinkimagid%>' style="width: 280px" onchange="isimag(this);"><%=SystemEnv.getHtmlLabelName(82744,user.getLanguage())%> gif,png,jpg,jpeg,ico,bmp
				</wea:item>
				<wea:item><%=SystemEnv.getHtmlLabelName(125422,user.getLanguage())%></wea:item>
				<wea:item>
					<%=SystemEnv.getHtmlLabelName(33818,user.getLanguage())%>&nbsp;
					<input class=inputstyle type=text style='width:30px!important;' size=30 maxlength="30" name="imagewidth" value='<%=imagewidth%>'    onchange="vaidDataNum(this);checkinput('imagewidth','imagewidthSpan');" _noMultiLang=true>
					<span name="imagewidthSpan" id="imagewidthSpan">
					<img src="/images/BacoError_wev8.gif" align=absmiddle>
					</span>
					&nbsp;&nbsp;<%=SystemEnv.getHtmlLabelName(33819,user.getLanguage())%>&nbsp;
					<input class=inputstyle type=text style='width:30px!important;' size=30 maxlength="30" name="imageheight" value='<%=imageheight%>'  onchange="vaidDataNum(this);checkinput('imageheight','imageheightSpan');" _noMultiLang=true>
					<span name="imageheightSpan" id="imageheightSpan">
					<img src="/images/BacoError_wev8.gif" align=absmiddle>
					</span>
				</wea:item>
		<% } %>		
		<% if(!urllinkimagid.equals("0")&&urllinkimagid.length()>0) { %>
				<wea:item><%=SystemEnv.getHtmlLabelName(82747,user.getLanguage())%></wea:item>
  				<wea:item>
  				<img class="ContactsAvatar" style="right: 0;z-index: 999;width:32px;height:32px" border=0 id=urllinkimagid src="/weaver/weaver.file.FileDownload?fileid=<%=urllinkimagid%>">
  				</wea:item>
  				<wea:item><%=SystemEnv.getHtmlLabelName(125422,user.getLanguage())%></wea:item>
				<wea:item>
					<%=SystemEnv.getHtmlLabelName(33818,user.getLanguage())%>&nbsp;
					<input class=inputstyle type=text style='width:30px!important;' size=30 maxlength="30" name="imagewidth" value='<%=imagewidth%>'    onchange="vaidDataNum(this);checkinput('imagewidth','imagewidthSpan');" _noMultiLang=true>
					<span name="imagewidthSpan" id="imagewidthSpan">
					<img src="/images/BacoError_wev8.gif" align=absmiddle>
					</span>
					&nbsp;&nbsp;<%=SystemEnv.getHtmlLabelName(33819,user.getLanguage())%>&nbsp;
					<input class=inputstyle type=text style='width:30px!important;' size=30 maxlength="30" name="imageheight" value='<%=imageheight%>'  onchange="vaidDataNum(this);checkinput('imageheight','imageheightSpan');" _noMultiLang=true>
					<span name="imageheightSpan" id="imageheightSpan">
					<img src="/images/BacoError_wev8.gif" align=absmiddle>
					</span>
				</wea:item>
		<% } %>
		
		
		<%
			String qqemail_type = typename.equals("6")?"{'samePair':'qqemail_type','display':'none'}":"{'samePair':'qqemail_type','display':'true'}";
			String username_type = (typename.equals("6")||typename.equals("8"))?"{'samePair':'username_type','display':'none'}":"{'samePair':'username_type','display':'true'}";
			String password_type = (typename.equals("6")||typename.equals("7"))?"{'samePair':'password_type','display':'none'}":"{'samePair':'password_type','display':'true'}";
		%>
		<wea:item attributes="<%=qqemail_type %>"><%=SystemEnv.getHtmlLabelName(125423,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=qqemail_type %>">
		<input class='Inputstyle' type='checkbox' tzCheckbox="true" name="autologinflag" id="autologinflag" value='<%=autologinflag%>' onclick="changeautologinflag();" <%if(autologinflag.equals("1")) out.print("checked");%>>
		<span id="autologinspan" style="display:none">
		<select id="inneripselecct" style='width:260px!important;' name="inneripselecct"  >
		<%
		if(ips!=null&&ips.size()>0)
		{
			for(int i=0;i<ips.size();i++){
			%>
			 <option value="<%=ips.get(i)%>"><%=ips.get(i)%></option>
			<%
			}
		}
		%>
        
		</select> &nbsp;&nbsp;<a style="color:#00B2FC;" href="javascript:addtr();"><%=SystemEnv.getHtmlLabelName(83476,user.getLanguage())%></a>   &nbsp;&nbsp;<SPAN class="e8tips" style="CURSOR: hand"  title="<%=addipinf%>""><img src="/images/tooltip_wev8.png" align="absMiddle"/></SPAN>&nbsp;&nbsp;  <a style="color:#00B2FC;" href="javascript:setNetwork();" ><%=SystemEnv.getHtmlLabelName(83726,user.getLanguage())%></a>
		</span>
		</wea:item>
		<wea:item attributes="{'samePair':'networkview','display':'none'}">&nbsp;</wea:item>
		<wea:item attributes="{'samePair':'networkview','isTableList':'true','display':'none'}">
		<div style="width:100%;" >
			<table  cellSpacing="0" cellpadding="0" id="networktable"  width="100%">
				<colgroup>
					<col width="30%">
					<col width="10%">
					<col width="100%">
				</colgroup>
				<%
					if(outternetwork!=null&&outternetwork.size()>0)
					 {
						for(int i=0;i<outternetwork.size();i++){
				%>
				<tr class="field">
				<td class="field"><%=outternetwork.get(i)%></td>
				<td class="field"><a href="#" id="testa" onclick="deltr(this)"><%=SystemEnv.getHtmlLabelName(125426,user.getLanguage())%></a></td>
				<td class="field"><input type='hidden' name='outternetworks' id='outternetworks' value='<%=outternetwork.get(i)%>'></td>
				</tr>
				<%
					}
				}
				%>
			</table>
		</div>
		</wea:item>
		
		
		<wea:item attributes="<%=qqemail_type %>"><%=SystemEnv.getHtmlLabelName(20963,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=qqemail_type %>">
            <%if(canEdit){%>
            <wea:required id="iurlimage" required="true" value='<%=iurl%>'>
            	<input class=inputstyle type=text style='width:420px!important;' size=100 maxlength="200" name="iurl"  value="<%=iurl%>" onchange='checkinput("iurl","iurlimage")' _noMultiLang=true>
            </wea:required>
           <%}else{%><%=iurl%><%}%>
		</wea:item>
		<wea:item attributes="<%=qqemail_type %>"><%=SystemEnv.getHtmlLabelName(20964,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=qqemail_type %>">
            <%if(canEdit){%>
            <wea:required id="ourlimage" required="true" value='<%=ourl%>'>
            	<input class=inputstyle style='width:420px!important;' type=text size=100 maxlength="200" name="ourl"   value="<%=ourl%>" onchange='checkinput("ourl","ourlimage")' _noMultiLang=true>
            </wea:required>
           <%}else{%><%=ourl%><%}%>
		</wea:item>
		
		
		<%
			String urlencodeflag_encodeflag_encrypttype_samePair = (typename.equals("6")||typename.equals("7")||typename.equals("8"))?"{'samePair':'urlencodeflag_encodeflag_encrypttype_samePair','display':'none'}":"{'samePair':'urlencodeflag_encodeflag_encrypttype_samePair','display':''}";
		%>
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>"><%=SystemEnv.getHtmlLabelName(32343,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>">
			<select name="requesttype" style='width:120px!important;' onchange="onChangeRequestType(this.value)">
				<option value="POST" <%if("POST".equals(requesttype)) out.println("selected"); %>>POST</option>
				<option value="GET" <%if("GET".equals(requesttype)) out.println("selected"); %>>GET</option>
			</select>
			<span id="encodespan" <%if("POST".equals(requesttype)) out.println("style=display:none"); %>>
			<input type=radio name=urlencodeflag value=1 <%if(urlencodeflag.equals("1")){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(82628,user.getLanguage())%>
		    <input type=radio name=urlencodeflag value=0 <%if(urlencodeflag.equals("0")){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(82631,user.getLanguage())%>
			</span>
		</wea:item>
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>"><%=SystemEnv.getHtmlLabelName(127225,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>">
			<select style='width:120px!important;' name="encodeflag" >
			  <option value="0" <%if("0".equals(encodeflag)) out.println("selected"); %>>UTF-8</option>
			  <option value="1" <%if("1".equals(encodeflag)) out.println("selected"); %>>GBK</option>
			</select>
		</wea:item>
		
		
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>"><%=SystemEnv.getHtmlLabelName(32344,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=urlencodeflag_encodeflag_encrypttype_samePair %>">
			<select style='width:120px!important;' id="encrypttype" name="encrypttype" onchange="changeEncryptType(this.value);" title=""><!-- 系统加密算法 -->
          	  <option value="0" <%if("0".equals(encrypttype)) out.println("selected"); %>></option>
          	  <%
			    rs.executeSql("select id, encryptclass from outter_encryptclass_sys order by showorder ");
			    while(rs.next()) {
			    	String id = Util.null2String(rs.getString("id"));
			    	String sysEncryptClass = Util.null2String(rs.getString("encryptclass"));
			  %>
			  <option value="<%=id %>" <%if(encrypttype.equals(id)) out.println("selected"); %>><%=sysEncryptClass.substring(sysEncryptClass.lastIndexOf(".")+1) %></option>
			  <%    
				}
			  %>
			  <option value="2" <%if("2".equals(encrypttype)) out.println("selected"); %>><%=SystemEnv.getHtmlLabelName(32345,user.getLanguage())%></option><!-- 自定义加密算法 -->
			</select>
			<SPAN id="EncryptclassSpan"> 
			<select style='width:200px!important;' id="encryptclassId" name="encryptclassId" onchange="changeCustomEncrypt(this.value);" ><!-- 自定义加密算法  -->
          	  <% 
          	  if(mEncryptclass!=null&&mEncryptclass.size()>0){
          		  
          		mEncryptclass=ut.sortMapByKey(mEncryptclass);
          		for(Object obj : mEncryptclass.keySet()){
       			 String tid=obj.toString();
       			 if(tid==null||tid.equals("")){
       				 continue;
       			 }
       			 String  encryptclassname=mEncryptclass.get(tid)==null?"":(String)mEncryptclass.get(tid);
       			 %>
       			  <option value="<%=tid%>" <%if(tid.equals(encryptclassId)) out.println("selected"); %>><%=encryptclassname%></option>
       			 <% 
          	  }
          	  }
          	  %>
			</select> &nbsp;<a style="color:#00B2FC;" href="javascript:newencryptclass();"><%=SystemEnv.getHtmlLabelName(83981,user.getLanguage())%></a>
			</SPAN>
			<!--
			<SPAN class="e8tips" style="CURSOR: hand"  title="<%=tiptitle %>"><img src="/images/tooltip_wev8.png" align="absMiddle"/></SPAN>
			-->
			<select id="result" style='width:120px!important;' name="result">
				<option value="0" <%if("0".equals(result)) out.println("selected"); %>><%=SystemEnv.getHtmlLabelName(6056,user.getLanguage()) %></option>		<!-- 原值 -->
				<option value="-1" <%if("-1".equals(result)) out.println("selected"); %>><%=SystemEnv.getHtmlLabelName(129376,user.getLanguage()) %></option>	<!-- 加密后小写 -->
				<option value="1" <%if("1".equals(result)) out.println("selected"); %>><%=SystemEnv.getHtmlLabelName(129377,user.getLanguage()) %></option>		<!-- 加密后大写 -->
			</select>
		</wea:item>
		
		
		<wea:item attributes="{'samePair':'encrypt1'}"><%=SystemEnv.getHtmlLabelName(32345,user.getLanguage())%><!-- 加密算法,已不用 --></wea:item>
		<wea:item attributes="{'samePair':'encrypt1'}">
            <wea:required id="encryptclassimage" required="true" value='<%=encryptclass %>'>
            	<input class=inputstyle type=text style='width:280px!important;' size=30 maxlength="200" name="encryptclass" value='<%=encryptclass %>' onchange='checkinput("encryptclass","encryptclassimage")'>
            </wea:required>
		</wea:item>
		<wea:item attributes="{'samePair':'encrypt2'}"><%=SystemEnv.getHtmlLabelName(32346,user.getLanguage())%><!-- 加密方法,已不用 --></wea:item>
		<wea:item attributes="{'samePair':'encrypt2'}">
			<wea:required id="encryptmethodimage" required="true" value='<%=encryptmethod %>'>
				<input class=inputstyle type=text style='width:280px!important;' size=30 maxlength="200" name="encryptmethod" value='<%=encryptmethod %>' onchange='checkinput("encryptmethod","encryptmethodimage")'>
            </wea:required>
		</wea:item>
		
		
		<wea:item attributes="<%=username_type %>"><%=SystemEnv.getHtmlLabelName(20965,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=username_type %>">
			<%if(canEdit){%>
			<wea:required id="baseparam1image" required="true" value="<%=baseparam1%>">
				<input class='inputstyle' type='text' style='width:120px!important;' size='30' maxlength="30" name="baseparam1" id="baseparam1" value="<%=baseparam1%>" onchange='checkinput("baseparam1","baseparam1image")' _noMultiLang=true>
            </wea:required>
            <%}else{%><%=baseparam1%><%}%>
		    <input type=radio name=basetype1 value=1 <%if(basetype1==1){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(20974,user.getLanguage())%>
		    <input type=radio name=basetype1 value=0 <%if(basetype1==0){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(20976,user.getLanguage())%>
		    &nbsp;&nbsp;<span class="isencrypt"><%=SystemEnv.getHtmlLabelName(28640,user.getLanguage())%>&nbsp;<input class='Inputstyle' type='checkbox' tzCheckbox="true" name="urlparaencrypt1" <%if(urlparaencrypt1.equals("1")){%>checked<%}%> value='1' onclick="changeurlparaencrypt(this);">&nbsp;&nbsp;<span class="encryptcode"><span class="pwdSpan"><%=SystemEnv.getHtmlLabelName(32348,user.getLanguage())%>:&nbsp;<input class=inputstyle type=password style='width:80px!important;' maxLength=50 name="encryptcode1" value='<%=encryptcode1 %>' onblur="checkPwd(this)"></span>&nbsp;&nbsp;<span class="ivSpan"><%=SystemEnv.getHtmlLabelName(129315,user.getLanguage())%>:&nbsp;<input class=inputstyle style='width:80px!important;' type=password maxLength=50 name="encryptiv1" value='<%=encryptiv1 %>' onblur="checkIv(this)"></span>&nbsp;&nbsp;<SPAN class="e8tips" style="CURSOR: hand" id=remind1 title="<%=SystemEnv.getHtmlLabelName(129590,user.getLanguage())%>"><img src="/images/tooltip_wev8.png" align="absMiddle"/></SPAN></span></span>
		</wea:item>
		<wea:item attributes="<%=password_type %>"><%=SystemEnv.getHtmlLabelName(20966,user.getLanguage())%></wea:item>
		<wea:item attributes="<%=password_type %>">
			<%if(canEdit){%>
			<wea:required id="baseparam2image" required="true" value='<%=baseparam2%>'>
				<input class=inputstyle type=text style='width:120px!important;' size=30 maxlength="30" name="baseparam2"  id="baseparam2"  value="<%=baseparam2%>" onchange='checkinput("baseparam2","baseparam2image")' _noMultiLang=true>
            </wea:required><%}else{%><%=baseparam2%><%}%>
		    <input type=radio name=basetype2 value=1 <%if(basetype2==1){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(20975,user.getLanguage())%>
		    <input type=radio name=basetype2 value=0 <%if(basetype2==0){%>checked<%}%>><%=SystemEnv.getHtmlLabelName(20976,user.getLanguage())%>
		    &nbsp;&nbsp;<span class="isencrypt"><%=SystemEnv.getHtmlLabelName(28640,user.getLanguage())%>&nbsp;<input class='Inputstyle' type='checkbox' tzCheckbox="true" name="urlparaencrypt2" <%if(urlparaencrypt2.equals("1")){%>checked<%}%> value='1' onclick="changeurlparaencrypt(this);">&nbsp;&nbsp;<span class="encryptcode"><span class="pwdSpan"><%=SystemEnv.getHtmlLabelName(32348,user.getLanguage())%>:&nbsp;<input class=inputstyle type=password style='width:80px!important;' maxLength=50 name="encryptcode2" value='<%=encryptcode2 %>' onblur="checkPwd(this)"></span>&nbsp;&nbsp;<span class="ivSpan"><%=SystemEnv.getHtmlLabelName(129315,user.getLanguage())%>:&nbsp;<input class=inputstyle style='width:80px!important;' type=password maxLength=50 name="encryptiv2" value='<%=encryptiv2 %>' onblur="checkIv(this)"></span>&nbsp;&nbsp;<SPAN class="e8tips" style="CURSOR: hand" id=remind2 title="<%=SystemEnv.getHtmlLabelName(129590,user.getLanguage())%>"><img src="/images/tooltip_wev8.png" align="absMiddle"/></SPAN></span></span>
		</wea:item>
		
		
		<%
		if("1".equals(typename)||"5".equals(typename)){
	    %>
	    <wea:item><%=SystemEnv.getHtmlLabelName(24427,user.getLanguage())%></wea:item>
	    <wea:item>
			<%if(canEdit){%>
			 <wea:required id="accountcodeimage" required="true" value='<%=accountcode%>'>
			 	<input class=inputstyle type=text style='width:80px!important;' size=30 maxlength="30" name="accountcode"  value="<%=accountcode%>" onchange='checkinput("accountcode","accountcodeimage")' _noMultiLang=true>
			 </wea:required>
            <%}else{%><%=accountcode%><%}%>
	    </wea:item>
		<%}%>
		
		
		<%
		String client_type = !typename.equals("6")?"{'samePair':'client_type','display':'none'}":"{'samePair':'client_type','display':'true'}";
		%>
	    <wea:item attributes='<%=client_type%>'><%=SystemEnv.getHtmlLabelName(129950,user.getLanguage())+"(corpid)"%></wea:item>
		<wea:item attributes='<%=client_type%>'>
            <wea:required id="client_idimage" required="true" value="<%=client_id%>">
            	<input class=inputstyle type=text style='width:280px!important;' size=100 maxlength="200" name="client_id"  value="<%=client_id%>" onchange='checkinput("client_id","client_idimage")' _noMultiLang=true>
            </wea:required>
		</wea:item>
		<wea:item attributes='<%=client_type%>'><%=SystemEnv.getHtmlLabelName(129951,user.getLanguage())+"(corpsecret)"%></wea:item>
		<wea:item attributes='<%=client_type%>'>
            <wea:required id="client_secretimage" required="true" value="<%=client_secret%>">
            	<input class=inputstyle type=text style='width:280px!important;' size=100 maxlength="200" name="client_secret"   value="<%=client_secret%>" onchange='checkinput("client_secret","client_secretimage")' _noMultiLang=true>
            </wea:required>
		</wea:item>
		
		
		<%
		String email263_type = !typename.equals("7")?"{'samePair':'email263_type','display':'none'}":"{'samePair':'email263_type','display':''}";
		%>
	    <wea:item attributes='<%=email263_type%>'><%=SystemEnv.getHtmlLabelName(128624,user.getLanguage())%></wea:item>
		<wea:item attributes='<%=email263_type%>'>
            <wea:required id="email263_domainimage" required="true" value="<%=email263_domain%>">
            	<input class='inputstyle' type='text' style='width:280px!important;' size='100' maxlength="200" name="email263_domain"  value="<%=email263_domain%>"  onchange='checkinput("email263_domain","email263_domainimage")' _noMultiLang='true'>
            </wea:required>
		</wea:item>
		 <wea:item attributes='<%=email263_type%>'><%=SystemEnv.getHtmlLabelName(128625,user.getLanguage())%></wea:item>
		<wea:item attributes='<%=email263_type%>'>
            <wea:required id="email263_cidimage" required="true" value="<%=email263_cid%>">
            	<input class='inputstyle' type='text' style='width:280px!important;' size='100' maxlength="200" name="email263_cid"  value="<%=email263_cid%>"  onchange='checkinput("email263_cid","email263_cidimage")' _noMultiLang='true'>
            </wea:required>
		</wea:item>
		 <wea:item attributes='<%=email263_type%>'><%=SystemEnv.getHtmlLabelName(128626,user.getLanguage())%></wea:item>
		<wea:item attributes='<%=email263_type%>'>
            <wea:required id="email263_keyimage" required="true" value="<%=email263_key%>">
            	<input class='inputstyle' type='password' style='width:280px!important;' size='100' maxlength="200" name="email263_key"  value="<%=email263_key%>"  onchange='checkinput("email263_key","email263_keyimage")' _noMultiLang='true'>
            </wea:required>
		</wea:item>
		
		
		<wea:item><%=SystemEnv.getHtmlLabelName(129236,user.getLanguage())%></wea:item>
		<wea:item>
		<%if("0".equals(typename)) {%>
            <wea:required id="entranceurlimage" required="true" value="<%=entranceurl %>">
            	<input class='inputstyle' type='text' style='width:420px!important;' size='100' maxlength="200" id="entranceurl" name="entranceurl"  value="<%=entranceurl %>" onchange='checkinput("entranceurl","entranceurlimage")' _noMultiLang='true'>
            </wea:required>
		<%} else {%>
			<input class='inputstyle' type='text' style='width:420px!important;' size='100' maxlength="200" id="entranceurl" name="entranceurl"  value="<%=entranceurl %>" readOnly="true" _noMultiLang='true'>
		<%}%>
		</wea:item>
		
		<wea:item><%=SystemEnv.getHtmlLabelName(15513,user.getLanguage())%></wea:item>
		<wea:item>
			<input class="InputStyle" type="text" style="width:120px!important;ime-mode:disabled" size='10' maxlength="10" id="showorder" name="showorder" value="<%=showorder %>" _noMultiLang='true' 
				onpaste="return false" onkeyup="this.value=this.value.replace(/[^-\d]/g,'');" onblur="checkNumber(this.value)">
		</wea:item>
	</wea:group>
	
	<%
		if(!"6".equals(typename)&&!"7".equals(typename)&&!"8".equals(typename)){
	%>
	<wea:group context='<%=SystemEnv.getHtmlLabelName(20967,user.getLanguage())%>' attributes="{'samePair':'SetInfo','groupOperDisplay':'none','itemAreaDisplay':'block'}">
		<wea:item type="groupHead">
		  <div style='float:right;'>
			<input id='addbutton' type="button" title="<%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%>(ALT+A)" onClick="addRow()" ACCESSKEY="A" class="addbtn"/>
			<input type="button" title="<%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%>(ALT+G)" onClick="removeRow()" ACCESSKEY="G" class="delbtn"/>
		  </div>
	    </wea:item>
		<wea:item attributes="{'colspan':'2','isTableList':'true'}">
			<div id="outtersetting">
			</div>
		</wea:item>
	</wea:group>
	<%} %>
</wea:layout>
<br>
<input class=inputstyle type=hidden name=operation>
<input class=inputstyle type=hidden name=sysid value="<%=sysid%>">
<input class=inputstyle type=hidden name=typename value="<%=typename%>">
<input class=inputstyle type=hidden name=backto value="<%=backto%>">
<input class=inputstyle type=hidden id=isneedpwd name=isneedpwd >
<input class=inputstyle type=hidden id=isneediv name=isneediv >
<input class=inputstyle type=hidden id=checkPwdFlag value='1'>
<input class=inputstyle type=hidden id=checkIVFlag value='1'>

<%if("1".equals(isDialog)){ %>
<input type="hidden" name="isdialog" value="<%=isDialog%>">
<%} %>
</form>
<script language=javascript>
//293001 [80][90]集成登录-编辑集成登陆设置页面,解决不允许名称内填入特殊符号的问题  ----START
function isSpecialChar(str){
	var reg = /[\+=\`~!@#$%^&\*\(\)\[\]{};:'",.<>\/\?\\|]/;
	return reg.test(str);
}

function isExist(newvalue){
	newvalue = $.trim(newvalue);
	document.getElementById("name").value = newvalue;

	if(isSpecialChar(newvalue)){
		top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(131334,user.getLanguage())%>");
		document.getElementById("name").value = "";
		
	}
}
//293001 [80][90]集成登录-编辑集成登陆设置页面,解决不允许名称内填入特殊符号的问题  ----END

function onSave() {
	var checkvalue = "";
	var typenametmp = "<%=typename%>";
	
	if(typenametmp == 0) {
		checkvalue = "sysid,name,iurl,ourl,entranceurl";
	} else if(typenametmp == 1 || typenametmp == 5) {
		checkvalue = "sysid,name,iurl,ourl,accountcode";
	} else if(typenametmp == 6) {
		checkvalue = "sysid,name,client_id,client_secret";
	} else if(typenametmp == 7) {
		checkvalue = "sysid,name,iurl,ourl,email263_domain,email263_cid,email263_key";
	} else {
		checkvalue = "sysid,name,iurl,ourl";
	}
	checkvalue += ",imagewidth,imageheight";
	var encrypttype = document.getElementById("encrypttype").value;
	
	checkPwdAndIv();
    if(check_form(frmMain,checkvalue) && ($("#checkPwdFlag").val() == "1") && ($("#checkIVFlag").val() == "1")) {
    	document.frmMain.operation.value="edit";
		/*QC340720 [80][90][建议]集成登录-参数名做必填项处理,输入框后添加必填感叹号start*/
        if(check_form(frmMain,"paramnames")){
            /*QC339532 [80][90][优化]集成登录-优化集成登录其它参数配置参数名不能重复start*/
			var param = new Array();
			var isSame = false;
			$("input[name='paramnames']").each(function(i){//将参数名存入数组
				param[i] = $.trim($(this).val());
			});
			$.each(param,function(i,vi){
				$.each(param,function(j,vj){
					if(i != j && vi == vj){
						isSame = true;
					}
				});
				if(isSame){
					return false;
				}
			});
			if(isSame){
				top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(132214,user.getLanguage())%>");
				return false;
			}
			/*QC339532 [80][90][优化]集成登录-优化集成登录其它参数配置参数名不能重复end*/
			document.frmMain.submit();
        }
        /*QC340720 [80][90][建议]集成登录-参数名做必填项处理,输入框后添加必填感叹号end*/
    }
}

function doAdd()
{
	document.location.href="/interface/outter/OutterSysAdd.jsp?typename=<%=backto%>";
}

function doBack()
{
	document.location.href="/interface/outter/OutterSys.jsp?typename=<%=backto%>";
}

function onDelete() {
	top.Dialog.confirm("<%=SystemEnv.getHtmlNoteName(7,user.getLanguage())%>", function (){
		document.frmMain.operation.value="delete";
		document.frmMain.submit();
	}, function () {}, 320, 90);
}

function changeCustomEncrypt(val) {
	<%
	rs.executeSql("select id, isneedpwd, isneediv from outter_encryptclass order by id ");
    while(rs.next()) {
    	String id = Util.null2String(rs.getString("id"));
    	isneedpwd = Util.null2String(rs.getString("isneedpwd"));
    	isneedpwd = "".equals(isneedpwd) ? "0" : isneedpwd;
    	isneediv = Util.null2String(rs.getString("isneediv"));
    	isneediv = "".equals(isneediv) ? "0" : isneediv;
	%>
	if(val == <%=id %>) {
		$("#isneedpwd").val("<%=isneedpwd %>");
		$("#isneediv").val("<%=isneediv %>");
	}
	<%
	}
	%>
	
	onInitTypeChange();
	
	isNeedPwdAndIv();
}

function isNeedPwdAndIv() {
	$("#remind1").hide();
	$("#remind2").hide();
	if($("#isneedpwd").val() == "0") {
		$(".pwdSpan").hide();
	} else {
		$(".pwdSpan").show();
		$("#remind1").show();
		$("#remind2").show();
	}
	if($("#isneediv").val() == "0") {
		$(".ivSpan").hide();
	} else {
		$(".ivSpan").show();
		$("#remind1").show();
		$("#remind2").show();
	}
}

function changeEncryptType(val) {
	if(val == "") {
		val = "0";
	}
	
	if(val == "0") {// 不加密
		$("#isneedpwd").val("0");
		$("#isneediv").val("0");
		
	  	$("#EncryptclassSpan").hide();
		
		hideEle("encrypt1");
		hideEle("encrypt2");
		$(".encryptcode").hide();
		$(".encryptcode_head").hide();
		$(".encryptiv_head").hide();
		
		$(".isencrypt").hide();
		$(".maybelast").attr("colspan","4");
	}
	else if(val == "2") {// 自定义
		changeCustomEncrypt($("#encryptclassId").val());
		
	    $("#EncryptclassSpan").show();
	    
		hideEle("encrypt1");
		hideEle("encrypt2");
		$(".encryptcode").hide();
		$(".encryptcode_head").hide();
		$(".encryptiv_head").hide();
		
		$(".isencrypt").show();
		$(".maybelast").attr("colspan","3");
		iniIsEncrypt();
	}
	else {
		<%
		rs.executeSql("select id, isneedpwd, isneediv from outter_encryptclass_sys order by showorder ");
	    while(rs.next()) {
	    	String id = Util.null2String(rs.getString("id"));
	    	isneedpwd = Util.null2String(rs.getString("isneedpwd"));
	    	isneediv = Util.null2String(rs.getString("isneediv"));
		%>
		if(val == <%=id %>) {
			$("#isneedpwd").val("<%=isneedpwd %>");
			$("#isneediv").val("<%=isneediv %>");
		}
		<%
		}
		%>
		
	   	$("#EncryptclassSpan").hide();
	  	
		hideEle("encrypt1");
		hideEle("encrypt2");
		$(".encryptcode").hide();
		$(".encryptcode_head").hide();
		$(".encryptiv_head").hide();
		
		$(".isencrypt").show();
		$(".maybelast").attr("colspan","3");
		iniIsEncrypt();
	}
	
	onInitTypeChange();
	
	// 根据加密算法是否需要密钥和向量,显示密钥和向量输入框
	isNeedPwdAndIv();
}

function onChangeTypeFun(obj){
	if(obj == "1") {
		
	} else {
	    document.all("baseparam1").readOnly = false;
		document.all("baseparam2").readOnly = false;
		document.getElementById("baseparam1image").style.display = "none";
		document.getElementById("baseparam2image").style.display = "none";
	}
}

function onTypeChange(obj,isinit) {
	if(obj.value == 0 || obj.value == 5) {
		obj.nextSibling.nextSibling.style.display='none';
		obj.nextSibling.nextSibling.nextSibling.style.display='inline-block';
		$(obj.nextSibling.nextSibling.nextSibling).find("input[type=text]").eq(0).attr("readonly","");
		if(obj.value == 5) {
			$(obj.nextSibling.nextSibling.nextSibling).find("*[class=e8tips]").eq(0).show();
			$(obj).closest("tr").find("*[class=isencrypt]").eq(0).hide();
			$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).hide();
			$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).hide();
	    	var flag = false;
			var paramtypes = $(obj).closest("tbody").find("input[type=password]");
		    jQuery.each(paramtypes, function(i, n){
				var obj = n;
		     	if($(obj).is(":visible")) {
					flag = true;
			     	return;
		     	}
		   	});
		  	if(!flag) {
		  		$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
		  		$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
		  		var encrypttype = jQuery("#encrypttype").val();
		  		if(encrypttype == 0) {
		  			$(".maybelast").attr("colspan","4");
		  		} else {
		  			$(".maybelast").attr("colspan","3");
		  		}
		  	}
			
		} else {
			$(obj.nextSibling.nextSibling.nextSibling).find("*[class=e8tips]").eq(0).hide();
			if($("#encrypttype").val() != "0") {
				$(obj).closest("tr").find("*[class=isencrypt]").eq(0).show();
				if($(obj).closest("tr").find("*[class=isencrypt]").eq(0).find("input[type=hidden]").eq(0).val() == 1) {
					var num = "3";
					if($("#isneedpwd").val() == "1") {
						$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).show();
						$(obj).closest("table").find(".encryptcode_head").eq(0).show();
						num = "2";
					} else {
						$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).hide();
						$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
					}
					if($("#isneediv").val() == "1") {
						$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).show();
						$(obj).closest("table").find(".encryptiv_head").eq(0).show();
						num = "1";
					} else {
						$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).hide();
						$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
					}
					$(".maybelast").attr("colspan",num);
				}
			}
		}
	}
	else if(obj.value == 4) {
		obj.nextSibling.nextSibling.style.display='inline-block';
		obj.nextSibling.nextSibling.nextSibling.style.display='inline-block';
		
		if(isinit == null || isinit != "isinit") {
			$(obj.nextSibling.nextSibling.nextSibling).find("input[type=text]").eq(0).val("");
		}
		$(obj.nextSibling.nextSibling.nextSibling).find("input[type=text]").eq(0).attr("readonly","readonly");
		$(obj.nextSibling.nextSibling.nextSibling).find("*[class=e8tips]").eq(0).hide();
		if($("#encrypttype").val() != "0") {
			$(obj).closest("tr").find("*[class=isencrypt]").eq(0).show();
			if($(obj).closest("tr").find("*[class=isencrypt]").eq(0).find("input[type=hidden]").eq(0).val() == 1) {
				var num = "3";
				if($("#isneedpwd").val() == "1") {
					$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).show();
					$(obj).closest("table").find(".encryptcode_head").eq(0).show();
					num = "2";
				} else {
					$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).hide();
					$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
				}
				if($("#isneediv").val() == "1") {
					$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).show();
					$(obj).closest("table").find(".encryptiv_head").eq(0).show();
					num = "1";
				} else {
					$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).hide();
					$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
				}
				$(".maybelast").attr("colspan",num);
			}
		}
	}
    else {
		obj.nextSibling.nextSibling.style.display='none';
		obj.nextSibling.nextSibling.nextSibling.style.display='none';
		if($("#encrypttype").val() != "0") {
			$(obj).closest("tr").find("*[class=isencrypt]").eq(0).show();
			if($(obj).closest("tr").find("*[class=isencrypt]").eq(0).find("input[type=hidden]").eq(0).val() == 1) {
				var num = "3";
				if($("#isneedpwd").val() == "1") {
					$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).show();
					$(obj).closest("table").find(".encryptcode_head").eq(0).show();
					num = "2";
				} else {
					$(obj).closest("tr").find("*[class=encryptcode_head]").eq(0).hide();
					$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
				}
				if($("#isneediv").val() == "1") {
					$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).show();
					$(obj).closest("table").find(".encryptiv_head").eq(0).show();
					num = "1";
				} else {
					$(obj).closest("tr").find("*[class=encryptiv_head]").eq(0).hide();
					$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
				}
				$(".maybelast").attr("colspan",num);
			}
		}
	}
}

function onInitTypeChange(){
	var paramtypes = jQuery("select[name='paramtypes']");
    jQuery.each(paramtypes, function(i, n){
		var obj = n;
      	//alert( "Item #" + i + ": " + n +" obj.value : "+obj.outerHTML);
		onTypeChange(obj,"isinit");
	});
}

function changeParamValue(obj)
{
	if(obj.checked) {
		obj.nextSibling.nextSibling.value='1';
	} else {
		obj.nextSibling.nextSibling.value='0';
	}
	//alert(obj.nextSibling.outerHTML);
}

<%
   	
	StringBuffer ajaxdata = new StringBuffer();
	rs.executeSql("SELECT * FROM outter_sysparam where sysid='"+sysid+"' order by indexid");
	//System.out.println("SELECT * FROM outter_sysparam where sysid='"+sysid+"' order by indexid");
	while (rs.next()) 
	{
		// System.out.println("============"+ut.ProcessCharacter(rs.getString("paramvalue")));
        int paramtype = Util.getIntValue(rs.getString("paramtype"),0);
        String paraencrypts = Util.null2String(rs.getString("paraencrypt"));
        String encryptcodes = Util.null2String(rs.getString("encryptcode"));
        String encryptivs = Util.null2String(rs.getString("encryptiv"));
        String checked = "false";
        if(paraencrypts.equals("1")) {
        	checked = "true";
        }
       	
		ajaxdata.append("[");
        ajaxdata.append("{name:'paramid',value:'',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'paramids',value:'',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'paramnames',value:'"+rs.getString("paramname")+"',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'labelnames',value:'"+rs.getString("labelname") +"',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'paramtypes',value:'"+paramtype+"',iseditable:true,type:'select'},");
        ajaxdata.append("{name:'paramvalues',value:'"+ut.ProcessCharacter(rs.getString("paramvalue")) +"',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'tempparaencrypts',value:'"+paraencrypts +"',iseditable:true,checked:"+checked+",type:'checkbox'},");
        ajaxdata.append("{name:'paraencrypts',value:'"+paraencrypts +"',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'encryptcodes',value:'"+ encryptcodes +"',iseditable:true,type:'input'},");
        ajaxdata.append("{name:'encryptivs',value:'"+ encryptivs +"',iseditable:true,type:'input'}");
        ajaxdata.append("],");
	}
	String tempajaxdata = ajaxdata.toString();
	if(!"".equals(tempajaxdata))
	{
		tempajaxdata = tempajaxdata.substring(0,(tempajaxdata.length()-1));
	}
	tempajaxdata = "["+tempajaxdata+"]";
	
%>

var maybelast="<select name=paramtypes onchange='onTypeChange(this)' style='width:82px;'>"+
               "<option value=0><%=SystemEnv.getHtmlLabelName(453,user.getLanguage())%></option>"+
               "<option value=1><%=SystemEnv.getHtmlLabelName(20976,user.getLanguage())%></option>"+
               "<option value=2><%=SystemEnv.getHtmlLabelName(141,user.getLanguage())%></option>"+
               "<option value=3><%=SystemEnv.getHtmlLabelName(18939,user.getLanguage())%></option>"+
               "<option value=4><%=SystemEnv.getHtmlLabelName(15636,user.getLanguage())%></option>"+
               "<option value=5><%=SystemEnv.getHtmlLabelName(125424,user.getLanguage())%></option>"+
               "</select>"+
               "<span style='display:none;'>"+
               "  &nbsp;&nbsp;<a style='color:#00B2FC;' href='#' onclick='setexpression(this);'><%=SystemEnv.getHtmlLabelName(125420,user.getLanguage())%></a>&nbsp;&nbsp; "+
               "</span>"+
               "<span style='display:inline-block;width:160px;'>"+
               "<INPUT class='Inputstyle'   style='width:80%!important;' type='text' name='paramvalues'  value='' _noMultiLang=true>"+
               "<SPAN class='e8tips' style='CURSOR: hand;display:none;'  title='<%=SystemEnv.getHtmlLabelName(129313,user.getLanguage())%>'><img src='/images/tooltip_wev8.png' align='absMiddle'/></SPAN>"+
               "</span>";

var items=[
    {width:"12%",colname:"<%=SystemEnv.getHtmlLabelName(20968,user.getLanguage())%>",itemhtml:"<INPUT class='Inputstyle' type='text' style='width:80%;' name='paramnames'  value='' _noMultiLang=true onchange='checkparamnames(this)' onblur='checkParamnamesRepet(this);'><span class='mustinput'></span>"},
    {width:"12%",colname:"<%=SystemEnv.getHtmlLabelName(176,user.getLanguage())%>",itemhtml:"<INPUT class='Inputstyle' type='text' style='width:80%;' name='labelnames'  value='' _noMultiLang=true>"},
    {width:"37%",tdclass:"maybelast",colname:"<%=SystemEnv.getHtmlLabelName(20969,user.getLanguage())%>",itemhtml:maybelast},
    {width:"8%",tdclass:"isencrypt",colname:"<%=SystemEnv.getHtmlLabelName(28640,user.getLanguage())%>",itemhtml:"<INPUT class='Inputstyle' type='checkbox' tzCheckbox='true' name='tempparaencrypts' value=0 onclick='changeParamValue(this); changeurlparaencrypt1(this);'><INPUT type='hidden' name='paraencrypts' value='0'>"},
    {width:"12%",tdclass:"encryptcode_head",colname:"<%=SystemEnv.getHtmlLabelName(32348,user.getLanguage())%>",itemhtml:"<INPUT class='Inputstyle' type='password' style='width:80%;' maxLength=50 name='encryptcodes' value='' onblur='checkPwd(this)'>"},
    {width:"18%",tdclass:"encryptiv_head",colname:"<%=SystemEnv.getHtmlLabelName(129315,user.getLanguage())%>",itemhtml:"<INPUT class='Inputstyle' type='password' style='width:80%;' maxLength=50 name='encryptivs' value='' onblur='checkIv(this)'>"}];

var option= {
   navcolor:"#003399",
   basictitle:"",
   toolbarshow:false,
   optionHeadDisplay:"none",
   colItems:items,
   addrowtitle:"<%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%>",
   deleterowstitle:"<%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%>",
   usesimpledata:true,
   openindex:false,
   addrowCallBack:function() {
      changeEncryptType(jQuery("#encrypttype").val());
   },
   configCheckBox:true,
   checkBoxItem:{"itemhtml":"<INPUT class='groupselectbox' type='checkbox' name='paramid'><INPUT type='hidden' name='paramids' value='-1'>",width:"5%"},
   initdatas:eval("<%=tempajaxdata%>")
};

var group=null;
jQuery(document).ready(function(){
	group=new WeaverEditTable(option);
    jQuery("#outtersetting").append(group.getContainer());
    var params=group.getTableSeriaData();
    reshowCheckBox();
    changeEncryptType(jQuery("#encrypttype").val());
    onChangeTypeFun('<%=typename%>');
    onInitTypeChange();
    jQuery(".optionhead").hide();
    jQuery(".tablecontainer").css("padding-left","0px");
    changeautologinflag();
    //hideEle("encrypt1");
	//hideEle("encrypt2");
	checkinput('imagewidth','imagewidthSpan');
	checkinput('imageheight','imageheightSpan');
    iniIsEncrypt();
    setReadOnly();
    jQuery(".e8tips").wTooltip({html:true});
});

function iniIsEncrypt()
{
	changeurlparaencrypt($("input[name=urlparaencrypt1]"));
	changeurlparaencrypt($("input[name=urlparaencrypt2]"));
	var paramtypes=$("input[name=tempparaencrypts]");
    jQuery.each(paramtypes, function(i, n){
		var obj = n;
      	//jQuery(obj).trigger("rbeauty");
      	//jQuery($(obj)).trigger("checked",true);
      	changeurlparaencrypt1(obj);
	});
}

function addRow()
{
	if(null!=group)
	{
		group.addRow(null);
		jQuery(".e8tips").wTooltip({html:true});
	}
}

function removeRow()
{
	var count = 0;//删除数据选中个数
	jQuery("#outtersetting input[name='paramid']").each(function(){
		if($(this).is(':checked')){
			count++;
		}
	});
	//alert(v+":"+count);
	if(count==0){
		top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(22686,user.getLanguage()) %>");
	}else{
		  if(null!=group)
		{
			group.deleteRows();
		}
	}
}

function onBack()
{
	parentWin.closeDialog();
}

function delpic() {
	if(confirm("<%=SystemEnv.getHtmlLabelName(82748,user.getLanguage())%>?")){
		document.frmMain.operation.value = "delpic";
		document.frmMain.submit();
	}
}

function onChangeRequestType(obj){
	if(obj == "GET") {  //get
	  jQuery("#encodespan").show();
    } else { 
	  jQuery("#encodespan").hide();
	 
	}
	//alert($("#urlencodeflag").val());
}

function isimag(obj){
	
	var file = obj.value.match(/[^\/\\]+$/gi)[0]; 
	var rx = new RegExp('\\.(gif)$','gi');
 	var rx1 = new RegExp('\\.(png)$','gi');
  	var rx2 = new RegExp('\\.(jpg)$','gi');
	var rx3 = new RegExp('\\.(jpeg)$','gi');
 	var rx4 = new RegExp('\\.(ico)$','gi');
   	var rx5 = new RegExp('\\.(bmp)$','gi');
	if(file&&!file.match(rx)&&!file.match(rx1)&&!file.match(rx2)&&!file.match(rx3)&&!file.match(rx4)&&!file.match(rx5)) {
 		window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(82744,user.getLanguage())%> gif,png,jpg,jpeg,ico,bmp !");
  		//alert("选择的文件不是图片文件,请选择图片文件!");       //重新构建input file       
		
		var file=document.getElementById("urllinkimagid");
		file.outerHTML=file.outerHTML;
		
	}
}

function addtr() {
if($("#networktable").find("tr").length == 0) {
	showEle("networkview");
}
var val = $("#inneripselecct").val();
var temp = $("#networktable tr").find("td:eq(0)");
if(val == temp1) {
	top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(126052,user.getLanguage())%>!");
	return ;
}
if(temp != null && temp.length > 0) {
	for(var i = 0; i < temp.length; i++) {
		var temp1 = $(temp[i]).html();
		if(val == temp1) {
			top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(125425,user.getLanguage())%>!");
			return ;
		}
	}
}

str = "<tr><td class='field'>"+val+"</td><td class='field'><a href='#' id='testa' onclick='deltr(this)'><%=SystemEnv.getHtmlLabelName(125426,user.getLanguage())%></a></td><td class='field'><input type='hidden' name='outternetworks' id='outternetworks' value='"+val+"'></td></tr>";
$('#networktable').append(str);

}

//删除对应的行
function deltr(obj) {
	$(obj).parent().parent().remove();
	//$("#testa").closest("tr").eq(0).remove();
	
	if($("#networktable").find("tr").length == 0) {
	 	hideEle("networkview");
	}
}

function changeautologinflag() {
	var checked = $("#autologinflag").attr("checked");
	
	if(!checked) {
		$("#autologinflag").val("0");
		$("#autologinspan").hide();
		hideEle("networkview");
	} else {
		$("#autologinflag").val("1");
		$("#autologinspan").show();
		if($("#networktable").find("tr").length == 0) {
	 		hideEle("networkview");
		} else {
			showEle("networkview");
		}
	}
}

function setexpression(obj) {
    var url="/interface/outter/outter_expressiontab.jsp?";
    var paramnames = jQuery("input[name='paramnames']");
    var names="";
    var expression=$(obj).closest("td").find("input[type=text]").eq(0).val();
    var temp=$(obj).closest("tr").find("input[type=text]").eq(0).val();
    
    names+=$("#baseparam1").val()+",";
    names+=$("#baseparam2").val()+",";
	jQuery.each(paramnames, function(i, n){
		var obj = n;
     	if(temp!=obj.value){
      		names+=obj.value+",";
      	}
     	//alert( "Item #" + i + ": " + n +" obj.value : "+obj.value);
	});
	
  	var encodev="expression="+encodeURIComponent(encodeURIComponent(expression))+"&names="+encodeURIComponent(encodeURIComponent(names));
  	url+=encodev;
  	var title = "<%=SystemEnv.getHtmlLabelNames("68,15636",user.getLanguage())%>";
  	openDialog1(url,title,obj);
}

function changeurlparaencrypt(obj) {
	var ch = $(obj).attr("checked");
	var encrypttype = jQuery("#encrypttype").val();
	if(encrypttype != 0) {
		if(ch) {
			$(obj).closest("tr").find(".encryptcode").eq(0).show();
		} else {
			$(obj).closest("tr").find(".encryptcode").eq(0).hide();
		}
	}
}

function changeurlparaencrypt1(obj) {
	var ch = $(obj).attr("checked");
	var encrypttype = jQuery("#encrypttype").val();
	
	if(encrypttype != 0) {
		if(ch) {
			var tempparatype = $(obj).closest("tr").find("*[name=paramtypes]").eq(0).val();
			if(tempparatype != "5") {
				if($("#isneedpwd").val() == "1") {
					$(obj).closest("tr").find(".encryptcode_head").eq(0).show();
				} else {
					$(obj).closest("tr").find(".encryptcode_head").eq(0).hide();
				}
				if($("#isneediv").val() == "1") {
					$(obj).closest("tr").find(".encryptiv_head").eq(0).show();
				} else {
					$(obj).closest("tr").find(".encryptiv_head").eq(0).hide();
				}
			}
			var num = "3";
			if($("#isneedpwd").val() == "1") {
				$(obj).closest("table").find(".encryptcode_head").eq(0).show();
				num = "2";
			} else {
				$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
			}
			if($("#isneediv").val() == "1") {
				$(obj).closest("table").find(".encryptiv_head").eq(0).show();
				num = "1";
			} else {
				$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
			}
			$(".maybelast").attr("colspan",num);
		} else {
			$(obj).closest("tr").find(".encryptcode_head").eq(0).hide();
			$(obj).closest("tr").find(".encryptiv_head").eq(0).hide();
			var flag = false;
			var paramtypes = $(obj).closest("tbody").find("input[type=password]");
		    jQuery.each(paramtypes, function(i, n){
				var obj = n;
				if($(obj).is(":visible")) {
			    	flag = true;
			    	return;
				}
		   	});
			
		  	if(!flag) {
		  		$(obj).closest("table").find(".encryptcode_head").eq(0).hide();
		  		$(obj).closest("table").find(".encryptiv_head").eq(0).hide();
		  		$(".maybelast").attr("colspan","3");
		  	}
		}
	}
}

function newencryptclass()
{
	var url = "/interface/outter/outter_encryptclassTab.jsp?urlType=1&backto=<%=backto%>&isdialog=1&mode=1";
	var title = "<%=SystemEnv.getHtmlLabelNames("365,125409",user.getLanguage())%>";
	openDialog2(url,title);
}

function openDialog(url,title){
	dialog = new window.top.Dialog();
	dialog.currentWindow = window;
	var url = url;
	dialog.Title = title;
	dialog.Width = 750;
	dialog.Height = 596;
	dialog.Drag = true;
	dialog.URL = url;
	dialog.show();
}

function openDialog1(url,title,obj){
	var browserDialog = new top.Dialog();
	browserDialog.currentWindow = window;
	browserDialog.Width = 620 ;
	browserDialog.Height = 550;
	//if(dialogMaxiumnable&&dialogMaxiumnable==true){
	//	browserDialog.maxiumnable=true;
	//}
	browserDialog.URL = url;
	browserDialog.Title = title;
	browserDialog.checkDataChange = false;
	browserDialog.callback=function(datas,otherdatas){
				   if(datas!=null&&datas.indexOf('###save')>-1){
								$(obj).closest("td").find("input[type=text]").eq(0).val(datas.substr(0, datas.indexOf('###save')));
					}
				 }
	browserDialog.show();
		
}

function openDialog2(url,title){
	var browserDialog = new top.Dialog();
	browserDialog.currentWindow = window;
	browserDialog.Width = 620 ;
	browserDialog.Height = 550;
	//if(dialogMaxiumnable&&dialogMaxiumnable==true){
	//	browserDialog.maxiumnable=true;
	//}
	browserDialog.URL = url;
	browserDialog.Title = title;
	browserDialog.checkDataChange = false;
	browserDialog.callback=reloadEncryptclass;
	browserDialog.show();
	
}

function openDialog3(url,title){
	var browserDialog = new top.Dialog();
	browserDialog.currentWindow = window;
	browserDialog.Width = 980 ;
	browserDialog.Height = 650;
	
	browserDialog.URL = url;
	browserDialog.Title = '';
	browserDialog.checkDataChange = false;
	browserDialog.callback=refreshNetwork;
	browserDialog.show();
	
}

function setNetwork()
{
   var url = "/interface/outter/outter_netWorkTab.jsp?urlType=1&backto=<%=backto%>&isdialog=1&mode=1";
	var title = "";
	openDialog3(url,title);
}

function refreshNetwork(datas,otherdatas)
{
   getNetwork();
}

function getNetwork()
{
  $.ajax({ 
        	type:"POST",
            url: "/interface/outter/outter_getNetWork.jsp",
            cache: false,
  			async: false,
            success: function(data){
            data=data.replace(/(^\s+)|(\s+$)/g,"");
 
  			$("#inneripselecct option").remove();
   			$("#inneripselecct").append(data);
   			
       }
        });
      jQuery("#inneripselecct").selectbox("detach");
 	  __jNiceNamespace__.beautySelect("#inneripselecct");
}

function reloadEncryptclass(datas,otherdatas)
{
     $.ajax({ 
        	type:"POST",
            url: "/interface/outter/outter_getEncryptClass.jsp",
            cache: false,
  			async: false,
            success: function(data){
            data=data.replace(/(^\s+)|(\s+$)/g,"");
            
  			$("#encryptclassId option").remove();
   			$("#encryptclassId").append(data);

       }
        });
        jQuery("#encryptclassId").val(<%=encryptclassId%>);
      jQuery("#encryptclassId").selectbox("detach");
 	  __jNiceNamespace__.beautySelect("#encryptclassId");

}

function vaidDataNum(obj)
{
	var str =$(obj).val();
	var reg = /^[0-9]*$/;
	if(!reg.test(str)){
		top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(125427,user.getLanguage())%>!");
		$(obj).val("");
		$(obj).focus();
	}
	
}

function checkNumber(value) {
	value = $.trim(value);
	if(value == "") {
		$("#showorder").val(<%=showorder %>);
	} else {
		if(isNaN(value)) {
			$("#showorder").val(<%=showorder %>);
		} else {
			if(value > 999999999 || value < -999999999) {
				$("#showorder").val(<%=showorder %>);
				top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(31181,user.getLanguage()).replace("12","9")%>");
			} else {
				$("#showorder").val(parseInt(value));
			}
		}
	}
}

function checkPwd(obj) {
   	var value = $(obj).val();
   	if(jQuery.trim(value).length == 0) {
		$(obj).val("");
   	}
}

function checkIv(obj) {
	var value = $(obj).val();
   	if(jQuery.trim(value).length == 0) {
		$(obj).val("");
   	}
}

function checkPwdAndIv() {
  	var tempEncrypt = $("#encrypttype").find("option:selected").text();
    
    var tempEncryptcode = $("input[name^='encryptcode']");
    jQuery.each(tempEncryptcode, function(i, n) {
    	var obj = n;
        var value = $(obj).val();
      	if(jQuery.trim(value).length == 0) {
        	$("#checkPwdFlag").val("1");
      	} else {
			if(tempEncrypt.indexOf("DES") > -1 && value.length != 8) {
	          	$("#checkPwdFlag").val("0");
	          	top.Dialog.alert(tempEncrypt+"<%=SystemEnv.getHtmlLabelName(129654,user.getLanguage()) %>");
	          	return false;
        	} else {
        		$("#checkPwdFlag").val("1");
        	}
      	}
  	});
  	
  	jQuery.each(tempEncryptcode, function(i, n) {
    	var obj = n;
        var value = $(obj).val();
      	if(jQuery.trim(value).length == 0) {
        	$(obj).val("");
      	} else {
			if(tempEncrypt.indexOf("DES") > -1 && value.length != 8) {
	          	$(obj).val("");
        	}
      	}
	});
	
  	var tempEncryptivs = $("input[name^='encryptiv']");
    jQuery.each(tempEncryptivs, function(i, n) {
    	var obj = n;
        var value = $(obj).val();
      	if(jQuery.trim(value).length == 0) {
      		$("#checkIVFlag").val("1");
      	} else {
			if(tempEncrypt.indexOf("DES") > -1 && value.length != 8) {
				$("#checkIVFlag").val("0");
				top.Dialog.alert(tempEncrypt+"<%=SystemEnv.getHtmlLabelName(129655,user.getLanguage()) %>");
				return false;
	        } else if(tempEncrypt.indexOf("AES") > -1 && value.length != 16) {
				$("#checkIVFlag").val("0");
				top.Dialog.alert(tempEncrypt+"<%=SystemEnv.getHtmlLabelName(129656,user.getLanguage()) %>");
				return false;
	        } else {
	        	$("#checkIVFlag").val("1");
	        }
      	}
	});
	
	jQuery.each(tempEncryptivs, function(i, n) {
    	var obj = n;
        var value = $(obj).val();
      	if(jQuery.trim(value).length == 0) {
      		$(obj).val("");
      	} else {
			if(tempEncrypt.indexOf("DES") > -1 && value.length != 8) {
				$(obj).val("");
	        } else if(tempEncrypt.indexOf("AES") > -1 && value.length != 16) {
				$(obj).val("");
	        }
      	}
	});
}

function onTest() {
	if("<%=sysid %>" == "") {
		return ;
	}
	var url = "/interface/outter/OutterSysSettingTab.jsp?urlType=3&isdialog=1&backto=<%=typename%>&id="+encodeURI("<%=sysid %>");
	var title = "<%=SystemEnv.getHtmlLabelNames("25496,20961",user.getLanguage())%>";
	openDialog4(url,title);
}

function openDialog4(url,title){
	dialog = new window.top.Dialog();
	dialog.currentWindow = window;
	var url = url;
	dialog.Title = title;
	dialog.Width = 620;
	dialog.Height = 620;
	dialog.Drag = true;
	dialog.URL = url;
	dialog.maxiumnable=true;
	dialog.show();
}

function setReadOnly() {
	if(<%=typename %> == "1" || <%=typename %> == "5") {
		document.getElementById("baseparam1").value = "username";
		document.getElementById("baseparam2").value = "password";
		document.getElementById("baseparam1").readOnly = true;
		document.getElementById("baseparam2").readOnly = true;
	} else if(<%=typename %> == "7") {
		document.getElementById("baseparam1").value = "uid";
		document.getElementById("baseparam1").readOnly = true;
	} else if(<%=typename %> == "8") {
		document.getElementById("baseparam2").value = "password";
		document.getElementById("baseparam2").readOnly = true;
	}
}

/*QC340133 [80][90][优化]集成登录-优化集成登录其它参数配置参数名内含有特殊字符会产生乱码,格式不对等情况start*/
//检查其他参数的参数名是否有特殊字符
function checkparamnames(obj){
	var value = $(obj).val();
	value = $.trim(value);
	if(isSpecialChar(value)){
	  top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(132223,user.getLanguage())%>");
	  $(obj).val("");
	  return false;
	}
	return true;
}
/*QC340133 [80][90][优化]集成登录-优化集成登录其它参数配置参数名内含有特殊字符会产生乱码,格式不对等情况end*/
/*QC339532 [80][90][优化]集成登录-优化集成登录其它参数配置参数名不能重复start*/
function checkParamnamesRepet(obj){
    var isSame = false;
	obj.value = $.trim(obj.value);
    $("input[name='paramnames']").each(function(){
        if(obj.value != "" &&  $(this)[0] != obj && $(this).val() == obj.value ){
            obj.value = "";
            isSame = true;
        }
    });
    if(isSame){
        top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(132214,user.getLanguage())%>");
        return false;
    }else{
        return true;
    }
}
/*QC339532 [80][90][优化]集成登录-优化集成登录其它参数配置参数名不能重复end*/
</script>
<%if("1".equals(isDialog)){ %>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
	<input type="button" style="display:none;" class=zd_btn_submit accessKey=S  id=btnsearch value="S-<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>"></input>
	<wea:layout needImportDefaultJsAndCss="false">
		<wea:group context=""  attributes="{'groupDisplay':'none'}">
			<wea:item type="toolbar">
				<input type="button" class=zd_btn_cancle accessKey=T  id=btncancel value="T-<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" onclick='onBack();'></input>
			</wea:item>
		</wea:group>
	</wea:layout>
	<script type="text/javascript">
		jQuery(document).ready(function(){
			resizeDialog(document);
		});
	</script>
</div>
</div>
<%} %>
</BODY>
</HTML>