📄 usermod.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkUser.asp"-->
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&Request("id")
rs.open sql,conn,1,3
act=request("act")
if act="upd" then
rs("admin")=request("admin")
rs("pwd")=request("password")
rs.update
response.redirect("userlist.asp")
end if
if act="del" then
conn.execute("delect * from admin where id="&request("id")&"")
response.redirect("userlist.asp")
end if
if not (rs.eof or err) then
%>
<html>
<head>
<title>管理员管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../images/CSS.CSS" type="text/css">
<script language=Javascript>
<!--
function deleteMe(){
if (confirm("确定删除?可是恢复不了的啊。")==1){
window.location="?act=del&id=<%=rs("id")%>";
}
}
//-->
</script>
</head>
<body bgcolor="#9CC7EF" text="#000000">
<br>
<br>
<br>
<br>
<form method="post" action="usermod.asp?act=upd" name="form1">
<table width="98%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolorlight=#145AA0 bordercolordark=#9CC7EF class="unnamed1">
<tbody>
<tr>
<td colspan=2 height="18" bgcolor="#4296E7">
<p align="center"><font color="#ffffff">管理员管理</font></p>
</td>
</tr>
<tr>
<td width=84 align="right" height="25" nowrap>
<div align="right">管理员序号:</div>
</td>
<td width="361" height="25">
<input type="text" name="ID" size="20" value="<%=rs("ID")%>" readOnly>
</td>
</tr>
<tr>
<td width=84 align="right" height="25" nowrap>
<div align="right">管理员姓名:</div>
</td>
<td width="361" height="25">
<input type="text" name="admin" size="20" value="<%=rs("admin")%>">
</td>
</tr>
<tr>
<td width=84 align="right" height="26" nowrap>
<div align="right">管理员密码:</div>
</td>
<td width="361" height="26">
<input name="password" type="password" id="password" value="<%=rs("pwd")%>" size="12"> </td>
</tr>
<tr valign="middle">
<td height="26" colspan="2" align="right" nowrap bgcolor="#4296E7">
<div align="center">
<input type="submit" name="Submit2" value="修改">
<input type="button" name="Submit" value="删除" onClick="deleteMe()">
<input type="button" name="Submit3" value="返回" onClick="javascript:window.history.back();">
</div>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
<%end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -