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

📄 passworkupdate.asp

📁 管理登录system 管理员:admin 密码:admin888 数据库链接文件: conn.asp 内容数据库前台链接文件 systemconn.asp 内容数据库后台链接文件 sy
💻 ASP
字号:
<!--#include file="check_login.asp"-->
<!--#include file="SuperAdminA.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="MD5.asp"-->
<html>
<head>
<title></title>
<script language="JavaScript">
<!--
function checkdata() {

if( form.pws.value =="" ) {
alert("\密码不可以为空!!")
return false;
}
if( form.pws.value.length<6 || isNumberString(form.pws.value,"qwertyuiopasdfghjklmnbvcxzMNBVCXZASDFGHJKLPOIUYTREWQ1234567890_-")!=1) {
alert("\密码不可以小于六位,且要规范!)")
return false;
}
return true;
}
function isNumberString (InString,RefString)
{
if(InString.length==0) return (false);
for (Count=0; Count < InString.length; Count++)  {
	TempChar= InString.substring (Count, Count+1);
	if (RefString.indexOf (TempChar, 0)==-1)  
	return (false);
}
return (true);
}
// -->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="text.css" rel="stylesheet" type="text/css">
</head>
<%
'============================goation=
Addyes=trim(request.QueryString("goation"))
if Addyes="yesdo2" then  response.write "<script language=javascript> alert('演示不可以修改密码!');history.back(-1);</script>"
if Addyes="yesdo"  then 				 
pws=trim(request.Form("pws"))
pws2=trim(request.Form("pws2"))
if pws="" then response.write "<script language=javascript> alert('密码不能为空!');history.back(-1);</script>"
if pws2="" then response.write "<script language=javascript> alert('密码不能为空!');history.back(-1);</script>"
if pws<>pws2 then response.write "<script language=javascript> alert('两次密码不一致!');history.back(-1);</script>"
'===============================

set rs = server.createobject("adodb.recordset")
sql="select * from Nwebadmin where username='"&trim(session("username"))&"'" 
rs.open sql,conn,1,3
			  
  if rs.recordcount=0 then
     response.write "<script language=javascript> alert('管理密码或用户有误,请联系我们解决!');history.back(-1);</script>" 
  else  
     rs("password")=MD5(pws)
     rs.update
     response.write "<script language=javascript> alert('管理密码修改成功!');history.back(-1);</script>"
  end if
rs.close
set rs=nothing
end if

'========================================
if Addyes=""  then 
%>
<body  topmargin="0" leftmargin="0" rightmargin="0" <%=kkk%>>
<!--#include file="top/Ltop07.asp"-->
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0" style='BORDER-BOTTOM:#666666 1px solid; BORDER-LEFT:#CECFCE 1px solid; BORDER-RIGHT:#CECFCE 1px solid; BORDER-TOP: #666666 0px solid;'>
  <tr>
    <td valign="top">
      <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td height="26" bgcolor="#F2F2F2" ><p><font color="#0000FF"><strong>注意 </strong>:修改管理密码后,请记好它,最好记在笔记本上,以防忘记带来不方便! </font></p></td>
        </tr>
      </table>      
      <table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td bgcolor="#CECFCE" style='BORDER-BOTTOM:#666666 1px solid '><strong> 修改网站管理密码:</strong> </td>
        </tr>
        <tr>
          <td bgcolor="#F1F1F1"><table width="96%"  border="0" align="center" cellpadding="0" cellspacing="1">
		    <form name="form" method="post" onSubmit="return checkdata()"  action="Passworkupdate.asp?goation=yesdo">
               <tr>
              <td width="23%" align="right">&nbsp;</td>
              <td width="77%">&nbsp;</td>
               </tr>
			  <tr>
              <td align="right">输入新密码:</td>
              <td><input name="pws" type="password" class="myput" id="pws" size="40"></td>
            </tr>
            <tr>
              <td align="right">确认新密码:</td>
              <td><input name="pws2" type="password" class="myput" id="pws2" size="40"></td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td><input type="submit" name="Submit" value=" 更新 "></td>
            </tr>
			</form>
          </table>          
            <br></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<% end if %>

⌨️ 快捷键说明

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