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

📄 orgmenulist.jsp

📁 “JSP数据库项目案例导航”一书从第一章到第十一章各章实例的源程序文件以及数据库文件。 注意: 1. 本书中的案例提供的数据库环境不同
💻 JSP
字号:
<%
/**********************************************************
Copyright (C),2003-12-13, Beijing  USTB.
All rights reserved.
Filename: orgmenu.jsp
Author: 
Version 1.0
Date:2003-10-12
Description://详细说明此程序文件完成的基本功能,与其他模块的或函数的接口、输出值、取值范围、含义及参数间的控制、顺序、独立或依赖等关系
Other://其它内容说明
Function List://主要方法列表
1.  ...
History://修改历史纪录表,包括修改日期、修改者、修改内容简述
1.  Date:
    Author:
    Modification:
2.  ...
***********************************************************/
%>
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString,javax.swing.tree.DefaultMutableTreeNode"%>
<link href="../css/person.css" type=text/css rel=stylesheet>
 <%	
 oa.bean.OrgMenuBean myBean = null;
 oa.bean.ArticleBean ArtBean = null;
 oa.bean.RightBean rBean = null;
 try{
	myBean = new oa.bean.OrgMenuBean();
	ArtBean = new oa.bean.ArticleBean();
	rBean = new oa.bean.RightBean();

	if ( myBean.getConn() == null
		|| ArtBean.getConn() == null
		|| rBean.getConn() == null )
	{
		%>		
		数据库无法响应,请<a href="javascript:window.history.back(-1);">返回</a>重试
		<%out.close();
	}

	DealString ds=new DealString();
	
	String strbmbh = ds.toString((String)request.getParameter("txt_orgno"));
	String strtag = ds.toString((String)request.getParameter("tag"));
	String strpbh = "0";
	String zgbh = (String)session.getAttribute("zgbh");
	Hashtable htorgqx = (Hashtable)ArtBean.getorgqx(zgbh);	
	String orgqx = (String)htorgqx.get("GL");
	String[] strbmno = orgqx.split(",");
	String[] strBMMC = new String[strbmno.length];
	if(orgqx.equals("")){
		orgqx="-1";
	}
//	String strbmbh = ds.toString((String)request.getParameter("bmbh"));
//	String strwzlx = ds.toString((String)request.getParameter("wzlx"));
	if(strbmbh.equals("")&&orgqx.length()>=20)
	{
		strbmbh = orgqx.substring(0,20);
	}
	if(strbmbh.equals(""))strbmbh = "-1";
	rBean.setOrgid(strbmbh);
	rBean.setUID(zgbh);
	boolean
		right1 = rBean.isRightModelbh("类别维护","增加"),
		right2 = rBean.isRightModelbh("类别维护","修改"),
		right3 = rBean.isRightModelbh("类别维护","删除");
	Vector vect = (Vector)myBean.getData(strbmbh);
%>
<br>
<table width="95%" border="0" cellspacing="3" cellpadding="3" align=center><tr><td height="20">当前位置:信息类别维护>><%= myBean.toName("ZZ_BMB","BMBH","BMMC",strbmbh)%></td></tr></table><br>
	<table width="95%" border="0" cellspacing="0" cellpadding="0" align=center><tr><td>选择部门:
<%	if(!strbmbh.equals("-1")){
		for(int i=0;i<strbmno.length;i++){
			rBean.setOrgid(strbmno[i]);
			if(!rBean.isRightModelbh("信息管理","类别维护")){
				if(strbmbh.equals(strbmno[i])&&i+1<strbmno.length){
					strbmbh = strbmno[i+1];
					rBean.setOrgid(strbmbh);
					right1 = rBean.isRightModelbh("类别维护","增加");
					right2 = rBean.isRightModelbh("类别维护","修改");
					right3 = rBean.isRightModelbh("类别维护","删除");
					vect = (Vector)myBean.getData(strbmbh);
				}
				continue;
			}
			strBMMC[i] = myBean.toName("ZZ_BMB","BMBH","BMMC",strbmno[i]);
%>			<input type=radio onclick="changeBM('<%=strbmno[i]%>')"<%if(strbmbh.equals(strbmno[i])){out.print("checked");}%>><a style="cursor:hand" onclick="changeBM('<%=strbmno[i]%>')"><font color=<%if(strbmbh.equals(strbmno[i])){%>#CC0000<%}else{%>#006600<%}%>><%=strBMMC[i]%></font></a>
		<%}%>
		</td></tr></table><hr><br>
<table width="95%" cellspacing="1" cellpadding="5" bgcolor=#999999 align=center><!-- align=center-->
	<tr bgcolor=#cccccc><td colspan=4><center><b>信息类别列表</b></td></tr>
	<%
	String[] str = new String[5];
	for(int i=0;i<vect.size();i++){
		str[0]=(String)((Hashtable)vect.get(i)).get("BH");
		str[1]=(String)((Hashtable)vect.get(i)).get("MC");
		%>
		<tr bgcolor="#ffcc00">
			<td>【<%=str[1]%>】</td>
<%if(right1||right2){%>
			<td><center>
<%if(right1){%>
				<A onclick="add('<%=str[0]%>')" style="cursor:hand;">增加子类</A>
<%}%>
				<%/*if(right2)
				  {%><%if(right1)
					   {%> | <%}
					 %><A onclick="mod('0','<%=str[0]%>');" style="cursor:hand;">修改</A><%
				  } */%>
			</td>
<%}%>
		</tr>
<%		Vector v2 = (Vector)vect.get(++i);
		int nv2 = v2.size();
		for(int j=0;j<nv2;j++){
			str[0]=(String)((Hashtable)v2.get(j)).get("BH");
			str[1]=(String)((Hashtable)v2.get(j)).get("MC");
			str[2]=(String)((Hashtable)v2.get(j)).get("PBH");
		%>
		<tr bgcolor=#CCCCFF>
			<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=str[1]%></td>
<%if(right2||right3){%>
			<td><center>
				<%if(right2){%>
					<A onclick="mod('<%=str[2]%>','<%=str[0]%>');" style="cursor:hand;">修改</A><%}if(right3){%><%if(right2){%> | <%}%><A onclick="del('<%=str[0]%>');" style="cursor:hand;">删除</A>
				<%}%>
			</td>
<%}%>
		</tr>
<%}%>
	<%}%>
</table>
<%}else out.print("<br><br><br><br><br><br><br><center><font size=5 color='#FF0000'><b>您没有权限浏览此页面</b></font>");%>
<script>
	function changeBM(strbmno)
	{
		document.all.txt_type.value = "5";
//		document.all.bmbh.value = strbmno;
		document.all.txt_orgno.value = strbmno;
		document.all.txt_edit.value = "";
		document.all.txt_personno.value = "";
		document.all.txt_paixu.value = "";
		document.all.txt_srch.value = "";
		document.all.txt_page.value = "";
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}
	function add(menubh){
		document.all.txt_type.value = "5";
//		document.all.bmbh.value = "<%=strbmbh%>";
		document.all.txt_orgno.value = "<%=strbmbh%>";
		document.all.txt_edit.value = "1";
		document.all.txt_id.value = menubh;
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}
	function mod(menupbh,menubh){
		document.all.txt_type.value = "5";
//		document.all.bmbh.value = "<%=strbmbh%>";
		document.all.txt_orgno.value = "<%=strbmbh%>";
		document.all.txt_edit.value = "2";
		document.all.txt_pid.value = menupbh;
		document.all.txt_id.value = menubh;
		document.all.form1.action = "index.jsp";
		document.all.form1.submit();
	}
	function del(menubh){
		if(!confirm("确认要删除吗?")){
			return false;
		}
		document.all.txt_type.value = "5";
//		document.all.bmbh.value = "<%=strbmbh%>";
		document.all.txt_orgno.value = "<%=strbmbh%>";
		document.all.txt_edit.value = "3";
		document.all.txt_id.value = menubh;
		document.all.form1.action = "orgmenu_del.jsp";
		document.all.form1.submit();
	}
</script>

<%}finally{
	if(ArtBean!=null)ArtBean.closeConn();
	if(myBean!=null)myBean.closeConn();
	if(rBean!=null)rBean.closeConn();
}%>

⌨️ 快捷键说明

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