<%@ LANGUAGE=VBScript%>
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
if zhbg_name="" then Response.Redirect "../error.asp?id=210"
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
rs.open "select * from 用户 where 姓名='"&zhbg_name&"'",conn
if rs.eof or rs.bof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	Response.Write "<script Language=Javascript>alert('你不是国度中人？！');window.close();</script>"
	response.end
end if
zhbg_id=rs("id")
rs.close
conn.close
set conn=nothing
function chuser(u)
	dim filter,xx,usernameenable,su
	for i=1 to len(u)
		su=mid(u,i,1)
		xx=asc(su)
		zhengchu = -1*xx \ 256
		yushu = -1*xx mod 256
		if (xx>122 or (xx>57 and xx<97) or (xx<-10241 and xx>-10247) or yushu=129 or yushu>192 or (yushu<2 and yushu>-1) or (((zhengchu>1 and zhengchu<8) or (zhengchu>79 and zhengchu<86)) and yushu<96 ) or (xx>-352 and xx<48) or (xx<-22016 and xx>-24321) or (xx<-32448)) then
			chuser=true
			exit function
		end if
	next
	chuser=false
end function
wt=lcase(trim(request.form("wt")))
da=lcase(trim(request.form("da")))
if wt="" then
	Response.Write "<script Language=Javascript>alert('错误：提示问题不可为空！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if da="" then
	Response.Write "<script Language=Javascript>alert('错误：问题答案不可为空！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if len(wt)>5 then
	Response.Write "<script Language=Javascript>alert('错误：提示问题最多为五个汉字！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if len(da)>5 then
	Response.Write "<script Language=Javascript>alert('错误：问题答案最多为五个汉字！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if chuser(wt) then
	Response.Redirect "../error.asp?id=120"
	response.end
end if
if chuser(da) then 
	Response.Redirect "../error.asp?id=60"
	response.end
end if
if instr(wt,"or")<>0 or instr(da,"or")<>0 or instr(wt,"=")<>0 or instr(da,"=")<>0 then
	Response.Redirect "../error.asp?id=54"
	response.end
end if
if trim(request.form("wt"))="" or trim(request.form("da"))="" then
	Response.Write "<script Language=Javascript>alert('错误：提示问题和答案都不可为空！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if wt=da then
	Response.Write "<script Language=Javascript>alert('错误：提示问题和答案不可以相同！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
if left(wt,3)="%20" OR InStr(wt,"=")<>0 or InStr(wt,"`")<>0 or InStr(wt,"'")<>0 or InStr(wt," ")<>0 or InStr(wt,"　")<>0 or InStr(wt,"'")<>0 or InStr(wt,chr(34))<>0 or InStr(wt,"\")<>0 or InStr(wt,",")<>0 or InStr(wt,"<")<>0 or InStr(wt,">")<>0 then
	Response.Redirect "../error.asp?id=120"
	response.end
end if
if left(da,3)="%20" OR InStr(da,"=")<>0 or InStr(da,"`")<>0 or InStr(da,"'")<>0 or InStr(da," ")<>0 or InStr(da,"　")<>0 or InStr(da,"'")<>0 or InStr(da,chr(34))<>0 or InStr(da,"\")<>0 or InStr(da,",")<>0 or InStr(da,"<")<>0 or InStr(da,">")<>0 then
	Response.Redirect "../error.asp?id=120"
	response.end
end if
%><!--#include file="DATA.ASP"--><%
sql="select * from 密码保护 where 用户="&zhbg_id
set rs=conn1.execute(sql)
if rs.eof or rs.bof then
	rs.close
	set rs=nothing
	conn1.close
	set conn1=nothing
	Response.Write "<script Language=Javascript>alert('提示：你还未申请过密码保护！');history.go(-1)';</script>"
	response.end
end if
a=trim(rs("问题"))
b=trim(rs("答案"))
rs.close
set rs=nothing
conn1.close
set conn1=nothing
if wt<>a or da<>b then
	Response.Write "<script Language=Javascript>alert('错误：提示问题或问题答案错误，操作失败！');location.href = 'javascript:history.go(-1)';</script>"
	response.end
end if
%><script language="JavaScript">
function load()
{var name=navigator.appName
var vers=navigator.appVersion
if(name=="Netscape")
{window.location.reload()
}else
{history.go(0)
}}
</script>
<html>
<head><link href="../../../css.css" rel="stylesheet" type="text/css">
<title>密码保护资料修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<bgsound src="../../ZCMP/pic/bj.mid" loop="-1">
</head>
<body  >

<table width="428" border="1" align="center" cellpadding="10" cellspacing="13" bordercolor="#cccccc" bgcolor="#cccccc">
  <tr>
    <td height="55" align="center" ><p align="center"><a href="javascript:load()">【刷新】</a><a href="javascript:history.go(-1)">【返回】</a> </p>
 <form name="form1" method="post" action="MMBHXG2.ASP?oldwt=<%=a%>&oldda=<%=b%>">
        <p align="center">密码保护资料修改</p>
        <p align="center"><font color="#FF0000">第二步：修改资料</font></p>
        <p align="center">敬告：<font color="#000000" size="2"><%=zhbg_name%></font>请牢记你修改过的密码保护提示问题和答案，这是你唯一找回密码的依据。</p>
  <p align="center">新密码提示问题：
    <input type="text" name="newwt" size="12" maxlength="10"> </p>
  <p align="center">新密码提示答案：
    <input type="text" name="newda" size="12" maxlength="10"></p>
  <p align="center"> 
    <input type="submit" name="Submit" value="修改">
  </p>
</form>
</td>
  </tr>
<tr>    
    <td colspan="2" align="center" >[非凡国度]
    </td>    
</tr> 
</table>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>