<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="gbase.menu.*"%>
<%@ include file="/admin/checkLogin.jsp" %>
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<title>系统管理左边菜单</title>
</head>
<body>
<%  //调用MenuTree类，得到菜单数组;
    WebMenuTree theMenuTree=new WebMenuTree();
    String record[][]=null;
    String record1[][]=null;
    String role_id="0003";
    record=theMenuTree.getRoleAllMenuTree();
    record1=theMenuTree.getRoleHaveMenuTree(role_id);
    String flag="";
    for(int i=0;i<record.length;i++){
    for(int j=0;j<record1.length;j++){
    flag="";
    if(record[i][0].equals(record1[j][0]))
      {
      flag="checked";
      break;
      }
    else
      flag="";
    }
    %>
<!--第一层-->
<%if(record[i][3].length()>0 && record[i][0].length()==3){
%>
<input name="menu_id<%=i%>" type="checkbox" value="record[i][0]" <%=flag%>><%=record[i][1]%><br>
<%}%>
<%if(record[i][3].length()<=0 && record[i][0].length()==3){
%>
<img src="../images/next.gif" width="14" height="14"/><%=record[i][1]%><br>
<%}%>

<!--第二层-->
<%if(record[i][3].length()>0 && record[i][0].length()==6){
%>
&nbsp;&nbsp;<input name="menu_id<%=i%>" type="checkbox" value="record[i][0]" <%=flag%>><%=record[i][1]%><br>
<%}%>
<%if(record[i][3].length()<=0 && record[i][0].length()==6){
%>
&nbsp;&nbsp;<img src="../images/next.gif" width="14" height="14"/><%=record[i][1]%><br>
<%}%>


<!--第三层-->
<%if(record[i][3].length()>0 && record[i][0].length()==9){
%>
&nbsp;&nbsp;&nbsp;&nbsp;<input name="menu_id<%=i%>" type="checkbox" value="record[i][0]" <%=flag%>><%=record[i][1]%><br>
<%}%>
<%if(record[i][3].length()<=0 && record[i][0].length()==9){
%>
&nbsp;&nbsp;&nbsp;&nbsp;<img src="../images/next.gif" width="14" height="14"/><%=record[i][1]%><br>
<%}%>

<%}%>
</body>

</html>
