日期:2014-05-17  浏览次数:20428 次

ASP修改密码,输入相同的密码提示密码不同
<%

dim c

c=2

pagename="修改密码"

%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<meta http-equiv="Cache-Control" content="no-store">

<meta http-equiv="Pragma" content="no-cache">

<meta http-equiv="Expires" content="0">

<link href="style/public.css" rel="stylesheet" type="text/css">

<link href="style/style.css" rel="stylesheet" type="text/css">

<link href="style/editor.css" rel="stylesheet" type="text/css">

<script language="javascript" src="inc/function.js"></script>

<script language="javascript" src="inc/editor.js"></script>

<script language="javascript" src="inc/tips.js"></script>

<title><%=pagename%></title>

</head>

<body><%

dim i,rec(2),requestx,para

para=Request.ServerVariables("Query_String")

if para="submit" then

set requestx=new UpLoadClass

requestx.Charset="UTF-8"

requestx.AutoSave=2

requestx.Open()

rec(0)=CheckInput(requestx.Form("dREamX"),"i")

rec(1)=CheckInput(requestx.Form("r1"),"s")

rec(2)=CheckInput(requestx.Form("r2"),"s")

If rec(1)="" Or rec(2)="" Then 

response.write "<script>alert('密码不能为空!');history.go(-1);</script>"

Else 

If rec(1)<>rec(2) Then

response.write "<script>alert('两次密码不同!');history.go(-1);</script>"

End If

End If

connv.execute("update [user] set PW='"&rec(1)&"' where ID="&rec(0)) 

Set requestx=Nothing

response.write "<script>alert('密码已成功修改!');history.go(-2);</script>"

end If


%>

<script language="JavaScript">

<!--

function validate(obj){

$("r13").value=tsjj.getHtml();

return true;

}

function chbg(v){$("priview").src=""+v+"";}

parent.document.title="<%=pagename%>";

showtip("可以在此修改自己本身的密码");

//-->

</script>

<div class="pagetitle">

<div class="pt_info"><%=pagename%></div>

<div class="pb">

<form method="post" id="postform" action="?submit" enctype="multipart/form-data" onSubmit="validate(this);"> <input type="hidden" name="r2" id="r2" />

<table width="100%" cellspacing="0" cellpadding="5">

<tr>

<td>新 密 码:</td>

<td><input type="password" name="r1" id="r1" size="30" ></td>

</tr>

<tr>

<td>确认密码:</td>

<td><input type="password" name="r2" id="r2" size="30" ></td>

</tr>

<tr>

<td> </td>

<td colspan="2"&g