|
阅读:24041回复:10
网页登录系统时,无需点击内网外网登录,直接判断~
常常我们在登录网页后,还要弹个窗口提示点击内网登录与外网登录,我写的网页,网页可直接判断是否为内网还是外网,并且直接登录,并且自动设置好安全等级等信息。如果内网不能访问外部ip,具体位置可以调整下,具体效果慢慢体验吧~~~~
请以root权限 到 /var/www/html 下更改tiptop.html 内容 请注意备份哦~~ <!--
FOURJS_START_COPYRIGHT(D,2002) Property of Four Js*
(c) Copyright Four Js 2002, 2012. All Rights Reserved.
* Trademark of Four Js Development Tools Europe Ltd
in the United States and elsewhere
This file can be modified by licensees according to the
product manual. FOURJS_END_COPYRIGHT--><HTML>
<HEAD> <TITLE>
TOPGP ERP管理系统客户端服务程序
</TITLE>
<META http-equiv="expires" content="1">
<META http-equiv="pragma" content="no-cache">
<style>.divcss-right{float:left;width:150px;height:25px;border:1px solid #F00}</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF" onload="startIt();" onbeforeunload="preventClose();">
<H2 style="color:#FF0000">
系统开启后请勿关闭此界面,关闭将自动退出所有系统页面,若长时间无法打开,请下载桌面客户端安装!
</H2>
<CENTER>
<DIV id="divgdc" style="display:none"></DIV>
<DIV id="divwait">
正在安装系统客户端插件请稍后...
安装过程可能需要几分钟时间,取决于您的网速.
如果您的IE浏览器警告 Active X 安全问题, 请选择允许安装.若长时间无响应,请设置浏览器为兼容模式
<IMG src="/gas/pic/processing.gif"/>
</DIV>
</CENTER> </BODY>
<SCRIPT src="/gas/fjs/activex/fglgdcdefault.js"></SCRIPT>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<SCRIPT language="javascript">
var timerID = 0; var gdc = 0;
var retryCount = 0;
var maxRetry = 240; //the script will test if GDC is loaded for 240 seconds
function startIt() {
// first activate ActiveX.
gdc = loadGDC("divgdc", "GeneroDesktopClient", "2,40,21,0", "gas");
checkGDC(); }
function preventClose() {
if ( !gdc ) {
return;
}
if (gdc.applicationCount > 0) {
event.returnValue = "Genero Desktop Client";
} }
function configureGDC() {
gdc.setAdmin(true);
gdc.setListeningMode("any");
gdc.setDebug(true);
gdc.setFocus(); }
function startApplication(appName, appQueryString) {
gdc.setSrvUrl(location.protocol + "//" + location.host + "/gas/wa/r/" + appName);
gdc.setPictureUrl("$(pictures.uri)");
gdc.setAppName(appName);
return false; }
function checkGDC(){
if(timerID) {
clearTimeout(timerID);
timerID = 0;
}
if (!gdc || !gdc.enabled) {
// gdc is not ready, wait a few seconds...
retryCount++;
if (retryCount <= maxRetry) {
timerID = setTimeout("checkGDC()", 1000);
} else {
if (confirm("系统客户端启动超时.\n是否继续等待 ?")){
retryCount = 0;
timerID = setTimeout("checkGDC()", 1000);
return;
}
document.getElementById("divwait").style.display = 'none';
document.getElementById("divgdc").style.display = 'block';
document.getElementById("divlogin").style.display = 'none';
alert("系统客户端无法启动, 请联系系统管理员.");
}
} else {
document.getElementById("divwait").style.display = 'none';
document.getElementById("divgdc").style.display = 'block';
document.getElementById("divlogin").style.display = 'block';
configureGDC();
if(returnCitySN["cip"] == "xxx.xxx.xxx.xxx") //公司对应的外网ip
{
//alert(returnCitySN["cip"]);
return startApplication("gdc-tiptop-udm-intranet", "$(application.querystring)");//内网
}
else
{
//alert(returnCitySN["cip"]);
return startApplication("gdc-tiptop-udm-internet", "$(application.querystring)");//外网
}
} }
</SCRIPT> </HTML> |
|
|
沙发#
发布于:2016-11-15 10:00
抢个沙发坐坐
|
|
|
板凳#
发布于:2016-12-01 20:09
路过.希望越来越好
|
|
|
地板#
发布于:2017-01-05 09:36
路过.希望越来越好
|
|
|
4楼#
发布于:2018-09-09 18:38
很好的说
|
|
|
5楼#
发布于:2018-09-14 11:43
谢谢分享,共进共勉
|
|
|
6楼#
发布于:2019-02-13 16:54
支持!!支持!!支持!!
|
|
|
7楼#
发布于:2019-02-20 11:54
学习~
|
|
|
8楼#
发布于:2019-09-06 20:39
厉害!谢谢楼主分享!!!
|
|
|
9楼#
发布于:2019-10-23 20:32
希望越来越好
|
|
|
10楼#
发布于:2021-09-28 09:32
谢谢整理
|
|
