📄 _check__jsp.java
字号:
/*
* JSP generated by Resin 2.1.2 (built Tue Jun 11 08:26:56 PDT 2002)
*/
package _news._admin;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import org.ehotsoft.yekki.sql.SQLFacade;
import org.ehotsoft.yekki.widget.page.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 _check__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);
pageContext.write(_jsp_string2, 0, _jsp_string2.length);
sql = "select caption, id from tbl_news_category";
rst = facade.executeQuery( sql );
while ( rst.next() ) {
pageContext.write(_jsp_string3, 0, _jsp_string3.length);
if ( category_id == rst.getInt( "id" ) ) {
pageContext.write(_jsp_string4, 0, _jsp_string4.length);
out.print((rst.getString( "caption" )));
pageContext.write(_jsp_string5, 0, _jsp_string5.length);
}
else {
pageContext.write(_jsp_string6, 0, _jsp_string6.length);
out.print((rst.getString( "id" )));
pageContext.write(_jsp_string7, 0, _jsp_string7.length);
out.print((rst.getString( "caption" )));
pageContext.write(_jsp_string8, 0, _jsp_string8.length);
}
pageContext.write(_jsp_string9, 0, _jsp_string9.length);
}
pageContext.write(_jsp_string10, 0, _jsp_string10.length);
if ( category_id == -1 )
sql = "select has_check, can_pass, id, title, create_on from tbl_news_article order by id desc";
else
sql = "select has_check, can_pass, id, title, create_on from tbl_news_article where category_id=" + category_id + " order by id desc";
pager = facade.executePage( request, sql, 2 );
pager.setArgs( "&category_id=" + category_id );
rst = pager.getResultSet();
while ( pager.next() ) {
pageContext.write(_jsp_string11, 0, _jsp_string11.length);
out.print((rst.getString( "id" )));
pageContext.write(_jsp_string12, 0, _jsp_string12.length);
out.print((rst.getString( "title" )));
pageContext.write(_jsp_string13, 0, _jsp_string13.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_string14, 0, _jsp_string14.length);
out.print((pager.getAbsolutePage()));
pageContext.write(_jsp_string15, 0, _jsp_string15.length);
out.print((rst.getString( "id" )));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -