<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico">
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/skin/default/skin.css" rel="stylesheet" type="text/css" id="skin" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/style.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>消息列表</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> <span class="c-gray en">&gt;</span> 用户列表 <a
			class="btn btn-success radius r mr-20"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新"><i
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20">
	<form action="${pageContext.request.contextPath }/secure/message/listuser" method="post">
		
			<input name="username" id="username" value="${username }" placeholder="用户名称" style="width: 300px" class="input-text" type="text">
			
			<button name="" id="submitBtn" onclick="return dataCheck();" class="btn btn-success" type="submit">
				<i class="Hui-iconfont"></i> 搜索
			</button>
		</form>
	<form id="userlist" >
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l"><a href="javascript:;"onclick="datadel();"class="btn btn-danger radius">确认选择</a>&nbsp;
		    </span>
		 
		</div>
		<table class="table table-border table-bordered table-bg" id="example">
			<thead>
				<tr>
					<th scope="col" colspan="11">用户列表</th>
				</tr>
				<tr class="text-c">
						<th width="25"></th>
					<th width="150">用户姓名</th>
					<th width="100">昵称</th>
					<th width="130">头像</th>
					<th width="150">创建时间</th>
					<th width="100">来源</th>
					<th width="100">地址</th>
				</tr>
			</thead>
			<tbody>
					<c:if test="${!(empty memberList) }">
					<c:forEach items="${memberList }" var="user">
						<tr class="text-c">
							
							<td><input type="radio" value="${user.id }_${user.username }" name="userId"></td>
							<td>${user.username }</td>
							<td>${user.display_name }</td>
							<td>
								<img alt="用户头像" src="${user.display_picture }" style="width:50px;height: 50px">
							</td>
							<td><fmt:formatDate value="${user.created_on }" pattern="YYYY-MM-dd HH:MM:ss"/></td>
							<td>${user.ext_type }</td>
							<td>${user.location }</td>
							
							
					</tr>
					</c:forEach>
				</c:if>
				<c:if test="${empty memberList }">
					<tr class="text-c">
						<td colspan="11">没有查询到数据</td>
					</tr>
				</c:if>
			</tbody>
		</table>
		<div align="right" class="mt-10 mb-10 mr-10">
			<%@include file="/common/other/paper/pager.jsp"%>
  		</div>
  		</form>
	</div>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/My97DatePicker/WdatePicker.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
	<script type="text/javascript">
		
	/*用户选择*/
	  function datadel(){
		  var choseId = $("#userlist").serialize().replace(/userId=/gm,"");
		  
		  var arr1 = choseId.split("_");
		  
		 window.opener.document.getElementById('user').value=arr1[0];
		 window.opener.document.getElementById('username').value=arr1[1];
		 
		  window.close();
		}

</script>
</body>
</html>