📄 changeadmin.asp
字号:
<!--#include file="conn.asp" -->
<!--#include file="ADOFunctions.asp"-->
<%
if (session("username")="") then
response.Redirect("index.asp")
end if
%>
<%
Dim conn,sql
If Request("submit")<>"" Then
If Request("name")="" Then
Response.Write("输入的用户名不能为空")
Response.End()
End If
If Request("passwd")="" Then
Response.Write("输入的密码不能为空")
Response.End()
End If
If Request("passwd")<>Request("passwd2") Then
Response.Write("两次输入的密码不一致")
Response.End()
End If
aname=request.Form("name")
psw=Request.Form("passwd")
'sql="UPDATE admin SET psw='"&(psw)&"' and admin='"&(aname)&"' "
'db.execute(sql)
Set rs=GetRecordset("BOOK.mdb","admin")
rs("admin")=aname
rs("psw")=psw
rs.update
rs.close
set rs=nothing
response.Redirect("main.asp")
End If
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改密码</title>
<link href="css/admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="595" height="49" align="left" valign="middle">
<p><font color="red"><%=session("username")%>
</font> :欢迎您进入图书管理系统! </p></td>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="4" cellspacing="1" >
<tr>
<td><br>
<form action="changeadmin.asp" method=post>
<table width=70% border=1 align="center" cellpadding=4 cellspacing=1 bordercolor="#FFFFFF">
<tr class="header">
<th colspan=2><strong>更改密码</strong></th>
</tr>
<tr>
<td width=30% align=center nowrap>输入新用户名:</td>
<td ><input name=name type=text size=25> </td>
</tr>
<tr>
<td width=30% align=center nowrap>输入新密码:</td>
<td ><input name=passwd type=password size=25> </td>
</tr>
<tr>
<td width=30% height="25" align=center>再确认一遍:</td>
<td ><input name=passwd2 type=password size=25></td>
</tr>
</table>
<p align="center"> </p>
<p align="center">
<input type=submit name=submit value=" 提 交 ">
<input type=reset name=reset value=" 重 置 ">
</p>
</form>
<p> </p>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -