修复无法修改岗位和管理员
This commit is contained in:
@@ -45,53 +45,66 @@
|
||||
<div class="col-lg-1 col-md-1 hidden-xs"></div>
|
||||
<h3 class="text-center">修改管理员</h3>
|
||||
<div class="col-sm-12 col-lg-9 col-md-9">
|
||||
<%
|
||||
try {
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("select * from adminstrator_record where AdminName=?");
|
||||
sql.setString(1, adminName);
|
||||
rs = sql.executeQuery();
|
||||
while (rs.next()) {
|
||||
%>
|
||||
<%
|
||||
try {
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("select * from adminstrator_record where AdminName=?");
|
||||
sql.setString(1, adminName);
|
||||
rs = sql.executeQuery();
|
||||
while (rs.next()) {
|
||||
%>
|
||||
<form class="form-horizontal" role="form" id="add_admin"
|
||||
name="add_admin" action="JSPhandle/admin_update.jsp" method="post">
|
||||
<div class="form-group">
|
||||
<label for="disabledTextInput" class="col-sm-2 control-label">原管理员名</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="<%=rs.getString("AdminName")%>" name="OldAdminName"
|
||||
id="disabledTextInput" value="<%=rs.getString("AdminName")%>"
|
||||
readonly>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputText1" class="col-sm-2 control-label">管理员号</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="<%=rs.getString("AdminNo")%>" name="adminno" value='<%=rs.getString("AdminNo")%>'>
|
||||
placeholder="<%=rs.getString("AdminNo")%>" name="adminno"
|
||||
value='<%=rs.getString("AdminNo")%>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputText2" class="col-sm-2 control-label" value="">管理员姓名</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
|
||||
<input type="text" class="form-control"
|
||||
placeholder='<%=rs.getString("AdminName")%>' name="adminname" value='<%=rs.getString("AdminName")%>'>
|
||||
|
||||
placeholder='<%=rs.getString("AdminName")%>' name="adminname"
|
||||
value='<%=rs.getString("AdminName")%>'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputText3" class="col-sm-2 control-label">管理员性别</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="<%=rs.getString("AdminSex")%>" name="sex" value='<%=rs.getString("AdminSex")%>'>
|
||||
placeholder="<%=rs.getString("AdminSex")%>" name="sex"
|
||||
value='<%=rs.getString("AdminSex")%>'>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<div class="form-group">
|
||||
<label for="inputText1" class="col-sm-2 control-label">管理员角色</label>
|
||||
<div class="col-sm-10">
|
||||
@@ -99,8 +112,8 @@
|
||||
<%
|
||||
try {
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("select * from administrator_job");
|
||||
@@ -110,10 +123,10 @@
|
||||
<option value="<%=rs.getString("AdminJob")%>"><%=rs.getString("AdminJob")%></option>
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user