<%@ page language="java" contentType="text/html;charset=UTF-8" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="<%=request.getContextPath() %>/js/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="<%=request.getContextPath() %>/js/bootstrap/css/bootstrap-theme.min.css">
    <script type="text/javascript" charset="utf-8" src="<%=request.getContextPath() %>/js/jquery/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="<%=request.getContextPath() %>/js/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="<%=request.getContextPath() %>/js/layer/layer.js"> </script>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/js/jquery-uploadify/css/uploadify.css">
	<script src="<%=request.getContextPath() %>/js/jquery-uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
</head>
<body>
<div class="container-fluid">
<!-- Split button -->
<!-- Single button -->
<div class="col-md-3">
	<div class="btn-group">
	  <button type="button" id="showType" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	   	 用户头像上传 <span class="caret"></span>
	  </button>
	  <ul class="dropdown-menu">
	    <li><a onclick="changeType(0,this.text)">用户头像上传</a></li>
	    <li><a onclick="changeType(1,this.text)">赛事导入</a></li>
	    <li><a onclick="changeType(2,this.text)">添加爱宠信息</a></li>
	    <li><a onclick="changeType(3,this.text)">修改爱宠信息</a></li>
	  </ul>
	</div>
</div>
<div class="col-md-9">
<form id="avator" class="form-inline" style="display:block;" action="<%=request.getContextPath() %>/user/update_avatar.do" method="post" ENCTYPE="multipart/form-data">
	<a class="list-group-item" ><label>token:</label><input type="text" name="token" class="form-control" placeholder="用户token"></a>
	<a class="list-group-item" ><label>file:</label><input type="file" name="file" class="form-control" placeholder="选择文件..."></a>
	<input type="submit" class="btn btn-default" value="提交">
</form>
<form id="matchxls" class="form-inline" style="display:none;" action="<%=request.getContextPath() %>/admin/uploadXls.do" method="post" ENCTYPE="multipart/form-data">
	<a class="list-group-item" ><label>file:</label><input type="file" name="file" class="form-control" placeholder="选择文件..."></a>
	<input type="submit" class="btn btn-default" value="提交">
</form>
<form id="addDog" class="form-inline" style="display:none;" action="<%=request.getContextPath() %>/myDog/addMyLoveDog.do" method="post" ENCTYPE="multipart/form-data">
	<a class="list-group-item" ><label>token:</label><input type="text" name="token" class="form-control" placeholder="用户token"></a>
	<a class="list-group-item" ><label>dog_name:</label><input type="text" name="dog_name" class="form-control" placeholder="dog_name"></a>
	<a class="list-group-item" ><label>pedigree_num:</label><input type="text" name="pedigree_num" class="form-control" placeholder="pedigree_num"></a>
	<a class="list-group-item" ><label>sex:</label><input type="text" name="sex" class="form-control" placeholder="sex"></a>
	<a class="list-group-item" ><label>weight:</label><input type="text" name="weight" class="form-control" placeholder="weight"></a>
	<a class="list-group-item" ><label>dog_birthday:</label><input type="text" name="dog_birthday" class="form-control" placeholder="dog_birthday"></a>
	<a class="list-group-item" ><label>get_home_date:</label><input type="text" name="get_home_date" class="form-control" placeholder="get_home_date"></a>
	<a class="list-group-item" ><label>dogType:</label><input type="text" name="dogType" class="form-control" placeholder="dogType"></a>
	<a class="list-group-item" ><label>typeName:</label><input type="text" name="typeName" class="form-control" placeholder="typeName"></a>
	<a class="list-group-item" ><label>file:</label><input type="file" name="file" class="form-control" placeholder="选择文件..."></a>
	<input type="submit" class="btn btn-default" value="提交">
</form>
<form id="updateDog" class="form-inline" style="display:none;" action="<%=request.getContextPath() %>/myDog/updateMyLoveDog.do" method="post" ENCTYPE="multipart/form-data">
	<a class="list-group-item" ><label>id:</label><input type="text" name="id" class="form-control" placeholder="id"></a>
	<a class="list-group-item" ><label>token:</label><input type="text" name="token" class="form-control" placeholder="用户token"></a>
	<a class="list-group-item" ><label>dog_name:</label><input type="text" name="dog_name" class="form-control" placeholder="dog_name"></a>
	<a class="list-group-item" ><label>pedigree_num:</label><input type="text" name="pedigree_num" class="form-control" placeholder="pedigree_num"></a>
	<a class="list-group-item" ><label>sex:</label><input type="text" name="sex" class="form-control" placeholder="sex"></a>
	<a class="list-group-item" ><label>weight:</label><input type="text" name="weight" class="form-control" placeholder="weight"></a>
	<a class="list-group-item" ><label>dog_birthday:</label><input type="text" name="dog_birthday" class="form-control" placeholder="dog_birthday"></a>
	<a class="list-group-item" ><label>get_home_date:</label><input type="text" name="get_home_date" class="form-control" placeholder="get_home_date"></a>
	<a class="list-group-item" ><label>dogType:</label><input type="text" name="dogType" class="form-control" placeholder="dogType"></a>
	<a class="list-group-item" ><label>typeName:</label><input type="text" name="typeName" class="form-control" placeholder="typeName"></a>
	<a class="list-group-item" ><label>file:</label><input type="file" name="file" class="form-control" placeholder="选择文件..."></a>
	<input type="submit" class="btn btn-default" value="提交">
</form>
</div>
</div>
<script>
function changeType(type,obj){
	if(type==0){
		$("#avator").css("display","block");
		$("#matchxls").css("display","none");
		$("#addDog").css("display","none");
		$("#updateDog").css("display","none");
	}else if(type==1){
		$("#avator").css("display","none");
		$("#matchxls").css("display","block");
		$("#addDog").css("display","none");
		$("#updateDog").css("display","none");
	}else if(type==2){
		$("#avator").css("display","none");
		$("#matchxls").css("display","none");
		$("#addDog").css("display","block");
		$("#updateDog").css("display","none");
	}else {
		$("#avator").css("display","none");
		$("#matchxls").css("display","none");
		$("#addDog").css("display","none");
		$("#updateDog").css("display","block");
	}
	$("#showType").html(obj+"<span class=\"caret\"></span>");
}
</script>
</body>
</html>
