<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
$(function()
{
	if($("#checkUseList").val()!="")
	{
		var a="현재 사용중인 IP가 있어 삭제가 불가능합니다.\r\n";
		$(".useIP").each(function()
		{
			a+=$(this).val()+"\r\n";
		});
		alert(a);
	}
});
</script>
<!-- 여기가 본 페이지이다 -->
<input type="hidden" id="checkUseList" value=${UseList }>
<c:forEach items="${UseList }" var="temp">
	<input type="hidden" class="useIP" value="${temp }">
</c:forEach>
<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4><i class="fa fa-desktop fa-fw"></i>라인 리스트</h4>
			</div>
			<div class="panel-body">
	   			<div class="table-responsive">
	   				<a class="btn btn-outline btn-default" type="button" href="IdcLineListFormExcel.lin">엑셀</a>
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<td>No</td>
								<td>회선명</td>
								<td>회선번호</td>
								<td>회선구분</td>
								<td>고객명</td>
								<td>IP 대역</td>
								<td>개통일</td>
								<td>해약일</td>
								<td>연락처</td>
								<td>ID</td>
								<td>Password</td>
							</tr>
						</thead>
						<tbody>
								<c:forEach items="${IdcLineDB }" var="temp" varStatus="i">
									<tr>
										<td>${temp.num }</td>
										<td><a href="IdcLineModifyForm.lin?lineNum=${temp.line_num }">${temp.line_name }</a></td>
										<td>${temp.line_code }</td>
										<td>${temp.line_case }</td>
										<td>${temp.line_client_name }</td>
										<td><a href="IdcIPListForm.lin?lineNum=${temp.line_num }">${temp.line_haveip }</a></td>
										<td>${temp.line_user_allocatingday }</td>
										<td>${temp.line_user_endday }</td>
										<td>${temp.line_phone }</td>
										<td>${temp.line_id }</td>
										<td>${temp.line_pass }</td>
									</tr>
								</c:forEach>
						</tbody>
						<tfoot>
						</tfoot>
					</table>
				</div>
				<!-- table-responsive -->
				<div>
					<ul class="pagination" style="margin:0px;">
						<li>
							<a class="btn btn-outline btn-default" href="IdcLineListForm.lin?curPage=1">
								<i class="fa fa-angle-double-left "></i>
							</a>
						</li>
					<c:forEach var="i" begin="1" end="${pageCnt }">
						<li>
							<a class="btn btn-outline btn-defualt" href="IdcLineListForm.lin?curPage=${i }">${i}</a>	
						</li>
					</c:forEach>
						<li>
							<a class="btn btn-outline btn-default" href="IdcLineListForm.lin?curPage=${pageCnt}">
								<i class="fa fa-angle-double-right "></i>
							</a>
						</li>
					</ul>
					<!-- ul -->
				</div>
				<!-- UL DIV -->
			</div>
			<!-- panel-body -->
		</div>
		<!-- panel panel-default -->
	</div>
	<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->
