<!--#include file="../conn/conn2.asp" -->
<!--#include file="../conn/function.asp" -->

<!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" />
<title>会员中心</title>
<%
action=Request.QueryString("action")
M_pwdcode=Request.QueryString("M_pwdcode")

sql="Select * from SL_member Where M_pwdcode='"&M_pwdcode&"'"
		set rs=Server.CreateObject("ADODB.RecordSet")
		rs.open sql,conn,1,1
		if not rs.eof then
		M_login=rs("M_login")
		else

		call box("重置码错误!","member_login.asp","error")

		end if
		
		
if action="setpwd" then
if request.Form("M_newpwd")=request.Form("M_newpwd2") and request.Form("M_newpwd")<>"" then
conn.execute("update SL_member set M_pwd='"&request.Form("M_newpwd")&"' where M_pwdcode='"&M_pwdcode&"'")
conn.execute("update SL_member set M_pwdcode='' where M_pwdcode='"&M_pwdcode&"'")

call box("重置密码成功，请返回登录!","member_login.asp","success")
else
call box("两次密码不一致!","back","error")
end if

end if
		

%>
<link type="text/css" rel="stylesheet" href="css/style.css"  />
</head>
<body>
<div class="panel panel-t1 panel-login-new" style=" position: fixed; width: 540px; z-index: 101; left: 50%; top: 50%; margin-left:-270px;margin-top:-200px; " id="BAIDU_PANEL_5">
  <div class="panel-content" id="panel-content">
    <div class="hd">
      <h3>登录</h3>
     
    </div>
    <div class="bd">
      <div class="panel panel-login-new" id="BAIDU_PANEL_4">
        <div class="panel-content">
          <div class="bd">
            <div style="margin-top:6px;"></div>
            <div class="panel-login-cont-bd cls">
              <div class="panel-login-cont-l">
                <p>还没有帐号？</p>
                <a title="立即注册" class="reg-btn _hrefAddRef" target="_self" href="member_reg.asp">立即注册</a>
                <div class="login-btns">
                  <p>使用合作网站帐号登录</p>
                  <a title="QQ帐号" style=" margin-top:6px;" class="third-login third-party-btn qq _hrefAddRef" target="_self" data-type="third" href="<%=C_dir%>qq/qqlogin.asp">QQ帐号</a> </div>
              </div>
              <div class="panel-login-cont-r">
                <form action="member_setpwd.asp?action=setpwd&M_pwdcode=<%=M_pwdcode%>" name="loginForm" method="post" class="panel-login-form">
                  <ul>
                    <li>
                      <label class="k" for="a1">登录帐号：</label>
                      <span class="v">
                      <%=M_login%>
                      </span> </li>
                    <li>
                      <label class="k" for="a2">设置密码：</label>
                      <span class="v">
                      <input type="password" emel="error_txt" id="password" name="M_newpwd" data-placeholder="请输入密码" reqmsg="请填写密码" emptyhintel="emptyhint-10001">
                      </span> </li>
					  <li>
                      <label class="k" for="a2">确认密码：</label>
                      <span class="v">
                      <input type="password" emel="error_txt" id="password" name="M_newpwd2" data-placeholder="请输入密码" reqmsg="请填写密码" emptyhintel="emptyhint-10001">
                      </span> </li>
                  </ul>
                  <div class="error-txt"><em id="error_txt"></em></div>
                  <div class="login-remember cls">
                     </div>
                  <div class="btns">
                    <input class="btn-login" type="submit" id="submit_button" value="登录">
                    <input class="btn-login btn-active" style="display:none" type="submit" value="登录中...">
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    
    </div>
    <div class="ft"></div>
  </div>
  <span class="sd"></span><span class="close"></span>
  </div>
</body>
</html>