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

📄 menu_function.jsp

📁 jsp人事管理系统jsp+servlet
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>CMS4J</title>
<link href="../skin/blue/css/menu.css" rel="stylesheet" type="text/css">
<link href="../skin/blue/css/tree.css" rel="stylesheet" type="text/css">
<script src="../../js/common.js"></script>
<script src="../../js/tree/xtree.js"></script>
<script src="../../js/page_init.js"></script>

<script>
function goto(target,URL){
	obj = eval("top." + target);
	obj.location.href = URL;
}
</script>

<%
if(!cn.com.dekn.cms.security.login.CMS4JUser.isLogin(request)){
%>
	<script>
		top.location.href="../login.jsp";
	</script>
<%
return;
}
%>

</head>

<script>

//当前的菜单
var currMenu = "${param.type}";

function displayOrHideMenu(objID){
	displayOrHide("menu_" + objID);
	
	var linkTable = document.getElementById("menu_" + objID);
	var obj = document.getElementById("menu_title_" + objID);
	
	if(obj){
		if(linkTable.style.display==""){
			obj.className = "menu-ctrl-bar-exp-button";
		}else{
			obj.className = "menu-ctrl-bar-col-button";
		}
	}
}

//页面初始化
function pageInit(){
	if(document.getElementById("NODE_ID")){
		selectInit("NODE_ID","${param.cluster_node_id}");
	}
}

//切换要显示的菜单
function loadMenu(showMenuID){
	//如果当前要切换的菜单不是当前正在显示的菜单
	if(showMenuID != currMenu){		
		document.getElementById("module_span_" + currMenu).style.display = "none";
		document.getElementById("module_span_" + showMenuID).style.display = "";
	}else{
		document.getElementById("module_span_" + showMenuID).style.display = "";
	}
	
	currMenu = showMenuID;
	
}

</script>

<body onLoad="loadMenu(currMenu)">




<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="menu-border-line"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="8"></td>
  </tr>
  
</table>

<cms4j:module scope="user" domain="domain_admin" is_menu="1" parent_module_id="" state="1">

<span id="module_span_<%=module_info.getMODULE_ID()%>" style="display:none">


<cms4j:module scope="user" domain="domain_admin" is_menu="1" parent_module_id="<%=module_info.getMODULE_ID()%>" state="1">
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="menu-ctrl-bar-left"></td>
    <td class="menu-ctrl-bar-bg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr style="cursor:pointer" onClick="displayOrHideMenu('module_<%=module_info.getMODULE_ID()%>')" >
        <td width="157" class="menu-ctrl-bar-title"><%=module_info.getNAME()%></td>
        <td width="25" class="menu-ctrl-bar-exp-button" id="menu_title_module_<%=module_info.getMODULE_ID()%>">&nbsp;</td>
      </tr>
    </table></td>
    <td class="menu-ctrl-bar-right"></td>
  </tr>
</table>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0" id="menu_module_<%=module_info.getMODULE_ID()%>">
  <tr>
    <td class="menu-link-area-left"></td>
    <td height="10" class="menu-link-area-bg">
	
	<table width="98%" border="0" cellspacing="0" cellpadding="0">
	<%
	boolean isHasChildModule = cn.com.dekn.cms.resource.sysModule.busi.ModuleBean.isExistChildModule(module_info.getMODULE_ID());
	int tmp = 0;
	if(isHasChildModule){
	%>
	
	<cms4j:module scope="user" is_menu="1" state="1" domain="domain_admin" parent_module_id="<%=module_info.getMODULE_ID()%>">
	
		<%
		//判断是否显示分隔线
		if(tmp > 0){
		%>
		<tr>
			<td colspan="2" align="center" height="12">
				<table width="90%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td height="2" valign="middle" class="menu_class_line"></td>
				  </tr>
				</table>
			</td>
		</tr>
		<%
		}
		%>
		
		<cms4j:resource type="type_menu" module="<%=module_info.getMODULE_ID()%>">
		  <tr>
			<td class="menu-icon">&nbsp;</td>
			<td class="menu-text"><a href="<%=res_info.getRES_ACTION()%>" target="mainFrame"><%=res_info.getNAME()%></a></td>
		  </tr>
		  <% tmp++; %>
		</cms4j:resource>
		
	</cms4j:module>
	
	<%
	}else{
	%>
	
	<cms4j:resource type="type_menu" module="<%=module_info.getMODULE_ID()%>">
      <tr>
        <td class="menu-icon">&nbsp;</td>
        <td class="menu-text"><a href="<%=res_info.getRES_ACTION()%>" target="mainFrame"><%=res_info.getNAME()%></a></td>
      </tr>
	</cms4j:resource>
	
   	<%
	}
	%>
	
	
	</table>
    </table>
	
	</td>
    <td class="menu-link-area-right"></td>
  </tr>
</table>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="menu-bottom-left"></td>
    <td class="menu-bottom-bg">&nbsp;</td>
    <td class="menu-bottom-right"></td>
  </tr>
</table>

</cms4j:module>

</span>


</cms4j:module>




</body>
</html>

⌨️ 快捷键说明

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