⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_modify2fly.asp

📁 2Fly通讯录v1.1,一个不错的系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="config.asp" -->
<%
 if Session("adminopen")<>True then
 Response.Redirect "login2fly.asp"
 end if

  AdminName2fly=Request("AdminName2fly") 
AdminName2fly=request.cookies("adminusers")("AdminName2fly")
  action=Request("action") 

Set rs=Server.CreateObject("ADODB.RecordSet") 
%>


<%if action="edit" then%>
<%
AdminPWD2fly=Request("AdminPWD2fly")
pwd1=Request("pwd1")
pwd2=Request("pwd2")

if pwd1<>pwd2 then
  response.write "<script language=javascript>"	
		response.write "alert('两次密码输入不正确,请重新输入。');"	
		response.write "</script>"
		response.write "<script language=javascript>location='javascript:history.back(1)'</script>"
   Response.End
end if

if pwd1="" then
  response.write "<script language=javascript>"	
		response.write "alert('您放弃了对密码的修改,请点击关闭。');"	
		response.write "</script>"
		response.write "<script language=javascript>location='javascript:history.back(1)'</script>"
   Response.End
end if

Set rs=Server.CreateObject("ADODB.Recordset")

if AdminName2fly="" then
sql="select * from [admin2fly] where AdminName2fly='"&AdminName2fly&"'"
rs.open sql,conn,3,3
'rs("AdminName2fly")=Server.Htmlencode(Request("AdminName2fly"))
rs("AdminPWD2fly")=Server.Htmlencode(md5(Request("pwd1")))
else
sql="select * from [admin2fly] where AdminName2fly='"&AdminName2fly&"'"
rs.open sql,conn,3,3

rs("AdminPWD2fly")=Server.Htmlencode(md5(Request("pwd1")))
end if
rs.update
rs.close
set rs=nothing
Response.Redirect"admin.asp?post=已经成功更新用户密码"
end if
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户 管理密码修改界面</title>
<link rel="stylesheet" type="text/css" href="site.css">
<style type="text/css">
<!--
body {
	margin-bottom: 0px;
	margin-left: 0px;
	margin-right: 0px;
}
-->
</style></head>

<body bgcolor="#FFFFFF" topmargin="20">
<%
sql="select * from [admin2fly] where AdminName2fly='"&AdminName2fly&"'"
rs.Open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<br><div align=center><font color=ff0000>目前还没有任何用户!</font></div><br>" 
else
%>
<form method="POST" action="?action=edit&AdminName2fly=<%=AdminName2fly%>">
  <table width="250" border="1" align="center" cellpadding="2" cellspacing="1" bordercolorlight="7285CF" bordercolordark="7285CF">
    <tr bgcolor="7285CF"> 
      <td align="right" valign="bottom"><div align="center"><font color="#FFFFFF">修改密码 
          </font></div></td>
    </tr>
    <tr> 
      <td width="350" bordercolor="#E7E7E7" bgcolor="#E7E7E7"> 用户名: 
        <input name="AdminName2fly" type="text" class="editbox1" value="<%=rs("AdminName2fly")%>" size="25"> 
      </td>
    </tr>
    <tr> 
      <td width="350" bordercolor="F2F2F2" bgcolor="F2F2F2"> 旧密码: 
        <input name="AdminPWD2flyold" type="password" class="editbox1" id="AdminPWD2flyold" value="<%=rs("AdminPWD2fly")%>" size="25" readonly>
      </td>
    </tr>
    <tr> 
      <td width="350" bordercolor="F2F2F2" bgcolor="F2F2F2"> 新密码: 
        <input name="pwd1" type="text" class="editbox1" id="pwd1" size="25">
</td>
    </tr>
    <tr> 
      <td width="350" bordercolor="F2F2F2" bgcolor="F2F2F2"> 确认码: 
        <input name="pwd2" type="text" class="editbox1" id="pwd2" size="25">
</td>
    </tr>
    <tr> 
      <td width="350" bordercolor="#E7E7E7" bgcolor="#E7E7E7"> <div align="center">
          <input name="B1" type="submit" class="bottom" value="修改密码">
          <input name="B2" type="reset" class="bottom" value="重新设定"> 
        </div></td>
    </tr>
  </table>
</form><br>
    <br>
<%end if%>
  <div align="center">
    <a href="http://2fly.cn" target="_blank"><img src="img/power.gif" alt="2Fly工作室 官方网站" width="108" height="24" border="0"></a> </div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -