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

📄 dv_nav.js

📁 一个利用JSP+MYSQL编写的新闻发布系统
💻 JS
字号:
//论坛头部代码
function dvbbs_nav(stats,userhidden){
	//CSS部分
	document.write ("<style type=text/css>")
	document.write (Forum_cssArray[6])
	document.write ("BODY{" + Forum_cssArray[25] + "}")
	document.write ("TD{" + Forum_cssArray[10] + "}")
	document.write ("th{" + Forum_cssArray[2] + "}")
	document.write ("td.TableTitle2{" + Forum_cssArray[3] + "}")
	document.write ("td.TableBody1{" + Forum_cssArray[4] + "}")
	document.write ("td.TableBody2{" + Forum_cssArray[5] + "}")
	document.write ("td.TopDarkNav{" + Forum_cssArray[24] + "}")
	document.write ("td.TopLighNav{" + Forum_cssArray[23] + "}")
	document.write ("td.TopLighNav1{" + Forum_cssArray[26] + "}")
	document.write ("td.TopLighNav2{" + Forum_cssArray[28] + "}")
	document.write (".tableBorder1{" + Forum_cssArray[0] + "}")
	document.write (".tableBorder2{" + Forum_cssArray[1] + "}")
	document.write (Forum_cssArray[7])
	document.write ("input,select,Textarea{font-family:Tahoma,Verdana,宋体; font-size: 12px; line-height: 15px;}")
	document.write (".normalTextSmall {     font-size : 11px;    color : #000000;     font-family: Verdana, Arial, Helvetica, sans-serif;}")
	document.write ("</style>")
	//头部代码开始
	document.write ('</head><body ' + Forum_cssArray[11] + ' onmousemove="HideMenu()">')
	document.write ('<div ID="overDiv" STYLE="position:absolute; visibility:hide; z-index: 1;"></div>')
	document.write ("<div id=menuDiv style='Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; BACKGROUND-COLOR: #9cc5f8'></div>")
	document.write ("<table cellspacing=0 cellpadding=0 align=center style=\"border:1px " + Forum_cssArray[27] + " solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 1px;width:" + Forum_cssArray[12] + ";\">")
	document.write ("<tr><td width=100%>")
	document.write ("<table width=100% align=center border=0 cellspacing=0 cellpadding=0>")
	document.write ("<tr><td class=TopDarkNav height=9></td></tr>")
	document.write ("<tr><td height=70 class=TopLighNav2>")
	document.write ("<TABLE border=0 width=\"100%\" align=center>")
	document.write ("<TR><TD align=left width=\"25%\"><a href=\"" + Forum_info_3 + "\"><img border=0 src=\"" + Forum_info_6 + "\"></a></TD>")
	document.write ("<TD Align=center width=\"65%\">")
	if (Forum_adsArray[0]!='')
	{
		document.write (Forum_adsArray[0])
	}else{
		document.write ("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"468\" height=\"60\"><param name=movie value=\"http://www.dvbbs.net/skin/default/dvbanner.swf\"><param name=quality value=high><param name=menu value=false><embed src=\"http://www.dvbbs.net/skin/default/dvbanner.swf\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\"></embed></object>")
	}
	document.write ("</td><td align=right style=\"line-height: 15pt\" width=\"10%\">")
	document.write ("<a href=#><span style=\"CURSOR: hand\" onClick=\"window.external.AddFavorite(\'" + Forum_info_1 + "\', \'" + Forum_info_0 + "\')\">加入收藏</span></a>")
	document.write ("<br><a href=\"mailto:" + Forum_info_5 + "\">联系我们</a>")
	document.write ("<br><a href=\"boardhelp.asp?boardid=" + boardid + "\">论坛帮助</a>")
	document.write ("</td></td></tr></table></td></tr>")
	document.write ("<tr><td class=TopLighNav height=9></td></tr>")
	document.write ("<tr><td class=TopLighNav1 height=22  valign=\"middle\">&nbsp;&nbsp;")
	var navlinkimg=" <img src=" + Forum_info_7 + "navspacer.gif align=absmiddle>"
	if (founduser)
	{
		if (userhidden==2)
		{
			document.write ("<a href=\"cookies.asp?action=hidden&userid=" + userid + "\">隐身</a>")
		}else{
			document.write ("<a href=\"cookies.asp?action=online&userid=" + userid + "\">上线</a>")
		}
		document.write (navlinkimg + " <a href=\"login.asp\">重登陆</a>" + navlinkimg + " <a href=\"usermanager.asp\" onMouseOver=\'ShowMenu(manage,100)\'>用户控制面板</a>")
	}else{
		document.write ("<a href=\"login.asp\">登陆</a>" + navlinkimg + " <a href=\"reg.asp\">注册</a>")
	}
	document.write (navlinkimg + " <a href=\"query.asp?boardid=" + boardid + "\">搜索</a>")
	document.write (navlinkimg + " <a href=\"#\" onMouseOver=\'ShowMenu(stylelist,100)\'>自选风格</a>")
	document.write (navlinkimg + " <a href=\"boardstat.asp?boardid=" + boardid + "\" onMouseOver=\'ShowMenu(boardstat,100)\'>论坛状态</a>")
	document.write (navlinkimg + " <a href=\"show.asp?boardid=" + boardid + "\" onMouseOver=\'ShowMenu(downlist,100)\'>论坛展区</a>")
	document.write (navlinkimg + " <a href=\"http://www.dvbbs.net/dvgame/\"><font color=red>聊天游戏中心</font></a>")
	if (founduser)
	{
		document.write (navlinkimg + " <a href=\"logout.asp\">退出</a>")
	}else{
		document.write (navlinkimg + " <a href=\"dispuser.asp?boardid=" + boardid + "&action=permission\">我能做什么</a>")
	}
	if (master)
	{
		document.write (navlinkimg + " <a href=admin_index.asp>管理</a>")
		document.write (navlinkimg + " <a href=\"recycle.asp\">回收站</a>")
	}
	document.write ("</td></tr></table></td></tr></table>")
}

if (founduser)
{
var sendmsgnum,sendmsgid,sendmsguser
if (usermsg!=''){
	var usermsgArray=usermsg.split("||")
	if (usermsgArray.length==3){
	sendmsgnum=usermsgArray[0]
	sendmsgid=usermsgArray[1]
	sendmsguser=usermsgArray[2]
	}else{
	sendmsgnum=0
	sendmsgid=0
	sendmsguser=''
	}
}else{
	sendmsgnum=0
	sendmsgid=0
	sendmsguser=''	
}
}
//用户控制面板
var manage= '<a style=font-size:9pt;line-height:14pt; href=\"JavaScript:openScript(\'messanger.asp?action=new\',500,400)\">发短信</a><br><a style=font-size:9pt;line-height:14pt; href=\"dispuser.asp?id=<%=userid%>&boardid=' + boardid + '&action=permission\">我能做什么</a><br><a style=font-size:9pt;line-height:14pt; href=\"topicwithme.asp?s=2\">我发表的主题</a><br><a style=font-size:9pt;line-height:14pt; href=\"topicwithme.asp?s=1\">我参与的主题</a><br><a style=font-size:9pt;line-height:14pt; href=\"mymodify.asp\">基本资料修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"modifypsw.asp\">用户密码修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"modifyadd.asp\">联系资料修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"usersms.asp\">用户短信服务</a><br><a style=font-size:9pt;line-height:14pt; href=\"friendlist.asp\">编辑好友列表</a><br><a style=font-size:9pt;line-height:14pt; href=\"favlist.asp\">用户收藏管理</a><br><a style=font-size:9pt;line-height:14pt; href=\"myfile.asp\">个人文件管理</a>'
//论坛状态
var boardstat= '<a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?boardid=' + boardid + '\">今日贴数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?action=lasttopicnum&boardid=' + boardid + '\">主题数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?action=lastbbsnum&boardid=' + boardid + '\">总帖数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?reaction=online&boardid=' + boardid + '\">在线图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?reaction=onlineinfo&boardid=' + boardid + '\">在线情况</a><br><a style=font-size:9pt;line-height:14pt; href=\"boardstat.asp?reaction=onlineUserinfo&boardid=' + boardid + '\">用户组在线图例</a>'
//论坛收藏
var downlist= '<a style=font-size:9pt;line-height:14pt; href=\"show.asp?filetype=0&boardid=' + boardid + '\">文件集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"show.asp?filetype=1&boardid=' + boardid + '\">图片集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"show.asp?filetype=2&boardid=' + boardid + '\">Flash浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"show.asp?filetype=3&boardid=' + boardid + '\">音乐集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"show.asp?filetype=4&boardid=' + boardid + '\">电影集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"show.asp\">贺卡发送</a>'
//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -2;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
}
}

function ShowMenu(vMnuCode,tWidth) {
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}

function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}

function dvhtmlencode(str){
	if (str!='')
	{
		str=str.replace(">","&gt;")
		str=str.replace("<","&lt;")
		str=str.replace(" ","&nbsp;")
		for (i=0;i<=badwordsArray.length ;i++ )
		{
			str=str.replace(badwordsArray[i],"*")
		}
		return(str)
	}else{
	str='';
	return(str);
	}
}

⌨️ 快捷键说明

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