<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<% pageContext.setAttribute("phpurl",request.getScheme()+"://"+request.getServerName()); %>
<script>
/*
function LockF5(){
	if (event.keyCode == 116) {
		event.keyCode = 0;
		return false;
	}	
}
document.onkeydown = LockF5;
*/
//미기입 체크
/*
 
 function validateTest(){
	var receiver = document.getElementById("receiver").value;
	var content = document.getElementById("content").value;
	
	if(receiver==null || receiver == ""){
		alert("수신인을 입력해주세요.");
		return false;
	}
	if(content==null||content==""){
		alert("내용을 입력해주세요.");
		return false;
	}
}*/
</script>
<script src="IDC/js/setToken.js"></script>
<!-- 여기가 본 페이지이다 -->
<div class="row">
	<div class="col-lg-8">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4><i class="fa fa-desktop fa-fw"></i>메세지</h4>
			</div>
			<!-- panel heading -->
			<div class="panel-body">
				<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="row">
						</div>
						<!-- row -->
			   			<div class="table-responsive">
			   			<c:import url="${phpurl}/member_memo_sent.php?name=${member.name }" />		
			   			<!-- 
							<table class="table table-bordered table-hover table-striped">
								<thead>
									<tr>
										<td>글 번호</td>
										<td>글 종류</td>
										<td>수신자</td>			
										<td>글 내용1</td>
										<td>작성시간</td>
										<td>확인 여부</td>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${sendList }" var="dto">
										<tr>				
											<td>${dto.num}</td>
											<td>${dto.temp}</td>
											<td>${dto.receiver}</td>
											<td>${dto.content}</td>
											<td>${dto.write_date} ${dto.write_time}</td>				
											<td>${dto.read_check}</td>
										</tr>
									</c:forEach>
								</tbody>
								<tfoot>
								</tfoot>
							</table>
							 -->
						</div>
						<!-- table-responsive -->
						<div class="input-group">
							<div class="input-group-btn text-center">
								<ul class="pagination">
									<li>
										<a class="btn btn-default btn-outline" href="commentList.cm">
											<i class="fa fa-angle-double-left"></i>
										</a>
									</li>
									<c:forEach var="i" begin="1" end="${pageCnt}">
										<li><a class="btn btn-default btn-outline" href="commentList.cm?curPage=${i}">${i}</a></li>
									</c:forEach>
									<li>
										<a class="btn btn-default btn-outline" href="commentList.cm?curPage=${pageCnt}">
											<i class="fa fa-angle-double-right"></i>
										</a>
									</li>
								</ul>
							</div>
						</div>
						<!-- input-group -->
					</div>
					<!-- panel-body -->
				</div>
				<!-- 1panel panel-default -->
				
				<div class="panel panel-default" id="receive">
					<div class="panel-heading">
						<h4><i class="fa fa-desktop fa-fw"></i> 받은 메세지</h4>
					</div>
					<!-- panel head -->
					<div class="panel-body">
						<div class="table-responsive">
			<c:import url="${phpurl}/member_memo.php?name=${member.name }&page=comment" />						
						<!-- 
							<table class="table table-bordered table-hover table-striped">
								<thead>
									<tr>
										<td>글 번호</td>
										<td>글 종류</td>
										<td>수신자</td>			
										<td>글 내용</td>
										<td>작성시간</td>
										<td>확인 여부</td>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${receivedList}" var="dto">
										<tr>				
											<td>${dto.num}</td>
											<td>${dto.temp}</td>
											<td>${dto.receiver}</td>
											<td>${dto.content}</td>
											<td>${dto.write_date} ${dto.write_time}</td>				
											<td>${dto.read_check}</td>
										</tr>
									</c:forEach>
								</tbody>
								<tfoot>
								</tfoot>
							</table>
							 -->
						</div>
						<!-- table-responsive -->
						<div class="input-group">
							<div class="input-group-btn text-center">
								<ul class="pagination">
									<li>
										<a class="btn btn-default btn-outline" href="commentList.cm">
											<i class="fa fa-angle-double-left"></i>
										</a>
									</li>
									<c:forEach var="i" begin="1" end="${r_pageCnt}">
										<li><a class="btn btn-default btn-outline" href="commentList.cm?r_curPage=${i}">${i}</a></li>
									</c:forEach>
									<li>
										<a class="btn btn-default btn-outline" href="commentList.cm?r_curPage=${pageCnt}">
											<i class="fa fa-angle-double-right"></i>
										</a>
									</li>
								</ul>
							</div>
						</div>
						<!-- pagination div -->
					</div>
					<!-- panel body -->
				</div>
				<!-- 2panel panel-default -->
				
				<!--<form action="writeComment.cm" method="post" onsubmit="return validateTest();">-->
			<form action="${phpurl}/member_memo_up.php" method="post" >
<input type=hidden name=page value="comment">
<input type=hidden name=name value="${member.name }">				
					<input type="hidden" id="token" name="token">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h4><i class="fa fa-desktop fa-fw"></i> 메세지 전송</h4>
						</div>
						<!-- panel head -->
						<div class="panel-body">
							<div class="table-responsive">
								<table class="table table-bordered table-hover table-striped">
										<tr>			
											<td>					
<select id="comment_case" name="comment_case" id="comment_case">
	<option value="0">일반 업무</option>
	<option value="1">긴급</option>						
	<option value="2">지시 사항</option>
	<option value="3">전달 사항</option>
	<option value="4">기타</option>
</select>
<select name="receiver">
    <option value="김용민" selected="selected">-- 수신자선택 --</option>
    <option value="전체" >전체전달</option>
    <option value="송충호" >송충호 부장</option>
    <option value="김효영" >김효영 차장</option>
    <option value="고병남">고병남 과장</option>
    <option value="신인철">신인철 대리</option>
    <option value="김용민">김용민 대리</option>
    <option value="이풍호">이풍호 대리</option>
    <option value="박요한">박요한 대리</option>
    <option value="강부중">강부중 대리</option>
    <option value="김은혁">김은혁 대리</option>
    <option value="김대영">김대영 대리</option>
    <option value="조준희">조준희 대리</option>
    <option value="최진호">최진호 대리</option>
    <option value="김영석">김영석 대리</option>
    <option value="이지승">이지승 주임</option>
    <option value="김동윤">김동윤 주임</option>
    <option value="류축복">류축복 PT왕</option>
    <option value="박소영">박소영 PT</option>
    <option value="이민제">이민제 PT</option>
    <option value="류은총">류은총 PT</option>
    <option value="1팀">1팀 전체(신)</option>
    <option value="2팀">2팀 전체(용)</option>
    <option value="영업">영업팀 전체(고)</option>
    <option value="시스템">시스템팀 전체</option>
    <option value="네트워크">네트워크팀 전체</option>
    <option value="알바">아르바이트 전체</option>    
    <option value="팀장">각 팀장 전체</option>
</select>
<br><font color=white>0</font>
<textarea class="form-control" name="content" id="content"></textarea>
</td>
										</tr>			
								</table>
							</div>
							<!-- table-responsive -->
							<div class="input-group">
								<div class="input-group-btn text-center">
									  <input class="btn btn-primary btn-outline" type="submit" value="전송">
								</div>
							</div>
							<!-- pagination div -->
						</div>
						<!-- panel body -->
					</div>
					<!-- 3panel panel-default -->
				</form>
			</div>
			<!-- panel body -->
		</div>
		<!-- 제일 밖의 패널  -->
	</div>
	<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->
