<form class="form" name="frmedit" id="frmedit" method="post">
	<input type="hidden" name="action" id="action" value="update" />
    <fieldset>
        <div class="frow">
            <label class="col4 flabel">邮箱：</label>
            <div class="col8 last">
				<input type="text" class="text" name="email" id="email" maxlength="30" style="width:160px" value="{?$user.email?}" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">手机：</label>
            <div class="col8 last">
				<input type="text" class="text" name="mobile" id="mobile" maxlength="11" style="width:160px" value="{?$user.mobile?}" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">QQ：</label>
            <div class="col8 last">
				<input type="text" class="text" name="qq" id="qq" maxlength="12" style="width:160px" value="{?$user.qq?}" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">MSN：</label>
            <div class="col8 last">
				<input type="text" class="text" name="msn" id="msn" maxlength="50" style="width:160px" value="{?$user.msn?}" />
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">性别：</label>
            <div class="col8 last">
				<label class="radio"><input type="radio" name="gender" value="1"{?if $user.gender == 1?} checked="checked"{?/if?} />&nbsp;男</label>
				<label class="radio"><input type="radio" name="gender" value="2"{?if $user.gender == 2?} checked="checked"{?/if?} />&nbsp;女</label>
				<label class="radio"><input type="radio" name="gender" value="0"{?if $user.gender == 0?} checked="checked"{?/if?} />&nbsp;保密</label>
            </div>
        </div>
        <div class="frow">
            <label class="col4 flabel">简介：</label>
            <div class="col8 last">
				<textarea class="textarea" name="intro" rows="5" style="width:160px">{?$user.intro?}</textarea>
            </div>
        </div>
		<div class="frow">
			<button type="button" class="btn btn-primary btn-large" id="clksave" name="submit">保　存</button>
		</div>
    </fieldset>
</form>
<script>
$(function(){
	var dosave = false;
	$("#clksave").tap(function () {
		if(dosave) return;
		dosave = true;
		$.post('useredit.php', $('#frmedit').serialize(), function(res){
			if(res.flag==0) {
				dosave = false;
				popTip(res.msg);
			} else {
				popTip('修改资料成功');
				setTimeout(function(){window.location.href='/member/'}, 1000);
			}
		}, 'json')
    })
})
</script>