<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<style type="text/css">
	.hahh{
		color: red;
		font-weight:900;
		font-size:16px;
	}
</style>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/static/h-ui.admin/css/style.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/static/h-ui.admin/css/page.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<script type="text/javascript" src="${pageContext.request.contextPath}/admin/lib/jquery/1.9.1/jquery.js"></script>
<title>Formula Project</title>
<link rel="stylesheet" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
</head>
<body class="pos-r">

<div>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> Home Page </nav>
	<div class="page-container">
		<form action="${pageContext.request.contextPath}/admin/product-list.html" method="post">
			<div class="text-c">
				<input type="hidden" name="uid" value="${bean.typeid}">
				<input type="text" name="name" id="" placeholder="Product Name" style="width:250px" class="input-text">
				<button name=""  class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> Search Products</button>
			</div>
		</form>
		<div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="r data_num">A Total of Data：<strong>${bean.total }</strong> row</span> </div>
		<div class="mt-20">
			<table class="table table-border table-bordered table-bg table-hover table-sort">
				<thead>
					<tr class="text-c">
						<th width="100">ID</th>
						<th width="200">Product Picture</th>
						<th>Product Name</th>
						
						<th width="200">Turnover Time</th>
						<th width="60">Classify</th>
						<th width="100">Operation</th>
					</tr>
				</thead>
				
					<tbody>
					
					
					
						<c:forEach items="${bean.list}" var="p">
							<tr class="text-c va-m">
								<td id="dianId${p.id}">${p.id}</td>
								<td><img width="100" height="60" class="product-thumb" src="${pageContext.request.contextPath}${p.img}"></td>
								<td class="td-status">${p.name}</td>
								<td><span class="price">${p.updatedate }</span></td>
								<td class="td-status">
									<c:forEach items="${bean1}" var="b">
										<c:forEach items="${p.classifyid.split(',') }" var="bb">
											<c:if test="${b.id == bb }">
												<span class="label label-success radius">${b.name}</span>
											</c:if> 
										</c:forEach>
									</c:forEach>
								</td>
								<td class="td-manage"> 
									<a style="text-decoration:none" class="ml-5" onclick="skip(${p.id})"  title="Compile"><i class="Hui-iconfont">&#xe6df;</i></a> 

							</tr>
						</c:forEach>
					</tbody>
			</table>
		</div>

		<div id="PageNum">
			
				<div class="bd points-goods-list">
					<ul class="pages">
						<li><a href="${pageContext.request.contextPath}/admin/product-list.html?pageNumber=1&uid=${bean.typeid}">first page</a></li>
						<c:if test="${bean.pageNumber!=1}">
							<li class="prev"><a href="${pageContext.request.contextPath}/admin/product-list.html?pageNumber=${bean.pageNumber-1}&uid=${bean.typeid}">&lt;&lt;first page</a></li>
						</c:if>
						<c:if test="${bean.pageNumber==1}">
							<li class="haha">&lt;&lt;previous page</li>
						</c:if>
						<c:forEach begin="1" end="${bean.pages}" var="pageNum">
							<c:if test="${pageNum==bean.pageNumber}">
								<li class="active">${pageNum }</li>
							</c:if>
							<c:if test="${pageNum!=bean.pageNumber}">
								<li><a href="${pageContext.request.contextPath}/admin/product-list.html?pageNumber=${pageNum}&uid=${bean.typeid}">${pageNum}</a>
								</li>
							</c:if>
						</c:forEach>				
						<c:if test="${bean.pageNumber==bean.pages||bean.pages==0}">
							<li class="disablepage">next page &gt;&gt;</li>
						</c:if>
						<c:if test="${bean.pageNumber!=bean.pages&&bean.pages!=0}">
							<li class="prev">
								<a href="${pageContext.request.contextPath}/admin/product-list.html?pageNumber=${bean.pageNumber+1}&uid=${bean.typeid}">next page&gt;&gt;</a>
							</li>
						</c:if>
						<li><a href="${pageContext.request.contextPath}/admin/product-list.html?pageNumber=${bean.pages}&uid=${bean.typeid}">last page</a></li>
					</ul>
				</div>
			
		</div>
		

	</div>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script> 

<script type="text/javascript">
	function skip(id){
		window.location.href = "${pageContext.request.contextPath}/admin/updata.html?pid="+id;
	}
	

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