📄 adminnewscolumn_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class AdminNewsColumn_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
static {
_jspx_dependants = new java.util.Vector(1);
_jspx_dependants.add("/SessionCheckA.jsp");
}
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("<!-- 权限管理 -->\r\n");
out.write(" ");
out.write("<!-- \r\n");
out.write("ÑéÖ¤¹ÜÀíÔ±session,\r\n");
out.write("Ö»ÓоÈÏÖ¤µÄϵͳ¹ÜÀíÔ±²Å¿ÉÒÔ¼ÌÐø·ÃÎÊ£¬\r\n");
out.write("ÆäËû¹ÜÀíÔ±ÖØ¶¨Ïòµ½¹ÜÀíÖ÷Ò³Ãæ\r\n");
out.write("·ÇÈÏÖ¤¹ÜÀíÔ±ÖØ¶¨Ïòµ½µÇÂ½Ò³Ãæ-\r\n");
out.write("->\r\n");
out.write("\r\n");
/** check user type */
Integer usertype = (Integer)session.getAttribute("usertype");
if( usertype == null || usertype.equals(new Integer(0)))
response.sendRedirect("login.jsp");
/** only user with check permit or System Administrator can enter into this page */
else if(usertype.equals(new Integer(2)) || usertype.equals(new Integer(3)) || usertype.equals(new Integer(4)))
response.sendRedirect("AdminMain.jsp");
out.write("\r\n");
out.write("\r\n");
news.NewsTypeManager myNewsTypeManager = null;
synchronized (_jspx_page_context) {
myNewsTypeManager = (news.NewsTypeManager) _jspx_page_context.getAttribute("myNewsTypeManager", PageContext.PAGE_SCOPE);
if (myNewsTypeManager == null){
myNewsTypeManager = new news.NewsTypeManager();
_jspx_page_context.setAttribute("myNewsTypeManager", myNewsTypeManager, PageContext.PAGE_SCOPE);
}
}
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<title>汉语史研究中心网站――栏目管理</title>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\">\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body bgcolor=\"#FFFFFF\">\r\n");
out.write(" <!-- include common top page -->\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "top.htm", out, false);
out.write("\r\n");
out.write("\r\n");
out.write("\t<table width=\"777\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" height=\"1\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#3A5C9F\" width=\"168\" height=\"322\" valign=\"top\"> \r\n");
out.write(" <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr bgcolor=\"#000000\"> \r\n");
out.write(" <td><img src=\"../images/dot.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" \r\n");
out.write(" <table width=\"151\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr bgcolor=\"#DFDFDF\"> \r\n");
out.write(" <td width=\"131\" class=\"unnamed2\" height=\"2\"> \r\n");
out.write(" <div align=\"center\" class=\"unnamed1\"> 增 加 栏 目</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"20\" valign=\"bottom\" align=\"right\" height=\"2\"><img src=\"../images/x9.gif\" width=\"16\" height=\"8\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <table width=\"75%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td><FORM METHOD=POST ACTION=\"AdminNewsColumnAdd.jsp\">\r\n");
out.write(" <div align=\"center\">\r\n");
out.write(" <table width=\"75%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">栏 目 名 称 : </font> \r\n");
out.write(" <input name=newtypename type=text class=\"smallInput\" id=\"newtypename\">\r\n");
out.write(" </div>\r\n");
out.write(" </td>\t\t\t\t\t\t\r\n");
out.write(" </tr>\t\t\t\t\t \r\n");
out.write("\t <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <div align=\"center\"> \r\n");
out.write(" <input type=submit value=增加 class=\"smallInput\" name=\"submit\">\r\n");
out.write(" <input type=\"reset\" name=\"Reset\" value=\"取消\" class=\"smallInput\">\r\n");
out.write(" </div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" \r\n");
out.write(" </div>\r\n");
out.write(" </FORM>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <table width=\"151\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr bgcolor=\"#DFDFDF\"> \r\n");
out.write(" <td width=\"131\" class=\"unnamed2\" height=\"2\"> \r\n");
out.write(" <div align=\"center\" class=\"unnamed1\"> 修 改 栏 目</div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"20\" valign=\"bottom\" align=\"right\" height=\"2\"><img src=\"../images/x9.gif\" width=\"16\" height=\"8\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <table width=\"75%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td><FORM METHOD=POST ACTION=\"AdminNewsColumnEdit.jsp\">\r\n");
out.write(" <div align=\"center\">\r\n");
out.write(" <table width=\"75%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">\r\n");
out.write(" <input type=\"hidden\" name=method value=\"modified\">\r\n");
out.write(" 栏 目 的 ID 号: </font> \r\n");
out.write(" <input name=tid type=text class=\"smallInput\" id=\"tid\">\r\n");
out.write(" </div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">新的栏目名称: \r\n");
out.write(" </font> \r\n");
out.write(" <input name=typename type=text class=\"smallInput\" id=\"typename\">\r\n");
out.write(" </div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t\t\t\t <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <div align=\"center\"> \r\n");
out.write(" <input type=submit value=修改 name=\"changetype\" class=\"smallInput\">\r\n");
out.write(" <input type=\"reset\" name=\"Reset2\" value=\"取消\" class=\"smallInput\">\r\n");
out.write(" </div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table> \r\n");
out.write(" </div>\r\n");
out.write(" </FORM></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" <td bgcolor=\"#C4C4C4\" width=\"3\" height=\"322\"><img src=\"../images/dot1.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" <td colspan=\"2\" height=\"322\" valign=\"top\" align=\"right\"> \r\n");
out.write(" <table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td>\r\n");
out.write(" <p>\r\n");
out.write("\t\t\t\t");
if(myNewsTypeManager.getTypeNum() == 0)
out.println("没有栏目");
else {
out.write(" \r\n");
out.write("\t\t\t\t<br>\r\n");
out.write("\t\t\t\t栏目列表如下:\r\n");
out.write("\t\t\t\t</p>\r\n");
out.write(" <table width=\"98%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#000000\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"7%\" bgcolor=\"#304D7C\"> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">ID号</font></div>\r\n");
out.write(" </td>\r\n");
out.write("\t\t\t\t\t<td width=\"16%\" bgcolor=\"#304D7C\"> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">栏目名称</font></div>\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"12%\" bgcolor=\"#304D7C\"> \r\n");
out.write(" <div align=\"center\"><font color=\"#FFFFFF\">删除</font></div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
int[] typeID = myNewsTypeManager.getTypeIDArray();
for(int i = 0; i < myNewsTypeManager.getTypeNum(); i++) {
out.write(" \r\n");
out.write(" <tr bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <td width=\"7%\" align=\"center\">");
out.print(typeID[i]);
out.write("</td>\r\n");
out.write(" <td width=\"16%\" align=\"center\">");
out.print(myNewsTypeManager.getTypeName(typeID[i]));
out.write("</td>\r\n");
out.write(" <td width=\"12%\" align=\"center\"><font color=\"#FFFFFF\"><a href=\"AdminNewsColumnDel.jsp?tid=");
out.print(typeID[i]);
out.write("\">删除</a></font></td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
out.write(" \r\n");
out.write(" </table>\r\n");
out.write(" \r\n");
out.write(" <p><font color=red>!请注意,对栏目的删除操作将使该栏目以及栏目下所有已存数据和文件丢失。</font><br>\r\n");
out.write(" </p>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <br>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("\t");
} // end else clause
out.write("\r\n");
out.write("\t<!-- include common bottom.htm -->\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "bottom.htm", out, false);
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -