📄 selectmanager_jsp.java
字号:
package org.apache.jsp.bManager;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.List;
import com.actionForm.ManagerForm;
public final class selectManager_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
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\r\n");
com.tool.Chinese chinese = null;
synchronized (request) {
chinese = (com.tool.Chinese) _jspx_page_context.getAttribute("chinese", PageContext.REQUEST_SCOPE);
if (chinese == null){
chinese = new com.tool.Chinese();
_jspx_page_context.setAttribute("chinese", chinese, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">");
com.tool.TimeShow time = null;
synchronized (request) {
time = (com.tool.TimeShow) _jspx_page_context.getAttribute("time", PageContext.REQUEST_SCOPE);
if (time == null){
time = new com.tool.TimeShow();
_jspx_page_context.setAttribute("time", time, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n<title>宇晨网络新闻中心后台</title>\r\n<script language=\"javascript\">\r\nfunction deleteForm(date){\r\nif(confirm(\"您真的要删除吗?\")){\r\nwindow.location.href=\"managerAction.do?method=deleteManagerAction&id=\"+date;\r\n}\r\n}\r\n</script>\r\n</head>\r\n");
List list=(List)request.getAttribute("list");
int number=list.size();
//以下这段代码是计算多少页数
int pageNumber=number;
if(pageNumber%10==0){
pageNumber=pageNumber/10;
}else{
pageNumber=pageNumber/10+1;
}
//以下是计算当前页的页数
int count;
if(request.getParameter("count")==null){
count=0;
}else{
count=Integer.valueOf(request.getParameter("count"));
}
//以下显示多少条纪录
int start=count*10;//开始条数
int over=(count+1)*10;//结束条数
int lastCount=number-over;//还剩多少条记录
if(lastCount<=0){
over=number;
}
out.write("\r\n<body><div align=\"center\">\r\n");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../bTop.jsp", out, false);
out.write("\r\n<table width=\"800\" height=\"465\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td width=\"196\" rowspan=\"2\" valign=\"top\">");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../bleft.jsp", out, false);
out.write("</td>\r\n <td width=\"604\" height=\"57\" background=\"bImage/place.jpg\" >\r\n <table width=\"601\" height=\"36\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td> 当前位置提示 >> 用户管理</td>\r\n </tr>\r\n <tr>\r\n <td> </td>\r\n </tr>\r\n </table></td>\r\n </tr>\r\n <tr>\r\n <td height=\"400\" align=\"center\" valign=\"top\" background=\"bImage/big.jpg\"><table width=\"601\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"bImage/placeNext.jpg\">\r\n <tr>\r\n <td height=\"21\" > </td>\r\n <td>用户查询</td>\r\n </tr>\r\n </table>\r\n\t <br>\r\n\t");
if(number==0){
out.write("\r\n\t没有其他的用户\r\n\t");
}else{
out.write("\t<br>\r\n\t<br>\r\n\r\n\t<table width=\"415\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr>\r\n <td height=\"23\"><div align=\"center\">账号</div></td>\r\n <td><div align=\"center\">姓名</div></td>\r\n <td><div align=\"center\">次数</div></td>\r\n <td><div align=\"center\">操作</div></td>\r\n </tr>\r\n\t \t ");
for(int i=start;i<over;i++){
ManagerForm form=(ManagerForm)list.get(i);
out.write("\r\n <tr align=\"center\">\r\n <td height=\"29\">");
out.print(form.getAccount());
out.write("</td>\r\n <td>");
out.print(form.getName());
out.write("</td>\r\n <td>");
out.print(form.getNumber());
out.write("</td>\r\n <td><a href=\"javascript:deleteForm('");
out.print(form.getId());
out.write("')\">删除</a></td>\r\n </tr>");
}
out.write("\r\n </table>\r\n\t<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr align=\"center\">\r\n <td width=\"578\" height=\"37\" >\r\n ");
for(int i=0;i<pageNumber;i++){
out.write("\r\n ");
if(count==i){
out.write("\r\n [<font color=\"#FF0000\"><b>");
out.print(i+1);
out.write("</b></font>]\r\n ");
}else{
out.write("\r\n [<a href=\"managerAction.do?method=selectManagerAction&count=");
out.print(i);
out.write("\"><b>");
out.print(i+1);
out.write("</b></a>]\r\n ");
}}
out.write("</td>\r\n </tr>\r\n </table>");
}
out.write("</td>\r\n </tr>\r\n</table>\r\n</div>\r\n</body>\r\n</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 + -