免费网站源码资源分享
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="admincheck.asp"-->
<!--#include file="conn.asp"-->
<%
if request.QueryString("act")="edit" then
'check password
sqlCP="select id from [admin] where [password]='"&md5(trim(request.Form("opwd")))&"'"
set rsCP=server.CreateObject("dset")
rsCP.open sqlCP,conn,1,1
if  f or  rsCP.bof then
rsCp.close
set conn=nothing
response.Redirect("?w=1")
else
sqlUp="update [admin] set [password]='"&md5(trim(request.Form("npwd")))&"'"
response.Write(sqlUp)
response.Redirect("?w=2")
end if
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员密码</title>
<link  rel="stylesheet" type="text/css" href="skin/skin1/g.css" />
</head>
<body>
<script language="javascript">
function c(){
//check null
if(document.f.opwd.value==''){
alert('请输入原始密码');
document.f.opwd.focus();
return false;
}
if(document.f.npwd.value==''){
alert('请输入新密码');
document.f.npwd.focus();
return false;
}
if(pwd.value==''){
alert('重复输入新密码');
pwd.focus();
return false;
}
if(pwd.value!=document.f.npwd.value){
alert('您两次输入的密码不统一');
pwd.focus();
return false;
}
return true;
}
</script>
<h2 class="bg"></h2>
<div class="detial"> <font class="comp-title">安全设置 Safe</font><br />
<br />
<%
if request.QueryString("w")="1" then
response.Write("您的密码错误!")
elseif request.QueryString("w")="2" then
response.Write("您的密码已经修改完成!")
end if
%>
<table cellpadding="10" cellspacing="1" align="center" bgcolor="#CCCCCC" border="0">
<form action="?act=edit" method="post" name="f"  enctype="application/x-www-form-urlencoded" onSubmit="return c()">
<tr>
<td bgcolor="#FFFFFF"><strong>原始密码</strong></td>
<td bgcolor="#FFFFFF"><input type="text" value="" name="opwd">
<input type="hidden" value="comppwdreset" name="logintype"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><strong>新密码</strong></td>
<td bgcolor="#FFFFFF"><input type="text" value="" name="npwd"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><strong>重复密码</strong></td>
<td bgcolor="#FFFFFF"><input type="text" value="" name="rnpwd"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#FFFFFF"><input type="submit" value="修改"></td>
</tr>
</form>
</table>
</div>
<div ></div>
<h3 class="bg"></h3>
</div>
</body>
</html>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。