使用说明(另一个菜单样式见 "新菜单样式.jpg" 文件)：

(1)将两个jsp文件替换原来web根目录下的文件。
(2)将图标文件夹中的文件拷贝到zrsysmanage\images\五种不同的肤色文件夹下。
(3)将以下四个函数拷贝到 ZRpowerSys下的UIservice.java中。


              /**
              * 功能或作用：生成主框架上面页面的菜单  //第二种菜单1
              * @param strUser_No用户编号
              * @strUser_ImagePath用户图片路径
              * @return 返回HTML值
              */
              public String LoadMainUP(String strUser_No,String strUser_ImagePath){
                log.WriteLog("LoadMainUP", "开始调用");
                String strResult = "";

                strResult = "<table height=\"85\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
                strResult = strResult + "<td width=\"5\" bgcolor=\"#EDF3FF\" style=\"filter: Alpha(Opacity=85)\"></td>";

                try {
                  String scode = "";
                  String sname = "";
                  String surl = "";
                  String  strSql = "";
                  int num_row = 0;
                  if (strUser_No.equals("0000000000000000"))
                 {
                    strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and MENUNO like '___' order by MNCODE,MENUNO";
                 }else
                 {
                     strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and  MENUNO like '___' and  MENUNO in (select distinct substr(MENUNO,1,3) from BPIP_ROLE_RERMISSISSON where ROLEID in (select ROLEID from BPIP_USER_ROLE where USERID='"+strUser_No+"')) order by MNCODE,MENUNO";
                 }

                  dbSet ds = dbengine.QuerySQL(strSql);
                  if (ds != null && ds.RowCount() > 0) {
                    for (int i = 0; i < ds.RowCount(); i++) {
                            scode = ds.Row(i).Column("MENUNO").getString();
                            sname = ds.Row(i).Column("MENUNAME").getString();
                            surl = ds.Row(i).Column("URL").getString();
                            if (surl == null){surl = "";}
                            num_row = num_row + 1;

                            strResult = strResult + "<td width=\"80\"  bgcolor=\"#EDF3FF\" align=center  style=\"filter: Alpha(Opacity=80)\">";
                            strResult = strResult + "<a href=\"javascript:chgFontStyle('"+scode+"','"+surl+"');\"><img  border=\"0\" src="+SysPreperty.getProperty().AppUrl +"zrsysmanage/images/"+strUser_ImagePath+"/dt"+String.valueOf(num_row)+".gif align=\"absmiddle\"><br><br><b>"+sname+"</b></a></td>";


                    }
                    ds = null;
                  }
                }
                catch (Exception ex){
                  strResult ="error";
                }
                strResult = strResult + "<td width=\"5\"></td></tr></table>";
                return strResult.toString();
            }


            //第二种菜单2
            public String LoadMenu_two(String strUser_No,String strcode) {
                String  strSql = "";
                String  strSqlA = "";
                String  strResult = "";
                String  strTmp = "";
                String  strPARENTNO = "";
                String  strYPARENTNO = "";
                String  strMENUNO = "";
                String  strMENUNAME = "";
                String  strURL = "";
                String  strISOPEN = "";
                int num=0;
                int znum=0;

                Hashtable Hashtable1 = new Hashtable();//一级菜单对应的二级菜单表

                try {

                    //---一级菜单------------
                    if (strUser_No.equals("0000000000000000"))
                    {
                       strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and MENUNO like '______'  and MENUNO like '"+strcode+"%' order by MNCODE,MENUNO";
                    }else
                    {
                       strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and  MENUNO like '______' and MENUNO like '"+strcode+"%' and  MENUNO in (select distinct substr(MENUNO,1,6) from BPIP_ROLE_RERMISSISSON where ROLEID in (select ROLEID from BPIP_USER_ROLE where USERID='"+strUser_No+"')) order by MNCODE,MENUNO";
                    }

                    //二级菜单----------------
                    if (strUser_No.equals("0000000000000000"))
                   {
                      strSqlA = "select URL,MENUNO,ISOPEN,MENUNAME from BPIP_MENU where FLAG='1' and ISPOWER='1'  and MENUNO like '_________'  order by MNCODE,MENUNO";
                   }else
                   {
                      strSqlA = "select  URL,MENUNO,ISOPEN,MENUNAME from BPIP_MENU where FLAG='1'  and ISPOWER='1'  and MENUNO like '_________' and MENUNO in (select MENUNO from BPIP_ROLE_RERMISSISSON where ROLEID in (select ROLEID from BPIP_USER_ROLE where USERID='"+ strUser_No+"')) order by MNCODE,MENUNO";
                   }



                    //二级菜单装入对照表
                    dbSet ds = dbengine.QuerySQL(strSqlA);
                    if (ds != null && ds.RowCount() > 0) {
                      for (int i = 0; i < ds.RowCount(); i++) {
                           strMENUNO = ds.Row(i).Column("MENUNO").getString();
                           strPARENTNO = strMENUNO.substring(0,6);
                           strMENUNAME = ds.Row(i).Column("MENUNAME").getString();
                           strURL = ds.Row(i).Column("URL").getString();
                           if (strURL==null){strURL="";}
                           strISOPEN = ds.Row(i).Column("ISOPEN").getString();
                           if (strISOPEN==null || strISOPEN.length()==0)
                           {strISOPEN="0";}

                           if (!strPARENTNO.equals(strYPARENTNO) && strYPARENTNO.length()>0)
                           {
                               Hashtable1.put(strYPARENTNO,strTmp);
                               strTmp = "";
                           }
                           if (strTmp.length()==0)
                           {strTmp = strTmp + strMENUNO+"@"+strMENUNAME+"@"+strURL+"@"+strISOPEN;}
                           else
                           {strTmp = strTmp + "#"+strMENUNO+"@"+strMENUNAME+"@"+strURL+"@"+strISOPEN;}

                           strYPARENTNO = strPARENTNO;

                      }
                      if (ds.RowCount()>1)
                      {
                          Hashtable1.put(strYPARENTNO,strTmp);
                      }
                    }




                  //从一级菜单开始分层生成二级菜单
                  ds = dbengine.QuerySQL(strSql);
                  if (ds != null && ds.RowCount() > 0) {
                    znum=ds.RowCount();
                    for (int i = 0; i < ds.RowCount(); i++) {

                    log.WriteLog("i:"+i);

                      strMENUNO = ds.Row(i).Column("MENUNO").getString();
                      strMENUNAME = ds.Row(i).Column("MENUNAME").getString();
                      strURL =ds.Row(i).Column("URL").getString();
                      if (strURL==null){strURL="";}
                      strISOPEN =ds.Row(i).Column("ISOPEN").getString();
                      if (strISOPEN==null || strISOPEN.length()==0)
                      {strISOPEN="0";}

                      if (i==0)
                      {
                          if (strURL.length()>0)
                          {
                              strResult = strResult + "<div class='lmenua' id='treePic"+String.valueOf(i+1)+"' onClick=\"javascript:ShowFLT("+String.valueOf(i+1)+");OpenUrl('"+strURL+"','"+strISOPEN+"');\">"+strMENUNAME+"</div>\r\n";

                          }else
                          {
                              strResult = strResult + "<div class='lmenua' id='treePic"+String.valueOf(i+1)+"' onClick=\"javascript:ShowFLT("+String.valueOf(i+1)+");\">"+strMENUNAME+"</div>\r\n";

                          }
                      }else
                      {
                          if (strURL.length()>0)
                          {
                              strResult = strResult + "<div class='lmenub'  id='treePic"+String.valueOf(i+1)+"' onClick=\"javascript:ShowFLT("+String.valueOf(i+1)+");OpenUrl('"+strURL+"','"+strISOPEN+"');\">"+strMENUNAME+"</div>\r\n";

                          }else
                          {
                              strResult = strResult + "<div class='lmenub'  id='treePic"+String.valueOf(i+1)+"' onClick=\"javascript:ShowFLT("+String.valueOf(i+1)+");\">"+strMENUNAME+"</div>\r\n";

                          }
                      }
                      if (i==0)
                      {
                         strResult = strResult + "<div id='LM"+String.valueOf(i+1)+"'>\r\n";
                      }
                      else
                      {
                         strResult = strResult + "<div  style='display:none' id='LM"+String.valueOf(i+1)+"'>\r\n";
                      }

                      //--得到当前菜单下的二级菜单-----------------------
                      strTmp= (String)Hashtable1.get(strMENUNO);
                      if (strTmp!=null)
                      {
                      String[] sList1 = strTmp.split("#");//得到记录数
                      for (int k = 0; k < sList1.length; k++) {
                          String[] sList2 = sList1[k].split("@");
                          strMENUNO =sList2[0];
                          strMENUNAME =sList2[1];
                          strURL =sList2[2];
                          strISOPEN =sList2[3];

                          num++;

                          if (strURL.length()>0)
                          {
                              strResult = strResult + "<div class='lmenuc' id='treePicb"+String.valueOf(num)+"' onClick=\"javascript:ShowFLTb("+String.valueOf(num)+");OpenUrl('"+strURL+"','"+strISOPEN+"');\">"+strMENUNAME+"</div>\r\n";

                          }else
                          {
                              strResult = strResult + "<div class='lmenuc' id='treePicb"+String.valueOf(num)+"' onClick=\"javascript:ShowFLTb("+String.valueOf(num)+");\">"+strMENUNAME+"</div>\r\n";

                          }


                         strResult = strResult + "<div id='LMb"+String.valueOf(num)+"'  style='display:none'  class='pclist'>\r\n";


                          strResult = strResult + "<ul>\r\n";

                          strResult = strResult + "</ul>\r\n";
                          strResult = strResult + "</div>\r\n";
                      }}
                      //--得到当前菜单下的二级菜单结束--------------------
                      strResult = strResult + "</div>\r\n";


                    }
                    ds = null;
                  }
                }
                catch (Exception ex) {
                       log.WriteLog("错误："+ex.toString());
                       return "error";

                }

                if (strResult.length()>0)
                {strResult = String.valueOf(znum)+"/"+String.valueOf(num)+"       "+strResult;}

                return strResult;
            }

            //第二种菜单2-1
            public String LoadMenu_two_a(String strUser_No,String strcode) {
                            String  strSql = "";
                            String  strSqlA = "";
                            String  strResult = "";
                            String  strTmp = "";
                            String  strPARENTNO = "";
                            String  strYPARENTNO = "";
                            String  strMENUNO = "";
                            String  strMENUNAME = "";
                            String  strURL = "";
                            String  strISOPEN = "";
                            int num=0;
                            int znum=0;
                            strResult = strResult + "<table width='149' border='0' cellpadding='0' cellspacing='0'>\r\n";
            
                            Hashtable Hashtable1 = new Hashtable();//一级菜单对应的二级菜单表
            
                            try {
            
                                //---一级菜单------------
                                if (strUser_No.equals("0000000000000000"))
                                {
                                   strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and MENUNO like '______'  and MENUNO like '"+strcode+"%' order by MNCODE,MENUNO";
                                }else
                                {
                                   strSql = "select MENUNO,MENUNAME,URL,ISOPEN from BPIP_MENU where FLAG='1' and  MENUNO like '______' and MENUNO like '"+strcode+"%' and  MENUNO in (select distinct substr(MENUNO,1,6) from BPIP_ROLE_RERMISSISSON where ROLEID in (select ROLEID from BPIP_USER_ROLE where USERID='"+strUser_No+"')) order by MNCODE,MENUNO";
                                }
            
                                //二级菜单----------------
                                if (strUser_No.equals("0000000000000000"))
                               {
                                  strSqlA = "select URL,MENUNO,ISOPEN,MENUNAME from BPIP_MENU where FLAG='1' and ISPOWER='1'  and MENUNO like '_________'  order by MNCODE,MENUNO";
                               }else
                               {
                                  strSqlA = "select  URL,MENUNO,ISOPEN,MENUNAME from BPIP_MENU where FLAG='1'  and ISPOWER='1'  and MENUNO like '_________' and MENUNO in (select MENUNO from BPIP_ROLE_RERMISSISSON where ROLEID in (select ROLEID from BPIP_USER_ROLE where USERID='"+ strUser_No+"')) order by MNCODE,MENUNO";
                               }
            
            
            
                                //二级菜单装入对照表
                                dbSet ds = dbengine.QuerySQL(strSqlA);
                                if (ds != null && ds.RowCount() > 0) {
                                  for (int i = 0; i < ds.RowCount(); i++) {
                                       strMENUNO = ds.Row(i).Column("MENUNO").getString();
                                       strPARENTNO = strMENUNO.substring(0,6);
                                       strMENUNAME = ds.Row(i).Column("MENUNAME").getString();
                                       strURL = ds.Row(i).Column("URL").getString();
                                       if (strURL==null){strURL="";}
                                       strISOPEN = ds.Row(i).Column("ISOPEN").getString();
                                       if (strISOPEN==null || strISOPEN.length()==0)
                                       {strISOPEN="0";}
            
                                       if (!strPARENTNO.equals(strYPARENTNO) && strYPARENTNO.length()>0)
                                       {
                                           Hashtable1.put(strYPARENTNO,strTmp);
                                           strTmp = "";
                                       }
                                       if (strTmp.length()==0)
                                       {strTmp = strTmp + strMENUNO+"@"+strMENUNAME+"@"+strURL+"@"+strISOPEN;}
                                       else
                                       {strTmp = strTmp + "#"+strMENUNO+"@"+strMENUNAME+"@"+strURL+"@"+strISOPEN;}
            
                                       strYPARENTNO = strPARENTNO;
            
                                  }
                                  if (ds.RowCount()>1)
                                  {
                                      Hashtable1.put(strYPARENTNO,strTmp);
                                  }
                                }
            
            
            
            
                              //从一级菜单开始分层生成二级菜单
                              ds = dbengine.QuerySQL(strSql);
                              if (ds != null && ds.RowCount() > 0) {
                                znum=ds.RowCount();
                                for (int i = 0; i < ds.RowCount(); i++) {
            
                                log.WriteLog("i:"+i);
            
                                  strMENUNO = ds.Row(i).Column("MENUNO").getString();
                                  strMENUNAME = ds.Row(i).Column("MENUNAME").getString();
                                  strURL =ds.Row(i).Column("URL").getString();
                                  if (strURL==null){strURL="";}
                                  strISOPEN =ds.Row(i).Column("ISOPEN").getString();
                                  if (strISOPEN==null || strISOPEN.length()==0)
                                  {strISOPEN="0";}
            
                                  
            
                                  //--得到当前菜单下的二级菜单-----------------------
                                  strTmp= (String)Hashtable1.get(strMENUNO);
                                  if (strTmp!=null)
                                  {
                                  String[] sList1 = strTmp.split("#");//得到记录数
                                  
                                  for (int k = 0; k < sList1.length; k++) {
                                      String[] sList2 = sList1[k].split("@");
                                      strMENUNO =sList2[0];
                                      strMENUNAME =sList2[1];
                                      strURL =sList2[2];
                                      strISOPEN =sList2[3];
            
                                      num++;
                                      
                                      if (num>10){num=10;}
                                      
                                      strResult = strResult + "<tr>\r\n";
                                      strResult = strResult +"<td  align=center>\r\n";
                                      strResult = strResult +"<a href=\"javascript:OpenUrl('"+strURL+"','"+strISOPEN+"');\"><img  border='0' src="+SysPreperty.getProperty().AppUrl +"zrsysmanage/images/blueimg/dtw"+String.valueOf(num)+".gif align='absmiddle'><br><b>"+strMENUNAME+"</b></a>\r\n";
                                      strResult = strResult + "<br><br></td></tr>\r\n";
                                      

                                      
            
                                  }}
                                  //--得到当前菜单下的二级菜单结束--------------------
                                  
            
            
                                }
                                ds = null;
                              }
                            }
                            catch (Exception ex) {
                                   log.WriteLog("错误："+ex.toString());
                                   return "error";
            
                            }
            
                            strResult = strResult + "</table>\r\n";
                            
                            if (strResult.length()>0)
                            {strResult = String.valueOf(znum)+"/"+String.valueOf(num)+"       "+strResult;}
            
                            return strResult;
            }

  public String get_menuName(String strcode) {
      String strRe = "";
      String  strSql = "";
      strSql = "select MENUNAME from BPIP_MENU where MENUNO = '"+strcode+"'";
      dbSet ds = dbengine.QuerySQL(strSql);
      if (ds != null && ds.RowCount() > 0) {
          strRe = ds.Row(0).Column("MENUNAME").getString();
      }
      ds = null;
      return strRe;
  }



