<form id="formAdd" method="post">
<input type="hidden" name="dosubmit" value="1">
<input type="hidden" name="action" value="update">
<input type="hidden" name="uid" value="{?$row.uid?}">
<table width="100%" class="grid">
	<tr>
		<td class="tdleft" width="100">用户名：</td>
		<td><input type="text" class="text" name="uname" id="uname" size="20" maxlength="20" value="{?$row.uname?}" /></td>
	</tr>
	<tr>
		<td class="tdleft">Email：</td>
		<td><input type="text" class="text" name="email" id="email" size="20" maxlength="30" value="{?$row.email?}" /></td>
	</tr>
	<tr>
		<td class="tdleft">密码：</td>
		<td><input type="password" class="text" name="pass" id="pass" size="20" value="" autocomplete="off" /></td>
	</tr>
	<tr>
		<td class="tdleft">确认密码：</td>
		<td><input type="password" class="text" name="repass" id="repass" size="20" value="" /></td>
	</tr>
</table>
<div><input type="submit" name="submit" id="submit" class="button dodialog" value="提 交"/></div>
</form>
<script type="text/javascript">
$(function(){
	$.formValidator.initConfig({formid:"formAdd",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'250',height:'50'}, function(){this.close();$(obj).focus();})}});
	$("#uname").formValidator({onshow:"请输入用户名",onfocus:"请输入用户名",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"用户名不能为空"}).regexValidator({regexp:"ps_username",datatype:"enum",param:'i',onerror:"只能包括中文、数字、字母、下划线类型。"});
	$("#email").formValidator({onshow:"请输入邮箱",onfocus:"请输入邮箱",oncorrect:"请输入邮箱"}).inputValidator({min:1,onerror:"邮箱不能为空"}).regexValidator({regexp:"email",datatype:"enum",param:'i',onerror:"邮箱格式错误"});
	$("#pass").formValidator({empty:true,onshow:"不修改密码请留空",onfocus:"请输入密码",oncorrect:"输入正确"}).inputValidator({min:1,onerror:"请输入密码"});
	$("#repass").formValidator({onshow:"不修改密码请留空",onfocus:"两次密码输入不同",oncorrect:"密码输入一致"}).compareValidator({desid:"pass",operateor:"=",onerror:"两次密码输入不同"});
	$("#formAdd").ajaxForm({
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				doTip(data.msg);
			}else{
				window.top.mainframe.location.reload();
				doDialogClose();
			}
        }
    });
})
</script>