⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _sidebar__jsp.java

📁 JSP聊天系统
💻 JAVA
字号:
/*
 * JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
 */

package _forum._admin;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import com.coolservlets.forum.*;
import com.coolservlets.forum.util.*;
import com.coolservlets.forum.util.tree.*;
import com.coolservlets.forum.util.admin.*;

public class _sidebar__jsp extends com.caucho.jsp.JavaPage{
  private boolean _caucho_isDead;
  	////////////////////
	// page variables
	private final String bullet = "<font color='#666666'>&#149;</font>";

  	////////////////////
	// page methods
	
	private final String printTree( com.coolservlets.forum.util.tree.Tree tree ) {
		StringBuffer buf = new StringBuffer();
		for( int i=0; i<tree.size(); i++ ) {
			com.coolservlets.forum.util.tree.TreeObject treeObject = tree.getChild(i);
			if( treeObject.getType() == tree.NODE ) {
				com.coolservlets.forum.util.tree.TreeNode node 
					= (com.coolservlets.forum.util.tree.TreeNode)treeObject;
				buf.append( printNodeHTML(tree,node) );
				if( node.isVisible() ) {
					buf.append( printTree( node.getChildren() ) );
				}
			}
			else {
				com.coolservlets.forum.util.tree.TreeLeaf leaf 
					= (com.coolservlets.forum.util.tree.TreeLeaf)treeObject;
				buf.append( printLeafHTML(leaf) );
			}
		}
		return buf.toString();
	}
	
	private final String printNodeHTML( com.coolservlets.forum.util.tree.Tree tree, 
			com.coolservlets.forum.util.tree.TreeNode node ) 
	{
		StringBuffer buf = new StringBuffer();
		buf.append( "<table cellpadding='3' cellspacing='0' border='0' width='100%'><td width='1%'>" );
		buf.append( "<a href='sidebar.jsp?flip=" ).append(node.getId()).append("&tree=").append(tree.getName()).append("'>" );
		if( node.isVisible() ) {
			buf.append( "<img src='images/minus.gif' width='11' height='11' border='0'>" );
		}
		else {
			buf.append( "<img src='images/plus.gif' width='11' height='11' border='0'>" );
		}
		buf.append( "</a>" );
		buf.append( "</td><td width='99%' class='sidebarNode'><font size='-1'>" );
		String link = node.getLink();
		if( link != null ) {
			buf.append( "<a href='").append(link).append("' target='main' class='sidebarLink'>" )
			   .append( node.getName() ).append( "</a>" );
		}
		else {
			buf.append( node.getName() );
		}
		buf.append( "</font></td></table>" );
		return buf.toString();
	}
	
	private final String printLeafHTML( com.coolservlets.forum.util.tree.TreeLeaf leaf ) {
		StringBuffer buf = new StringBuffer();
		buf.append( "<table cellpadding='3' cellspacing='0' border='0' width='100%'><td width='1%'>" );
		buf.append( "<img src='images/blank.gif' width='11' height='11' border='0'>" );
		buf.append( "</td><td width='1%'>").append(bullet).append("</td><td width='98%' class='sidebarLeaf'>" );
		buf.append( "<a href='" ).append( leaf.getLink() ).append( "' target='main' class='sidebarLink'>" );
		buf.append( leaf.getName() );
		buf.append( "</a></td></table>" );
		return buf.toString();
	}

  
  public void
  _jspService(javax.servlet.http.HttpServletRequest request,
              javax.servlet.http.HttpServletResponse response)
    throws java.io.IOException, javax.servlet.ServletException
  {
    com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
    javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
    javax.servlet.ServletConfig config = getServletConfig();
    javax.servlet.Servlet page = this;
    javax.servlet.http.HttpSession session = pageContext.getSession();
    javax.servlet.ServletContext application = pageContext.getServletContext();
    response.setContentType("text/html;charset=gb2312");
    request.setCharacterEncoding("GB2312");
    try {
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      
/**
 *	$RCSfile: sidebar.jsp,v $
 *	$Revision: 1.3 $
 *	$Date: 2000/12/18 02:06:21 $
 */

      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      pageContext.write(_jsp_string2, 0, _jsp_string2.length);
      com.coolservlets.forum.util.admin.AdminBean adminBean;
      synchronized (session) {
        adminBean = (com.coolservlets.forum.util.admin.AdminBean) session.getValue("adminBean");
        if (adminBean == null) {
          adminBean = new com.coolservlets.forum.util.admin.AdminBean();
          session.putValue("adminBean", adminBean);
        }
      }
      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      	////////////////////////////////
	// 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( "login.jsp" );
		return;
	}

      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      	//////////////////////
	// Get parameters
	
	// "tree" (tells which tree to display
	String treeName = ParamUtils.getParameter(request,"tree");
	
	// "flip" (id of node to expand/contract)
	int flip = ParamUtils.getIntParameter(request,"flip",-1);

      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      	///////////////////////////////////////
	// Get the permissions for this user:
	boolean isSystemAdmin = ((Boolean)session.getValue("jiveAdmin.systemAdmin")).booleanValue();
	boolean isForumAdmin  = ((Boolean)session.getValue("jiveAdmin.forumAdmin")).booleanValue();
	boolean isGroupAdmin  = ((Boolean)session.getValue("jiveAdmin.groupAdmin")).booleanValue();

      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      	///////////////////////////////////////
	// Figure out which tree to display
	
	com.coolservlets.forum.util.tree.Tree tree = null;
	
	// if treeName is null, try to show the system tree by default if
	// that user has access to see it:
	if( treeName == null ) {
		if( isSystemAdmin || isGroupAdmin ) {
			tree = adminBean.getTree("systemTree");
		}
	}
	// treeName is not null so use that variable to get the tree
	else {
		if( treeName.equals("system") && 
			(isSystemAdmin || isGroupAdmin) ) 
		{
			tree = adminBean.getTree("systemTree");
		}
		else if( treeName.equals("forum") && ( isSystemAdmin || isForumAdmin ) ) {
			tree = adminBean.getTree("forumTree");
		}
	}
	
	// Flip any nodes that need to be flipped:
	if( flip > -1 ) {
		com.coolservlets.forum.util.tree.TreeNode node 
			= (com.coolservlets.forum.util.tree.TreeNode)tree.getChild(flip);
		node.toggleVisible();
	}

      pageContext.write(_jsp_string3, 0, _jsp_string3.length);
      	if( tree != null ) { 
      pageContext.write(_jsp_string4, 0, _jsp_string4.length);
      out.print(( printTree(tree) ));
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      	} 
      pageContext.write(_jsp_string5, 0, _jsp_string5.length);
    } catch (java.lang.Throwable _jsp_e) {
      pageContext.handlePageException(_jsp_e);
    } finally {
      JspFactory.getDefaultFactory().releasePageContext(pageContext);
    }
  }

  private com.caucho.java.LineMap _caucho_line_map;
  private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

  public boolean _caucho_isModified()
  {
    if (_caucho_isDead)
      return true;
    if (com.caucho.util.CauchoSystem.getVersionId() != 2057024144)
      return true;
    for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
      com.caucho.vfs.Depend depend;
      depend = (com.caucho.vfs.Depend) _caucho_depends.get(i);
      if (depend.isModified())
        return true;
    }
    return false;
  }

  public long _caucho_lastModified()
  {
    return 0;
  }

  public com.caucho.java.LineMap _caucho_getLineMap()
  {
    return _caucho_line_map;
  }

  public void destroy()
  {
      _caucho_isDead = true;
      super.destroy();
  }

  public void init(com.caucho.java.LineMap lineMap,
                   com.caucho.vfs.Path appDir)
    throws javax.servlet.ServletException
  {
    com.caucho.vfs.Path resinHome = com.caucho.util.CauchoSystem.getResinHome();
    com.caucho.vfs.MergePath mergePath = new com.caucho.vfs.MergePath();
    mergePath.addMergePath(appDir);
    mergePath.addMergePath(resinHome);
    mergePath.addClassPath(getClass().getClassLoader());
    _caucho_line_map = new com.caucho.java.LineMap("_sidebar__jsp.java", "/forum/admin/sidebar.jsp");
    _caucho_line_map.add(10, 1);
    _caucho_line_map.add(15, 16);
    _caucho_line_map.add(20, 20);
    _caucho_line_map.add(2, 97);
    _caucho_line_map.add(9, 105);
    _caucho_line_map.add(15, 107);
    _caucho_line_map.add(20, 108);
    _caucho_line_map.add(83, 109);
    _caucho_line_map.add(86, 118);
    _caucho_line_map.add(158, 180);
    _caucho_line_map.add(159, 182);
    _caucho_line_map.add(160, 184);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(mergePath.lookup("file:/e:/jnjt/forum/admin/sidebar.jsp"), 1021606812000L, 5352L);
    _caucho_depends.add(depend);
  }

  private static byte []_jsp_string2;
  private static byte []_jsp_string1;
  private static byte []_jsp_string4;
  private static byte []_jsp_string0;
  private static byte []_jsp_string3;
  private static byte []_jsp_string5;
  static {
    try {
      _jsp_string2 = "\r\n\r\n				 \r\n".getBytes("GB2312");
      _jsp_string1 = "\r\n\r\n".getBytes("GB2312");
      _jsp_string4 = "\r\n	".getBytes("GB2312");
      _jsp_string0 = "\r\n".getBytes("GB2312");
      _jsp_string3 = "\r\n\r\n<html>\r\n<head>\r\n	<title>sidebar.jsp</title>\r\n	<link rel=\"stylesheet\" href=\"style/global.css\">\r\n</head>\r\n\r\n<body bgcolor=\"#dddddd\" text=\"#000000\" link=\"#0000ff\" vlink=\"#0000ff\" alink=\"#ff0000\">\r\n\r\n<img src=\"images/blank.gif\" width=\"50\" height=\"10\" border=\"0\"><br>\r\n\r\n".getBytes("GB2312");
      _jsp_string5 = "\r\n\r\n<br><br>\r\n\r\n</body>\r\n</html>\r\n\r\n".getBytes("GB2312");
    } catch (java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -