
<%  // sidebar variables
    
    String[] sidebarItems = {
        "安装检查",
        "语言",
        "数据库",
        "管理员设置"
    };
    String[] links = {
        "setup.jsp",
        "setup2.jsp",
        "setup3.jsp",
        "setup5.jsp"
    };
    boolean[] sidebarActive = new boolean[4];
    for (int i=0; i<sidebarActive.length; i++) {
        sidebarActive[i] = getSessionBoolean(session,"sidebar."+i+".active");
    }
    String[] lights = new String[4];
    for (int i=0; i<lights.length; i++) {
        String temp = getSessionString(session,"sidebar."+i+".light");
        if (temp == null) {
            temp = RED;
        }
        lights[i] = temp;
    }
%>

<center>
<font size="-2">安装状态</font>
</center>
<p>
<%  for (int i=0; i<sidebarItems.length; i++) {
        boolean active = sidebarActive[i];
        boolean link = lights[i].equals(YELLOW) || lights[i].equals(GREEN);
%>
<table bgcolor="<%= active?"#999999":"#cccccc" %>" cellpadding="0" cellspacing="0" border="0" width="160">
<tr>
    <td>
    <table bgcolor="<%= active?"#999999":"#cccccc" %>" cellpadding="3" cellspacing="1" border="0" width="100%">
    <tr bgcolor="#eeeeee">
        <td width="1%"><%= lights[i] %></td>
        <td width="99%" background="images/grad_gray.gif">
        <font size="-1"<%= active?"":" color=\"#666666\"" %>>
    <%=  link?("<a href=\""+links[i]+"\">"):"" %><b><%= sidebarItems[i] %></b><%= link?"</a>":"" %>
        </font>
        </td>
    </tr>
    </table>
    </td>
</tr>
</table>
<p>
<%  } %>