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

📄 admin_modifypassword.asp

📁 是一个电子商务网站系统,提供前后台交易源码.
💻 ASP
字号:
<!--#include file="inc/Conn.asp"-->
<!--#include file="inc/md5.asp" -->
<!--#include file="Admin_IsLogin.asp" -->
<%

If Request.Querystring("action")="post" Then
 Dim OldPwd,NewPwd,NewPwd2,mUserName
 Dim rs,rsw,mSql
 mUserName=Session.Contents("CurUserName")
 mOldPwd=Trim(Request.Form("txtOldPwd"))
 mNewPwd=Trim(Request.Form("txtNewPwd"))
 mNewPwd2=Trim(Request.Form("txtNewPwd2"))
 mSql="Select F_PassWord From fyasp_Admin Where F_UserName='" & mUserName & "'"
 set Rs=conn.Execute(mSql)
  If rs("F_Password")<>md5(mOldPwd) then
     response.write "<script>alert('旧密码输入错误!');history.back();</Script>"
	 response.end
  else
     Set Rsw=server.createobject("Adodb.recordset")
	 mSql="select F_PassWord from fyasp_Admin Where F_UserName='" & mUserName & "'"
	 Rsw.open mSql,conn,1,3
	 Rsw("F_PassWord")=md5(mNewPwd)
	 Rsw.update
	 Rsw.close
	 set Rsw=Nothing
     response.write "<script>alert('密码修改成功!');history.back();</Script>"
  end if
end if
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Style.css" rel="stylesheet" type="text/css">
<script language="javascript">
  function checkdata()
  {
  if (document.all.txtOldPwd.value=="") 
     {
	  alert("密码不能为空,请输入旧密码!")
	  document.all.txtOldPwd.focus()
	  return false;
	 }
    if (document.form1.txtNewPwd.value=="") 
     {
	  alert("密码不能为空,请输入新密码!")
	  document.form1.txtNewPwd.focus()
	  return false;
	 }
  if (document.form1.txtNewPwd2.value=="") 
     {
	  alert("密码不能为空,请输入确认密码!")
	  document.form1.txtNewPwd2.focus()
	  return false;
	 }
  
  
  if (document.form1.txtNewPwd.value!=document.form1.txtNewPwd2.value)
    {
	  alert("您两次输入的密码不一致,请重新输入!");
	  document.form1.txtNewPwd.focus();
	  return false;
	}

 }
</script>
</head>
<BODY leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<br>
<TABLE class=tableBorder cellSpacing=1 cellPadding=3 width="95%" align=center 
border=0>
  <TBODY>
    <TR> 
      <TH width="100" height=25 align="center" class=tableHeaderText>操作提示</TH>
    </TR>
    <TR> 
      <TD class=forumrow> <P><B>注意</B>:<BR>
          如果您想更改密码,请先输入旧密码,然后再输入新密码及确认密码。新密码和确认密码必须一致<BR>
        </P></TD>
    </TR>
  </TBODY>
</TABLE>
<form name="form1" method="post" action="Admin_ModifyPassword.asp?action=post" onSubmit="return checkdata()">
<table class=tableBorder width="95%" border=0 align="center" cellpadding=5 cellspacing=1>
  <tbody>
    <tr> 
        <th height=21 colspan="2" sytle="line-height:150%">【修改密码】</th>
    </tr>
    <tr> 
      <td width="15%"  class=forumRow>输入旧密码:</td>
      <td width="85%"  class=forumRowHighlight><input class="INPUT" type="password" name="txtOldPwd"></td>
    </tr>
    <tr> 
      <td class=forumRow>输入新密码:</td>
      <td class=forumRowHighlight><input class="INPUT" type="password" name="txtNewPwd"></td>
    </tr>
    <tr> 
      <td class=forumRow>新密码确认:</td>
      <td class=forumRowHighlight><input class="INPUT" type="password" name="txtNewPwd2"></td>
    </tr>
    <tr>
      <td class=forumRow> </td>
      <td class=forumRowHighlight> <input type="submit" value="提交信息" name="B32" > 
        &nbsp; <input type="reset" value="重新来过" name="B32" ></td>
    </tr>
  </tbody>
</table>
</form>
<P></P>
</body>
</html>

⌨️ 快捷键说明

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