?? uedit_jsp.java
字號(hào):
package org.apache.jsp.user;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.bwm.db.Condb;
public final class uedit_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,
null, 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");
Condb con2=new Condb();
if(session.getAttribute("username")==null){
out.write("\r\n");
out.write("<script language=\"javascript\">\r\n");
out.write("\talert(\"你必須先登錄后才能修改個(gè)人資料\");\r\n");
out.write("\thistory.back();\r\n");
out.write("</script>\r\n");
}else{
String sql2="select * from tb_User where Username='"+session.getAttribute("username")+"'";
ResultSet rs2=con2.executeQuery(sql2);
if(rs2.next()){
String id=rs2.getString(1);
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<table width=\"562\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <form action=\"user/ucheck.jsp\" method=\"post\" name=\"form1\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"46\" colspan=\"5\" align=\"center\" background=\"\" bgcolor=\"#EFE9BB\">修改用戶(hù)信息</td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"144\" rowspan=\"8\" align=\"center\" background=\"images/images/usereg_2.gif\" style=\"background-repeat:no-repeat\"> </td>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">用戶(hù)名:</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"username\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(2));
out.write("\" size=\"32\" readonly=\"yes\"></td> \r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"89\" height=\"23\" align=\"right\" class=\"bgcolor\">真實(shí)姓名:</td>\r\n");
out.write(" <td width=\"329\" height=\"23\" align=\"left\"><input name=\"Rname\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(3));
out.write("\" size=\"32\" /></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">密碼:</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"password\" type=\"password\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(4));
out.write("\" size=\"32\"></td>\r\n");
out.write(" </tr> \r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">Email:</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"email\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(5));
out.write("\" size=\"32\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"21\" align=\"right\" class=\"bgcolor\">地址:</td>\r\n");
out.write(" <td height=\"21\" align=\"left\"><textarea name=\"address\" cols=\"30\" rows=\"4\" class=\"txt_grey\">");
out.print(rs2.getString(6));
out.write("</textarea></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">聯(lián)系電話(huà):</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"photo\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(7));
out.write("\" size=\"32\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">找回密碼問(wèn)題:</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"pass\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(8));
out.write("\" size=\"32\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"23\" align=\"right\" class=\"bgcolor\">問(wèn)題答案:</td>\r\n");
out.write(" <td height=\"23\" align=\"left\"><input name=\"question\" type=\"text\" class=\"txt_grey\" value=\"");
out.print(rs2.getString(9));
out.write("\" size=\"32\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"40\" colspan=\"4\" align=\"center\"background=\"\"><input name=\"Submit\" type=\"submit\" class=\"btn_grey\" value=\"修改\">\r\n");
out.write(" <input name=\"Submit2\" type=\"reset\" class=\"btn_grey\" value=\"重置\">");
session.setAttribute("userid",id);
out.write("\r\n");
out.write(" <a href=\"index.jsp\">返回首頁(yè)</a></td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
}con2.close();
out.write("\r\n");
out.write(" </form>\r\n");
out.write("</table>\r\n");
out.write("\r\n");
out.write("\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);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -