📄 xiugaimima.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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">
<!--
body,td,th {
font-size: 12px;
}
.an {
border: #000000;border: 1px #000000 solid; font-family: "宋体", "Tahoma", "Verdana"; font-size: 12px; line-height: 120%; text-decoration: none; background-color: #ffffff}
-->
</style>
<script language="javascript">
function check(form){
if(form.old_pwd.value.length==""){
alert("请输入密码");
form.old_pwd.select();
return(false);
}
if(form.new_pwd.value.length<6){
alert("密码长度不能小于6位。");
form.new_pwd.select();
return(false);
}
if(form.new_pwd.value!=form.once_pwd.value){
alert("两次输入密码不相同。");
form.once_pwd.select();
return(false);
}
}
</script>
</head>
<%
if request("action")="xiugaimima" then
n_name=request("n_name")
old_pass=request("old_pwd")
new_pwd=request("new_pwd")
once_pwd=request("once_pwd")
%>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from member where user_name='"&n_name&"' and user_pass='"&old_pass&"'"
rs.open sql,conn,3,3
if rs.eof then
response.write "<center>用户名和密码不匹配"
response.write "<center>请您再次输入你的用户名和密码"
else
rs("user_pass")=new_pwd
rs.update
response.write "<center><font color=red>密码更改成功</font>"
end if
rs.close
set conn=nothing
end if%>
<body>
<form name="form" method="post" action="xiugaimima.asp?action=xiugaimima" onSubmit="return check(this)">
<div align="center">
<table width="205" border="0" cellspacing="8">
<tr>
<td width="69"><div align="left">用户名:</div></td>
<td width="143"><div align="left">
<input name="n_name" type="text" class="an" value="<%=session("user_name")%>" size="15" readonly>
</div></td>
</tr>
<tr>
<td><div align="left">密码:</div></td>
<td><div align="left">
<input name="old_pwd" type="password" class="an" size="15">
</div></td>
</tr>
<tr>
<td><div align="left">新密码:</div></td>
<td><div align="left">
<input name="new_pwd" type="password" class="an" size="15">
</div></td>
</tr>
<tr>
<td><div align="left">再次输入:</div></td>
<td><div align="left">
<input name="once_pwd" type="password" class="an" size="15">
</div></td>
</tr>
<tr>
<td align="center"><div align="right">
<input type="submit" name="Submit" value="修改">
</div></td>
<td><div align="center">
<input type="reset" name="Submit2" value="重写">
</div></td>
</tr>
</table>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -