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

📄 _article__jsp.java

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

package _news._admin._info;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import org.ehotsoft.yekki.sql.SQLFacade;
import org.ehotsoft.yekki.sql.Pager;
import org.ehotsoft.yekki.util.ParamUtil;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.jsp.JspWriter;
import java.io.IOException;

public class _article__jsp extends com.caucho.jsp.JavaPage{
  private boolean _caucho_isDead;
  
	void printPageInfo( JspWriter out, Pager pager, String url ) {
		
		StringBuffer buf = new StringBuffer( );
		
		for ( int i = 1; i <= pager.getPageCount(); i++ ) {
						
			if ( pager.getAbsolutePage() == i ) {
				
				buf.append( " <font color='red'>" )
					.append( i )
					.append( "</font>" );
			}
			else {
				
				buf.append( " <a href='" )
					.append( url )
					.append( "?page_no=" )
					.append( i )
					.append( pager.getArgs() )
					.append( "'>" )
					.append( i )
					.append( "</a>" );
			}
						
		}
		
		try {
			
			out.println( buf.toString() );
		}
		catch ( IOException e ) {
			
			//ignore
		}

	}

  
	boolean hasChecked( ResultSet rst )
		throws SQLException {
		
		int has_check = rst.getInt( "has_check" );
		int can_pass = rst.getInt( "can_pass" );

		if ( has_check == 0 ) return true;
		if ( can_pass == 1 ) return true;

		return false;
	}

  
  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);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      pageContext.write(_jsp_string0, 0, _jsp_string0.length);
      
	SQLFacade facade = new SQLFacade();
	String sql = null;
	ResultSet rst = null;
	Pager pager = null;
	StringBuffer buf = null;
	
	int category_id = ParamUtil.getIntParameter( request, "category_id", -1 );

      pageContext.write(_jsp_string1, 0, _jsp_string1.length);
      
		sql = "select id, title, has_check, can_pass, create_on from tbl_info_article where category_id=" + category_id + " order by id desc";

		pager = facade.executePage( request, sql, 2 );
		rst = pager.getResultSet();

		while ( pager.next() ) {
	
      pageContext.write(_jsp_string2, 0, _jsp_string2.length);
      out.print((rst.getString( "id" )));
      pageContext.write(_jsp_string3, 0, _jsp_string3.length);
      out.print((rst.getString( "title" )));
      pageContext.write(_jsp_string4, 0, _jsp_string4.length);
      out.print((rst.getDate( "create_on" )));
      pageContext.write(_jsp_string5, 0, _jsp_string5.length);
      
			if ( hasChecked( rst ) )
				out.println( "已审核" );
			else
				out.println( "<a href='action.jsp?id=" + rst.getString( "id" ) + "&action=check_article&page_no=" + pager.getAbsolutePage() + "'>待审核</a>" );
	
      pageContext.write(_jsp_string6, 0, _jsp_string6.length);
      out.print((pager.getAbsolutePage()));
      pageContext.write(_jsp_string7, 0, _jsp_string7.length);
      out.print((rst.getString( "id" )));
      pageContext.write(_jsp_string8, 0, _jsp_string8.length);
      out.print((category_id));
      pageContext.write(_jsp_string9, 0, _jsp_string9.length);
      out.print((rst.getString( "id" )));
      pageContext.write(_jsp_string10, 0, _jsp_string10.length);
      out.print((pager.getAbsolutePage()));
      pageContext.write(_jsp_string11, 0, _jsp_string11.length);
      out.print((category_id));
      pageContext.write(_jsp_string12, 0, _jsp_string12.length);
      
		}

		facade.close();

		pager.setArgs( "&category_id=" + category_id );

      pageContext.write(_jsp_string13, 0, _jsp_string13.length);
       printPageInfo( out, pager, "article.jsp" );
      pageContext.write(_jsp_string14, 0, _jsp_string14.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("_article__jsp.java", "E:\\resin-2.1.2\\webapps\\test\\news\\admin\\info\\article.jsp");
    _caucho_line_map.add("/test/news/admin/info/article.jsp", 6, 1);
    _caucho_line_map.add("/news/admin/info/../inc/function_inc.jsp", 2, 1);
    _caucho_line_map.add(3, 19);
    _caucho_line_map.add("E:\\resin-2.1.2\\webapps\\test\\news\\admin\\info\\article.jsp", 8, 57);
    _caucho_line_map.add("/test/news/admin/info/article.jsp", 1, 85);
    _caucho_line_map.add("/news/admin/info/../inc/function_inc.jsp", 1, 91);
    _caucho_line_map.add("E:\\resin-2.1.2\\webapps\\test\\news\\admin\\info\\article.jsp", 8, 94);
    _caucho_line_map.add(21, 95);
    _caucho_line_map.add(47, 105);
    _caucho_line_map.add(57, 116);
    _caucho_line_map.add(58, 118);
    _caucho_line_map.add(67, 129);
    _caucho_line_map.add(67, 131);
    _caucho_line_map.add(68, 133);
    _caucho_line_map.add(68, 135);
    _caucho_line_map.add(68, 137);
    _caucho_line_map.add(71, 139);
    _caucho_line_map.add(80, 147);
    com.caucho.vfs.Depend depend;
    depend = new com.caucho.vfs.Depend(appDir.lookup("news/admin/inc/function_inc.jsp"), 1028883993108L, 772L);
    _caucho_depends.add(depend);
    depend = new com.caucho.vfs.Depend(appDir.lookup("news/admin/info/article.jsp"), 1029146596755L, 2944L);
    _caucho_depends.add(depend);
  }

  private static byte []_jsp_string11;
  private static byte []_jsp_string8;
  private static byte []_jsp_string14;
  private static byte []_jsp_string5;
  private static byte []_jsp_string4;
  private static byte []_jsp_string10;
  private static byte []_jsp_string6;
  private static byte []_jsp_string13;
  private static byte []_jsp_string2;
  private static byte []_jsp_string3;
  private static byte []_jsp_string9;
  private static byte []_jsp_string1;
  private static byte []_jsp_string7;
  private static byte []_jsp_string0;
  private static byte []_jsp_string12;
  static {
    try {
      _jsp_string11 = "&action=del_article&category_id=".getBytes("GB2312");
      _jsp_string8 = "&category_id=".getBytes("GB2312");
      _jsp_string14 = "\r\n    </td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</html>\r\n".getBytes("GB2312");
      _jsp_string5 = " </td>\r\n    <td bgcolor=\"#FFFFFF\" align=\"center\"> \r\n      ".getBytes("GB2312");
      _jsp_string4 = " </td>\r\n    <td bgcolor=\"#FFFFFF\" align=\"center\"> ".getBytes("GB2312");
      _jsp_string10 = "&page_no=".getBytes("GB2312");
      _jsp_string6 = "\r\n    </td>\r\n    <td bgcolor=\"#FFFFFF\" align=\"center\"><a href=\"edit_article.jsp?page_no=".getBytes("GB2312");
      _jsp_string13 = "\r\n  <tr align=\"left\"> \r\n    <td colspan=\"5\" bgcolor=\"#FFFFFF\">页码: \r\n      ".getBytes("GB2312");
      _jsp_string2 = "\r\n  <tr> \r\n    <td align=\"center\" bgcolor=\"#FFFFFF\"> ".getBytes("GB2312");
      _jsp_string3 = " </td>\r\n    <td bgcolor=\"#FFFFFF\"> ".getBytes("GB2312");
      _jsp_string9 = "\">修改</a> \r\n      <a href=\"action.jsp?id=".getBytes("GB2312");
      _jsp_string1 = "\r\n<html>\r\n\r\n<head>\r\n<title></title>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\">\r\n\r\n</head>\r\n\r\n<body background=\"../images/background.gif\">\r\n<table border=\"0\" cellspacing=\"1\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" cellpadding=\"0\" align=\"center\" width=\"75%\" bgcolor=\"#666666\">\r\n  <tr> \r\n    <td align=\"center\"><b><strong><font color=\"#FFFFFF\">ID号</font></strong></b></td>\r\n    <td align=\"center\"><b><strong><font color=\"#FFFFFF\">文章标题</font></strong></b></td>\r\n    <td align=\"center\"><b><strong><font color=\"#FFFFFF\">日期</font></strong></b></td>\r\n    <td align=\"center\"><b><font color=\"#FFFFFF\">审核</font></b></td>\r\n    <td align=\"center\"><b><font color=\"#FFFFFF\">控制</font></b></td>\r\n  </tr>\r\n  ".getBytes("GB2312");
      _jsp_string7 = "&id=".getBytes("GB2312");
      _jsp_string0 = "\r\n".getBytes("GB2312");
      _jsp_string12 = "\">删除</a> \r\n    </td>\r\n  </tr>\r\n  ".getBytes("GB2312");
    } catch (java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
  }
}

⌨️ 快捷键说明

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