<%
'乘风多用户计数器
'作者QQ：178575
'作者EMail：yliangcf@163.com
'作者网站：http://www.qqcf.com
'详细简介：http://www.qqcf.com/cfcount.htm
'上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
'因为这些内容可能时常更新，没有放在程序里，请自己上网站上查看
%>
<%If SysCode="" Then Response.End%>

<%Set Rs= Server.CreateObject("Adodb.RecordSet")
Sql="Select * From CFCount_User Where UserName='"&UserName&"'"
Rs.Open Sql,Conn,1,1%>

<script>
$(function(){
	 $("#submit1").click(function(){		 
		
		if($('#pwdask_new').val()==""){
			 alert('请填写新密码提示问题', '', function () {$("#pwdask_new").focus();});
			 return false;
		}
		
		if($('#pwdanswer_new').val()==""){
			 alert('请填写新密码回答答案', '', function () {$("#pwdanswer_new").focus();});
			 return false;
		}
		
		if($('#pwdask_new').val()==$('#pwdanswer_new').val()){
			 alert('新密码回答答案和新密码提示问题不能相同', '', function () {$("#pwdanswer_new").focus();});
			 return false;
		}
		
		<%If Rs("pwdask")<>"" Then%>
		if($('#pwdanswer_old').val()==""){
			 alert('请填写原密码回答答案', '', function () {$("#pwdanswer_old").focus();});
			 return false;
		}
		<%End If%>
		
	});	
});
</script>

<form name="form3" method="post" action="?Action=answermodifysave">
<table class="tb_1"><tr class="tr_1">
<td colspan="2"> 修改密码提示和答案(带*为必填项）</td>
</tr>

<tr> 
<td width="120px" class="td_r">新密码提示问题：</td>
<td>
<input name="pwdask_new" type="text" id="pwdask_new" size="20">
<font color="#0000FF">*</font></td>
</tr>
<tr> 
<td class="td_r">新密码回答答案：</td>
<td>
<input name="pwdanswer_new" type="text" id="pwdanswer_new" size="20">
<font color="#0000FF">*</font></td>
</tr>

<%If Rs("pwdask")<>"" Then%>
<tr> 
<td class="td_r">原密码提示问题：</td>
<td><%=Rs("pwdask")%></td>
</tr>
<tr> 
<td class="td_r">原密码回答答案：</td>
<td><input name="pwdanswer_old" type="text" id="pwdanswer_old" size="20">
<font color="#0000FF">*</font>(请输入原答案确认要修改为以下新提示和答案)</td>
</tr>
<%End If%>

<tr> 
<td>&nbsp;</td>
<td>
<input type="submit" name="submit1" id="submit1" value="修　改" >

</td>
</tr>
</table>
</form>
