📄 system_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class system_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("<style type=\"text/css\">\r\n");
out.write("<!--\r\n");
out.write("@import url(\"style.css\");\r\n");
out.write(".style2 {font-size: 9pt}\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_s.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 width=\"281\" height=\"14\" 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><span class=\"style2\">资 料</span></td>\r\n");
out.write(" <td><a href=\"admin.jsp\" class=\"font0\">密 码</a></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\" cellpadding=\"0\" cellspacing=\"0\" class=\"tittle5\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"48\" align=\"center\" nowrap bgcolor=\"#F5F5F5\" class=\"font0\">网站名:</td>\r\n");
out.write(" <td height=\"30\" align=\"center\" bgcolor=\"#F5F5F5\"> \r\n");
out.write(" <input type=\"text\" name=\"name\" value=\"");
out.print(rs.getString("name"));
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> \r\n");
out.write(" <td align=\"center\" nowrap bgcolor=\"#FFFFFF\" class=\"font0\">标题栏:</td>\r\n");
out.write(" <td height=\"30\" align=\"center\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <input type=\"text\" name=\"title\" value=\"");
out.print(rs.getString("title"));
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> \r\n");
out.write(" <td align=\"center\" nowrap bgcolor=\"#F5F5F5\" class=\"font0\">首 页:</td>\r\n");
out.write(" <td height=\"30\" align=\"center\" bgcolor=\"#F5F5F5\"> \r\n");
out.write(" <input type=\"text\" name=\"web\" value=\"");
out.print(rs.getString("web"));
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> \r\n");
out.write(" <td align=\"center\" nowrap bgcolor=\"#FFFFFF\" class=\"font0\">公 告:</td>\r\n");
out.write(" <td height=\"30\" align=\"center\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <input type=\"text\" name=\"news\" value=\"");
out.print(rs.getString("news"));
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 name=\"submit\" 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();
out.write('\r');
out.write('\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 + -