📄 modifyuser.jsp~18~
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
</style></head>
<body>
<form name="form1" method="post" action="">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="left" valign="top" bgcolor="#000000">
<td height="100" colspan="2"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF"><img src="F:\example\图书馆\login\library1.gif" width="699" height="100" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td height="449" align="left" valign="top" bgcolor="#000000"><table width="99%" border="0" align="left" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top" bgcolor="#CCCCCC"><table width="70%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="20" align="right"> </td>
<td width="130" align="center"> </td>
</tr>
<tr>
<td width="20" align="right"><img src="file:///C|/Documents%20and%20Settings/cavalier/桌面/library3.png" width="10" height="10" alt=""></td>
<td width="130" align="center"> <a href="adduser.jsp">Adduser</a> </td>
</tr>
<tr>
<td width="20" height="5" align="right"> </td>
<td width="130" height="5" align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td width="20" align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td width="130" align="center"><a href="modifyuser.jsp">Modifyuser</a></td>
</tr>
<tr>
<td width="20" height="5" align="right"> </td>
<td width="130" height="5" align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td width="20" align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td width="130" align="center"><a href="deleteuser.jsp">Deletuser</a></td>
</tr>
<tr>
<td width="20" align="right"> </td>
<td width="130" align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td width="20" align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td width="130" align="center"><a href="searchuser.jsp">Searchuser</a></td>
</tr>
<tr>
<td width="20" align="right"> </td>
<td width="130" align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td width="20" align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td width="130" align="center"><a href="addbook.jsp">Addbook</a></td>
</tr>
<tr>
<td width="20" align="right"> </td>
<td width="130" align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td align="center"><a href="deletebook.jsp">Deletebook</a></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="F:\example\图书馆\loginlibrary4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td align="center"><a href="borrowsearch.jsp">Borrowsearch</a></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td align="right"><img src="F:\example\图书馆\login/library3.png" width="10" height="10" alt=""></td>
<td align="center"><a href="search.jsp">Search</a></td>
</tr>
<tr>
<td align="right"> </td>
<td align="center"><img src="F:\example\图书馆\login/library4.png" width="102" height="5" alt=""></td>
</tr>
<tr>
<td width="20" align="right"> </td>
<td width="130" align="center"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="230" valign="top" bgcolor="#CCCCCC"> </td>
</tr>
</table></td>
<td height="449" align="left"><table width="80%" border="0" align="center" cellpadding="8" cellspacing="1">
<tr align="center">
<td height="50" colspan="2"><span class="style3">Modify user </span></td>
</tr>
<tr>
<td width="37%" height="30" align="right" ><span class="style4">ID:</span></td>
<td width="63%" height="30"><span class="style4">
<input name="modifyuserid" type="text" id="modifyuserid" size="15" maxlength="12">
***</span></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Course:</span></td>
<td height="30"><input name="modifyusercourse" type="text" id="modifyusercourse" size="10" maxlength="8"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Number:</span></td>
<td height="30"><input name="modifyusernumber" type="text" id="modifyusernumber" size="10" maxlength="8"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Code:</span></td>
<td height="30"><input name="modifyusercode" type="text" id="modifyusercode" size="15" maxlength="12"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Phone:</span></td>
<td height="30"><input name="modifyuserphone" type="text" id="modifyuserphone" size="15" maxlength="11"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Email:</span></td>
<td height="30"><input name="modifyuseremail" type="text" id="modifyuseremail" size="35" maxlength="30"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Oicq:</span></td>
<td height="30"><input name="modifyuserqq" type="text" id="modifyuserqq" size="15" maxlength="11"></td>
</tr>
<tr>
<td height="30" align="right"><span class="style4">Maxbook:</span></td>
<td height="30"><input name="modifyusermax" type="text" id="modifyusermax" size="5" maxlength="3"></td>
</tr>
<tr>
<td height="30" colspan="2" align="right"> <table width="60%" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="50%" align="center"><input name="modifyuserenter" type="submit" id="modifyuserenter" value="Enter"></td>
<td width="50%" align="center"><input name="modifyuserreset" type="reset" id="modifyuserreset" value="Reset"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#666666"> </td>
<td><img src="F:\example\图书馆\login/library2.png" width="573" height="40" alt=""></td>
</tr>
</table>
</form>
<jsp:useBean id="Library" scope="session" class="login.Library">
</jsp:useBean>
<center>
<%
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();}
%>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -