📄 modifyuser_jsp.java
字号:
out.write(" <tr>\r\n");
out.write(" <td align=\"right\"><img src=\"F:\\example\\图书馆\\login/library3.png\" width=\"10\" height=\"10\" alt=\"\"></td>\r\n");
out.write(" <td align=\"center\"><a href=\"update.jsp\">Update</a></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td align=\"right\"> </td>\r\n");
out.write(" <td align=\"center\"><img src=\"F:\\example\\图书馆\\login/library4.png\" width=\"102\" height=\"5\" alt=\"\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"20\" align=\"right\"> </td>\r\n");
out.write(" <td width=\"130\" align=\"center\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"200\" valign=\"top\" bgcolor=\"#CCCCCC\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" <td height=\"449\" align=\"left\"><table width=\"80%\" border=\"1\" align=\"center\" cellpadding=\"10\" cellspacing=\"1\">\r\n");
out.write(" <tr align=\"center\">\r\n");
out.write(" <td height=\"50\" colspan=\"2\"><span class=\"style3\">Modify user </span></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"37%\" height=\"30\" align=\"right\" ><span class=\"style4\">ID:</span></td>\r\n");
out.write(" <td width=\"63%\" height=\"30\"><span class=\"style4\">\r\n");
out.write(" <input name=\"modifyuserid\" type=\"text\" id=\"modifyuserid\" size=\"15\" maxlength=\"12\">\r\n");
out.write("***</span></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Course:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyusercourse\" type=\"text\" id=\"modifyusercourse\" size=\"10\" maxlength=\"8\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Number:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyusernumber\" type=\"text\" id=\"modifyusernumber\" size=\"10\" maxlength=\"8\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Code:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyusercode\" type=\"text\" id=\"modifyusercode\" size=\"15\" maxlength=\"12\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Phone:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyuserphone\" type=\"text\" id=\"modifyuserphone\" size=\"15\" maxlength=\"11\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Email:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyuseremail\" type=\"text\" id=\"modifyuseremail\" size=\"35\" maxlength=\"30\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Oicq:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyuserqq\" type=\"text\" id=\"modifyuserqq\" size=\"15\" maxlength=\"11\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" align=\"right\"><span class=\"style4\">Maxbook:</span></td>\r\n");
out.write(" <td height=\"30\"><input name=\"modifyusermax\" type=\"text\" id=\"modifyusermax\" size=\"5\" maxlength=\"3\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"30\" colspan=\"2\" align=\"right\"> <table width=\"60%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"50%\" align=\"center\"><input name=\"modifyuserenter\" type=\"submit\" id=\"modifyuserenter\" value=\"Enter\"></td>\r\n");
out.write(" <td width=\"50%\" align=\"center\"><input name=\"modifyuserreset\" type=\"reset\" id=\"modifyuserreset\" value=\"Reset\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr>\r\n");
out.write(" <td bgcolor=\"#666666\"> </td>\r\n");
out.write(" <td><img src=\"F:\\example\\图书馆\\login/library2.png\" width=\"573\" height=\"40\" alt=\"\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("</form>\r\n");
login.Library Library = null;
synchronized (session) {
Library = (login.Library) _jspx_page_context.getAttribute("Library", PageContext.SESSION_SCOPE);
if (Library == null){
Library = new login.Library();
_jspx_page_context.setAttribute("Library", Library, PageContext.SESSION_SCOPE);
out.write('\r');
out.write('\n');
}
}
out.write("\r\n");
out.write("<center>\r\n");
out.write("\r\n");
String id = request.getParameter("modifyuserid");
String course = request.getParameter("modifyusercourse");
String studentnumber = request.getParameter("modifyusernumber");
String code = request.getParameter("modifyusercode");
String phone = request.getParameter("modifyuserphone");
String email = request.getParameter("modifyuseremail");
String oicq = request.getParameter("modifyuserqq");
String maxbook = request.getParameter("modifyusermax");
try{
if(request.getParameter("modifyuserenter")!=null && id!=""){
Connection conn=Library.getConn();
Statement stmt=conn.createStatement();
if(course!=""){
String updatecourse = "update user set course ='" + course +"' where id ='" + id + "'";
stmt.execute(updatecourse);}
if(studentnumber!=""){
String updatenumber = "update user set studentnumber ='" + studentnumber +"' where id ='" + id + "'";
stmt.execute(updatenumber);}
if(code!=""){
String updatecode = "update user set code ='" + code +"' where id ='" + id + "'";
stmt.execute(updatecode);}
if(phone!=""){
String updatephone = "update user set phone ='" + phone +"' where id ='" + id + "'";
stmt.execute(updatephone);}
if(email!=""){
String updateemail = "update user set email ='" + email +"' where id ='" + id + "'";
stmt.execute(updateemail);}
if(oicq!=""){
String updateoicq = "update user set oicq ='" + oicq +"' where id ='" + id + "'";
stmt.execute(updateoicq);}
if(maxbook!=""){
String updatemax = "update user set maxbook ='" + maxbook +"' where id ='" + id + "'";
stmt.execute(updatemax);}
response.sendRedirect("success.jsp");
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
out.write("\r\n");
out.write("</center>\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 + -