PageSourceSearch

https://webvpn.zjut.edu.cn/?redirect_uri=https%3A%2F%2Fwww-my-zjut-edu-cn.webvpn.zjut.edu.cn%3A8118%2Fmain.htm

html zjut.edu.cn collected 2026-09-25 18:54:52 UTC 9,356 bytes, 321 lines download raw bytes

1<html>
2<head>
3
4<meta http-equiv="Pragma" content="no-cache">
5<meta http-equiv="Cache-Control" content="no-cache" >
6<meta http-equiv="Cache-Control" content="must-revalidate" >
7<meta http-equiv="Expires" content="-1">
8<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
9</head>
10
11<NOSCRIPT>
12Your browser does not support JavaScript (or it is blocked). Please check your browser settings and make sure it supports JavaScript.
13</NOSCRIPT>
14<body>
15</body>
16
17<script>
18
19var hashIndex = location.href.lastIndexOf("#");
20var sourceUrl = "";
21if(hashIndex != -1  && location.href.length > (hashIndex + 1)) {
22	sourceUrl = location.href.substr(hashIndex + 1);
23}
24else {
25	sourceUrl = encodeURIComponent(location.href);
26}
27
28/*
29客户端要从中解析地址时间, 老版本时间为3s, 需保持不变
30var selectline_timeout = "3";
31*/
32
33var time_distance = "10";
34var g_midatk = "0";
35var g_lines = [];
36//var lineInterArr = [];
37var delayTimer = [];
38var g_timeout = null;
39
40/*
41	luyi 20120223
42	1、先分析line_list中的数据,转换成Array
43	2、通过优先级级对数据进行分组,并按优先级别进行排序
44	3、对分组后的数据按速度选路
45	*/
46	/*old function about win_location just support for old version update*/
47function win_location(imgs, level, callback){
48	var lines = [],
49		stop = false,
50		config_timeout = parseFloat(time_distance),
51		interval = level * config_timeout * 10,
52		delay_timeout = level * config_timeout * 10,
53		result = null,
54		MAX = 5,
55		MIN = 3;
56	function loaded(is_timeout){	//图片onload成功时,检查此级别的线路请求次数是否达到了最大次数MAX,或第一条与第二条的差距是否达到了最小次数MIN;线路只有一条时,检查是否达到了最小请求次数MIN。
57		var _lines = [];
58		for(var i=0, len = lines.length; i<len; i++){
59			_lines[i] = { line: i, index: lines[i] };
60		}
61		_lines.sort(function(a, b){
62			if(a.index > b.index){
63				return -1;
64			}else if(a.index < b.index){
65				return 1;
66			}else{
67				return 0;
68			}
69		});
70		//if((_lines.length === 1 && _lines[0].index >= MIN) || _lines[0].index >= MAX || (_lines.length >= 2 && _lines[0].index - _lines[1].index >= MIN)){
71		if(_lines[0].index >= MIN){
72			stop = true;
73			result = imgs[_lines[0].line].url;	//已经符合选路规则,选择onload次数完成最多的。
74			// 优先级高的先跳,优先级别的等待时间(高:0,中:100ms,低:200ms)
75			delayTimer[level] = setTimeout(function () {
76				clearTimeout(g_timeout);
77				callback(result);  
78			}, delay_timeout);
79		}
80	}
81	function reLoad(el, index){
82		return function(){
83			el.src = imgs[index].src + '?' + Math.random();
84		};
85	}
86
87	function createDelegate(el, index){
88		return function(){
89			if(!stop){
90				lines[index]++;
91				imgs[index].count = lines[index];
92				loaded(false);
93				if(!stop && lines[index] <= MAX){
94					el.src = imgs[index].src + '?' + Math.random();
95				}
96			}
97		};
98	}
99
100	var els = document.createDocumentFragment();
101	for(var i=0, len = imgs.length; i<len; i++){
102		lines[i] = 0;
103		var el = document.createElement('img');
104		el.style.position = 'absolute';
105		el.style.top = '-1000px';
106		el.onload = createDelegate(el, i);
107		el.onerror = reLoad(el, i);
108		el.src = imgs[i].src + '?' + Math.random();
109		els.appendChild(el);
110	}
111	document.body.appendChild(els);
112	//定时查询是否已经完成了选路,且达到了优先级别的等待时间(高:0,中:30ms,低60ms;差值10毫秒)
113	//lineInterArr[level] = setInterval(function(){
114	//	interval-=10;  // interval-100, 初始值interval = level * config_timeout * 10,
115	//	if(result && interval<=0){
116	//		for(var k=0; k<lineInterArr.length;k++){
117	//			clearInterval(lineInterArr[k]);
118	//		}
119	//		clearTimeout(g_timeout);
120	//		callback(result);  //优先级高的先跳
121	//	}
122	//}, 10);
123}
124//第二步:按优先级别对路线进行分组
125function lineLevel(imgs, callback){
126	var obj_lines = {},
127		arr_lines = [],
128		config_timeout = parseFloat(time_distance);
129	for(var i=0, len = imgs.length; i<len; i++){
130		var right = imgs[i].right;
131		if(!obj_lines[right]){
132			obj_lines[right] = [];
133		}
134		obj_lines[right].push(imgs[i]);
135	}
136	for(var prop in obj_lines){
137		if(obj_lines.hasOwnProperty(prop)){
138			arr_lines.push({ right: prop, lines: obj_lines[prop] });
139		}
140	}
141	arr_lines.sort(function(a, b){	//按级别进行排序
142		if(a.right > b.right){
143			return 1;
144		}else if(a.right < b.right){
145			return -1;
146		}else{
147			return 0;
148		}
149	});
150	for(var i=0, len = arr_lines.length; i<len; i++){
151		win_location(arr_lines[i].lines, i, callback);
152	}
153	g_timeout = setTimeout(function(){	//当所有路线都在指定时间内未å
153®Œæˆé€‰è·¯ï¼Œåˆ™æŸ¥æ‰¾æœ‰å¤šå°‘条已经有发送过成功请求的,按优先级别,选择成功次数最高的。
154		var slines = [];	//统计出有多少条有onload成功的线路
155		for(var i=0, len = arr_lines.length; i<len; i++){
156			var item = arr_lines[i],
157				i_lines = item.lines;
158			for(var ii=0, ilen = i_lines.length; ii<ilen; ii++){
159				if(i_lines[ii].count != null && i_lines[ii].count > 0){
160					slines.push(i_lines[ii]);
161				}
162			}
163			if(slines.length > 0){
164				break;
165			}
166		}
167		if(slines.length > 0){	//按优先级别,找到onload成功最多的线路
168			slines.sort(function(a, b){
169				if(a.count > b.count){
170					return -1;
171				}else if(a.count < b.count){
172					return 1;
173				}else{
174					return 0;
175				}
176			});
177			callback(slines[0].url);
178		}else{
179			callback(arr_lines[0].lines[0].url);	//当所有路线都超时,直接选优先级别最高的第一条。
180		}
181		clearTimeout(g_timeout);
182		//for(var k=0; k<lineInterArr.length;k++){
183		//	clearInterval(lineInterArr[k]);
184		//}
185	
186		for(var k=0; k<delayTimer.length; k++){
187			clearTimeout(delayTimer[k]);
188		}
189	}, arr_lines.length * config_timeout * 1000);
190}
191//第一步:对线路数据进行分析
192function gotoLines(){
193	var lines = g_lines,
194		flag = false;
195
196	function gotoUrl(url){
197		var param = '',
198			originURL = '',
199			startIndex = '';  //url问号所在位置
200		if(flag){ return; }
201
202		flag = true;
203		
204		// 存储 sourceUrl,校验window.name中是否存储过数据并符合标记
205		var tempURL,
206		    urlFlag;
207		tempURL = window.name || '';
208		urlFlag = tempURL.substr(0,10);
209		if(urlFlag !== 'sf_ssl_ms_'){
210			window.name = 'sf_ssl_ms_' + sourceUrl;
211		}
212		originURL = decodeURIComponent(window.name);
213		// 开始处理路径的参数
214		if(originURL.indexOf('?') >= 0) {
215			param = originURL.substr(originURL.indexOf('?') + 1);
216		}
217
218		if(param){
219			startIndex = url.indexOf('?');
220			if(startIndex >= 0) {
221				url = url.substr(0, startIndex + 1) + getMergeParam(param, url.substr(startIndex + 1));
222			} else{
223				url = url + '?' + param;
224			}
225			// 此处是在问号后面直接插入参数
226			
227		}
228
229		window.location.href = url;
230	}
231
232	function getMergeParam (originParam, newParam) {
233		var originObj = parseQueryString(originParam) || {},
234			newObj = parseQueryString(newParam) || {},
235			param = '',
236			p;
237		
238		// 将所有newO的字段全部合入并覆盖至originParam中
239		for (p in newObj) {
240			if (newObj.hasOwnProperty(p)) { 
241				originObj[p] = newObj[p];
242			}
243		}
244
245		// 遍历合并后的参数,拼接成字符串
246		for (p in originObj) { 
247			if (originObj.hasOwnProperty(p) && p) { 
248				if (originObj[p] !== undefined) {
249					param += p + '=' + originObj[p] + '&';
250				} else { 
251					param += p + '&';
252				}
253			}
254		}
255
256		if (param) { 
257			param = param.substr(0, param.length - 1);
258		}
259		return param;
260	}
261
262	function parseQueryString (url)
263	{
264		var obj = {},
265			keyvalue = [],
266			key = "",
267			value = "",
268			paraString;
269		if(!url){
270			return obj;
271		}
272		paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
273		for(var i in paraString)
274		{
275			keyvalue = paraString[i].split("=");
276			key = keyvalue[0];
277			value = keyvalue[1];
278			obj[key] = value;            
279		}        
280		return obj;
281	}
282
283
284	if(lines.length > 1){
285		lineLevel(lines, gotoUrl);
286	}else if(lines.length === 1){
287		gotoUrl(lines[0].url);
288	}else{
289
290		var getOrigin = function () {
291			if (window.location.origin) {
292				return window.location.origin;
293			} else {
294				return window.location.protocol + '//' + window.location.hostname + 
295					(window.location.port ? ':' + window.location.port : '');
296			}
297		}
298
299		gotoUrl(getOrigin() + '/portal');
300	}
301}
302/*end*/
303
304(function () {
305	var loc = window.location;
306	var url = loc.protocol+"//"+loc.host;
307	if(/\/$/g.test(url)){
308		url = url.substring(0,url.length-1);
309	}
310	url = encodeURIComponent(url);
311	//注意: 以下注释中的代码不可修改和重复, 客户端要从中解析地址
312	/* 
313		if(CookiesEnabled())
314		g_lines = [{src:"",url:"https://webvpn.zjut.edu.cn/por/login_psw.csp?redirect_uri=https%3A%2F%2Fwww-my-zjut-edu-cn.webvpn.zjut.edu.cn%3A8118%2Fmain.htm",flag:'win_location("https://webvpn.zjut.edu.cn/por/login_psw.csp?redirect_uri=https%3A%2F%2Fwww-my-zjut-edu-cn.webvpn.zjut.edu.cn%3A8118%2Fmain.htm")',right:0}];
315	*/
316	g_lines = [{src:"",url:"https://webvpn.zjut.edu.cn/portal?redirect_uri=https%3A%2F%2Fwww-my-zjut-edu-cn.webvpn.zjut.edu.cn%3A8118%2Fmain.htm",right:0}];
317	gotoLines();
318})();
319</script>
319
320</html>
321

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.