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

📄 popmenu.jsp

📁 在系统开发过程中用到了javabean和jsp技术
💻 JSP
字号:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,java.sql.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode"%>


<STYLE>
.skin1 {
    BORDER-RIGHT: buttonhighlight 0px outset; BORDER-TOP: buttonhighlight 0px outset; FONT-SIZE: 9pt; VISIBILITY: hidden; BORDER-LEFT: buttonhighlight 0px outset; WIDTH: 90px; CURSOR: default; BORDER-BOTTOM: buttonhighlight 0px outset; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: absolute; BACKGROUND-COLOR: #000000; TEXT-ALIGN: center
}
.menuitems {
    PADDING-RIGHT: 10px; PADDING-LEFT: 10px
}
</STYLE>

<SCRIPT language=JavaScript1.2>
<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?

function showmenuie5() {
	var rightedge = document.body.clientWidth-event.clientX;
	var bottomedge = document.body.clientHeight-event.clientY;
	if (rightedge < ie5menu.offsetWidth)
		ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
	else
		ie5menu.style.left = document.body.scrollLeft + event.clientX;
	if (bottomedge < ie5menu.offsetHeight)
		ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
	else
		ie5menu.style.top = document.body.scrollTop + event.clientY;
	
	ie5menu.style.visibility = "visible";
		var str = document.all.txt_orgno.value;
		//var orgno = document.all.txt_test.value;
		var id="00000000000000000000:58,62@00010000000000000000:59,58";
		var ids = id.split("@");

		for(var i=0;i<ids.length;i++)
		{
			var bmrt = ids[i].split(":");
			if(bmrt[0]==str)
			{
				var rts = bmrt[1].split(",");
				for(var j=0;j<rts.length;j++)
				{
					if(rts[j]=="58")
						addorg1.style.visibility = "visible";
					else
						addorg1.style.visibility = "hidden";
					if(rts[j]=="59")
						modorg1.style.visibility = "visible";
					else
						modorg1.style.visibility = "hidden";
					if(rts[j]=="60")
						delorg1.style.visibility = "visible";
					else
						delorg1.style.visibility = "hidden";
					if(rts[j]=="61")
						dutylist1.style.visibility = "visible";
					else
						dutylist1.style.visibility = "hidden";
					if(rts[j]=="62")
						addduty1.style.visibility = "visible";
					else
						addduty1.style.visibility = "hidden";
					if(rts[j]=="63")
						psinf1.style.visibility = "visible";
					else
						psinf1.style.visibility = "hidden";
				}
			}
		}
	return false;
}

function hidemenuie5() {
	delorg1.style.visibility = "hidden";
	addorg1.style.visibility = "hidden";
	modorg1.style.visibility = "hidden";
	addduty1.style.visibility = "hidden";
	dutylist1.style.visibility = "hidden";
	psinf1.style.visibility = "hidden";
	news1.style.visibility = "hidden";
	ie5menu.style.visibility = "hidden";
}

function highlightie5() {
	if (event.srcElement.className == "menuitems") {
		event.srcElement.style.backgroundColor = "highlight";
		event.srcElement.style.color = "white";
		if (display_url)
		window.status = event.srcElement.url;
   }
}

function lowlightie5() {
	if (event.srcElement.className == "menuitems") {
		event.srcElement.style.backgroundColor = "";
		event.srcElement.style.color = "black";
		window.status = "";
   }
}

function jumptoie5() {
	if (event.srcElement.className == "menuitems") {
		if (event.srcElement.getAttribute("target") != null)
		window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
	else
		window.location = event.srcElement.url;
   }
}
//  End -->
</SCRIPT>

<q class=skin1 id=ie5menu onmouseover="highlightie5()" 
style="LEFT: 280px; TOP: 28px" onclick="jumptoie5()"; onmouseout="lowlightie5()">


<!--TABLE height="73" cellSpacing=1 cellPadding=0 width="98%" align=center 
bgColor=#000000>
  <TBODY-->
<%
oa.bean.RightBean rtBean =null;
try{
//权限判断//判断用户身份
String bmbh = (String)request.getParameter("txt_orgno");
rtBean = new oa.bean.RightBean();

String userid = (String)session.getAttribute("zgbh");
if(userid==null || userid.equals(""))
{
	System.out.println("session过期,请重新登陆!");
}
if(userid!=null)
{
	rtBean.setUID(userid);
	//boolean isRight = false;
}
%>   
<q id=addorg1>
 <table>
  <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00 height=20 
    scroll="no" onload="window.defaultStatus='00009876.4567.net';" onclick="addorg()">
      <CENTER>增加子部门</CENTER>
	</TD>
  </TR>
 </table>
</q>
<q id=modorg1>
 <table>
  <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" bgColor=#ffcc00 height=20 onclick="modorg()">
       <CENTER>修改部门</CENTER>
	</TD>
  </TR>
 </table>
</q>
<q id=delorg1>
   <table>
  <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffffff';" vAlign=center 
    bgColor=#ffffff height="20" onclick="delorg()">
      <CENTER>删除部门</CENTER></TD></TR></table></q>
<q id=addduty1>
   <table>
   <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center 
    bgColor=#ffcc00 height="20" onclick="addduty()">
      <CENTER>增加职务</CENTER></TD></TR></table></q>
<q id=dutylist1>
   <table>
  <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center 
    bgColor=#ffcc00 height="20" onclick="dutylist()">
      <CENTER>职务列表</CENTER></TD></TR></table></q>
 <q id=psinf1>
   <table>
  <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center 
    bgColor=#ffcc00 height="20" onclick="disperson()">
      <CENTER>人员信息</CENTER></TD></TR></table></q>
 <q id=news1>
   <table>
 <TR>
    <TD 
    onmouseover="this.style.backgroundColor='#ff9900'; this.style.cursor='hand';" 
    onmouseout="this.style.backgroundColor='#ffcc00';" vAlign=center 
    bgColor=#ffcc00 height="20" onclick="disnews()">
      <CENTER>新闻类别</CENTER></TD></TR></table></q>
<!--/TBODY></TABLE></q--></q>

<SCRIPT language=JavaScript1.2>
  
	var tag = "1";
	function onclickshow(id)
	{
		document.all.txt_orgno.value = id;
		tag = "2";

		document.oncontextmenu = showmenuie5;
		document.body.onclick = hidemenuie5;
	}

	if (document.all && window.print)
	{
		ie5menu.className = menuskin;
		document.oncontextmenu = showmenuie5;
		document.body.onclick = hidemenuie5;
	}

	function nocontextmenu() 
	{
		event.cancelBubble = true
		event.returnValue = false; 
		return false;
	}
 
	function norightclick(e) 
	{
		if (window.Event) 
		{
			if (e.which == 2 || e.which == 3)
			return false;
		}
		else if (event.button == 2 || event.button == 3)
		{
			event.cancelBubble = true
			event.returnValue = false;
			return false;
		} 
	}

	function onclickhide()
	{
		if (window.Event) 
		document.captureEvents(Event.MOUSEUP); 

		if(tag=="1")//鼠标单击在显示菜单地方之外
		{	
			document.all.txt_orgno.value = "";
			document.oncontextmenu = nocontextmenu;  // for IE5+
			document.onmousedown = norightclick;  // for all others
		}
		tag = "1";
	}

	function addorg()
	{
		document.all.txt_type.value = "1";
		document.all.txt_edit.value = "1";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}

	function modorg()
	{
			document.all.txt_type.value = "1";
			document.all.txt_edit.value = "2";
			document.all.form1.action = "index.jsp";
			document.all.form1.submit();
	}

	function delorg()
	{
		if(document.all.txt_orgno.value=="00000000000000000000")
		{
			alert("总公司不能删除!");
		}
		else
		{
			if(!confirm("是否真的要删除?"))
			{
			}
			else
			{
				document.all.txt_type.value = "1";
				document.all.txt_edit.value = "3";
				document.all.form1.action = "../../Org";
				document.all.form1.submit();
			}
		}
	}

	function dutylist()
	{
		document.all.txt_type.value = "2";
		document.all.txt_edit.value = "";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}

	function addduty()
	{
		document.all.txt_type.value = "2";
		document.all.txt_edit.value = "1";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}
	function disperson()
	{
		document.all.txt_type.value = "3";
		document.all.txt_edit.value = "";
<%
if(!rtBean.isRightMode("部门列表","人员信息"))//浏览个人信息  可有可无
{
%>
		document.all.txt_type.value = "3"; 
		document.all.txt_edit.value = "4";
		document.all.txt_personno.value = <%=userid%>;

<%}%>

		//document.all.txt_edit.value = "";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}

</SCRIPT>
<%}finally{
	if(rtBean!=null)rtBean.closeConn();
}%>

⌨️ 快捷键说明

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