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

📄 head.ascx

📁 简易BBS源码,包括系统管理、论坛管理、用户可以看懂源码
💻 ASCX
字号:
<%@ Control Language="c#" Inherits="free.bbs.head" CodeFile="head.ascx.cs" %>
<SCRIPT language="javascript">

function submitonce(theform){
//if IE 4+ or NS 6+
if (document.all||document.getElementById){
//screen thru every element in the form, and hunt down "submit" and "reset"
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
//disable em
tempobj.disabled=true
}
}
}
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
</SCRIPT>
<SCRIPT language="JavaScript">
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");


function showPopupText(){
var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
	if(o.dypop!=sPop) {
			sPop=o.dypop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				dypopLayer.innerHTML="";
				dypopLayer.style.filter="Alpha()";
				dypopLayer.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
			
	}
}

function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
document.onmouseover=showPopupText;

function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }

//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -2;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#ffffff';//定义下拉菜单阴影色
 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'class=tableBorder1 cellspacing=1 cellpadding=3 style='width:"+tWidth+"'  onmouseout='HideMenu()'><tr height=23><td nowrap class=tableBody1  align=left >" + 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;
	}
}

//用户控制面板
var manage= '<a style=font-size:9pt;line-height:14pt; href=\"myzhuti.aspx?Page=1">我发表的主题</a><br><a style=font-size:9pt;line-height:14pt; href=\"myhuifu.aspx?Page=1\">我参与的主题</a><br><a style=font-size:9pt;line-height:14pt; href=\"ziliaoxiugai.aspx\">基本资料修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"mimaxiugai.aspx\">用户密码修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"lianxiziliao.aspx\">联系资料修改</a><br><a style=font-size:9pt;line-height:14pt; href=\"shoujianxiang.aspx\">用户短信服务</a><br><a style=font-size:9pt;line-height:14pt; href=\"goodfriend.aspx\">编辑好友列表</a><br><a style=font-size:9pt;line-height:14pt; href=\"#\">用户收藏管理</a><br><a style=font-size:9pt;line-height:14pt; href=\"#\">个人文件管理</a>'
//模板列表
var stylelist = '<a style=font-size:9pt;line-height:12pt; href=\"#\">恢复默认设置</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">默认模板</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">水晶紫色</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">e点小镇</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">心情灰色</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">秋意盎然</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">蓝色庄重</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">绿色淡雅</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">蓝雅绿</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">紫色淡雅</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">淡紫色</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">橘子红了</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">红红夜思</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">粉色回忆</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">青青河草</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">浓浓绿意</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">棕红预览</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">淡咖啡</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">碧海晴天</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">蓝色水晶</a><br><a style=font-size:9pt;line-height:12pt; href=\"#\">雪花飘飘</a><br>'
//论坛状态
var boardstat= '<a style=font-size:9pt;line-height:14pt; href=\"jinritieshu.aspx">今日贴数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"jinrizhuti.aspx\">今日主题数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"zongzhuti.aspx\">主题数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"zongtie.aspx\">总帖数图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"yonghuzhuce.aspx\">用户注册图例</a><br><a style=font-size:9pt;line-height:14pt; href=\"#\">在线情况</a><br><a style=font-size:9pt;line-height:14pt; href=\"#\">用户组在线图例</a>'
//论坛收藏
var downlist= '<a style=font-size:9pt;line-height:14pt; href=\"../article/default.aspx\" target=_blank>文件集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"./pic.aspx\" target=_blank>images集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"../flash_look/flash.aspx\" target=_blank>Flash浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"music.aspx\" target=_blank>音乐集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"film.aspx\" target=_blank>电影集浏览</a><br><a style=font-size:9pt;line-height:14pt; href=\"kapian.aspx\" target=_blank>贺卡发送</a>'
//bbs
//var bbs='<a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=1&Page=1\">PB界面设计</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=2&Page=1\">PB高级技巧</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=3&Page=1\">PB数据窗口技术</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=4&Page=1\">PB/Anywhere/Sqlserver</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=5&Page=1\">PB/PFC</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=6&Page=1\">PB/BS</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=7&Page=1\">ERP讨论区</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=8&Page=1\">程序人生</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=9&Page=1\">交友天地</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=10&Page=1\">版主申请</a><br><a style=font-size:9pt;line-height:14pt; href=\"bbs_zhuti.aspx?ancestor_id=11&Page=1\">站内公告</a>'
</SCRIPT>

<TABLE id="Table1" style="WIDTH: 760px; TOP: 0px"  cellSpacing="0"
	cellPadding="0" align="center" border="0">
	<TBODY>
		<TR align="center">
			<TD>
				<OBJECT class="falsh" width="760" height=160 classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
						<PARAM NAME="_cx" VALUE="20082">
						<PARAM NAME="_cy" VALUE="2381">
						<PARAM NAME="FlashVars" VALUE="">
						<PARAM NAME="Movie" VALUE="./banner.swf">
						<PARAM NAME="Src" VALUE="./banner.swf">
						<PARAM NAME="WMode" VALUE="Window">
						<PARAM NAME="Play" VALUE="-1">
						<PARAM NAME="Loop" VALUE="-1">
						<PARAM NAME="Quality" VALUE="High">
						<PARAM NAME="SAlign" VALUE="">
						<PARAM NAME="Menu" VALUE="-1">
						<PARAM NAME="Base" VALUE="">
						<PARAM NAME="AllowScriptAccess" VALUE="always">
						<PARAM NAME="Scale" VALUE="ShowAll">
						<PARAM NAME="DeviceFont" VALUE="0">
						<PARAM NAME="EmbedMovie" VALUE="0">
						<PARAM NAME="BGColor" VALUE="">
						<PARAM NAME="SWRemote" VALUE="">
						<PARAM NAME="MovieData" VALUE="">
						<embed src="./banner.swf" width="760"  height=200> </embed>
					</OBJECT>
			</TD>
		</TR>
	</TBODY>
</TABLE>
<table width="760" align="center" border="0" cellpadding="0" cellspacing="0">
	<TBODY>
		<TR height="2">
			<TD colSpan="2" class="TableBody1" height="5"></TD>
		</TR>
		<TR height="20" >
			<TD class="TableBody1" style="HEIGHT: 20px" align=left colSpan="1">
				<DIV><A id="kongzhimianban" onmouseover="ShowMenu(manage,100)" onmouseout="HideMenu()" href="kongzhiye.aspx?xiaoxi_page=1&amp;wenzhang_page=1"
						runat="server">
						<asp:Label id="Label1" runat="server" ForeColor="Red">Label</asp:Label>用户控制面板</A>
					| <A id="denglu" href="denglu.aspx" runat="server">登陆</A> | <A href="zhuce1.aspx">注册</A>
					| <A href="#">搜索</A> | <A onmouseover="ShowMenu(stylelist,100)" onmouseout="HideMenu()" href="#">
						自选风格</FONT></A> | <A onmouseover="ShowMenu(boardstat,100)" onmouseout="HideMenu()" href="#">
						论坛状态</FONT></A> | <A onmouseover="ShowMenu(downlist,100)" onmouseout="HideMenu()" href="#">
						论坛展区</FONT></A> | <A href="what can i do.aspx">我能做什么</A> |
					<asp:linkbutton id="dengchu" Runat="server" ForeColor="Black" onclick="dengchu_Click">登出</asp:linkbutton></DIV>
			</TD>
		</TR>
		<TR >
			<TD class="TableBody1" style="HEIGHT: 5px" colSpan="1">
			</TD>
		</TR>
	</TBODY>
</table>
</FONT>

⌨️ 快捷键说明

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