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

📄 modmenuqx.jsp

📁 “JSP数据库项目案例导航”一书从第一章到第十一章各章实例的源程序文件以及数据库文件。 注意: 1. 本书中的案例提供的数据库环境不同
💻 JSP
📖 第 1 页 / 共 4 页
字号:
	}
	else if(!ID3.equals("0"))
	{
		radioid = id1+"_0_0";
		out.println("<div style='display:none' id='"+radioid+"'>");//一级<table border='1' cellpadding='2' style='border-collapse: collapse; color:#FFFFFF' bordercolor='D0E7FF' width='100%' height='18' bgcolor='#ffffff'>

		radioid = id1 + "_" + id2 + "_0";		
		//out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		out.println("<div style='display:none' id='"+radioid+"'><table border='0' cellpadding='0' style='border-collapse: collapse; color:#FFFFFF' width='100%' height='18' bgcolor='#ffffff'>");//二级

		menuhrachyname = menu1 +"\\\\"+ menu2 +"\\\\"+ menu3;

		out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
		



		////////////////////////////////////////////////////////////////////////////////////////
		String selmenu00id3 = ""; //将 selectmenu00 的 id 设为 selectmenu 的 id 的集合,用 E 连接
		for(int i=0;i<5;i++)
		{
			if(!qx_checkid[i].equals(""))						
				selmenu00id3 = selmenu00id3 + qx_checkid[i] + "E";
		}	
		if(sfstate==2 && state==2) selmenu00id3 = selmenu00id3 + "1_1_"+dxbh+"_0" + "E";
		out.print("<input type='checkbox' name='selectmenu00' id='"+selmenu00id3+"' value='' onclick='allChecked(\""+selmenu00id3+"\")'>");
		///////////////////////////////////////////////////////////////////////////////////////




		out.println("<font color='blue'>"+menu3+"</font>");
		



		/////////////////////////////////////////////////////////////////////////////////////////////
		for(int i=0;i<5;i++)
		{
			if(!qx_checkid[i].equals(""))
			{
				out.print("<input type='checkbox' id='"+qx_checkid[i]+"' name='selectmenu' value='");
				if(ischecked[i]!=-1) out.print(ischecked[i]+"' style='color: #66FF66;border-style: double; border-color: #6699FF' checked>");
				else out.print("' style='color: #66FF66;border-style: double; border-color: #6699FF'>");
				String ss1 = qx_checkid[i].substring(0,1);
				String ss2 = qx_checkid[i].substring((qx_checkid[i]).length()-1);
				if(ss1.equals("2"))//管理员
					out.print("<font color='blue'>"+QXtitle[Integer.parseInt(ss2)]+"</font>&nbsp;&nbsp;");
				else
					out.print("<font color='blue'>"+QXtitle[4]+"</font>&nbsp;&nbsp;");
			}
		}
		if(sfstate==2 && state==2)//没有录入员的身份,但有管理员的身份
		{
			String lrcheckid = "1_1_"+dxbh+"_0";//sf +"_"+wt+"_"+ dxbh +"_"+ cz;
			int lrischecked = personqx[Integer.parseInt(id1)][Integer.parseInt(id2)][Integer.parseInt(id3)][1][0];
			out.print("<input type='checkbox' id='"+lrcheckid+"' name='selectmenu' value='");
			if(lrischecked!=-1) out.print(lrischecked+"' style='color: #66FF66;border-style: double; border-color: #6699FF' checked>");
			else				out.print("' style='color: #66FF66;border-style: double; border-color: #6699FF'>");
			out.print("<font color='blue'>"+QXtitle[4]+"</font>&nbsp;&nbsp;");
		}
		///////////////////////////////////////////////////////////////////////////////



		out.println("</td></tr>");//三级
		out.println("</table></div>");//二级</td></tr>
		out.println("</div>");//一级//二级</table>

		ID3 = id3;
	}

}
if(rs!=null) {stmt = rs.getStatement(); rs.close();}
			if(stmt!=null) stmt.close();






/*		
		if(Integer.parseInt(id2)==0 && Integer.parseInt(id3)==0)
		{
			String bmqx = (String)hash.get("SHOW1");									
			String bmqxArray[] = bmqx.split(",");
			stature = "录入员";
			state = "1";
			for(int mm=0;mm<bmqxArray.length;mm++)
			{				
				if(bmqxArray[mm].equals(dxbh))
				{
					stature = "管理员";
					state = "2";				
				}
			}
			String selmenu00id = state +"_1_"+ dxbh;
			out.print("<input type='checkbox' name='selectmenu00' id='selectmenu00id' value='' onclick='allChecked(\"selectmenu00id\")'>");
		}
		out.print("<q class='mout' onclick='Expand(\""+radioid+"\")' style='cursor:hand'><font color='blue'>"+menu1+"</font></q></td>");
*/
%>
</q>
</form>

<script>
function Expand(radioid)
{
	
	var divTags = document.all.tags("div");															
	var thisdiv = null;
	for(var i=0;i<divTags.length;i++)
	{	
		thisdiv = divTags.item(i);												
		if(thisdiv.id==radioid)
		{
			if(thisdiv.style.display=="none")
				thisdiv.style.display="";
			else 
				thisdiv.style.display="none";
		}

	}
}

function allChecked(checkboxID)
{
	var idE = checkboxID.split("E");
	var mm = "";
	if(document.getElementById(checkboxID).checked==true)
	{
		for(var k=0;k<idE.length;k++)
		{ 
			mm = idE[k];
			if(document.getElementById(mm)!=null)
				document.getElementById(mm).checked=true;
		}
	}
	if(document.getElementById(checkboxID).checked==false)
	{
		for(var k=0;k<idE.length;k++)
		{ 
			mm = idE[k];
			if(document.getElementById(mm)!=null)
				document.getElementById(mm).checked=false;
		}
	}

/*
	//alert();
	var str = "";
	var strid = "";		
	if(document.getElementById(checkboxID).checked==true)
		alert("111");
	if(document.getElementById(checkboxID).checked==false)
		alert("222");
	//alert("thanks");

	
	var num00 = document.all.selectmenu00.length;
	var num = document.all.selectmenu.length;

	for(var j=0;j<num00;j++)
	{
		strid = document.all.selectmenu00[j].id;
		var idE = strid.split("E");				//	alert(idE);

		if(strid==checkboxID)
		{
			if(document.all.selectmenu00[j].checked==true)
			{		
				for(var i=0;i<num;i++)
				{
					str = document.all.selectmenu[i].id;	
					for(var k=0; k<idE.length; k++)
					{
						var idEm = idE[k];	
						if(idEm == str)
							document.all.selectmenu[i].checked = true;
					}
				}

			}

			if(document.all.selectmenu00[j].checked==false)
			{
				for(var i=0;i<num;i++)
				{
					str = document.all.selectmenu[i].id;	
					for(var k=0; k<idE.length; k++)
					{
						var idEm = idE[k];	
						if(idEm == str)
							document.all.selectmenu[i].checked = false;
					}
				}
			}
		}	
	}

*/
}

function toto()
{
	var deletestr = "";
	var strng = "";
	var str = "";
	var temp = "";
	var num = document.all.selectmenu.length;

	for(var i=0;i<num;i++)
	{
		if(document.all.selectmenu[i].checked==true)
		{
			strng = document.all.selectmenu[i].id;			
			temp = strng.substring(0,strng.length-2)+"_0";	
			if(document.getElementById(temp)!=null && document.getElementById(temp).checked == false)
			{
				str = str + temp + ";";
				document.getElementById(temp).checked = true;
			}
			str = str + strng + ";";
		}
		if(document.all.selectmenu[i].value!="")
		{
			deletestr = deletestr + document.all.selectmenu[i].value + ",";
		}
	}
/*	strng = "";
	for(var i=0;i<num;i++)
	{
		if(document.all.selectmenu[i].checked==true)
		{
			strng = strng + document.all.selectmenu[i].id+";";				
		}
	}
	
	var deletestr = "";
	for(var i=0;i<num;i++)
	{
		if(document.all.selectmenu[i].value!="")
			deletestr = deletestr + document.all.selectmenu[i].value + ",";
	}
*/
//	alert(str);
//	alert(deletestr);
	
	document.all.txt_type.value = "7";
	document.all.txt_edit.value = "1";
	document.all.txt_page.value = str;       //txt_page被借用
	document.all.txt_dutyno.value = deletestr;	//txt_dutyno被借用
	document.all.txt_personno.value = "<%=strPersonNo%>";
	document.all.form3.action = "../../Org";
	document.all.form3.submit();	
	window.close();
}
function clearMENUQX(){
/*	document.all.txt_type.value = "7";
	document.all.txt_edit.value = "1";
	document.all.txt_page.value = "";       //txt_page被借用
	document.all.txt_dutyno.value = deletestr;	//txt_dutyno被借用
	document.all.txt_personno.value = "<%=strPersonNo%>";
	document.all.form3.action = "../../Org";
	document.all.form3.submit();
*/
	var num = document.all.selectmenu.length;
	for(var i=0;i<num;i++)
		document.all.selectmenu[i].checked=false;
	var num = document.all.selectmenu00.length;
	for(var i=0;i<num;i++)
		document.all.selectmenu00[i].checked=false;
}

</script>


<%}
finally{
	if(myBean!=null)	myBean.closeConn();
	if(menuBean!=null)	menuBean.closeConn();
	if(myArtBean!=null)	myArtBean.closeConn();
	if(docBean!=null)	docBean.closeConn();
	if(makenew!=null)	makenew.closeConn();
}%>

⌨️ 快捷键说明

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