<div class="hint"><h3>修改资料</h3></div>
<form method="post" name="frmedit" id="frmedit">
<input type="hidden" name="action" id="action" value="update" />
<div class="m-sec">
	<div class="sub">邮箱:</div>
	<div class="main main-2">
		<div class="inner">
			<input type="text" name="email" id="email" maxLength="30" value="{?$user.email?}" class="inptxt" />
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub">手机:</div>
	<div class="main main-2">
		<div class="inner">
			<input type="text" name="mobile" id="mobile" maxLength="11" value="{?$user.mobile?}" class="inptxt" />
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub">QQ:</div>
	<div class="main main-2">
		<div class="inner">
			<input type="text" name="qq" id="qq" maxLength="12" value="{?$user.qq?}" class="inptxt" />
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub">MSN:</div>
	<div class="main main-2">
		<div class="inner">
			<input type="text" name="msn" id="msn" maxLength="50" value="{?$user.msn?}" class="inptxt" />
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub">性别:</div>
	<div class="main">
		<div class="inner">
			<p class="inpradio">
				<label><input type="radio" name="gender" value="1"{?if $user.gender == 1?} checked="checked"{?/if?} />&nbsp;男</label>
				<label><input type="radio" name="gender" value="2"{?if $user.gender == 2?} checked="checked"{?/if?} />&nbsp;女</label>
				<label><input type="radio" name="gender" value="0"{?if $user.gender == 0?} checked="checked"{?/if?} />&nbsp;保密</label>
			</p>
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub">简介:</div>
	<div class="main">
		<div class="inner">
			<textarea id="intro" name="intro" class="inptxt txt">{?$user.intro?}</textarea>
			<p class="intro">用简短的话语描述自己，最多输入120字。</p>
		</div>
	</div>
</div>
<div class="m-sec">
	<div class="sub"></div>
	<div class="main">
		<div class="inner">
			<input type="submit" value="提交修改" class="post_submit">
		</div>
	</div>
</div>
</form>
<script type="text/javascript" src="{?$saxue_skin_server?}/lib/formvalidator.js"></script>
<script type="text/javascript" src="{?$saxue_skin_server?}/lib/formvalidatorregex.js"></script>
<script id="postScript" type="text/javascript">
$(function(){
	$.formValidator.initConfig({formid:"frmedit",autotip:true});
	$("#email").formValidator({onshow:"请输入您的邮箱，不超过30个字符",onfocus:"请输入邮箱",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"邮箱不能为空"}).regexValidator({regexp:"email",datatype:"enum",onerror:"邮箱格式错误"});
	$("#mobile").formValidator({onshow:"请输入您的手机",onfocus:"请输入手机",oncorrect:"输入正确",'empty':true}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"手机格式错误"});
	$("#qq").formValidator({onshow:"请输入您的QQ",onfocus:"请输入QQ",oncorrect:"输入正确",'empty':true}).regexValidator({regexp:"^\\d{5,12}$",onerror:"请输入正确QQ格式"});
	$("#msn").formValidator({onshow:"请输入您的MSN",onfocus:"请输入MSN",oncorrect:"输入正确",'empty':true}).regexValidator({regexp:"email",datatype:"enum",onerror:"MSN格式错误"});
	$("#frmedit").ajaxForm({
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				alert(data.msg);
			}else{
				alert('修改资料成功');
				location.href='/member/';
			}
        }
    });
})
</script>