📄 modmenuqx.jsp
字号:
menuhrachyname = menu1 +"\\\\"+ menu2 +"\\\\"+ menu3;
out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'> ");
//////////////////////////////////////////////////////////////////////////////////////////
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> ");
else
out.print("<font color='blue'>"+QXtitle[4]+"</font> ");
}
}
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> ");
}
///////////////////////////////////////////////////////////////////////////////
out.println("</td></tr>");//三级
out.println("</table></div></td></tr>");//二级
}
out.println("</table></div>");//一级
ID1 = id1;
ID2 = id2;
ID3 = id3;
}
else if(!id2.equals(ID2) && !ID2.equals("0"))////id1==ID1//2222222////
{
radioid = id1+"_0_0";
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'>");//一级
radioid = id1 + "_" + id2 + "_0";
out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'> ");
////////////////////////////////////////////////////////////////////////////////////////////////////*
if(Integer.parseInt(id2)!=0 && Integer.parseInt(id3)==0)
{
String selmenu00id2 = "";//将 selectmenu00 的 id 设为 selectmenu 的 id 的集合,用 E 连接
for(int i=0;i<5;i++)
{
if(!qx_checkid[i].equals(""))
selmenu00id2 = selmenu00id2 + qx_checkid[i] + "E";
}
if(sfstate==2 && state==2) selmenu00id2 = selmenu00id2 + "1_1_"+dxbh+"_0" + "E";
out.print("<input type='checkbox' name='selectmenu00' id='"+selmenu00id2+"' value='' onclick='allChecked(\""+selmenu00id2+"\")'>");
}
else out.print(" ");
////////////////////////////////////////////////////////////////////////////////////////////////////
out.println("<q class='mout' style='cursor:hand' onclick='Expand(\""+radioid+"\")'><font color='blue'>"+menu2+"</font></q>");//二级
////////////////////////////////////////////////////////////////////////////////////////////
if(Integer.parseInt(id2)!=0 && Integer.parseInt(id3)==0)
{
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> ");
else
out.print("<font color='blue'>"+QXtitle[4]+"</font> ");
}
}
}
if(sfstate==2 && state==2)//没有录入员的身份,但有管理员的身份
{
String lrcheckid = "1_1_"+dxbh+"_0";//sf +"_"+wt+"_"+ dxbh +"_"+ cz;
int lrischecked = personqx[Integer.parseInt(id1)][Integer.parseInt(id2)][0][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> ");
}
////////////////////////////////////////////////////////////////////////////////////////////////
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'>");
////三级
if(Integer.parseInt(id2)!=0 && Integer.parseInt(id3)==0)//说明zz_fbxwb.dxbh是二级菜单id,则将此小树全部展开
{
sql = " select distinct menu3,id3,id "
+ " from menu "
+ " where id1=" + id1
+ " and id2=" + id2
+ " and id3<>0 "
+ " order by id3";
ResultSet rsid3 = docBean.QuerySQL(sql);
while(rsid3.next())
{
temp_id = ds.toString(rsid3.getString("id"));
String temp_id3 = ds.toString(rsid3.getString("id3"));
String temp_menu3 = ds.toString(rsid3.getString("menu3"));
menuhrachyname = menu1 +"\\\\"+ menu2 +"\\\\"+ temp_menu3;
out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'> ");
////////////////////////////////////////////////////////////////////////////////////////////
for(int i=0;i<5;i++)
{
if(!qx_checkid[i].equals("")) //修改qx_checkid[i]的BMBH
qx_checkid[i] = qx_checkid[i].substring(0,4) + temp_id + qx_checkid[i].substring((qx_checkid[i]).length()-2);
}
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_"+temp_id+"_0" + "E";
out.print("<input type='checkbox' name='selectmenu00' id='"+selmenu00id3+"' value='' onclick='allChecked(\""+selmenu00id3+"\")'>");
/////////////////////////////////////////////////////////////////////////////////
out.println("<font color='blue'>"+temp_menu3+"</font>");
///////////// liumei ///////////////////////////////////////////////////////////////////////////////
for(int i=0;i<5;i++)
{
if(!qx_checkid[i].equals(""))
{
out.print("<input type='checkbox' id='"+qx_checkid[i]+"' name='selectmenu' value='");
String ss1 = qx_checkid[i].substring(0,1);
//System.out.println("ss1: "+ss1);
String ss2 = qx_checkid[i].substring((qx_checkid[i]).length()-1);
bon = personqx[Integer.parseInt(id1)][Integer.parseInt(id2)][Integer.parseInt(temp_id3)][Integer.parseInt(ss1)][Integer.parseInt(ss2)];
if(bon!=-1) out.print(bon+"' style='color: #66FF66;border-style: double; border-color: #6699FF' checked>");
else out.print("' style='color: #66FF66;border-style: double; border-color: #6699FF'>");
if(ss1.equals("2"))//管理员
out.print("<font color='blue'>"+QXtitle[Integer.parseInt(ss2)]+"</font> ");
else
out.print("<font color='blue'>"+QXtitle[4]+"</font> ");
}
}
if(sfstate==2 && state==2)//没有录入员的身份,但有管理员的身份
{
String lrcheckid = "1_1_"+temp_id+"_0";//sf +"_"+wt+"_"+ dxbh +"_"+ cz;
int lrischecked = personqx[Integer.parseInt(id1)][Integer.parseInt(id2)][Integer.parseInt(temp_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> ");
}
////////////////////////////////////////////////////////////////////////////////////////////////
out.println("</td></tr>");
}
if(rsid3!=null) {stmt = rsid3.getStatement(); rsid3.close();}
if(stmt!=null) stmt.close();
}
if(Integer.parseInt(id2)!=0 && Integer.parseInt(id3)!=0)//说明zz_fbxwb.dxbh是三级菜单id
{
menuhrachyname = menu1 +"\\\\"+ menu2 +"\\\\"+ menu3;
out.println("<tr bgcolor='#ffffff' height='22'><td width='12%'> ");
///////////////////////////////////////////////////////////////////////////////////////////////
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> ");
else
out.print("<font color='blue'>"+QXtitle[4]+"</font> ");
}
}
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> ");
}
///////////////////////////////////////////////////////////////////////////////
out.println("</td></tr>");//三级
}
out.println("</table></div></td></tr>");//二级
out.println("</table></div>");//一级
ID2 = id2;
ID3 = id3;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -