toolbar.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:3k
源码类别:
电子政务应用
开发平台:
Java
- <%
- /**
- * $RCSfile: toolbar.jsp,v $
- * $Revision: 1.3 $
- * $Date: 2000/12/18 02:06:21 $
- */
- %>
- <%@ page
- import="com.coolservlets.forum.*,
- com.coolservlets.forum.util.*"
- %>
- <jsp:useBean id="adminBean" scope="session"
- class="com.coolservlets.forum.util.admin.AdminBean"/>
- <% ////////////////////////////////
- // Jive authorization check
- // check the bean for the existence of an authorization token.
- // Its existence proves the user is valid. If it's not found, redirect
- // to the login page
- Authorization authToken = adminBean.getAuthToken();
- if( authToken == null ) {
- response.sendRedirect( "/mainctrl/bbs/admin" );
- return;
- }
- %>
- <% ////////////////////////////////////////
- // figure out what type of user we are:
- boolean isSystemAdmin = ((Boolean)session.getValue("jiveAdmin.systemAdmin")).booleanValue();
- boolean isForumAdmin = ((Boolean)session.getValue("jiveAdmin.forumAdmin")).booleanValue();
- boolean isGroupAdmin = ((Boolean)session.getValue("jiveAdmin.groupAdmin")).booleanValue();
- %>
- <% ////////////////
- // get parameters
- String tab = ParamUtils.getParameter(request,"tab");
- if( tab == null ) {
- tab = "global";
- }
- %>
- <html>
- <head>
- <title>工具栏</title>
- <link rel="stylesheet" href="style/global.css">
- </head>
- <body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0
- bgcolor="#dddddd" text="#000000" link="#0000ff" vlink="#0000ff" alink="#ff0000">
- <table class="toolbarBg" cellpadding="0" cellspacing="0" border="0" height="100%">
- <td width="99%">
- <font face="verdana,arial,helvetica" size="-1">
-
- <%-- "Global" tab --%>
- <% if( isSystemAdmin || isGroupAdmin ) { %>
- <a href="sidebar.jsp?tree=system"
- target="sidebar" class="toolbarLink"
- title="Goto the Global menu"
- onclick="location.href='toolbar.jsp?tab=global';"
- ><%= (tab.equals("global"))?"<b>Global</b>":"Global" %></a>
- <% } %>
-
- <%-- "Forums" tab --%>
- <% if( isSystemAdmin || isForumAdmin ) { %>
- <a href="sidebar.jsp?tree=forum"
- target="sidebar" class="toolbarLink"
- title="Goto the Forums menu"
- onclick="location.href='toolbar.jsp?tab=forums';"
- ><%= (tab.equals("forums"))?"<b>Forums</b>":"Forums" %></a>
- <% } %>
- </font>
- </td>
- <td width="1%" nowrap>
- <%-- logout link --%>
- <% // get the username %>
- <% try { %>
- <% ForumFactory forumFactory = ForumFactory.getInstance(authToken); %>
- <% ProfileManager manager = forumFactory.getProfileManager(); %>
- <% User user = manager.getUser(authToken.getUserID()); %>
- Logged in as: <b><%= user.getUsername() %></b>
- <% } catch( Exception ignored ) {} %>
-
- <a href="index.jsp?logout=true"
- target="_top" class="toolbarLink"
- title="退出管理工具"
- ><b>退出</b></a>
-
- </td>
- </table>
- </body>
- </html>