function runShell(cmd) { |
| var shell = new ActiveXObject('WScript.Shell'); |
| shell.Run(cmd); |
| } |
| function Encrypt() { |
| try { |
| setMaxDigits(129); |
| var key = new RSAKeyPair("010001", "", "F1D4245A0F29253E793FC24D5BC6A311EA7410FFB4FB1B0BF903AD229FA67CB2C7ECA462FA1A3B5F327431928625DE31E97BC941336C0297487435AF9AE5C3F0E5A26DAEFF1E91095D7DBA30F3B91316A6103A9C044FDAEE9AA60EED6970DD13D135D0DB1AD0E8F2F8145371107E00A1CE1E7F9486F3845570FDB28E365DF211"); |
| |
| //var usrMD5Twice = $.md5($.md5($("#txtUserName").attr("value"))); |
| //var usrName = document.getElementById("txtUserName").value; |
| //var usrRtn = encryptedString(key, usrName); |
| //document.getElementById("userName").value = usrRtn; |
| //$("#UserName").val(usrRtn); |
| //alert("txtUserName encode:" + document.getElementById("txtUserName").value); |
| |
| //var pwdMD5Twice = $.md5($.md5($("#txtPassword").attr("value"))); |
| var password = document.getElementById("txtPassword").value; |
| var pwdRtn = encryptedString(key, password); |
| document.getElementById("password").value = pwdRtn; |
| //$("#Password").val(pwdRtn); |
| //alert("txtPassword encode:" + document.getElementById("txtPassword").value); |
| |
| document.getElementById("isEncrypted").value = "true"; |
| //$("#IsEncrypted").val("true"); |
| } |
| catch (e) { |
| //alert("用户名和密码加密异常:" + e) |
| } |
| } |
| // function GetScroll() { |
| // var returnText = Logon.ScrollText(); |
| |
| // document.getElementById("mtext").innerHTML = returnText.value; |
| |
| // // setTimeout("GetScroll()","6000"); |
| // } |
| function ShowSpan() { |
| var str = document.getElementById("divScroll").innerHTML; |
| var obj = new Object(); |
| obj.name = str; |
| obj.theme = document.getElementById("hidtheme").value; |
| //window.location.href=("UpdateInfo.aspx?str=" + str, "", "height=565px, width=785px, toolbar=no, menubar=no, scrollbars=no, location=no, status=no"); |
| // window.open("UpdateInfo.aspx?str=" + str, "", "height=500px, width=500px, toolbar=no, menubar=no, scrollbars=no, location=no, status=no"); |
| window.showModelessDialog('UpdateInfo.aspx', obj, 'dialogWidth=500px;dialogHeight=300px;scroll:no') |
| //window.dialogArguments.var_name = str;] |
| } |
| function getmachinename() { |
| try { |
| var wsh = new ActiveXObject("WScript.Network"); |
| var name = document.getElementById("ComputerName"); |
| name.value = stripScript(wsh.ComputerName); |
| //alert(wsh.ComputerName); |
| } |
| catch (e) { |
| |
| } |
| } |
| //去掉输入字符串中特殊符号 |
| function stripScript(s) { |
| var pattern = new RegExp("[`~!@#$^&*()+_-=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]") |
| var rs = ""; |
| for (var i = 0; i < s.length; i++) { |
| rs = rs + s.substr(i, 1).replace(pattern, ''); |
| } |
| return rs; |
| } |
| function changeTo4ATab() { |
| document.domain = ""; |
| document.getElementById("trLocal").style.display = "none"; |
| document.getElementById("tr4a").style.display = "block"; |
| // if (document.getElementById("iframe4A").src.indexOf("iframeLogin.jsp") == -1) { |
| // var iframeLoginUrl = "http://www.baidu.com"; |
| // var target = ""; |
| // var appCode = ""; |
| // document.getElementById("iframe4A").src = iframeLoginUrl + "?" + "target=" + target + "&appCode=" + appCode; |
| //} |
| } |
| function changeToLocalTab() { |
| document.getElementById("iframe4A").src = ""; |
| document.getElementById("trLocal").style.display = "block"; |
| document.getElementById("tr4a").style.display = "none"; |
| } |