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

📄 adminpass.asp

📁 一个不错的个人商务网站的源码
💻 ASP
字号:
<%dim nowplace
nowplace="faq"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_request.asp"-->
<!--#include file="../comm/md5.asp"-->
<%
action=my_request("action",0)
if action="save" then
old_password=my_request("old_password",0)
new_password=my_request("new_password",0)
new_password2=my_request("new_password2",0)

if old_password="" or new_password="" or new_password2="" then
response.write"<SCRIPT language=JavaScript>alert('信息不完整!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if new_password<>new_password2 then
response.write"<SCRIPT language=JavaScript>alert('两次新密码输入不一致!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

id=session("yqj_id")
set rs=server.createobject("adodb.recordset")
sql="select login_txt_pass from yqj_manager where id="&id
rs.open sql,conn,1,3
password=rs("login_txt_pass")
if password<>md5(old_password,32) then
response.write"<SCRIPT language=JavaScript>alert('原密码输入有错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
else
rs("login_txt_pass")=md5(new_password,32)
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.write "<script>alert(""密码修改成功"");location.href=""adminpass.asp"";</script>"
Response.end
end if
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=AdminStyle.css rel=stylesheet type=text/css>
<title>管理员修改密码</title>
<SCRIPT language="javascript">
<!--
function checksubmit()
{
 if (document.form2.old_password.value == "")        
  {        
    window.alert("请输入原密码!");        
    document.form2.old_password.focus();        
    return (false);} 
 if (document.form2.new_password.value == "")        
  {        
    window.alert("请输入新密码!");        
    document.form2.new_password.focus();        
    return (false);} 
 if (document.form2.new_password2.value == "")        
  {        
    window.alert("请输入新的确认密码!");        
    document.form2.new_password2.focus();        
    return (false);} 
    document.form2.B1.disabled=true
    document.form2.B1.value="正在保存数据……"
    }
  //--></SCRIPT>
</head>

<body>
<div align="center">
<table width="100%" cellspacing="1" cellpadding="4" style="border:1px solid #183789; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
  <form action="adminpass.asp" method="post" name=form2 onsubmit="return checksubmit();">
<tr>
    <td colspan="2" height="25" bgcolor="#F7F7F7" background="Image/admin_bg_1.gif"><div align="left">
		<font color="#FFFFFF">
		<b>密码修改</b></font></div></td>
  </tr>
  <tr>
    <td width="40%"><div align="right">原密码:</div></td>
    <td height="20" width="58%">
	<input name="old_password" type="password" id="old_password" size="29">
	<input name="action" type="hidden" value="save"></td>
  </tr>
  <tr>
    <td width="40%"><div align="right">新密码:</div></td>
    <td height="20" width="58%">
	<input name="new_password" type="password" id="new_password" size="29"></td>
  </tr>
  <tr>
    <td width="40%"><div align="right">确认新密码:</div></td>
    <td height="20" width="58%">
	<input name="new_password2" type="password" id="new_password2" size="29"></td>
  </tr>
  <tr>
    <td colspan="2" height="20"><div align="center">
      <input type="submit" name="B1" value="保存数据">
    </div></td>
  </tr></form>
</table>
</div>

</body>
</html>

⌨️ 快捷键说明

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