经过研发确认,这个准入页面存在着bug,如果直接在word形式下的文本格式里创建超链接,会造成无法调用函数的问题。所以客户这边模仿着原始的方法自己写了一些代码(参照蓝色字体),临时性的解决了这个问题。
该问题已经转研发走问题单了!
<html><head><title>网络准入客户端</title>
<meta name="viewport" id="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=2.0; minimum-scale=1.0;">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"><link href="../css/terminal.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
var bNotRun = false;
if(window.ActiveXObject)
{
}
else
{
bNotRun = true;
//alert("请使用IE核心浏览器查看本网页!3" + bNotRun);
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function Close()
{
try
{
var startSD = 某公司Clnt.StartSD();
if (startSD == 0) {
alert("启动安全桌面失败");
return;
}
}
catch (e)
{
alert("启动安全桌面失败");
return;
}
var ua=navigator.userAgent
var ie=navigator.appName=="Microsoft Internet Explorer"?true:false
if(ie)
{
var IEversion
var hasTrident = preg_match("/trident.*rv:[d]+/i", ua)
if(hasTrident)
{
IEversion=11
}
else
{
IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
}
if(IEversion< 5.5)
{
close();
}
else
{
parent:top.window.opener =null;
parent:top.window.close();
}
}
else
{
parent:top.window.close()
}
}
function Uninstall()
{
try
{
某公司Clnt.Uninstall();
strPrompt = "网络准入系统客户端卸载成功!\r\n";
strPrompt += "请关闭所有浏览器!";
bUninstall = false;
}
catch(e)
{
var strPrompt;
strPrompt = "卸载准入失败,请检查准入安装文件夹是否存在未卸载文件!";
}
var loading= document.getElementById("loading");
if(loading){
loading.innerText = strPrompt;
}
}
function button_show()
{
var sHTML;
sHTML="<input type=button align=right value='启动安全桌面' onclick='Close()'style='height: 22; width:120'>";
//del by zl at 05/25/2010 卸载失效
/*
if(!bUninstall)
sHTML="<input type=button align=right value='关闭窗口' onclick='Close()'style='height: 22; width:120'>";
//sHTML="<a href onClick='Close()'><img src='./images/close.gif'alt='关闭窗口' border='0' width='71' height='23'></a>";
else
sHTML="<input type=button align=right value='关闭窗口' onclick='Close()'style='height: 22; width:120'>      <input type=button align=right value='卸载' onclick='Uninstall()' style='height: 22; width:120'><BR>";
*/
//end del by zl
ScriptDiv.innerHTML = sHTML;
}
function html_redirect()
{
var s = new String(window.location);
var ss = s.indexOf("?");
if(ss > 0)
{
var url = s.substr(ss+1);
var ss = url.indexOf("://");
if(ss < 0)
url = "http://" + url;
window.location = url;
}
}
function onLocationSingress()
{
var ipaddress = "http://"+window.location.host + ":817/singress.exe";
window.open(ipaddress);
}
function onLocationSingress1()
{
var ipaddress = "http://172.16.3.40/security.exe";
window.open(ipaddress);
}
//-->
</script>
<meta name="GENERATOR" content="MSHTML 11.00.9600.18639"></head>
<body>
<script language="JavaScript">
<!--
var strPrompt = "";
var bInstall = true; // true : Want to install, false : want to uninstall
var bDownloading = true;
var bProcessed = false;
var bSuccess = false;
var bStartProcess = false;
var bRuleChecking = false;
var bUninstall = false;
var bDelTempFile = false;
var bPass某公司 = false;
var i = 0;
var timer = 0;
var j = 0;
var k = 0;
var total = 0;
function CheckProcess()
{
if(bNotRun)
{
var loading= document.getElementById("loading");
if(loading){
loading.innerHTML = "请使用IE核心浏览器查看本页面!";
}
return;
}
var retv;
if(!bSuccess)
{
try
{
var ipaddress = window.location.host + ",10.252.252.252";
某公司Clnt.TellServiceGatewayIp(ipaddress);
bDownloading = false;
bSuccess = true;
}
catch(e)
{
bDownloading = true;
}
}
if(bDownloading)
{
if(j == 0)
{
strPrompt = "网络准入系统客户端正在在线安装,安装过程可能需要几分钟,"
strPrompt +="请您耐心等待。<br />您也可以手动点击下载链接下载到本地安装。";
strPrompt +="<br />安装过程中会添加服务,请允许服务安装";
}
if(j <= 5)
{
strPrompt += ".";
j++;
total++;
}
else
{
j=0;
if(total > 50)
{
window.clearInterval(timer);
// strPrompt = "网络准入系统客户端安装超时!";
html_redirect();//IE8第一次安装准入会导致控件不能加载到IE8,导致一致无法跳转
}
}
}
else
{
if(!bDelTempFile)
{
某公司Clnt.DeleteTempFile(); //删除临时缓存
bDelTempFile = true;
}
bProcessed = true;
if(!bRuleChecking)
{
strPrompt = "网络准入系统客户端已经安装,<br />正在进行规则检测!";
}
else
{
var retv;
retv = 某公司Clnt.GetAuthenState();
switch(retv)
{
case 0:
{
// 现在统一由共享内存给出
try
{
strPrompt = 某公司Clnt.Get某公司Message();
if (k <= 5) {
for (var dot = 0; dot < k; dot++ )
strPrompt += ".";
k++;
total++;
}
else {
k = 0;
}
}
catch(e)
{
strPrompt = "准入客户端正在升级,请稍后打开浏览器重试。若长时间未升级成功,可以点击下载链接下载准入客户端后进行手动安装!";
}
}
break;
case 1:
{
strPrompt = "规则检测已经完成,可以正常上网!";
bRuleChecking = false;
bPass某公司 = true;
}
break;
case 2:
{
var strlog;
strlog = 某公司Clnt.Get某公司Log();
if(strlog.search("安全桌面没有运行,") >= 0)
{
button_show();
}
strPrompt = strlog;
bRuleChecking = false;
}
break;
case 3:
{
strPrompt = "连接准入失败,正在尝试重启。<br />如果此提示超过1分钟,请关闭当前浏览器";
}
default:
break;
}
if(!bRuleChecking)
{
window.clearInterval(timer);
if (bPass某公司)
{
html_redirect();
}
}
}
bRuleChecking = true;
}
var loading= document.getElementById("loading");
if(loading){
loading.innerHTML = strPrompt.replace("\r\n", "<br />");
}
}
timer = window.setInterval("CheckProcess()", 500);
// 获取Windows操作系统版本信息(利用UA检测,可能会存在误判)
var isWindows = (navigator.platform.indexOf("Win") == 0); //注:历史出现过3种 Windows Win16 Win32
var isWin2000, isWinXP, isWin2003, isWinVista, isWin7, isWin8, isWin8_1, isWin10;
isWin2000 = isWinXP = isWin2003 = isWinVista = isWin7 = isWin8 = isWin8_1 = isWin10 = false;
if (isWindows) {
var ua = navigator.userAgent;
if (/Win(?:dows )?([^do]{2})\s?(\d+\.\d+)?/.test(ua)) {
if(RegExp["$1"] == "NT"){
switch (RegExp["$2"]) {
case "5.0":
case "5.01": // Windows 2000 SP1
isWin2000 = true;
break;
case "5.1":
isWinXP = true;
break;
case "5.2":
isWin2003 = true;
break;
case "6.0":
isWinVista = true;
break;
case "6.1":
isWin7 = true;
break;
case "6.2":
isWin8 = true;
break;
case "6.3":
isWin8_1 = true;
break;
case "6.4": // Windows 10 技术预览版
case "10": // 网上的代码有这个,不知道是写错了,还是说某个预览版长这样
case "10.0":
isWin10 = true;
break;
default: // 古老的和新出的windows系统,统一用双签名的那个
break;
}
}
}
}
var isIE = ("ActiveXObject" in window);
var cab_filename = "singress.cab"; // 默认情况下使用双签名的 singress.cab
// 若是windows平台,浏览器是IE,且操作系统是win7以下,则使用单签名的 sha1/singress.cab
do {
//不是windows平台,用默认的singress.cab即可
if (!isWindows) {
break;
}
//非IE没法安装activex控件,用默认的singress.cab即可
if (!isIE) {
break;
}
// 以下操作系统使用单签名
if (isWin2000 || isWinXP || isWin2003 || isWinVista) {
cab_filename = "sha1/singress.cab";
}
} while(0);
var objinfo ="<object CLASSID='clsid:02309C77-1B15-4309-AC7D-1376111A2648' id='某公司Clnt' name= '某公司Clnt' "
+ "CODEBASE='http://" + window.location.host + ":817/" + cab_filename + "#Version=1.0.0.1' BORDER=0 width=0 height=0></object>";
document.write(objinfo);
//-->
</script><object classid="clsid:02309C77-1B15-4309-AC7D-1376111A2648" id="某公司Clnt" name="某公司Clnt" codebase="http://172.16.3.215:817/singress.cab#Version=1.0.0.1" border="0" width="0" height="0"></object>
<div id="content">
<h1 class="warning">网络准入系统</h1>
<div class="partition"><span class="partition_left" style="WIDTH: 170px"></span></div>
<p class="b_distance">依据组织的上网安全策略,您需要先在计算机上安装网络准入系统,才能继续访问网络。安装完成后,准入系统将会对计算机的安全情况进行检查。</p>
<p><span id="loading">请使用IE核心浏览器查看本页面!</span></p>
<p><span id="ScriptDiv"></span></p><br>
<p><b>安装方法:</b>
</p><ol>
<li>根据浏览器上方的提示(仅支持IE),点击信息栏进行安装</li>
<li>点击 <a href="#">下载</a> 下载准入系统,手动安装</li>
<li>点击 <a href="#">下载</a> 下载系统安全软件,手动安装</li><!--
</OL-->
<p></p></ol></div></body></html>
|