📄 pass.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="../md5.asp"-->
<%if session("china_cityadmin")="" then
response.redirect "login.asp"
end if
dim username,oldpass,newpass,confirmpass,sql,rs
username=HtmlEncode(trim(request.form("username")))
oldpass=HtmlEncode(trim(request.form("oldpass")))
newpass=HtmlEncode(trim(request.form("newpass")))
confirmpass=HtmlEncode(trim(request.form("confirmpass")))
if username<>"" and newpass=confirmpass then
sql="select * from china_city where cityadmin='"&username&"' and city='"&session("china_city")&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
if md5(oldpass)=rs("citypass") then
rs("citypass")=md5(newpass)
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.redirect "ok.asp"
end if
end if
end if%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>分站管理员修改</title>
</head>
<body background="images/background.gif">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
<tr>
<td height="20" bgcolor="#799AE1" align="center"><font color="#FFFFFF" style="font-size:14px"><%=session("china_city")%>分站---管理员修改</font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> <br>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
<form action="" method="post"><tr bgcolor="#FFFFFF">
<td width="27%" height="26" valign="bottom">
<p align="right">原始帐号:</td>
<td width="72%"><input name="username" type="text" value="<%=session("china_cityadmin")%>" size="17" readonly></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right" valign="bottom"> 原始密码:</td>
<td width="72%"><input type="password" name="oldpass" size="17"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right" valign="bottom"> 新设密码:</td>
<td width="72%"><input type="password" name="newpass" size="17"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="26" align="right" valign="bottom"> 确认密码:</td>
<td width="72%"><input type="password" name="confirmpass" size="17"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="30"></td>
<td width="72%" height="30"><input type="submit" value="修改" name="edit">
<input type="reset" value="取消" name="reset">
</td>
</tr></form>
</table>
<br>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -