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

📄 admin_changepass.asp

📁 嘉缘人才6.0精简 ,很好用的人才系统
💻 ASP
字号:
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/Commoncode.asp"-->
<!--#include file="../checkvalid.asp"-->
<!--#include file="../../inc/md5.asp"-->
<%if request("action")="save" then
user=request("user")
passa=request("passa")
pass=request("pass")

set rs=server.createobject("adodb.recordset")
sql="select * from JOB_admin where JOB_user='"&user&"'"
	rs.open sql,conn,1,3
 	if not(rs.bof and rs.eof) then
 		if md5(passa)<>rs("JOB_pass") then
	response.write "<script>alert('原始密码有误,请重新输入');history.go(-1);</script>"
	Response.End 
 		else
			rs("JOB_pass")=md5(pass)
			rs.update
			rs.close
			set rs=nothing
            call success()
			Response.Cookies("admin_pass")=md5(pass)   '更新加密密码
			response.end
 		end if
	else
	response.write "<script>alert('此管理员不存在,请重新输入');history.go(-1);</script>"
	Response.End 
	end if
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css> 
<script language="javascript">
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
function Juge(theForm)
{

  if (fnRemoveBrank(theForm.passa.value) == "")
  {
    alert("请输入原始密码!");
    theForm.passa.focus();
    return (false);
  }
    if (fnRemoveBrank(theForm.pass.value) == "")
  {
    alert("请输入新密码!");
    theForm.pass.focus();
    return (false);
  }
    if (fnRemoveBrank(theForm.pass1.value) == "")
  {
    alert("请输入确认密码!");
    theForm.pass1.focus();
    return (false);
  }
  if (theForm.pass.value !=theForm.pass1.value)
  {
    alert("两次密码输入不一致,请重新确认密码!");
    theForm.pass.focus();
    return (false);
  }
return true;
}
</script></head>
<body>
<br>

<table width="95%" height="0" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cccccc" class="tableBorder">
  <form name="form1" method="post" action="admin_changepass.asp?action=save" onSubmit="return Juge(this)">
    <tr> 
    <th class="tableHeaderText" colspan=2 height=25>修改管理员密码</th>
    </tr>
    <tr> 
      <td width="18%" height="30" align="center">用 户 名</td>
      <td width="82%"> 
      <input name="user" type="text" value="<%=Request.Cookies("admin_name")%>" size=20 readonly style="width:150" ></td>
    </tr>
    <tr> 
      <td width="18%" height="30" align="center">原始密码</td>
      <td width="82%"> 
      <input name="passa" type="password" size=20 style="width:150"></td>
    </tr>
    <tr> 
      <td width="18%" height="30" align="center">新 密 码</td>
      <td width="82%"> 
      <input name="pass" type="password" size=20 style="width:150"></td>
    </tr>
    <tr> 
      <td width="18%" height="30" align="center">确认密码</td>
      <td width="82%"> 
      <input name="pass1" type="password" size=20 style="width:150"></td>
    </tr>
    <tr align="center"> 
      <td height="30" colspan=2><input type="submit" name="Submit" value="提 交" class=inputs></td>
    </tr>
  </form>
</table>
</body>
</html>

<%sub success()%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/style.css" rel=stylesheet type=text/css> 
<title>操作成功</title>
</head>
<body>
<table cellpadding=2 cellspacing=1 border=0 width=400 class=tableBorder align=center><TR>
  <TH class=tableHeaderText colSpan=2 height=25>修改管理员密码</TH>
<TR><tr><td height=85 valign=top class=forumRow><div align=center><br><br>
修改密码成功!</div></td></tr><tr align=center><td height=30 class=forumRowHighlight><a href='admin_changepass.asp'>&lt;&lt; 返回上一页</a></td></tr></table>
</body>
</html>
<br>
<%end sub%>

⌨️ 快捷键说明

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