<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<%
'=============================================
'TianTian Enterprise Content Management System
'TianTian Network Technology studio, All Rights Reserved
'Service center http://www.ip126.com
'QQ:530051328 mail:bbfhq@163.com
'=============================================
%>
<%call SiteInfo
headid=7
Seotitle="Pay the password"
%>
<!--#include file="Head.Asp" -->
<%
if not (session("MemName")<>"" and session("MemLogin")="Succeed") then
  response.Write "<script language=javascript>alert('Please login first！');location.href='Index.asp';</script>"
  response.end
end If
dim mMemID,mMemName,mGroupIdName,mRealName,mSex,mQuestion,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,mUserqq,mEmail,mHomepage,mAddTime,mLoginTimes,mLastLoginTime,mLastLoginIP
call MemInfo()
If IsNull(trim(mQuestion)) Then
  response.Write "<script language=javascript>alert('Your question and answer not set password protection, cannot be modified or set to pay password, please set the password protection question and answer！');location.href='MemberInfo.asp';</script>"
Call CloseRs(rs)
Call CloseDB(conn)
  response.End
else
If trim(request("id"))<>"" Then
set rs = server.createobject("adodb.recordset")
sql="select * from TianTianCMS_Members where ID="&trim(request("id"))&" and Answer='"&md5(request("Answer"))&"'"
rs.open sql,conn,1,3
if rs.eof Then
  response.Write "<script language=javascript>alert('Password protected the answer is wrong, can't modify the payment password！');location.href='memberpay.asp';</script>"
Call CloseRs(rs)
Call CloseDB(conn)
  response.End
else
rs("Paypassword")=md5(request("Paypassword"))
rs.update
  response.Write "<script language=javascript>alert('Modify the payment password successfully, please keep in mind！');location.href='memberpay.asp';</script>"
  response.End
End if 
Call CloseRs(rs)
Call CloseDB(conn)
End if  
end If%>
<TABLE width="960" border=0 align="center" cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF">
  <TR>
    <TD height="5"></TD>
  </TR>
  <TR> 
    <TD height="172" ><table width="960" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="tdbg_left"  width="190" height="179" valign="top" > <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height="34" class="title_left">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;&nbsp;The user login 
                </td>
              </tr>
              <tr> 
                <td height="5"></td>
              </tr>
              <tr> 
                <td height="10"><table width="88%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td> 
                       
	<iframe src="login.asp"  frameborder="0" border="0px" scrolling="no" class="frame" height="120px" width="160px"></iframe>
                      </td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="5"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="34" class="title_left">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;&nbsp;The member center</td>
              </tr>
     
 	<%=WebMenu()%>

            </table></td>
          <td width="6"></td>
          <td valign="top"><table Class=border width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="206" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td class="
title_right" height="32">&nbsp;&nbsp;&nbsp;<img src="../images/smallbook.jpg" width="10" height="10">&nbsp;The member center</td>
                    </tr>
					            <TR> 
              <TD    
                  height=1> 
				  
 
 
 <table width="100%" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr> 
                            <td width="80%" height="18" bgcolor="#eeeeee"><%=WebLocation()%>Modify payment password</td>
                        <td width="79%" bgcolor="#eeeeee">&nbsp; </td>
                  </tr>
                  <tr> 
                    <td height="1" colspan="2" bgcolor="#999999"></td>
                  </tr>
                </table>
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="#FBFEFF">
                  <tr> 
                    <td height="8"></td>
                  </tr>
                 
                  <tr> 
                        <td>

<script language="javascript">
<!--
	//--------------------------------------------------------------------
function myform_onsubmit()
 {
//字节数限制，与下面配合=========
String.prototype.Length=function(){
temp=this.replace(/([^\x00-\xff])/g,"$1$1");
return temp.length
}
//显示输入字符数

	  if ((document.myform.PayPassword.value.Length()>12) || (document.myform.PayPassword.value.Length()<6)) //字节数限制，与上面配合
     {
	 alert("Password length for 6-12 bytes, please enter again！");
	  document.myform.PayPassword.focus()
	  return false
  }
	    if(document.myform.vPayPassword.value.length<1)
	{
	    alert("Confirm password cannot be empty!");
		document.myform.vPayPassword.focus()
	    return false;
	}
	   if(document.myform.vPayPassword.value!=document.myform.PayPassword.value)
        {
       alert("Enter the password twice!");
	   document.myform.vPayPassword.focus()
       return false;
        }
       if(document.myform.Answer.value=="") 
	{
	    alert("Password protected the answer cannot be empty!");
		document.myform.Answer.focus()
	    return false;
	}

}
// --></script>

		 <table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
		  <form action="?ID=<%=mMemID%>" method="post" name="myform" id="myform" onSubmit="return myform_onsubmit()">
              <tr>
                <td width="200" align="right">Member login name：</td>
                <td><% =mMemName %></td>
              </tr>
              <tr>
                <td align="right">The wallet payment password：</td>
                <td><input name="PayPassword" type="password" id="PayPassword" size="20" maxlength="16" /></td>
              </tr>
              <tr>
                <td align="right">Confirm payment password：</td>
                <td><input name="vPayPassword" type="password" id="vPayPassword" size="20" maxlength="16" /></td>
              </tr>
              <tr>
                <td align="right">Verify password protection：</td>
                <td><%=mQuestion %></td>
              </tr>
              <tr>
                <td align="right">Verify password protect the answer：</td>
                <td><input name="Answer" type="text" id="Answer" size="20" maxlength="100" /> （Must be password protected the answer to pay to modify the password）
				</td>
              </tr>

              <tr>
                <td align="right">&nbsp;</td>
                <td><input name="Submit" type="submit" value="Pay the password change purse" /></td>
              </tr>
			  </form>
            </table>

						 </td>
                  </tr>             
                  <tr> 
                    <td height="8"><div align="right"></div></td>
                  </tr>
                </table> 
                      </TD>
            </TR>
                  </table>
                  
                </td>
              </tr>
			  
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="Foot.Asp"-->

