<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="${comm}/js/jquery.js"></script>
<script src="/${skin}/js/com.js"></script>
<title>Insert title here</title>
</head>
<script language="javascript">
function ajaxlogin(){
	$.post("${base}/ajaxlogin.jsp",{
		username : $("#username").val(),
		password:$("#password").val()
	},function(data){
		if(data.success){
			$("#login").html("用户名："+data.username+"用户组："+data.groupname"+"头像<img src='${base}"+data.avatar+"'/>"+"<a href='${base}/logout.jsp?nextUrl=${url!?html}'>退出</a>");
		}else{
			if(data.status==-1){
				$("#msg").html("该账号被禁用！");
			}else{
				$("#msg").html("用户名或密码错误！");
			}
		}
	},"json");
}
</script>
<body>
<div id="login">
<span id="msg"></span>
<form name="ajaxForm" id="ajaxForm">
<input type="text" name="username" id="username"/>
<input type="password" name="password" id="password"/>
<input type="button" value="提交" onclick="ajaxlogin();"/>
</form>
</div>
</body>
</html>