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

📄 changepass.asp

📁 个性网名转换-繁体字转换-qq强制聊天-qq秀查看-空间留言代码编辑器-等其他常用工具
💻 ASP
字号:
<!-- #include file="conn.asp"-->
<%
if Request.Form("new_pass")<>"" Then
set rs=Server.CreateObject("ADODB.recordset")
sql="select * from admin where user='"&Session("user")&"' and password='"&Request.Form("old_pass")&"'"
rs.open sql,conn,3,3
if Not Rs.EOF Then
rs("user")=Request.Form("username")
rs("password")=Request.Form("new_pass")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "../admin/"
Else
Call AlertBack("密码不正确")
End if
End if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>站长帐户 - <%=sitetitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-cn" />
<link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
<link href="/favicon.ico" type="image/x-icon" rel="bookmark" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="Copyright 2007 netsoz.com" name="copyright" />
<link href="../css/accounts.css" type="text/css" rel="stylesheet" />
<script>
function check(){
var fromobj;
fromobj=document.form
if 	(fromobj.old_pass.value.length==""){
		alert("旧密码必须输入!");
		fromobj.old_pass.focus();
		return false;
	}
if 	(fromobj.new_pass.value.length==""){
		alert("新密码必须输入!");
		fromobj.new_pass.focus();
		return false;
	}
if 	(fromobj.renew_pass.value.length==""){
		alert("请输入重复密码!");
		fromobj.renew_pass.focus();
		return false;
	}
if (fromobj.old_pass.value == fromobj.new_pass.value){
		alert('旧密码不能与新密码相同哦!');
		fromobj.new_pass.focus();
		return false;
	}
if (fromobj.renew_pass.value != fromobj.new_pass.value){
		alert('新密码与重复密码必须相同哦!');
		fromobj.renew_pass.focus();
		return false;
	}

}
</script>
</head>
<body bgcolor="#FFFFFF">
<DIV id=Head>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="220" align="center" style="padding:1px 0px 0px 0px;"><a href="../index.asp" onFocus="this.blur();"><img src="../images/logo_coodirs.gif" width=206 height=50 vspace=7 border=0 alt="netsoz中文网站目录"></a></td>
    <td valign="top" style="padding:1px 0px 0px 0px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td align="right" valign="top" style="padding:6px 16px 0px 0px;">
	 
	  <strong><%=Session("user")%></strong> - <a href="../accounts/" class="linkNo">我的帐户</a> - <a href="../index.asp" class="linkNo">网站目录首页</a> - <a href="../accounts/logout/" class="linkNo">退出</a>
	  
	  </td>
    </tr>
</table>
</td>
  </tr>
</table> 
  <table width="100%" border="0" cellpadding="2" cellspacing="1" style="border-top:1px solid #99B2CC; border-bottom:1px solid #99B2CC;">
    <tr>
      <td height="20" bgcolor="#DBE9F4">&nbsp;您的位置:<strong><%=Session("user")%></strong> 的管理中心</td>
    </tr>
  </table>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
		  <td width="160" valign="top" style="padding:6px 0px 0px 0px;">
		   <table width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
	<td nowrap="nowrap" class="f60b14" style="padding:3px 0px 3px 6px;">管理中心</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
   <tr>
     <td height="1" background="../images/dot_line.gif"></td>
 </tr>		
</table>
<!-- #include file="LeftMenu.asp"-->

<table width="100%" border="0" cellspacing="1" cellpadding="2" style="margin-bottom:30px;">
  <tr>
     <td height="1" background="../images/dot_line.gif"></td>
 </tr>		
</table>
 	
		  </td>
		  <td width="1" background="../images/dot_line.gif"></td>
          <td valign="top" style="padding:0px 0px 10px 16px;">
	
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:10px;">
   <tr>
     <td height="1" background="../images/dot_line.gif"></td>
   </tr>		
</table>

			<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
				<tr> 
			       <td><span class=txtcolor><strong>修改密码</strong></span><br><br></td>
			    </tr>
			</table>
			<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
				<form action="ChangePass.asp" method="post" name="form">
				<tr>
					<td align="right" width="80">新用户名:</td>
					<td><input type="text" name="username" size="20" value="<%=Session("user")%>"></td>
				</tr>
				<tr>
					<td align="right" width="80">旧密码:</td>
					<td><input type="password" name="old_pass" size="20"></td>
				</tr>
				<tr>
					<td align="right">新密码:</td>
					<td><input type="password" name="new_pass" size="20"></td>
				</tr>	
				<tr>
					<td align="right">确认密码:</td>
					<td><input type="password" name="renew_pass" size="20"></td>
				</tr>		
				<tr>
					<td colspan="2" height="40" style="padding:0px 0px 0px 100px;"><input type="submit" name="submit" class=btxx value="保存" onClick="return check();">&nbsp;&nbsp;<input type="reset" name="reset" value="重填" class=btxx></td>
				</tr>
				</form>
			</table>


		  </td>
        </tr>
      </table>
<%=sitefoot%>
</div>
</body>
</html>

⌨️ 快捷键说明

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