📄 admin_edit.asp
字号:
<%if session("adminadmin")=false then response.redirect("index.asp") end if%>
<!--#include file="inc/open.asp" -->
<!--#include file="inc/md5.inc" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改管理员信息</title>
<!--#include file="inc/css.css" -->
</head>
<body>
<!--#include file="top.asp" -->
<!--#include file="menu.asp" -->
<%
edit_id=request.querystring("edit_id")
doing=request.querystring("doing")
if doing="edit" then
edit_name=request.form("edit_name")
edit_name=rtrim(ltrim(edit_name))
edit_pass=request.form("edit_pass")
edit_pass=rtrim(ltrim(edit_pass))
edit_pass1=request.form("edit_pass1")
edit_pass1=rtrim(ltrim(edit_pass1))
edit_class=request.form("edit_class")
if edit_pass="" or edit_pass1="" then
msg="密码不能为空"
else
if edit_pass<>edit_pass1 then
msg="二次密码不一致"
else
if edit_class="超级管理员" then jb=99 end if
if edit_class="教师" then jb=9 end if
if edit_pass="0000000000" then
str="update user_te set teacher_name='"&edit_name&"',teacher_class='"&edit_class&"',teacher_jb='"&jb&"' where id="&edit_id&""
set rs=conn.execute(str)
msg="信息已修改"
else
edit_pass=ucase(md5(edit_pass))
str="update user_te set teacher_name='"&edit_name&"',teacher_pass='"&edit_pass&"',teacher_class='"&edit_class&"',teacher_jb='"&jb&"' where id="&edit_id&""
set rs=conn.execute(str)
msg="信息已修改"
end if
end if
end if
end if
str="select * from user_te where id="&edit_id&""
set rs=conn.execute(str)
%>
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="ffcc99" bgcolor="edebeb">
<tr>
<td valign="top"> <form name="form1" method="post" action=admin_edit.asp?doing=edit&edit_id=<%=rs("id")%>>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed6"> </td>
</tr>
</table>
<table width="600" border="1" align="center" cellpadding="1" cellspacing="0">
<tr>
<td height="40" colspan="2" bgcolor="#999999" class="unnamed14"><div align="center"><strong>修
改 管 理 员 信 息</strong></div></td>
</tr>
<tr class="unnamed12">
<td width="50%" height="30"> <div align="center">用 户 名:</div></td>
<td width="50%" height="30"> <div align="center">
<input name="edit_user" type="text" id="edit_user" value="<%=rs("teacher_user")%>(不可修改)" size="20" maxlength="15">
</div></td>
</tr>
<tr class="unnamed12">
<td width="50%" height="30"> <div align="center">真实姓名:</div></td>
<td width="50%" height="30"> <div align="center">
<input name="edit_name" type="text" id="edit_name" value="<%=rs("teacher_name")%>" size="20" maxlength="15">
</div></td>
</tr>
<tr class="unnamed12">
<td width="50%" height="31"> <div align="center">用户密码:</div></td>
<td width="50%" height="31"> <div align="center">
<input name="edit_pass" type="password" id="edit_pass" value="0000000000" size="20" maxlength="15">
</div></td>
</tr>
<tr class="unnamed12">
<td width="50%" height="30"> <div align="center">验证密码:</div></td>
<td width="50%" height="30"> <div align="center">
<input name="edit_pass1" type="password" id="edit_pass1" value="0000000000" size="20" maxlength="15">
</div></td>
</tr>
<tr class="unnamed12">
<td width="50%" height="30"> <div align="center">用户类别:</div></td>
<td width="50%" height="30"> <div align="center">
<select name="edit_class" id="edit_class">
<option value="超级管理员">超级管理员</option>
<option value="教师" selected>教师</option>
</select>
</div></td>
</tr>
<tr>
<td height="30" colspan="2"><div align="center">
<INPUT name="button" type=button class=unnamed5 onclick=javascript:history.go(-1) value=" 返 回 ">
<input type="submit" name="Submit2" value=" 确 定 ">
<input type="reset" name="Submit3" value=" 重 填 ">
</div></td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td class="unnamed6"> </td>
</tr>
<tr>
<td><div align="center" class="unnamed14"> <font color="#FF0000">
<%'response.write msg%>
</font> </div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--#include file="inc/bottom.inc" -->
<%conn.close%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -