{template 'member', 'header'}
<div id="memberArea">
	{template 'member', 'account_manage_left'}
	<div class="col-auto">
		<div class="col-1 ">
			<h5 class="title">{L('modify').L('email')}/{L('password')}</h5>
			<div class="content">
			<form method="post" action="" id="myform" name="myform">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="80">{L('email')}：</th>        
						<td><input name="info[email]" type="text" id="email" size="30" value="{$memberinfo['email']}" class="input-text"></td>
					</tr>
					<tr>
						<th width="80">{L('old_password')}：</th>        
						<td><input name="info[password]" type="password" id="password" size="30" value="" class="input-text"></td>
					</tr>
					<tr>
						<th>{L('new_password')}：</th>
						<td><input name="info[newpassword]" type="password" id="newpassword" size="30" value="" class="input-text"></td>
					</tr>
					<tr>
						<th>{L('re_input').L('new_password')}：</th>
						<td><input name="info[renewpassword]" type="password" id="renewpassword" size="30" value="" class="input-text"></td>
					</tr>
					<tr>
						<th></th>
						<td><input name="dosubmit" type="submit" id="dosubmit" value="{L('submit')}" class="button"></td>
					</tr>
				</table>

				
			</form>
			</div>
			<span class="o1"></span><span class="o2"></span><span class="o3"></span><span class="o4"></span>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
<!--
$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#password").formValidator({onshow:"{L('input').L('password')}",onfocus:"{L('password').L('between_6_to_20')}"}).inputValidator({min:6,max:20,onerror:"{L('password').L('between_6_to_20')}"});
	$("#newpassword").formValidator({onshow:"{L('input').L('password')}",onfocus:"{L('password').L('between_6_to_20')}"}).inputValidator({min:6,max:20,onerror:"{L('password').L('between_6_to_20')}"}).regexValidator({regexp:"password",datatype:"enum",onerror:"密码只能是数字,字母 和 -_()等字符"});
	$("#renewpassword").formValidator({onshow:"{L('input').L('cofirmpwd')}",onfocus:"{L('input').L('passwords_not_match')}",oncorrect:"{L('passwords_match')}"}).compareValidator({desid:"newpassword",operateor:"=",onerror:"{L('input').L('passwords_not_match')}"});	
	$("#email").formValidator({onshow:"{L('input').L('email')}",onfocus:"{L('email').L('format_incorrect')}",oncorrect:"{L('email').L('format_right')}"}).inputValidator({min:2,max:32,onerror:"{L('email').L('between_2_to_32')}"}).regexValidator({regexp:"email",datatype:"enum",onerror:"{L('email').L('format_incorrect')}"}).ajaxValidator({
	    type : "get",
		url : "",
		data :"m=member&c=index&a=public_checkemail_ajax",
		datatype : "html",
		async:'false',
		success : function(data){	
            if( data == "1" ) {
                return true;
			} else {
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "{L('deny_register').L('or').L('email_already_exist')}",
		onwait : "{L('connecting_please_wait')}"
	}).defaultPassed();
})
//-->
</script>
{template 'member', 'footer'}