⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 skysoft.js

📁 漂亮的企业网站系统v11 1、整体修改了上一版的一些BUG。 2、修改了页面底部的统计形式。 3、修改了“公告更新”栏目
💻 JS
📖 第 1 页 / 共 2 页
字号:
/* SkySoft.js
 * ==============
 * kernel of SkySoft js source, copyright by oursky.net, all rights reserved.
 * any use of this code or part of these code, must keep these lines
 *
 */

SSObj = function()
{
	this.loaded = false;
	this.hookLoad = "";
	this.hookUnload = "";
	this.errorHandling = true;
	this.returnErrors = true;
	this.onLoadCodes = [];
	this.onUnLoadCodes = [];
	this.onResizeCodes = [];
}
SSp = SSObj.prototype;
SSp.include = function(src) {
	src = src.split(".");
	if (src[src.length-1] == 'js') src.length -= 1;
	if (src[0] != 'skysoft' || src[2] && src[1] != 'common') return alert('发生错误 请在[技术支持]报告错误 或者发快信给 Xuefer');
	this.includex(src.join("."), false)
}
SSp.loadGroup = function(group) {
	if (!self.scripturl)
		self.scripturl = (self.rooturl||'')+'/scripts';
	document.write('<script language="Javascript1.2" src="'+self.scripturl+'/loadjs.php?filegroup='+group+'"><\/script>');
}
SSp.includex = function(filename, trans) {
	if (!self.scripturl)
		self.scripturl = (self.rooturl||'')+'/scripts';

	if (!filename) return;
	filename = filename.replace( /\./g , "/").replace("common/","").replace("skysoft/","")

	if (typeof trans == 'undefined' || trans)
		document.write('<script language="Javascript1.2" src="'+self.scripturl+'/loadjs.php?files='+filename+'.js&trans=1&c='+(is.charset||'')+'"><\/script>');
	else
		document.write('<script language="Javascript1.2" src="'+self.scripturl+'/loadjs.php?files='+filename+'.js"><\/script>');
}
SSp.addLoadFunction = function(f, name) {
	name = name||this.onLoadCodes.length;
	this.onLoadCodes[name] = f;
	return name;
}
SSp.delLoadFunction = function(name) {
	delete(this.onLoadCodes[name]);
}
SSp.addUnLoadFunction = function(f) {
	name = name||this.onUnLoadCodes.length;
	this.onUnLoadCodes[name] = f;
	return name;
}
SSp.delUnLoadFunction = function(f) {
	delete(this.onUnLoadCodes[name]);
}
SSp.addResizeFunction = function(f) {
	name = name||this.onResizeCodes.length;
	this.onResizeCodes[name] = f;
	return name;
}
SSp.delResizeFunction = function(f) {
	delete(this.onResizeCodes[name]);
}
SSp.loadHandler = function() {
	this.created = true;
	eval(this.onLoadCodes.join(";"));
	if (this.onLoad) this.onLoad();
	this.loaded=true;
	eval(this.hookLoad);
}
SSp.unloadHandler = function() {
	eval(this.onUnLoadCodes.join(";"));

	if (this.onUnload) this.onUnload();
	eval(this.hookUnload);
}
SSp.resizeHandler = function() {
	eval(this.onResizeCodes.join(";"));
	if (this.onResize) this.onResize();
}

// dreamwaver's findObject
SSp.findObject = function(n, d) {
	var p,i,x;
	if(!d) d=document;
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x=d[n])&&d.all) x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++)
		x=d.forms[i][n];

	for(i=0;!x&&d.layers&&i<d.layers.length;i++)
		x=this.findObject(n,d.layers[i].document);
	if(!x && d.getElementById)
		x=d.getElementById(n);
	return x;
}

// newest plugin version
SSp.InsertFlash = function(src, w, h, trans, newest)
{
	this.insertFlash(src, w, h, trans, true);
}
// common plugin version
SSp.insertFlash = function(src, w, h, trans, newest)
{
	w=w||100;
	h=h||100;
	var codebase = (swlf.resurl||self.rooturl||"http://www.our-sky.com") +
		"/" + "flash/plugin/swflash.cab#version="+
		(newest?"6,0,23,0":"5,0,0,0") +
		">"
		;
	document.write('\
		<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+codebase+'"\
		    width="'+w+'" height="'+h+'" \
		  <param name=movie value="'+src+'">\
		  ' +
		  (trans?'<param name=wmode value=transparent>':'')+ '\
		  <param name=quality value=high>\
		  <embed src="'+src+'" \
		    '+
		    (trans?'wmode=':'transparent')+' \
		    quality=high \
		    pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" \
		    type="application/x-shockwave-flash" width="'+w+'" height="'+h+'>\
		  </embed> \
		</object>\
		'
	);
}
// shortcut
SSp.obj = SSp.findObject;

// create object
SS = SkySoft = new SSObj();

// install handler
if (self.DynAPI||self.dynapi)
{
	if (!self.dynapi) dynapi = self.DynAPI;
	DynAPI.addLoadFunction("SkySoft.loadHandler();");
	DynAPI.addUnLoadFunction("SkySoft.unloadHandler();");
	DynAPI.addResizeFunction("SkySoft.resizeHandler();");
}
else
{
	SkySoft.hookLoad=window.onload;
	SkySoft.hookUnload=window.onunload;
	onload = function() { SkySoft.loadHandler(); }
	onunload = function() { SkySoft.unloadHandler(); }
	onresize = function() { SkySoft.resizeHandler(); }
}
// we need cookie functions
SkySoft.cookies = {
	save : function(name,value,days) {
		if (days) {
			var date=new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires="; expires="+date.toGMTString();
		}
		else expires = "";
		document.cookie = name+"="+escape(value)+expires+"; path=/";
	},
	read : function(name) {
		var nameEQ=name+"=";
		var ca=document.cookie.split(';');
		for(var i=0;i<ca.length;i++) {
			var c=ca[i];
			while (c.charAt(0)==' ') c=c.substring(1,c.length);
			if (c.indexOf(nameEQ)==0) {
				var str = unescape(c.substring(nameEQ.length));
				return str;
			}
		}
		return null;
	},
	del : function(name) {
		SkySoft.cookies.save(name,"",-1);
	}
};
SkySoft.cookies.write = SkySoft.cookies.save;

if (self.DynAPI) {
	self.DynAPI.cookies = SkySoft.cookies;
}

/* code from dynapi3, Powered by oursky.net
 */
function Browser() {
	var b = navigator.appName;
	var v = this.version = navigator.appVersion;
	var ua = navigator.userAgent.toLowerCase();
	this.v = parseInt(v);
	this.safari = ua.indexOf("safari")>-1;	// always check for safari & opera
	this.opera = ua.indexOf("opera")>-1;	// before ns or ie
	this.ns = !this.opera && !this.safari && (b=="Netscape");
	this.ie = !this.opera && (b=="Microsoft Internet Explorer");

	if (this.ns) {
		this.ns4 = (this.v==4);
		this.ns6 = (this.v>=5);
		this.b = "Netscape";
	}
	else if (this.ie) {
		this.v=parseInt(v.substr(v.indexOf("MSIE")+4));
		if (this.v > 7) {}
		else if (this.v >= 6) {this.ie6 = true;}
		else if (this.v >= 5) {this.ie5 = true;}
		else if (this.v >= 4) {this.ie4 = true;}
		this.b = "MSIE";
	}
	else if (this.opera) {
		this.v=ua.substr(ua.indexOf("opera")+6,1) * 1; // set opera version
		if (this.v >= 7) {this.opera7 = true;}
		else if (this.v >= 6) {this.opera6 = true;}
		this.b = "Opera";
	}
	else if (this.safari) {
		this.ns6 = (this.v>=5);	// ns6 compatible correct?
		this.b = "Safari";
	}
	this.dom = (document.createElement && document.appendChild && document.getElementsByTagName)? true : false;
	this.def = (this.ie||this.dom);
	this.win32 = ua.indexOf("win")>-1;

	if (this.win32) {
		this.win = true;
		if (ua.indexOf("nt")>-1) {
			this.nt = true;
			if (ua.indexOf("nt 5")>-1) {
				this.nt5 = true;
				if (ua.indexOf("nt 5.1")>-1) {
					this.nt51 = true
				}
			}
		}
	}
	else if (ua.indexOf("mac")>-1) { this.mac = true; }
	else if (ua.indexOf("x11")>-1) { this.x = true; }

	this.other = (!this.win32 && !this.mac);
	this.detectCharset();

	var minver = navigator.appMinorVersion||'';
	minver = ';'+minver.replace(/ /, '')+';';
	if (minver.indexOf('SP1')) this.sp1 = true;

	this.hand = this.ie ? 'hand' : 'pointer';
	this.blankpage = this.opera ? siteurl + '/blank.html' : '';
	this.cssCompatMode = !document.compatMode||document.compatMode=='BackCompat';

	this.supported = (this.def||this.ns4||this.ns6||this.opera)? true:false;
	if (!this.supported) window.status = '无法识别的浏览器. 本站脚本可能不支持该浏览器.';

	if (!window.navigate) {
		window.navigate = function(url) {
			window.location.href = phpurl(url);
		}
	}
}
Browser.prototype.detectCharset = function () {
	if (!self.document) return setTimeout("is.detectCharset()", 0);
	this.en = this.english = self.english;
	this.charset = (document.charset||document.characterSet||"").toLowerCase();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -