<!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=gb2312" />
<title>{#$title#}</title>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<link rel="shortcut icon" href="{#$QISHI.main_domain#}favicon.ico" />
<meta name="author" content="骑士CMS" />
<meta name="copyright" content="74cms.com" />
<link href="{#$QISHI.site_template#}css/common.css" rel="stylesheet" type="text/css" />
<link href="{#$QISHI.site_template#}css/reg.css" rel="stylesheet" type="text/css" />
<script src="{#$QISHI.site_template#}js/jquery.js" type='text/javascript' ></script>
<script src="{#$QISHI.site_template#}js/jquery.validate.min.js" type='text/javascript' language="javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#Form1").validate({
//debug: true,
// onsubmit:false,
//onfocusout :true,
   rules:{
   username:{
    required: true
   },
	   {#if $verify_getpwd=="1"#}
		postcaptcha:{
		IScaptchastr: true,
		required: true,
		remote:{     
		url:"{#$QISHI.main_domain#}include/imagecaptcha.php",     
		type:"post",    
		data:{"postcaptcha":function (){return $("#postcaptcha").val()},"act":"verify","time":function (){return new Date().getTime()}}     
		}
	   },
	   {#/if#}  
	   email: {
	   required:true,
	   email:true
	   }
	},
    messages: {
    username: {
    required: "请输入用户名"
   },
   {#if $verify_getpwd=="1"#}
    postcaptcha: {
    required: "请填写验证码",
	remote: jQuery.format("验证码错误")	
   },
    {#/if#}
   email: {
    required: jQuery.format("请填写电子邮箱"),
	email: jQuery.format("请正确填写电子邮箱")
   } 
  },
  errorPlacement: function(error, element) {
    if ( element.is(":radio") )
        error.appendTo( element.parent().next().next() );
    else if ( element.is(":checkbox") )
        error.appendTo ( element.next());
    else
        error.appendTo(element.parent());
	}
    });
	jQuery.validator.addMethod("IScaptchastr", function(value, element) {
	var str="点击获取验证码";
	var flag=true;
	if (str==value)
	{
	flag=false;
	}
	return  flag || this.optional(element) ;
	}, "请填写验证码");
	/////验证码部分
{#if $verify_getpwd=="1"#}
function imgcaptcha(inputID,imgdiv)
{
	$(inputID).focus(function(){
		if ($(inputID).val()=="点击获取验证码")
		{
		$(inputID).val("");
		$(inputID).css("color","#333333");
		}
		$(inputID).parent("div").css("position","relative");
		//设置验证码DIV
		$(imgdiv).css({ position: "absolute", left:  $(inputID).width(), "bottom": "0px" , "z-index": "10", "background-color": "#FFFFFF", "border": "1px #A3C8DC solid","display": "none","margin-left": "25px"});
		$(imgdiv).show();
		if ($(imgdiv).html()=='')
		{
		$(imgdiv).append("<img src=\"{#$QISHI.main_domain#}include/imagecaptcha.php?t={#$random#}\" id=\"getcode\" align=\"absmiddle\"  style=\"cursor:pointer; margin:3px;\" title=\"看不请验证码？点击更换一张\"  border=\"0\"/>");
		}
		$(imgdiv+" img").click(function()
		{
			$(imgdiv+" img").attr("src",$(imgdiv+" img").attr("src")+"1");
			$(inputID).val("");
			$("#Form1").validate().element("#postcaptcha");	
		});
		$(document).unbind().click(function(event)
		{
			var clickid=$(event.target).attr("id");
			if (clickid!="getcode" &&  clickid!="postcaptcha")
			{
			$(imgdiv).hide();
			$(inputID).parent("div").css("position","");
			$(document).unbind();
			}			
		});
	});
}
imgcaptcha("#postcaptcha","#imgdiv");
//验证码结束
{#/if#}
});
</script>
</head>
<body class="login_body">
	<div class="sign_up_box">
		<div class="container">
			<div class="sign_lgo"><a href="{#$QISHI.website_dir#}"><img src="{#$QISHI.upfiles_dir#}{#$QISHI.web_logo#}" alt="{#$QISHI.site_name#}" border="0" align="absmiddle" /></a></div>
			<div class="sign_centent">
				<!-- 注册表单 -->
				<div class="sign_left">
					<div class="sign_nav">
						<ul>
							<li><a href="javascript:void(0);" class="select">找回密码</a></li>
							<div class="clear"></div>
						</ul>
					</div>
					{#if $step=="1"#}
					<form id="Form1" name="Form1" method="post" action="?act=get_pass">
					<div class="sign_form">
						<ul>
							<li>
								<div class="w99"><span>*</span>用户名：</div>
								<div class="input_box"><input type="text" name="username" id="username" class="sign_up_input_name" maxlength="25" /></div>
								<div class="item-tip"></div>
								<div class="clear"></div>
							</li>
							<li>
								<div class="w99"><span>*</span>电子邮箱：</div>
								<div class="input_box"><input type="text" name="email" id="email" class="sign_up_input_mail" maxlength="60" /></div>
								<div class="item-tip"></div>
								<div class="clear"></div>
							</li>
							{#if $verify_getpwd=="1"#}
							<li>
								<div class="w99"><span>*</span>验证码：</div>
								<div class="input_box">
									<div id="imgdiv"></div>
									<input  class="sign_up_input_varcode" name="postcaptcha" id="postcaptcha" type="text" value="点击获取验证码" style="color:#999999"/>
								</div>
								<div class="item-tip"></div>
								<div class="clear"></div>
							</li>
							{#/if#}
							<li>
								<div class="w99">&nbsp;</div>
								<div class="input_box">
									<input type="submit" name="Submit" id="Submit" value="提交" class="sign_up_but_sign" /></div>
							</li>
						</ul>
					</div>
					</form>
					{#/if#}
					{#if $step=="2"#}
					<div class="sign_form">
						<ul>
							<li>
								<div class="w99"></div>
								<div class="input_box">
									新密码已经成功发送至您的邮箱：{#$email#}
								</div>
								<div class="item-tip"></div>
								<div class="clear"></div>
							</li>
							<li>
								<div class="w99"></div>
								<div class="input_box">
									<input type="submit" name="Submit" value="立即登录" class="but150cheng" onclick="window.location='{#"QS_login"|qishi_url#}'" />
								</div>
								<div class="item-tip"></div>
								<div class="clear"></div>
							</li>
						</ul>
					</div>
					{#/if#}
				</div>
				<!-- 注册表单 结束 -->

				<div class="sign_right">
					<div class="fast_login" style="border:0;">
						<p class="title">还没有{#$QISHI.site_name#}账号？</p>
						<div><input type="button" value="马上注册" class="sign_up_but_login" onclick="window.location='{#$QISHI.main_domain#}user/user_reg.php'"/></div>
						{#if $QISHI.qq_apiopen=="1" || $QISHI.sina_apiopen=="1"  || $QISHI.taobao_apiopen=="1"#}
						<div class="content_box">
							<p>您也可以使用合作网站账号直接登录：</p>
							<ul>
								{#if $QISHI.qq_apiopen=="1"#}
								<li><a href="{#$QISHI.main_domain#}user/{#if $QISHI.qq_logintype=='1'#}connect_qq_client.php{#else#}connect_qq_server.php{#/if#}"class="qq">QQ</a></li>
								{#/if#}
								{#if $QISHI.sina_apiopen=="1"#}
								<li><a href="{#$QISHI.main_domain#}user/connect_sina.php" class="weibo">weibo</a></li>
								{#/if#}
								{#if $QISHI.taobao_apiopen=="1"#}
								<li><a href="{#$QISHI.main_domain#}user/connect_taobao.php" class="taobao">taobao</a></li>
								{#/if#}
								<div class="clear"></div>
							</ul>
						</div>
						{#/if#}
					</div>
				</div>
				<div class="clear"></div>
				
			</div>
		</div>
	</div>
</body>
</html>