main_data.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/errorpage.jsp" %>
  2. <%@ page import="com.vnex.intranet.web.*" %>
  3. <%@ page import="java.util.*" %>
  4. <%
  5.     String uri = request.getRequestURI();
  6.     uri = uri.substring(uri.lastIndexOf("/")+1, uri.length());
  7.     uri = uri.substring(0, uri.indexOf("_"));
  8.     String sessionName = uri+"_menu";
  9.     Collection collection = (Collection)session.getAttribute(sessionName);
  10.     String showString = "你没有足够的权限调用此项功能。";
  11.     if(collection != null && collection.size() > 1)
  12.      {
  13.         Iterator iterator = collection.iterator();
  14.         int i = 0;
  15.         while(iterator.hasNext())
  16.         {
  17.            MenuModel menuModel = (MenuModel)iterator.next();
  18.            String bgcolor = "#e0e0e0";
  19.            if(i%2==0)
  20.              bgcolor = "#fafafa";
  21.            i++;  
  22.            if(menuModel.getMenuAttribute() == MenuModel.TOP_MENU)
  23.            {  
  24. %>
  25.               <tr bgcolor="#666666">
  26.                  <td colspan="2"><font class="strongw"><%=menuModel.getMenuCaption()%></strong></td>
  27.               </tr>
  28. <%         }
  29.            else
  30.            {
  31.               String prifix = "";
  32.               if(menuModel.getMenuAttribute() == MenuModel.SECOND_MENU)
  33.                  prifix = "&nbsp;&nbsp;&nbsp;*";
  34.               else
  35.                  prifix = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--";   
  36.             %>           
  37.            <tr bgcolor="<%=bgcolor%>">
  38.              <td width="145"><%=prifix%>
  39. <%
  40.               if(menuModel.getMenuAttribute() == MenuModel.MENU_ITEM)
  41.               {  
  42. %>                         
  43.                  <a href="<%=menuModel.getAction()%>"><%=menuModel.getMenuCaption()%></a>
  44. <%            }
  45.               else
  46.               {
  47. %>
  48.                  <strong><%=menuModel.getMenuCaption()%></strong>
  49. <%            }%>                                                
  50.              </td>
  51.              <td><%=menuModel.getMenuDescription()%></td>
  52.            </tr>
  53. <%         }
  54.         }
  55.       }
  56.       else
  57.       {
  58. %>                                      
  59.             <tr> 
  60.               <td align="center" colspan="2" bgcolor="#FFFFFF" height="100">
  61.                  <strong><%=showString%></strong>
  62.               </td>
  63.             </tr>
  64. <%    }%>