📄 admin_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class admin_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("/conn.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');
out.write('\n');
java.sql.Connection conn;
java.sql.Statement stmt;
java.sql.ResultSet rs;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=jorwoobook";
String user="pade";
String password="pade";
conn=DriverManager.getConnection(url,user,password);
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
out.write('\r');
out.write('\n');
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>密码更改</title>\r\n");
out.write("<link rel=\"stylesheet\" href=\"css.css\" type=\"text/css\">\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("@import url(\"style.css\");\r\n");
out.write("-->\r\n");
out.write("</style>\r\n");
/*
巧悟留言板1.0版(JSP)
程序设计:Jorwoo
QQ:513768
E-Mail:jorwoo@eyou.com
网站:http://jorwoo.yeah.net
*/
if(session.getAttribute("adminname")==null)
{ response.sendRedirect("sorry.jsp");}
out.write('\r');
out.write('\n');
String condition="select * from system";
rs=stmt.executeQuery(condition);
rs.next();
out.write("\r\n");
out.write("<body background=\"img/beijing.gif\">\r\n");
out.write("<table width=\"350\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td> \r\n");
out.write(" <form method=\"post\" action=\"operate_a.jsp\" name=\"form1\">\r\n");
out.write(" <table width=\"280\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"29\" align=\"center\" valign=\"bottom\"> <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tittle0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"96%\" background=\"img/1_back.gif\"><table width=\"195\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
out.write(" <tr align=\"center\"> \r\n");
out.write(" <td><a href=\"index.jsp\" class=\"font0\">首 页</a></td>\r\n");
out.write(" <td><a href=\"system.jsp\" class=\"font0\">资 料</a></td>\r\n");
out.write(" <td>密 码</td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" <td width=\"4%\"><img src=\"img/1_r.gif\" width=\"26\" height=\"23\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <table width=\"280\" align=\"center\" cellspacing=\"1\" class=\"tittle5\">\r\n");
out.write(" <tr align=\"center\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <td width=\"59\" height=\"28\" nowrap bgcolor=\"#F5F5F5\" class=\"font0\">版主:</td>\r\n");
out.write(" <td width=\"212\" height=\"30\" bgcolor=\"#F5F5F5\"> \r\n");
out.write(" <input name=\"adminname\" type=\"text\" style=\"border:1px double rgb(187,185,185);font:9pt\" value=\"");
out.print(rs.getString("adminname"));
out.write("\" size=\"25\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <td height=\"28\" nowrap class=\"font0\">密码:</td>\r\n");
out.write(" <td height=\"30\"> \r\n");
out.write(" <input type=\"password\" name=\"adminpassword\" value=\"");
out.print(rs.getString("adminpassword"));
out.write("\" size=\"25\" style=\"border:1px double rgb(187,185,185);font:9pt\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr align=\"center\" bgcolor=\"#F5F5F5\"> \r\n");
out.write(" <td height=\"30\" colspan=\"2\" nowrap> \r\n");
out.write(" <input type=\"submit\" value=\"更改\" style=\"border:1 solid #BBB9B9;background:#ffffff\" class=\"button\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" \r\n");
out.write(" </form>\r\n");
out.write(" \r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
conn.close();
stmt.close();
} 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 + -