<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.User.RegUser" CodePage="65001" GameType="1" PageFileFlag="GetUserPass" PageFileTitle="找回密码" DataBindingType="1" PageFlagId="2"  %>

<%@ Register TagPrefix="Site" TagName="Menu" Src="~/WUC/Common/Site_Menu.ascx" %>
<%@ Register TagPrefix="Site" TagName="UserPicNote" Src="~/WUC/Common/Site_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Game1" Src="~/WUC/Common/Site_Game1.ascx" %>

<%@ Register TagPrefix="Site" TagName="Side_UserPicNote" Src="~/WUC/Common/Site_Side_UserPicNote.ascx" %>
<%@ Register TagPrefix="Site" TagName="Side_Future" Src="~/WUC/Common/Site_Side_Future.ascx" %>
<%@ Register TagPrefix="Site" TagName="Side_Main" Src="~/WUC/Common/Site_Side_Menu.ascx" %>




<!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>
<Site:Menu id="menu_headtitle" runat="server" Flag="HeadTitle" CurrentPageTitle = "找回密码" />
<Site:Menu id="menu_headjs" runat="server" Flag="HeadJs"  />

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

<script language="javascript" src="/paipaijs/jquery.checkform2.js"></script>
</head>

<body>
<!--start 头部-->

<Site:Menu id="menu_topmenu" runat="server" Flag="TopMenu"  CurrentPageFlag="Reg" />

<!--end 头部-->
<!--start 通用(上) -->

<!--start Adv-->
<%/*
<div class=" PageWidth Adv1"><img src="/images/ad_01.png" /></div>
<div class=" clear"></div>
*/%><!--end Adv-->

<div class="PageWidth">

<!--start left cont-->
<div class="Grid-Base ">
	<div class="Title">
		找回密码
	</div>
	<div class="MG20   LH35">

			<div class="RegBox W680 FL TextCenter ">
			<div CLASS="RegItem FS16 orange TextLeft " style="border-bottom:1px solid #DDDDDD;">
				<div STYLE="margin-left:50px;" >
				我们将重设密码的链接发送到您的有效邮箱里，您通过点击链接完成密码重设操作。<br />
				</div>
				<DIV STYLE="margin-left:50px;">
				
				请您输入您的昵称和所注册的邮箱:
				</DIV>
			</div>
			<div class=" clear"></div>
			<DIV class="RegItem">
				<div class="InfoTitle ">用户名:</div>
				<div id="DivInput_UserNickName" class="InfoInput defColor "><input type="text" id="UserNickName" name="UserNickName" maxlength="20" class="W235" />&nbsp;</div>
				<div id="DivMsg_UserNickName" class="InfoMsg InfoMsgColor ">2~20位中英文字符、数字、下划线等&nbsp;</div>
				<div class=" clear"></div>
			</DIV>	
	


			<DIV class="RegItem">
				<div class="InfoTitle ">邮箱: </div>
				<div id="DivInput_UserEmail" class="InfoInput defColor  "><input type="text"   id="UserEmail" name="UserEmail"  class="W235" />&nbsp;</div>
				<div id="DivMsg_UserEmail" class="InfoMsg InfoMsgColor ">例:zhangsan@qq.com&nbsp;</div>
			
				<div class=" clear"></div>
			</DIV>		
			<DIV  class="RegItem">
				<div class="InfoTitle ">&nbsp;</div>
				<div class="InfoInput InfoSuccess2 FS14" >&nbsp;注：该邮箱须与您详细资料中所保存的邮箱保持一致。</div>
				<div class=" clear"></div>
			</DIV>		
			<DIV class="RegItem">
				<div class="InfoTitle ">验证码: </div>
				<div id="DivInput_VerifyCode" class="InfoInput defColor ">
				<input type="text"   id="VerifyCode" name="VerifyCode"   class="W60" maxlength="4" />&nbsp;</div>
				
				<div class="InfoInput pic "><input type="image" id="safecode"   onclick="reloadcode();">&nbsp; </div>	
				<div class="InfoInput pic "> <a  class=" LH25" onclick="reloadcode();" >看不清楚，换一张</a></div>	
				<div id="DivMsg_VerifyCode" class="InfoMsg InfoMsgColor ">4位验证码&nbsp;</div>
				<div class=" clear"></div>
			</DIV>				

			<DIV class="RegItem MGT10">
				<input type="image" id="regSub" src="/images/btnGetPass.gif">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<div class=" clear"></div>
			</div>
			
			<DIV class="RegItem"  style="border-top:1px solid #DDDDDD;">
			
				<div id="reginfoText" class="W600 LH25 TextLeft FS14" style="margin-left:50px" >
				如果您在过程中，遇到任何问题，请与我们的客服联系。<br />
				客服电话：<font color="#FF7800">400-0168-7899</font><br />
				客服邮箱：<font color="#FF7800">service@9pai.com</font><br />
				</div>

			<div class=" clear"></div>
			</div>
					
			
	
			
			</div>

			<div class="LogBox  W200 FL MGL10 TextCenter">
			已有9拍帐户？直接登陆
			<input type="image" src="/images/login.gif" onclick='return CheckIsLoginForLogin();' >
			
			</div>
	<div class=" clear"></div>
	</div>	
		<div class=" clear"></div>
</div>
<div class=" clear"></div>
<!--end left cont-->
</div>



<script>

//function reloadcode() {jQuery('#safecode').attr("src", '/index.aspx?s=/User/verify/&w=120&h=60&tid=' + (new Date().getTime().toString(36)));}
function reloadcode() {jQuery('#safecode').attr("src", '/CommonTools/AjaxCommonUI.aspx?PageFileFlag=VerifyCode&w=120&h=60&tid=' + (new Date().getTime().toString(36)));}
function funSucc(id,msg){jQuery("#DivInput_"+ id).removeClass("warnColor");jQuery("#DivMsg_"+ id).removeClass("InfoWarning").addClass("InfoSuccess").html(msg+"&nbsp;");}
function funFail(id,msg){jQuery("#DivInput_"+ id).addClass("warnColor");jQuery("#DivMsg_"+ id).removeClass("InfoSuccess").addClass("InfoWarning").html(msg+"&nbsp;");}
function checkform(){
    var ok = jQuery.checkForm2({
        ctrls: [                                   
            	{id: "UserNickName",type:"mustRegular", par: /[\w\u4e00-\u9fa5]{2,20}$/,funSuccess: function(ctr){ funSucc(ctr.id,"");},funFailed:function(ctr){funFail(ctr.id,"2~20位中英文字符、数字、下划线等");}}//
		,{id: "UserEmail",type:"mustEmail", par:"",funSuccess: function(ctr){ funSucc(ctr.id,"");},funFailed:function(ctr){funFail(ctr.id,"这个邮箱不存在吧？");}}
		,{id: "VerifyCode",type:"mustMoreThan", par:4,funSuccess: function(ctr){ funSucc(ctr.id,"");},funFailed:function(ctr){funFail(ctr.id,"验证码须4位");}}
            ],
        success: function(){ //验证通过mustEqualTo
            },
        failed: function(msg){  //Alert("验证失败");
            }
        });
	return ok;	

}



//进行用户存在性验证
//进行邮箱验证
//进行手机号验证
//验证通过后，
function CheckBeforeSubmit()
{
	var value="";
	var t = checkform();
	//if(t){value = jQuery("#UserNickName").val();CheckExisted("UserNickName",value,function (msg) {if (msg == 1) {funFail("UserNickName",'该用户名已存在。');t =  false;}else {funSucc("UserNickName","");t =  true;}});}
	//if(t){value = jQuery("#UserEmail").val();CheckExisted("UserEmail",value,function (msg) {if (msg == 1) {funFail('UserEmail','该邮箱已被使用。');t=false;} else {funSucc('UserEmail',"");t =  true;}});}	
	return t;
}        

var  __x ;
function SubmitAfterSuccess()
{
			var queryString= jQuery(".RegItem  input").serialize();
			AjaxSubmit(
			"POST"
			//,"/index.aspx?s=/UserInfo/UserRegister2/&IsAdd=7&t="+ new Date().getTime()
			,"/UserInfo/UserInfo_Update.aspx?IsAdd=11&t="+ new Date().getTime()
			,queryString
			,function(msg)
			{
				switch(msg)
				{
					case "-1":Alert("您输入的资料有误，该会员不存在。");break;
					case "-2":Alert("验证码不正确。");break;
					case "0":Alert("邮件发送失败，请与本站客服联系。");break;
					case "1":Alert("您好，邮件已发送到您的邮箱中，请点击链接完成密码重设操作。");  //Common.GoTo("/index.aspx");
					break;
					default : Alert("未知错误("+ msg +")。");
					break;
					
				}
				reloadcode();
			}
			,function(msg)
			{
				Alert(msg,20);
				reloadcode();
			}
			);		


}



jQuery("#regSub").click(function(){

if(CheckBeforeSubmit()){SubmitAfterSuccess();}

});

jQuery(function(){
reloadcode();
});
</script>





















<div class=" clear"></div>
<!--start 通用(下) -->
<!--start 底部帮助-->
<!--end 底部帮助-->
<!--start 友情链接-->
<!--end 友情链接-->

<Site:Menu id="menu_foot" runat="server" Flag="Foot"   />


</body>
</html>
